<bean:define id="tmp">
<bean:write name="bean" property="">或者<%=exception%>
</bean:define>
<html:form action="oxAction.do?forumID=<%=tmp%>" >
<bean:write name="bean" property="">或者<%=exception%>
</bean:define>
<html:form action="oxAction.do?forumID=<%=tmp%>" >
解决方案 »
- 求IdentityHashMap顺序的问题,非常急!
- Spring 配置过程中的异常
- struts2.0.x支持action注解吗?
- spring+hibernate3+osworkflow整合问题
- 如何让index.jsp页面在第一次加载的时候就从数据库读数据
- 关于struts怎么运用到session.setAttribute()中
- struts路径的问题
- 关于Struts配置的问题(出现Servlet action is not available错误)
- 小弟也想和大侠换c#程序学习
- 一个发布信息问题
- 请问这是什么错误,有人知道么
- 100分求救!!!mysql中文处理问题,我快晕死了!!只要能解决分值可再加
刚学js,就特想用
用多了还是觉得简单好
这就是最简单的
用<html:form 时action里面嵌入<%%>代码就报错,或者不被struts识别
<%
String tmp=(String)request.getAttribute("tmp");
%><html:form action="oxAction.do?forumID=<%=tmp%>" >
<bean:define id="tmp">
<bean:write name="bean" property="">
</bean:define>
<html:form action="oxAction.do?forumID={$tmp}" >
写一个函数,在form的onsubmit事件中调用
这个函数可以指定form的action,在页面上放一个隐藏得input,写入你的forumId的值,然后再javascript中读取就可以了
<html: 的任何标签不支持在其中加入<%%>或者<bean:write 为了避免这个问题,只有用hidden input或者<form 再或者 用js onsubmit() 再window.location="" 了,谢谢大家的技术支持
将原来的form action="xxx.do?a=x&b=y"变为<form action="xxx.do">
<input type="hidden" name="a" value="x">
<input type="hidden" name="b" value="y">
用EL 也可以