This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes JSP Error when Struts simple login example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JSP Error when Struts simple login example" Watch "JSP Error when Struts simple login example" New topic
Author

JSP Error when Struts simple login example

Asmita Attharkar
Greenhorn

Joined: Nov 07, 2003
Posts: 2
Hi All
I am trying to execute the example mentioned in the following :
http://www.javaranch.com/newsletter/Mar2002/struts.html
However I am using
Tomcat 5.0.18
Struts 1.1
The example mentioned in the above link however had some problems like the struts.tld does not exist anymore in the Struts 1.1 distribution, which the LoginView.jsp and MainMenu.jsp were using.So I removed the line that refered to struts.tld in the beginning of the jsp files.
Also it was referencing some of the classes which were not there in classpath.
I included following files in the struts/WEB-INF/lib directory of the development folder.
1.commons-logging.jar
2.jsp-api.jar
3.servlet-api.jar
struts.jar was placed as per the instructions in the link.
I am a new programmer in struts.Also I have learnt how to write a JSP recently.
I am trying out the example mentioned for the Struts beginners.But it always gives the following exception :
javax.servlet.ServletException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.jsp.LoginView_jsp._jspService(LoginView_jsp.java:103)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause
java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:140)
org.apache.jsp.jsp.LoginView_jsp.class$(LoginView_jsp.java:114)
org.apache.jsp.jsp.LoginView_jsp._jspx_meth_html_errors_0(LoginView_jsp.java:114)
org.apache.jsp.jsp.LoginView_jsp._jspService(LoginView_jsp.java:89)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Please Help,I have been struggling with for long now.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Moving to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Don't get me started about those stupid light bulbs.
 
subject: JSP Error when Struts simple login example