Featured post
java - Unable to load class for JSP -
exception stack trace
org.apache.jasper.jasperexception: unable load class jsp org.apache.jasper.jspcompilationcontext.load(jspcompilationcontext.java:599) org.apache.jasper.servlet.jspservletwrapper.getservlet(jspservletwrapper.java:143) org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:321) org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:308) org.apache.jasper.servlet.jspservlet.service(jspservlet.java:259) javax.servlet.http.httpservlet.service(httpservlet.java:729) java.lang.classnotfoundexception: org.apache.jsp.redirect_jsp java.net.urlclassloader$1.run(unknown source) java.security.accesscontroller.doprivileged(native method) java.net.urlclassloader.findclass(unknown source) org.apache.jasper.servlet.jasperloader.loadclass(jasperloader.java:131) org.apache.jasper.servlet.jasperloader.loadclass(jasperloader.java:63) org.apache.jasper.jspcompilationcontext.load(jspcompilationcontext.java:597) org.apache.jasper.servlet.jspservletwrapper.getservlet(jspservletwrapper.java:143) org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:321) org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:308) org.apache.jasper.servlet.jspservlet.service(jspservlet.java:259) javax.servlet.http.httpservlet.service(httpservlet.java:729)
my redirect.jsp file contents
<%@page contenttype="text/html" pageencoding="utf-8"%> <% response.sendredirect("user/list.htm"); %>
under covers of servletcontainer, jsp's compiled java classes before executed.
the exception
java.lang.classnotfoundexception: org.apache.jsp.redirect_jsp
means redirect.jsp
file in root of webcontent folder failed compile in turn means contains raw java code in scriptlets <% %>
contains syntax errors. need fix syntax errors servletcontainer can compile jsp files. general concensus scriptlets poor practice. should consider if java code doesn't better belong in fullworthy java class, controlled servlet
or filter
.
another possible cause work cache of servletcontainer messed up. can happen when developing poor ide plugin. you'd clean work cache. in example eclipse, can rightclick server , choosing clean. otherwise has done manually deleting in work cache of servletcontainer in question. in case of example tomcat, that's in side /work
folder.
- Get link
- X
- Other Apps
Comments
Post a Comment