Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can not access class files in JSP_>>>>>>  RSS feed

perry arora
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends need your help..

i am trying to run a web application whihc is alsousing struts.. but that is not a problem,,
the problem which i need suggestion is that in my jsp file which is the final view of my
application i am not able to use the classes which i have stores in
and i think the classes which in this folder should be visible through out the application to
all other classes,servlets, and jsp.. even my Actionservlet and Action classes are using the
classes stored in this folder but when i am trying to cast a bean to a specific type its giving me
class not found exception,,
i also tried the following
(1) placed the class file in TOMCAT-HOME/classes folder so that the SHARED class loader can load it...
i know that TOMCAT assigns a jasperx class loader which loads the classes from the folder
TOMCAT/jasper folder and the classes which are placed here are specifically for the jsp files .
but i did checked the specification of the TOMCAT 4.0 which says that it is a child class loader
of the main class loader WEBAPPSX which loads all the classes from
TOMCAT-HOME/webapps/MYapplication/WEB_INF/classes .... and

i have tried acessing all the class files which i have placed in the
TOMCAT-HOME/webapps/MYapplication/WEB_INF/classes folder
but the jsp file can not access any of them...........

i think i am missing some thing or doing some thing wrong...

need u r help... i will really appreciate any suggestions....
Sainudheen Mydeen
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this.
Package your class files. Put them in appropriate subfolder inside WEB-INF\classes.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!