URL参数传递
java中
http://localhost:8080/myStruts2.0/login.jsp?username=admin&password=admin&sex=男
如何将接受usermane的值和password的值
[解决办法]
request 对象中的 getParameter(“传递的变量名”)
来获取参数值。
[解决办法]
request.getParameter("对象名");
不建议中文
[解决办法]
这样传 用户名和密码全曝光了 还是用POST吧
[解决办法]
action类里直接定义commandID,username,password,mobile,content属性,设置get set方法,直接就能获取这些值了
[解决办法]
struts1.3用过 struts2未进行深入了解
[解决办法]
request.getParameter("username");
request.getParameter("password");