Hi All,
i have recently integrated apache with tomcat server. all my jsp's are now located in the root dir of apache. they work fine. but where i need to use a java bean, it doesn't work because the class file has to be in Tomcats dir.
Is there a way that i dont have to move my class files from APache's root to tomcat's webapps dir ??? Plz Help............
Comments
When you create a class file (a bean file) then the same is either to be stored in the web-inf/class or web-inf/class/*package-name* alternately you may also place the class file in the shared/class folder int hat case this class file may be used by all the users or Pragrams runing under the apache Tomcat server environment.
Chander
: Hi All,
:
: i have recently integrated apache with tomcat server. all my jsp's are now located in the root dir of apache. they work fine. but where i need to use a java bean, it doesn't work because the class file has to be in Tomcats dir.
:
: Is there a way that i dont have to move my class files from APache's root to tomcat's webapps dir ??? Plz Help............
:
:
: When you create a class file (a bean file) then the same is either to be stored in the web-inf/class or web-inf/class/*package-name* alternately you may also place the class file in the shared/class folder int hat case this class file may be used by all the users or Pragrams runing under the apache Tomcat server environment.
:
: Chander
:
Hi and thanks for the reply,
i dont think that u understood the question. i know that the class files shuold be put where, let me be more specific.
i have tomcat installed on /usr/local/tomcat on my RH 7.3 box. All my jsp code and html pages are in webapps/mobile directory.
Now what I want to do is, that I should be able to move the mobile/ directory to lets say /var/www/html/ "completely" and not leaving the WEB-INF folder or anything behind. How to do it so that it continues to work? thats the main question.
If thats the question then go to the admin panel there u u go to the Tomcat Server section in thatthere will be Service and in that there will be the Host in that change the location of the Context/ to the directory where u want the code to be present. The server wil startreading the files from there instead of the lat location you were using..
I hope that solves yr problem plz do message me if there are still any issues or again i have misunderstood yr query i will be glad to help u..
Chander
Thanks for the reply. yup u understood it rightly this time
I followed ur instructions to the Context(/), but there are two properties there. "Document Base" and "Path". but both cannot be changed from there i.e. not through any html combo box or text box etc. they are fixed labels i guess. Maybe i have to change them manually in server.xml, but which one of the two ?
So any guesses ?
Cheers
happy Coding
Thanks once again. Chow