当前位置: 代码迷 >> Java Web开发 >> 刚学的struts,这.jsp文件总运行不起来!很郁闷!高手快帮小弟我看看
  详细解决方案

刚学的struts,这.jsp文件总运行不起来!很郁闷!高手快帮小弟我看看

热度:690   发布时间:2016-04-17 13:39:17.0
刚学的struts,这.jsp文件总运行不起来!很郁闷!高手快帮我看看
我用的是MyEclipse,原文件如下(Register.jsp):
<%@   page   language= "java "   import= "java.util.* "   pageEncoding= "gbk "%>
<%@   taglib   uri= "WEB-INF/struts-html.tld "   prefix= "html "%>
<%
String   path   =   request.getContextPath();
String   basePath   =   request.getScheme()+ ":// "+request.getServerName()+ ": "+request.getServerPort()+path+ "/ ";
%>

<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN ">
<html>
    <head>
        <base   href= " <%=basePath%> ">
       
        <title> My   JSP   'index.jsp '   starting   page </title>
<meta   http-equiv= "pragma "   content= "no-cache ">
<meta   http-equiv= "cache-control "   content= "no-cache ">
<meta   http-equiv= "expires "   content= "0 ">        
<meta   http-equiv= "keywords "   content= "keyword1,keyword2,keyword3 ">
<meta   http-equiv= "description "   content= "This   is   my   page ">
<!--
<link   rel= "stylesheet "   type= "text/css "   href= "styles.css ">
-->
    </head>
   
    <body>  
      <html:form   action= "Registor.do ">  
      rUsername <html:form   type= "text "   property= "username "/> <br>
      enter   password <html:form   type= "password "   property= "password1 "/> <br>
      re-enter   password <html:form   type= "password "   property= "password1 "/> <br>
      <html:form   type= "submit "   value= "Register "/>
    </body>
</html:form>

显示的错误是:
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:   Unable   to   load   class   for   JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:599)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:141)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root   cause  

java.lang.ClassNotFoundException:   org.apache.jsp.Register_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native   Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  相关解决方案