求解!!aspx表单如何POST提交数据转到JSP页面???

我需要从1个aspx的表单中POST提交请求到一个JSP页面,从而从.net的一个应用系统转入到JSP的应用系统。
不知道aspx的这个表单该怎么写?

aspx中的表单,我是这样写的:
<form id="form1" action="http://192.168.0.191:8080/jjoa/OaLogin.jsp" method="POST" >
<input type="text" id="username" value="1000" />
<input type="text" id="password" value="123456" />
<input type="submit" value="OK" />
</form>

JSP页面代码大概是这样的:
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
%>
......
<body>
<%=username%> 和 <%=password%>
</body>
......

按这样写提交过去,虽然转到了JSP页,
但参数输出结果是“null 和 null”,证明数据没有传递成功。

求高手解答!指教!

<input type="text" id="username" value="1000" />
<input type="text" id="password" value="123456" />

id换成name试试
<input type="text" name="password" value="123456" />
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-09-02
没看出有什么问题!应该可以传过去啊!