<s:form action="<%=request.getContextPath()%>/test/list.action"></s:form>
上面这个报错:
index.jsp(42,23) attribute for %>" is not properly terminated
但是下面这个没错,为什么啊,郁闷
<form action="<%=request.getContextPath()%>/control/method/list.action">
web.xml配置 <filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
上面这个报错:
index.jsp(42,23) attribute for %>" is not properly terminated
但是下面这个没错,为什么啊,郁闷
<form action="<%=request.getContextPath()%>/control/method/list.action">
web.xml配置 <filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
解决方案 »
- maven+spring3+hibernate3+sturts2启动tomcat报java.lang.IncompatibleClassChangeError
- 请求servlet出错,疯掉了啊
- 关于页面直接传值的问题
- 请问如何把LIST的数据传到IFRAME里
- 名字为什么不显示?
- 救命!不知道为什么!jsp配置老是失败!谢谢了
- 初学。在linux下可以用什么来开发webservices?web客户端用什么开发?
- j2ee中与中间件实现相关的技术有哪些??
- hibernate 提示:could not instantiate CacheProvider 是什么意思?
- 后MVC时代?!
- Hibernate自动创建表
- openmica开源的MVC??有谁用过,介绍一下,
应不是这问题 你把代码全帖出来看看
当前页面是不需要request.getContextPath;因为request.getContextPath返回的就是这个页面的相对根目录。struts标签中不可以嵌套jsp表达式,只接受 ${}或是%{}形式的表达式;要在struts标签中访问request\session,可以使用 <s:property value="#request"/>\<s:property value="#session"/>
例如 你现在是test/list.action 那么 你可以直接写
<s:form action="list" namespace="/test">这样!