Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class file is not loading while running JSP file

 
Manish Jain
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
 
Manish Jain
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes sure ben,


Manish Jain
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
 
Manish Jain
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using the JDK1.4 with Tomcat 5.5

Manish Jain
 
Manish Jain
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see how the two could be related but I'm glad it's working for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic