关于程序运行出错,大家可能觉得我说的不详细.
其实我就建立一个tomcat项目,添加struts支持,然后就增加了一个struts JSP File,名字为newfile.jsp.代码如下:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-nested" prefix="nested" %><html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
<title></title>
</head>
<body>
ddddddddddddddddd
</body>
</html:html>
其他啥代码都没写啊,运行就出以下错误HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPGenerated servlet error:
E:\Java\eclipse\workspace\kkkk\work\org\apache\jsp\newfile_jsp.java:7: cannot access java.lang.Object
Generated servlet error:
bad class file: C:\Program Files\Java\jre1.5.0_05\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public final class newfile_jsp extends org.apache.jasper.runtime.HttpJspBas
^
1 error希望各位大侠指点.谢谢
其实我就建立一个tomcat项目,添加struts支持,然后就增加了一个struts JSP File,名字为newfile.jsp.代码如下:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-nested" prefix="nested" %><html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
<title></title>
</head>
<body>
ddddddddddddddddd
</body>
</html:html>
其他啥代码都没写啊,运行就出以下错误HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPGenerated servlet error:
E:\Java\eclipse\workspace\kkkk\work\org\apache\jsp\newfile_jsp.java:7: cannot access java.lang.Object
Generated servlet error:
bad class file: C:\Program Files\Java\jre1.5.0_05\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public final class newfile_jsp extends org.apache.jasper.runtime.HttpJspBas
^
1 error希望各位大侠指点.谢谢
最近想学习学习java
报的错误也一样
就弄页面跳转就研究了一天了,死活出不来
就像这种:
<action path="/aFullAction"
type="somePackage.someActionClass">
name="someForm"
input="someJSP.jsp"
<forward name="successful" path="someJSP.jsp"/>
<forward name="failed" path="someOtherJSP.jsp"/>
</action>
按照你的写法,应该是写成
<taglib>
<taglib-uri>="/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/lib/taglib/struts-bean.tld</taglib-location>
</taglib>
其中<taglib-location></taglib-location>值是你的tld文件所在的物理位置,另外三个配置也要写上去。这样应该没问题了(当然你的action和actionform和struts-config.xml也要配置正确)