| Author |
class file is not loading while running JSP file
|
Manish Jain
Ranch Hand
Joined: Jun 07, 2005
Posts: 30
|
|
Hello, I am very new to JSP and I just wanna help in one thing. what is happening i download the some examples from sun website. basic examples are working fine (e.g HelloWorld) but if i run examples which has to include class from WEB-INF\classes\ folder. it does not run it gives error like this i have seen that Map class is there inside the WEB-INF\classes\email\Map.class. also, I am using apache tomcat5.5 and also not able to run servlets. I configured the tomcat as instructed. Could anyone help me out. I will really appreciate that. Manish Jain
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
Can you post your JSP code?
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Manish Jain
Ranch Hand
Joined: Jun 07, 2005
Posts: 30
|
|
yes sure ben, Manish Jain
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Does Map follow the JavaBean conventions? Mainly, does it have a zero argument constructor? If not, the useBean tag will blow up while trying to instanciate it.
|
 |
Manish Jain
Ranch Hand
Joined: Jun 07, 2005
Posts: 30
|
|
Thanks for the reply Ben, What I feel is that there is must be some configuration for tomcat that needs to done. Because this example is taken from sun website and it's WAR file, so I am assuming that it should be ok. Could be please tellme that what shoud be setting for tomcat 5.5 in order to invoke servlet. Because I am also not able to run the servlet (even HelloWorldServlet). and that also needs to access class file from WEB-INF\classes folder and also that is not working. Please Help me out in this regard because its two days now and I am nowhere.waiting for reply Manish Jain
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
Can you post the Sun link?
|
 |
Manish Jain
Ranch Hand
Joined: Jun 07, 2005
Posts: 30
|
|
Yes Ben, The Link is: http://java.sun.com/products/jsp/html/jsptut2.html#23903 Then from here download the example.zip and you will the some war files Manish Jain
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
I just downloaded the zip file, unzipped it, and dropped it in the webapps directory of a running instance of Tomcat and it ran fine. Tomcat is running "as is", with no special configurations. An invalid class error can sometimes be the result of trying to run an app that was compiled with a newer JDK than the one it's being run on. What jdk do you have?
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
I suppose it's also possible that the zip file got corrupted during download but I wouldn't picture the war files getting unpacked if that were the case.
|
 |
Manish Jain
Ranch Hand
Joined: Jun 07, 2005
Posts: 30
|
|
Hi, I am using the JDK1.4 with Tomcat 5.5 Manish Jain
|
 |
Manish Jain
Ranch Hand
Joined: Jun 07, 2005
Posts: 30
|
|
Hi Ben, Sorry to repley you a bit late. The problem has been resolved the problem was with cache . I deleted the temp internet files and offline content and problem is resolved. Thanks for all your help. Thanks Manish Jain
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
I don't see how the two could be related but I'm glad it's working for you.
|
 |
 |
|
|
subject: class file is not loading while running JSP file
|
|
|