You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jerry Villamizar <jv...@marketnews.com> on 2001/05/31 19:11:03 UTC

TOMCAT Config Files

Can i move all the tomcat configuration files and java classes outside of my
%TOMCAT_HOME%/...<subdir> because i would like to hide all these files
outside my web files..

Thanks
Jerry

----- Original Message -----
From: "Kiss-Beck Jozsef" <jo...@sysdata.siemens.hu>
To: <to...@jakarta.apache.org>
Sent: Thursday, May 31, 2001 8:16 AM
Subject: RE: TOMCAT_HOME\classes in 3.2.1


> Hi!
>
> There is something about TOMCAT_HOME\classes in the User's guide:
>
> ...
>
> The Tomcat directory structure
> ...
> Additionally you can, or Tomcat will, create the following directories:
>
> work:  Automatically generated by Tomcat, this is where Tomcat places
> intermediate files (such as compiled JSP files) during it's work. If you
> delete this directory while Tomcat is running you will not be able to
> execute JSP pages.
>
> classes:  You can create this directory to add additional classes to the
> classpath. Any class that you add to this directory will find it's place
in
> Tomcat's classpath.
>
> ...
>
> MfG / Best regards
>
> Jozsef Kiss-Beck
> Sysdata CSS IN INE3
>
> > -----Original Message-----
> > From: Moin Anjum H. [mailto:moinanjum@yahoo.com]
> > Sent: Thursday, May 31, 2001 2:12 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Re: TOMCAT_HOME\classes in 3.2.1
> >
> >
> > Hi,
> >
> > If you analize carefully you will notice TOMCAT_HOME is the
> > Environment
> > variable that you have to set. Similar to CLASSPATH. If you don't set
> > then bat file takes the ..\ as current Tomcat Directory.
> >
> > HTH
> > Moin.
> >
> > Anson To wrote:
> >
> > > Hi all,
> > >
> > > When I'm editing the tomcat.bat under TOMCAT_HOME\bin
> > > I'm just noticed that the script includes
> > > TOMCAT_HOME\classes in the classpath.  But the fact is
> > > that there's *NO* TOMCAT_HOME\classes in 3.2.1!!  I'm
> > > just curious... Any idea?
> > >
> > > Many thanks!
> > > Anson
> > >
> > > ____________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> > > or your free @yahoo.ie address at http://mail.yahoo.ie
> >
>


Re: I write a simple servlet and now!?! how can run it? under tomkat?

Posted by Luba Powell <lu...@bellatlantic.net>.
To quick-test your servlet - put it under \webapps\examples\WEB-INF\classes\
while html will go under \webapps\examples\servlets\
Update webapps\examples\WEB-INF\web.xml with you servlet entry -
the same way the examples do.
Use URL similar to what they have on the example page.

R/Luba

----- Original Message ----- 
From: <ri...@libero.it>
To: <to...@jakarta.apache.org>
Sent: Saturday, June 16, 2001 5:08 PM
Subject: I write a simple servlet and now!?! how can run it? under tomkat?


> I write a simple servlet with doGet and doPost...
> I have the file servlet1.java
> I have tomkat under winNt
> where I have to put this file?
> How can I run It?
> 
> Thank you in advance, Mario.
> 


Re: about auto-reloading of TC4.0-b5

Posted by Luba Powell <lu...@bellatlantic.net>.
Thank you.  I'll try it on Monday.

----- Original Message ----- 
From: "Bo Xu" <bo...@cybershop.ca>
To: <to...@jakarta.apache.org>
Sent: Saturday, June 16, 2001 5:57 PM
Subject: about auto-reloading of TC4.0-b5


> Hi :-)
> 
> * I use the foolowing symbol to try to explain my question :-)
>    MyServlet(0):  a old version of MyServlet
>    MyServlet(1):  a new version of MyServlet
>    MyServlet(2):  a newer(more) version of MyServlet
>    MyServlet(3):  a newer(more more...) version of MyServlet
>    ...
>    but: as a file, all MyServlet(i)s have the same name: MyServlet.class
> 
> * if:
>    - MyServlet(0) is in MyJar.jar
>    - MyJar.jar is in WEB-INF/lib
>    - and at the same time, MyServlet(1) is in WEB-INF/classes
> 
> * then:
>    - when I start TC4.0-b5, and "make the first-time invoking to
>       myapp/servlet/MyServlet", MyServlet(1) is loaded and invoked.
> 
>    from the following email, I can explain it:
>    //***************************************************
>    ...
>   (2.3 requirement only) Classes and resources in /WEB-INF/classes
>   override classes and resources with the same name under
>   /WEB-INF/lib.
>    ...
>    Craig McClanahan
> //***************************************************
> 
> * but:
>   - now I update MyServlet in WEB-INF/classes: I copy
>     MyServlet(2) into myapp/WEB-INF/classes to replace MyServlet(1)
>   - I don't change anything in WEB-INF/lib
> 
> * now I find:
>   - if I don't restart TC4.0-b5, I can not auto-reloading MyServlet(2):
>     MyServlet(1) is still invoked
>   - if I  restart TC4.0-b5, now MyServlet(2) is invoked
> 
> * if I delete MyJar.jar, and restart TC4.0-b5, now auto-reloading works:
> 
>    I can auto-reload MyServlet(i)
> 
> * I guess the reason is:
>   - if MyServlet(0) is in a jar file in myapp/WEB-INF/lib, it will be
> "overrided"
>     by the another MyServlet(i) which is in myapp/WEB-INF/classes
>   - but perhaps it will "prevent" auto-relaoding of MyServlet(i) which
> is in
>     myapp/WEB-INF/classes
>   - this is not a "frequency-case", because people will not put
> MyServlet both
>     in WEB-INF/classes and WEB-INF/lib, several days ago I put
> MyServlet(0)
>     in MyJar.jar in WEB-INF/lib for a testing, but I forgot to delete it
> after I finish
>    the testing, but today I try to update MyServlet(i) in
> WEB-INF/classes, and/but
>     I find I can not auto-reload it,  finally I delete MyJar.jar, now I
> can auto-reload
>     MyServlet(i) :-)
> 
> 
> 
> Bo
> June 16, 2001
> 
> 
> 


about auto-reloading of TC4.0-b5

Posted by Bo Xu <bo...@cybershop.ca>.
Hi :-)

* I use the foolowing symbol to try to explain my question :-)
   MyServlet(0):  a old version of MyServlet
   MyServlet(1):  a new version of MyServlet
   MyServlet(2):  a newer(more) version of MyServlet
   MyServlet(3):  a newer(more more...) version of MyServlet
   ...
   but: as a file, all MyServlet(i)s have the same name: MyServlet.class

* if:
   - MyServlet(0) is in MyJar.jar
   - MyJar.jar is in WEB-INF/lib
   - and at the same time, MyServlet(1) is in WEB-INF/classes

* then:
   - when I start TC4.0-b5, and "make the first-time invoking to
      myapp/servlet/MyServlet", MyServlet(1) is loaded and invoked.

   from the following email, I can explain it:
   //***************************************************
   ...
  (2.3 requirement only) Classes and resources in /WEB-INF/classes
  override classes and resources with the same name under
  /WEB-INF/lib.
   ...
   Craig McClanahan
//***************************************************

* but:
  - now I update MyServlet in WEB-INF/classes: I copy
    MyServlet(2) into myapp/WEB-INF/classes to replace MyServlet(1)
  - I don't change anything in WEB-INF/lib

* now I find:
  - if I don't restart TC4.0-b5, I can not auto-reloading MyServlet(2):
    MyServlet(1) is still invoked
  - if I  restart TC4.0-b5, now MyServlet(2) is invoked

* if I delete MyJar.jar, and restart TC4.0-b5, now auto-reloading works:

   I can auto-reload MyServlet(i)

* I guess the reason is:
  - if MyServlet(0) is in a jar file in myapp/WEB-INF/lib, it will be
"overrided"
    by the another MyServlet(i) which is in myapp/WEB-INF/classes
  - but perhaps it will "prevent" auto-relaoding of MyServlet(i) which
is in
    myapp/WEB-INF/classes
  - this is not a "frequency-case", because people will not put
MyServlet both
    in WEB-INF/classes and WEB-INF/lib, several days ago I put
MyServlet(0)
    in MyJar.jar in WEB-INF/lib for a testing, but I forgot to delete it
after I finish
   the testing, but today I try to update MyServlet(i) in
WEB-INF/classes, and/but
    I find I can not auto-reload it,  finally I delete MyJar.jar, now I
can auto-reload
    MyServlet(i) :-)



Bo
June 16, 2001




I write a simple servlet and now!?! how can run it? under tomkat?

Posted by ri...@libero.it.
I write a simple servlet with doGet and doPost...
I have the file servlet1.java
I have tomkat under winNt
where I have to put this file?
How can I run It?

Thank you in advance, Mario.

RE: TOMCAT Config Files

Posted by Martin van den Bemt <mv...@mvdb.com>.
Do it the other way around : hide your web files from the TOMCAT_HOME
directoty. (see server.xml...)

Mvgr,
Martin

> -----Original Message-----
> From: Jerry Villamizar [mailto:jvillami@marketnews.com]
> Sent: Thursday, May 31, 2001 7:11 PM
> To: tomcat-user@jakarta.apache.org
> Subject: TOMCAT Config Files
>
>
>
> Can i move all the tomcat configuration files and java classes
> outside of my
> %TOMCAT_HOME%/...<subdir> because i would like to hide all these files
> outside my web files..
>
> Thanks
> Jerry
>
> ----- Original Message -----
> From: "Kiss-Beck Jozsef" <jo...@sysdata.siemens.hu>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, May 31, 2001 8:16 AM
> Subject: RE: TOMCAT_HOME\classes in 3.2.1
>
>
> > Hi!
> >
> > There is something about TOMCAT_HOME\classes in the User's guide:
> >
> > ...
> >
> > The Tomcat directory structure
> > ...
> > Additionally you can, or Tomcat will, create the following directories:
> >
> > work:  Automatically generated by Tomcat, this is where Tomcat places
> > intermediate files (such as compiled JSP files) during it's work. If you
> > delete this directory while Tomcat is running you will not be able to
> > execute JSP pages.
> >
> > classes:  You can create this directory to add additional classes to the
> > classpath. Any class that you add to this directory will find it's place
> in
> > Tomcat's classpath.
> >
> > ...
> >
> > MfG / Best regards
> >
> > Jozsef Kiss-Beck
> > Sysdata CSS IN INE3
> >
> > > -----Original Message-----
> > > From: Moin Anjum H. [mailto:moinanjum@yahoo.com]
> > > Sent: Thursday, May 31, 2001 2:12 PM
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: Re: TOMCAT_HOME\classes in 3.2.1
> > >
> > >
> > > Hi,
> > >
> > > If you analize carefully you will notice TOMCAT_HOME is the
> > > Environment
> > > variable that you have to set. Similar to CLASSPATH. If you don't set
> > > then bat file takes the ..\ as current Tomcat Directory.
> > >
> > > HTH
> > > Moin.
> > >
> > > Anson To wrote:
> > >
> > > > Hi all,
> > > >
> > > > When I'm editing the tomcat.bat under TOMCAT_HOME\bin
> > > > I'm just noticed that the script includes
> > > > TOMCAT_HOME\classes in the classpath.  But the fact is
> > > > that there's *NO* TOMCAT_HOME\classes in 3.2.1!!  I'm
> > > > just curious... Any idea?
> > > >
> > > > Many thanks!
> > > > Anson
> > > >
> > > > ____________________________________________________________
> > > > Do You Yahoo!?
> > > > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> > > > or your free @yahoo.ie address at http://mail.yahoo.ie
> > >
> >
>
>