struts 2.0非常奇怪的问题,大家帮我分析分析
为什么我一用到这个标签就出错
s:property value= "message "/>
源码:
<%@ page contentType= "text/html; charset=UTF-8 " %>
<%@ taglib prefix= "s " uri= "/struts-tags " %>
<html>
<head>
<title> Sign On </title>
</head>
<body>
<s:property value= "message "/>
<form name= "classForm " method= "post " action= "NewCategory.page ">
<table width= "90% " border= "0 " cellspacing= "1 " cellpadding= "1 ">
<tr>
<td align= "right " width= "35% "> 图书分类名称: </td>
<td width= "65% ">
<input type= "text " name= "categoryName " maxlength= "40 " size= "30 ">
</td>
</tr>
<tr>
<td align= "right " width= "35% "> </td>
<td width= "65% ">
<input type= "submit " name= "Submit " value= "提交 ">
<input type= "reset " name= "reset " value= "重置 ">
</td>
</tr>
</table>
</form>
</body>
</html>
错误信息如下
HTTP Status 500 -
--------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /manage/AddCategory.jsp at line 9
6: </head>
7:
8: <body>
9: <s:property value= "message "/>
10: <form name= "classForm " method= "post " action= "NewCategory.page ">
11: <table width= "90% " border= "0 " cellspacing= "1 " cellpadding= "1 ">
12: <tr>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:426)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NullPointerException
org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:54)
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
org.apache.jsp.manage.AddCategory_jsp._jspx_meth_s_005fproperty_005f0(AddCategory_jsp.java:109)
org.apache.jsp.manage.AddCategory_jsp._jspService(AddCategory_jsp.java:65)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs.
--------------------------------------------
Apache Tomcat/6.0.10
[解决办法]
java.lang.NullPointerException
null值
查找下吧
[解决办法]
看看你自定义的Tag
[解决办法]
应该是你没导入那个包的问题~
[解决办法]
up
我也遇到这种问题了,有结果了说一下了,,,,,
[解决办法]
kuang ding
[解决办法]
把 <%@ taglib prefix= "s " uri= "/struts-tags " %> 改成
<%@ taglib prefix= "s " uri= "/WEB-INF/struts-tags.tld " %> ,然后把web.xml里的声明删掉试试!
[解决办法]
对应的action代码贴出来看看
我的异常网推荐解决方案:An exception occurred processing JSP page,http://www.myexception.cn/j2se/33144.html
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html