Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

JSP 500 Errors

Thread view: 
Nancy.Nicole@gmail.com - 03 Sep 2006 22:46 GMT
I apologize in advance if my question is easily answered (I've never
used JSP before). However, I've tried to fix this problem for days and
nothing I do seems to work. Please help if you can. Before you ask, I
have the jar file in both the WEB-INF\classes and \javalib directories.
Also, they are in a subfolder (my useBean id). I've tried to research
this but can't find an answer that seems to work.
Here's the error:

exception

org.apache.jasper.JasperException: Unable to load class for JSP
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

org.apache.jasper.JasperException: Unable to load class for JSP
    org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.ClassNotFoundException: org.apache.jsp.test2_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:133)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
    org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Thanks sooo much to anyone who can help!
-Nancy
Arne Vajhøj - 04 Sep 2006 01:29 GMT
> I apologize in advance if my question is easily answered (I've never
> used JSP before). However, I've tried to fix this problem for days and
> nothing I do seems to work. Please help if you can. Before you ask, I
> have the jar file in both the WEB-INF\classes and \javalib directories.
> Also, they are in a subfolder (my useBean id). I've tried to research
> this but can't find an answer that seems to work.

I do not know if it is the cause of your problem, but jar files
should be in WEB-INF\lib !

If fixing that does not solve the problem, then you need
to post more info like code snippet and an overview of
files and directories.

Arne
Nancy.Nicole@gmail.com - 05 Sep 2006 16:34 GMT
Thank you for your response :) . This is my first time working with JAR
files. Is the *.jar file the only file that needs to go in the
WEB-INF\lib folder? The classes go in the WEB-INF\classes folder,
correct?

Thanks,
Nancy

> > I apologize in advance if my question is easily answered (I've never
> > used JSP before). However, I've tried to fix this problem for days and
[quoted text clipped - 11 lines]
>
> Arne
Arne Vajhøj - 05 Sep 2006 17:23 GMT
> Thank you for your response :) . This is my first time working with JAR
> files. Is the *.jar file the only file that needs to go in the
> WEB-INF\lib folder? The classes go in the WEB-INF\classes folder,
> correct?

class files goes on WEB-INF\classes\xxxx where xxxx
is the package of the classes.

Arne
Nancy.Nicole@gmail.com - 05 Sep 2006 17:32 GMT
Should the package be named the same as my jar file or does that
matter?

> > Thank you for your response :) . This is my first time working with JAR
> > files. Is the *.jar file the only file that needs to go in the
[quoted text clipped - 5 lines]
>
> Arne
Andrew Thompson - 05 Sep 2006 17:50 GMT
Please refrain from top-posting.  It is very confusing.

> Should the package be named the same as my jar file or does that
> matter?

A Jar file might contain classes from many packages.
The name of the Jar is not connected with the name
of the package(s) it contains (though ideally, the Jar
name should be as 'meaningful' to the classes it contains).

Andrew T.
Nancy.Nicole@gmail.com - 05 Sep 2006 17:53 GMT


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.