aspose file tools*
The moose likes Servlets and the fly likes JSP TO SERVLET Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP TO SERVLET" Watch "JSP TO SERVLET" New topic
Author

JSP TO SERVLET

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 613
Hi All,
I have a Test.jsp in ROOT/jsp which looks like below
<%=" Hello World" %>
After executing this file I got an Test_jsp.class in work folder of tomcat 4.1.18
I copied this file in to Web-Inf/classes folder
under ROOT context. and tried to access it as
http://localhost:8080/servlet/Test_jsp
but i endup with following error
java.lang.NoClassDefFoundError: Test_jsp (wrong name: org/apache/jsp/Test_jsp)
can any one help me out
thanx in adv


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

just try
http://localhost:8080/servlet/Test.jsp
It should work fine.
Please do not post your problem in more than 1 forum.

[ July 17, 2003: Message edited by: Pradeep Bhat ]

Groovy
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 613
Pradeep ,
Thanx a bunch 4 ur reply,but it's not working that way...
I made it work by creating folders classes/org/apache/jsp
and then copied Test_jsp.class there and used follwing url
http://localhost:8080/servlet/org.apache.jsp.Test_jsp
cheers
Praful
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

which version of Tomcat are you using?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP TO SERVLET
 
Similar Threads
How do I get my JSP files to run on Eclipse?
Can't run JSP/HTML files in Tomcat
how to use the servlet in tomcat??
Basic doubt
Perl/Cgi in Tomcat 5.5