user:
<form action="print.do">
<bean:write name="ld" property="user" scope="request" ignore="true"/>
<input type="hidden" name="user" value="<bean:write name="ld" property="user" scope="request" ignore="true"/>">
<br>
password:
<bean:write name="ld" property="pwd" scope="request" ignore="true"/>
<input type="hidden" name="pwd" value="<bean:write name="ld" property="pwd" scope="request" ignore="true"/>">
<input type="submit" value="印刷"/>
</form>
提交后在action里取:
String uesr=request.getParameter("user");
String pwd=request.getParameter("pwd");
<form action="print.do">
<bean:write name="ld" property="user" scope="request" ignore="true"/>
<input type="hidden" name="user" value="<bean:write name="ld" property="user" scope="request" ignore="true"/>">
<br>
password:
<bean:write name="ld" property="pwd" scope="request" ignore="true"/>
<input type="hidden" name="pwd" value="<bean:write name="ld" property="pwd" scope="request" ignore="true"/>">
<input type="submit" value="印刷"/>
</form>
提交后在action里取:
String uesr=request.getParameter("user");
String pwd=request.getParameter("pwd");
解决方案 »
- 求教一个ftp的正则
- 谁懂程序修改,我需要人帮助
- Source not found for StandardContext.start() line: 4151
- 请问怎么查看连接(jdbc)个数和占用的资源情况
- Hibernate插入数据出错??求助
- 为什么struts中CheckBox的值会自动改变
- 为什么微软的mssql jdbc驱动不支持 java.sql.Types.OTHER! 请问哪里有支持的驱动?
- strut 调用ejb 问题,有没有高手见过这个问题?望指导
- 急啊,来看看我的贴子吧
- 数据入队速度大于出队速度导致数据积压在队列中的问题
- 奇怪,web.xml里放多个struts-config.xml的问题:把多个struts-config用','放一起没有问题,如果用分开就只载入一个struts-c
- struts中上传图片
<html:hidden property="user" value="?"/>
可是要在 value 中写什么呢?才能用String uesr=request.getParameter("user");在action中得到user
也就是说你的web.xml里的头是:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
那么可以使用:
<html:hidden property="user" value="${ld.user}"/>
今天争取剩到大猩猩★
还差300不到