<%@ page contentType="text/html" pageEncoding="GBK"%>
<html>
<head><title>login</title></head>
<body>
<form action="welcome.jsp" method="post">
用户名:<input type="text" name="uname" value="show"/><br />
密  码:<input type="text" name="pass"/><br />
<input type="submit" value="提交"/><input type="reset" value="重置"/><br />
</form>
<%=request.getParameter("uname")%>
</body>
</html>

解决方案 »

  1.   

    因为你跳转到这个页面之前没有setParameter("uname")
      

  2.   

    没提交 上welcome.jsp这个页面取下值 
    如果你现在代码就是welcome.jsp这个页面。那你可以 不用取了
      

  3.   

    给form添加id,然后用jquery把这个form提交了,比如$('#myform').submit()
      

  4.   


    用JQUery的话,就$("input[name='uname']").val();
    不是Jquery就用document.getElementByName("");取.value
      

  5.   

    request.getParamter("");这个是获取表单输入数据的,但是你得表单都还没有提交如何获取呢,但是如果该页面本来就是welcome.jsp的话,是可以获取的到的,祝lz好运!!!!