• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp looking applet folder for classes

 
Farooq Mahmood
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got a problem in jsp and I desperately need help.

There is an Applet in my jsp page and applet is using a class name clientInfo.java. My beans also use this class as well. So I have put this class in Web_inf folder and with applet as well so clientInfo.java is available in 2 locations.

Most of the time my application work fines but something it give me an error in jsp, class not found error with processClient.java. But that class is available in Web_inf/lib folder. What I have seen that sometime jsp look applet folder for classes instead of web_inf /lib folder. As processClient.java is not available in applet folder so and error is generated. processClient.java has nothing to do with Applet. But when I put that class in applet folder my page work fine again. But I donot want to put that class in Applet folder as applet donot need that file.

Regards,
Farooq
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"FarooqMahmood",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Treat your applet (client side code) and your server side code as two different applications.

The client can't read from WEB-INF and the server will only look in WEB-INF for classes.

Keep a copy in each place.
 
Farooq Mahmood
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot Ben Souther for your early reply.

Yes u r rite i m doing like this. I have kept copy of the class in both places. But the problem is that sometimes application look towards client side (Applet site) for perticular class instead of server side (WEB_INF/lib). As that class is not available over there so it through an exception classNotFound.

Regards,
Farooq
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No spec compliant server I've ever known looks for java classes anywhere but under WEB-INF/classes or WEB-INF/lib (or under a shared location for all webapps).

What container are you using?
 
Farooq Mahmood
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its JBoss 3.2.0
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic