Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Integrating beans support in Apache

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

  • Chanders2002Chanders2002 Member Posts: 7
    Dear,

    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............
    :

  • alisajjadalisajjad Member Posts: 5
    : Dear,
    :
    : 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.
  • Chanders2002Chanders2002 Member Posts: 7
    aah now if i have understood u rite then u want to shift the location of yr pages from x directory to y direcotry and you want the serverto recognize it like it used to..

    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
  • alisajjadalisajjad Member Posts: 5
    Hi Chander,

    Thanks for the reply. yup u understood it rightly this time ;). but another problem has come up.

    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 ?

  • Chanders2002Chanders2002 Member Posts: 7
    hmm well u can make change in the xml file if you want.. but in the Admin Panel you can delete the context and make a new context

    Cheers
    happy Coding
  • alisajjadalisajjad Member Posts: 5
    Thanks, the manual editing worked. now all my resources are in /home/ali and nothing in the webapps directory and its going fine for the momoent ;) . but i still couldn't find any way to change it through the admin panel :( . anyway, does not matter any more :)

    Thanks once again. Chow
Sign In or Register to comment.