org.apache.jasper.JasperException: Unable to compile class for JSPGenerated servlet error:
The method _jspx_meth_s_submit_0(JspTag, PageContext) in the type index_jsp is not applicable for the arguments (FormTag, PageContext)
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810
private boolean _jspx_meth_s_submit_0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_form_0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// s:submit
org.apache.struts2.views.jsp.ui.SubmitTag _jspx_th_s_submit_0 = (org.apache.struts2.views.jsp.ui.SubmitTag) _jspx_tagPool_s_submit_value_nobody.get(org.apache.struts2.views.jsp.ui.SubmitTag.class);
_jspx_th_s_submit_0.setPageContext(_jspx_page_context);
_jspx_th_s_submit_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_form_0);
_jspx_th_s_submit_0.setValue("submit");
int _jspx_eval_s_submit_0 = _jspx_th_s_submit_0.doStartTag();
if (_jspx_th_s_submit_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return true;
_jspx_tagPool_s_submit_value_nobody.reuse(_jspx_th_s_submit_0);
return false;
}
环境:
jdk1.6jboss-4.0.3SP1现在一加入struts2的标签就有上面的问题
The method _jspx_meth_s_submit_0(JspTag, PageContext) in the type index_jsp is not applicable for the arguments (FormTag, PageContext)
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810
private boolean _jspx_meth_s_submit_0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_form_0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// s:submit
org.apache.struts2.views.jsp.ui.SubmitTag _jspx_th_s_submit_0 = (org.apache.struts2.views.jsp.ui.SubmitTag) _jspx_tagPool_s_submit_value_nobody.get(org.apache.struts2.views.jsp.ui.SubmitTag.class);
_jspx_th_s_submit_0.setPageContext(_jspx_page_context);
_jspx_th_s_submit_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_form_0);
_jspx_th_s_submit_0.setValue("submit");
int _jspx_eval_s_submit_0 = _jspx_th_s_submit_0.doStartTag();
if (_jspx_th_s_submit_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return true;
_jspx_tagPool_s_submit_value_nobody.reuse(_jspx_th_s_submit_0);
return false;
}
环境:
jdk1.6jboss-4.0.3SP1现在一加入struts2的标签就有上面的问题
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri = "/struts-tags" %><html>
<head>
<title>My JSP 'index.jsp' starting page</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<s:form action="/testAction_getList.action" method="post">
<s:submit value="submit" />
</s:form>
</body>
</html>
<body>
</body>
</html>
不用标签跳下看报错不
我从action跳到这个页面的!
<s:form action="/testAction_getList.action" method="post">加个name属性吧
你版本多少 是不是不支持<s:submit value="submit" />;用html标签把struts2.1.6 我也不是非想用这个,因为公司以前项目用的这个,我需要做修改 现在页面都出不来 所以我做了个简单的例子,看看怎么回事,结果也是这样的! 迷糊了!
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
版本:jboss-4.0.3SP1版本:apache-tomcat-6.0.13
既然tomcat下可以运行,那你对比下jboss下tomcat用的包是否和你直接在tomcat下用的包相同.比如servlet包及其相应的依赖包
jboss-4.0.3SP1\server\default\deploy\jbossweb-tomcat55.sar\META-INF这个下面有两个属性<attribute name="Java2ClassLoadingCompliance">true</attribute>
<attribute name="UseJBossWebLoader">true</attribute>
默认的是false 我设置成true了 用的是jboss的classloder 找不到struts2的标签库。设置成false就可以了。