Re: Restart a single Tomcat service out of several running services?

2002-06-13 Thread Adam Pfeiffer

Here is what you do:

 First,
>follow
>the directions in
>"Manager App HOW-TO" included with the tomcat documentation.  Once this
is
>done, you can use the
>manager app reload function to reload the web app.  This also refreshes
any
>newly compiled classes
>(e.g. javabeans) that you may have included in the JSPs.  To use the
>reload,
>do the following:
>
>http:///manager/reload?path=
>
>You can also use the manager to deploy new web apps, un-deploy web
apps,
>start/stop web apps.
--- Sven Woltmann <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Our server runs several Tomcat services for different websites.  Every time
> I change a Java class for my my applications, I must restart Tomcat.  All my
> websites are then down for up to 30 seconds, even the ones that don't use
> the changed classes.
> 
> Is it possible to only restart one of the services?
> 
> Thanks,
> Sven
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: CATALINA_BASE?

2002-06-11 Thread Adam Pfeiffer

Jiann-Ming Su,
I am confused on your question.  You seem to contradict yourself.  Here is what I see 
as a
contradiction:


1. The RUNNING.txt wasn't exactly clear on this, but if I want to run multiple
instances of tomcat, do I simply set the CATALINA_BASE variable to as many
base directories as I need instances?  

Here you are saying you want multiple instances of tomcat...

2. That is, if I want two instances from
the same binary, would I set CATALINA_BASE as follows?

Here you are saying you want to run 2 different web apps from 1 binary.


Which of the above are you looking to do??  I can help you once I know the answer.

Adam

--- "Turner, John" <[EMAIL PROTECTED]> wrote:
> 
> Hi -
> 
> I don't think that will work.  As far as I know, you need to run a separate
> Tomcat process for each CATALINA_BASE, with the appropriate environment.
> The easiest thing to do would be to setup some small shell scripts to
> start/stop each instance, and in each script change CATALINA_BASE
> accordingly.
> 
> I haven't done this yet, I am still working on one instance of Tomcat, but
> the only document I was able to find that addresses the usage of
> CATALINA_BASE was here:
> 
> http://www.codesta.com/knowledge/technical/tomcat_warp_apache/page_01.jsp
> http://www.codesta.com/knowledge/technical/tomcat_warp_apache/printable_vers
> ion.jsp (printer ready)
> 
> Hope this helps.
> 
> John Turner
> [EMAIL PROTECTED]
> http://www.aas.com
> 
> 
> -Original Message-
> From: Jiann-Ming Su [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 4:04 PM
> To: [EMAIL PROTECTED]
> Subject: CATALINA_BASE?
> 
> 
> The RUNNING.txt wasn't exactly clear on this, but if I want to run multiple
> instances of tomcat, do I simply set the CATALINA_BASE variable to as many
> base directories as I need instances?  That is, if I want two instances from
> the same binary, would I set CATALINA_BASE as follows?
> 
> export CATALINA_BASE="/home/catalina1:/home/catalina2"
> 
> -- 
> Jiann-Ming Su  [EMAIL PROTECTED]  404-712-2603
> Development Team Systems Administrator
> General Libraries Systems Division
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Connecting Apache 2 with Tomcat 4.x

2002-06-11 Thread Adam Pfeiffer

Hi John, 
This is a very great doc and a very good start.  I have one question, what command 
line parameters
did you use to compile apache to enable DSO support, SSL, and apxs?

Thanks much,
Adam

--- "Turner, John" <[EMAIL PROTECTED]> wrote:
> 
> I just went through the same process (only using MS SQL Server 2000 instead
> of Oracle).  It took me over a week to figure out what was going on.  I'm
> all for the open source movement, but the lack of documentation has got to
> be the most frustrating thing I've ever dealt with. 
> 
> Here's what I did, in summary:
> 
> 1) install Tomcat 4.  Verify Tomcat 4 (served content on port 8080, examples
> work).
> 2) install Apache 2 with DSO support, SSL and apxs.  Verify Apache 2 (served
> content on port 80).
> 3) download the mod_webapp source, extract it.  Read README.txt in the
> webapp directory after extracting the source.
> 3) download the Apache Portable Runtime (APR) source from CVS as stated in
> mod_webapp README.txt, build and install (note: I did not install ant as
> mentioned in the README.txt file).
> 4) build mod_webapp from source according to README.txt after APR is
> installed.  Make sure the build/configure process is pointed to the right
> apxs (apache 1.3 or apache 2.0).  configure does an "autosense" of which
> version of Apache you have based on which apxs it can find.
> 5) install mod_webapp according to INSTALL.txt
> 6) put the following into httpd.conf, verify with
> "$APACHE_HOME/bin/apachectl configtest":
> 
> LoadModule webapp_module /usr/lib/apache/mod_webapp.so
> 
> 
> WebAppConnection warpConnection warp XXX.XXX.com:8008
> WebAppInfo   /webapp-info
> WebAppDeploy examples warpConnection /examples
> WebAppDeploy webdav warpConnection /webdav
> WebAppDeploy tomcat-docs warpConnection /tomcat-docs
> 
> 
> 7) in $CATALINA_HOME/conf/server.xml, on or about line 291 of 333, change
> the name parameter of the "Engine" directive to be the same as the
> ServerName directive in $APACHE_HOME/conf/httpd.conf.
> 8) Stop apache.
> 9) Stop tomcat...wait at least 10 seconds.  Verify down with "ps -ef |grep
> java"
> 10) Start tomcat...wait at least 10 seconds.
> 11) Start apache.
> 12) Verify that tomcat examples work on port 80
> (http://host.domain.com/examples/) Note that you need the trailing slash!
> 
> Doing this got me the Tomcat servlets running from host.domain.com/examples
> (not host.domain.com:8080/examples which is Tomcat stand-alone), so I'm
> pretty sure everything is set.
> 
> The Tomcat I used was the Standard version from:
> http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/bin/
> The Apache I used was the standard apache 2.0.36 from one of the mirror
> sites.
> The mod_webapp connector I used was retrieved from:
> http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/src/
> 
> Hope this helps!  Comments welcome.  This is on a RH 7.2 machine, BTW.
> 
> John Turner
> 
> -Original Message-
> From: Edward Wilson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 3:18 PM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: Connecting Apache 2 with Tomcat 4.x
> 
> 
> I would like to connect the latest version of Apache
> with the latest venison of Tomcat.  It would be great
> to find a single doc that could show me how to do this
> quickly.  I don't care about millisecond performance
> differentials or scalability.  I am trying to upgrade
> a previous implementation that used Apache 1.3 with
> Tomcat 3.3.
> 
> There doesn't seem to be a `clear and quick' way to do
> this.  I'm getting caught up in a circular reference
> of you can do it this way, or that way, or even a
> third way, yet no signal doc actually takes me all the
> way through connecting and tweaking Apache 2 with
> Tomcat 4. There is even some talk about how the
> connector sub-projects have broken off from the server
> development and exist autonomously.
> 
> I already have Apache 2 and Tomcat 4 running on RedHat
> 7.3 as well as a completed application running against
> Oracle. Everything is working great.  My last issue is
> getting Apache to front-end the application and pass
> servlet control to Tomcat.
> 
> I don't care which connector I use, time is limited, I
> wish to use whichever connector has the most complete
> documentation.
> 
> Does anybody have a quick and furious way to get this
> done?  Also, in the past, I was able to download a
> binary for intel/linux, this would be great to come
> across, somewhere I was reading that one would have to
> compile their own if using Apache 2, is this true?
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.ya

mod_jk-01 VS mod_webapp w/ Tomcat 4.0.3??

2002-06-11 Thread Adam Pfeiffer

Hello,
I am trying to find out which is better, mod_jk-01 or mod_webapp.

Here are my different criteria to base which is better on.

1. Which is more stable, and with what version of apache?

2. Which can do load balancing, and with what version of apache?

3. Which has the best performance for site under a heavy load of traffic, and with 
what version of
apache?

4. Any other goods or bad which I have not covered in the other 3 questions.

Thanks much for all of your input

Adam

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: problem..plz help me out

2002-06-08 Thread Adam Pfeiffer

Have you gotten the problem resolved??

Adam

--- puneet sachar <[EMAIL PROTECTED]> wrote:
> Hi friends, this is my 4th mail regarding my single
> complain..
> 
> I have install the tomcat 4.0.3 and its doing fine as
> far .html files are concern but no .class and .jsp
> files are running on it
> 
> I have asked 9-10 times abt same question again and
> again and I got nothing from u guys there
> 
> Plz help me…I really stuck ..
> 
> With this mail I’m sending my server.xml file and
> web.xml file which is in my virtualhost/WEB-INF/
> 
> I know it is very tough for u to go in these files and
> see for errors but plz..i’m in need badly and afater
> spending so much time here I some time feel like
> crying … and I’m in such a place and in such a part of
> India..where I can’t get ant local computer guy with
> whom I can discuss ..plz do me a little favour
> 
> Here are my problems
> 1)no .class and .jsp working only html is working 
> 2)I have done all changes which were to made in
> server.xml…)I have send the file also plz check it and
> tell me any mistake if u find)
> 3)I’m getting 404 error ..no servlet found
> 4)And I’m able to excess the .class file vis
> http://localhost:80/examples/servlet/abc.class
>  But not by making my own virtual host aand not even
> the default root directory
> 
> 
> what i have is my own context named sachar 
> and when i go
> .http://puneet:80/sachar/servlet/HelloworldServlet
> 
> error -- 404
> 
> See friends ..if u can help me I’ll be very grateful
> to u
> 
> Puneet 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> 
> 
> MyExample
> HelloWorldExample
> 
> Security role for anonymous access
> tomcat
> 
> 
> 
> 
> MyExample
> /sachar/servlet/snoop
> /servlet/*
> 
> 
> 
> 
> > 
> 
> 
> 
> 
> 
> 
> 
>   
> 
>   
>   
> 
> 
> 
> 
> port="80" minProcessors="5" maxProcessors="75"
>enableLookups="true" redirectPort="8443"
>acceptCount="10" debug="0" connectionTimeout="6"/>
> 
> 
> 
> 
> 
> 
> port="8009" minProcessors="5" maxProcessors="75"
>acceptCount="10" debug="0"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
>   
>   
> 
>   
>  prefix="catalina_log." suffix=".txt"
>   timestamp="true"/>
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
>   
>   
> 
> 
> 
> 
>   directory="logs"  prefix="localhost_access_log." suffix=".txt"
>  pattern="common"/>
>   
>   
> 
>   directory="logs"  prefix="localhost_log." suffix=".txt"
>   timestamp="true"/>
> 
>   
> 
> 
> 
> 
> 
> 
>   debug="0" privileged="true"/>
> 
> 
>   reloadable="true" crossContext="true">
> 
>   
> prefix="localhost_examples_log." suffix=".txt"
> timestamp="true"/>
> 
>   
> home="com.wombat.empl.EmployeeRecordHome"
>remote="com.wombat.empl.EmployeeRecord"/>
>   
> 
>  value="15"/>
> override="false"/>
>type="javax.sql.DataSource"/>
>   
> usersa
> password
> driverClassName
>   org.hsql.jdbcDriver
> driverName
>   jdbc:HypersonicSQL:database
>   
>type="javax.mail.Session"/>
>   
> 
>   mail.smtp.host
>   localhost
> 
>   
> 
> 
>   
> 
> 
> 
>   
> 
> 
>   
> 
>   
>   
> 
>   
>  prefix="catalina_log." suffix=".txt"
>   timestamp="true"/>
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
>   
> 
> 
> 
> 
>   directory="logs"  prefix="puneet_access_log." suffix=".txt"
>  pattern="common"/>
>   
>   
> 
>   directory="logs"  prefix="puneet_log." suffix=".txt"
>   timestamp="true"/>
> 
>   
> 
> 
> 
> 
> 
>   
> 
> 
>  reloadable="true" crossContext="true">
> 
>   
> prefix="puneet_examples_log." suffix=".txt"
> timestamp="true"/>
> 
>   
> hom

Re: Apache 2.36, Tomcat 4.x and JBoss 3.0

2002-06-07 Thread Adam Pfeiffer

I am not an expert, but from what I have seen floating around you would use apache + 
tomcat when
you have high requests on static html pages.  This way, you offload the static pages 
to apache to
free up tomecat for the jsps.  Hopefully someone else will chime in with more info 
than this.

Adam

--- "Segree, Gareth" <[EMAIL PROTECTED]> wrote:
> I am new to the JSP & EJB business and I'm trying to setup a server using
> opensource software.
> 
> 1) Is there any special configuration to install apache 2.x & tomcat 4.x
> from source.
> 2) When should I use tomcat only vs apache + tomcat plugin.
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Running JavaBeans

2002-06-07 Thread Adam Pfeiffer

Hi Juan,
The path that you stated is correct:
<>\webapps\ROOT\WEB-INF\classes

There are 2 important things to note.

1. If the classes are free standing (e.g. not jar'ed) and you have them as part of a 
package, you
must have directories corresponding to the package names.  I have a class name
PictureBrowserBean.class that is in package mada.trips so I have to have the following
<>\webapps\ROOT\WEB-INF\classes\mada\trips\PictureBrowserBean.class

2. You will have to reload the webapp whenever you add/modify your classes.  Here are 
the
directions for that:

I have finally figured out how you can get a class to reload (e.g. Included JavaBean) 
without
having to stop/start tomcat using shutdown.sh and startup.sh.  First, follow the 
directions in
"Manager App HOW-TO" included with the tomcat documentation.  Once this is done, you 
can use the
manager app reload function to reload the web app.  This also refreshes any newly 
compiled classes
(e.g. javabeans) that you may have included in the JSPs.  To use the reload, do the 
following:

http:///manager/reload?path=

You can also use the manager to deploy new web apps, un-deploy web apps, start/stop 
web apps. 
This may be common sense to those tomcat veterans, but this was very helpful to me 
once I learned
how to use it.

OR

If you do not want to go through the above procedure, you can just stop and start 
tomcat with the
shutdown.bat/startup.bad  (I assume you are on windows because you are using 
backslashes)

Adam



--- Juan <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I would like to use JavaBeans with jsp. Where is the "classes" directory? 
> Is it automatically created? Or am I have to create it automatically?
> 
> The classes directory were created manually:
> <>\webapps\ROOT\WEB-INF\classes
> 
> 
> Sorry, but I tried several things without success. I'm always getting a 
> error message: class not found (JavaBean class).
> May be I have to restart Tomcat or config webinf.xml
> 
> Thanks in advance,
> 
> Juan José Velázquez Garcia
> Web Development
> www.htmlspider.com.br
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to load properties into tomcat 4.0.3?

2002-06-05 Thread Adam Pfeiffer

I am still a bit confused.  I do not know what the servlet-name and servlet-class are 
referring
to?

The Jsp Page it called TopNav.jsp and the bean is called PictureBrowserBean.  I want 
to have the
bean PictureBrowserBean be able to access the extra parameter.  In this case, the 
location of the
properties file. Here i my guess at what I would do


 TopNav
 PictureBrowserBean
  
propFile
/opt/jakarta-tomcat-4.0.3/webapps/trips-dev
  


Is this correct?  I am going to try this, but I am a bit short on time right now.  
Thanks again
for your help.

Adam


--- Subir Sengupta <[EMAIL PROTECTED]> wrote:
> You can do something like this in your web.xml
> 
> 
>  somename
>  someclass
>   
> param1
> somevalue
>   
> 
> 
> You can then call getServletConfig().getInitParameter("param1") from the
> init method of the somename servlet.
> 
> Hope this helps,
> Subir
> 
> -Original Message-
> From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 10:52 PM
> To: [EMAIL PROTECTED]
> Subject: How to load properties into tomcat 4.0.3?
> 
> 
> Hello,
> I have a bean that uses the Properties Object.  Currently, on each jsp that
> calls that bean I have
> to do a bean.setPropsDir() which sets the directory where to find the
> properties file.  Is there a
> way in server.xml, web.xml or some other way that I can put in a variable
> that will define the
> directory where the properites file exists so that the class can access
> this?  
> 
> Thanks.
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Answer: Reloading classes WITHOUT using shutdown.sh & startup.sh (newbies should read)

2002-06-05 Thread Adam Pfeiffer

The for the clarification.  I didn't realize that it was doing all of the 
initializtion events.

Adam

--- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
> Howdy,
> Reloading the whole-app is very different from selectively reloading a
> set of classes.  When you use the manager to reload as you suggest, you
> will also re-trigger the various initialization events (filters,
> servlets, etc.). 
> 
> If that's what you want to do, then the manager reload is excellent.  I
> personally like it a lot.
> 
> However, if you want to reload just a specific class in place, that's
> more tricky.  You'll probably have to subclass the ClassLoader itself to
> do what you want.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Mike Millson [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, June 05, 2002 12:01 PM
> >To: Tomcat Users List
> >Subject: RE: Answer: Reloading classes WITHOUT using shutdown.sh &
> >startup.sh (newbies should read)
> >
> >You could also set reloadable="true" in the Context element, but that
> >requires significant overhead and is not recommended for production
> >environments.
> >
> >Mike
> >
> >-Original Message-
> >From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, June 05, 2002 11:37 AM
> >To: [EMAIL PROTECTED]
> >Subject: Answer: Reloading classes WITHOUT using shutdown.sh &
> >startup.sh (newbies should read)
> >
> >
> >I have been on this list for about a month and have see this question
> many
> >time (myself included).
> > I have finally figured out how you can get a class to reload (e.g.
> >Included
> >JavaBean) without
> >having to stop/start tomcat using shutdown.sh and startup.sh.  First,
> >follow
> >the directions in
> >"Manager App HOW-TO" included with the tomcat documentation.  Once this
> is
> >done, you can use the
> >manager app reload function to reload the web app.  This also refreshes
> any
> >newly compiled classes
> >(e.g. javabeans) that you may have included in the JSPs.  To use the
> >reload,
> >do the following:
> >
> >http:///manager/reload?path=
> >
> >You can also use the manager to deploy new web apps, un-deploy web
> apps,
> >start/stop web apps.
> >This may be common sense to those tomcat veterans, but this was very
> >helpful
> >to me once I learned
> >how to use it.
> >
> >Adam
> >
> >P.S.  If I have made any errors, please correct me.  Thanks.
> >
> >__
> >Do You Yahoo!?
> >Yahoo! - Official partner of 2002 FIFA World Cup
> >http://fifaworldcup.yahoo.com
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <mailto:tomcat-user-
> >[EMAIL PROTECTED]>
> >For additional commands, e-mail: <mailto:tomcat-user-
> >[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Answer: Reloading classes WITHOUT using shutdown.sh & startup.sh (newbies should read)

2002-06-05 Thread Adam Pfeiffer

Mike,
>From my experience, javabean will not be reloaded even with reloadable="true".  I have
reloadable="true" on my web app, and it would not reread the classes until I used 
shutdown.sh and
startup.sh.  Maybe I didn't have something set up right.  Here is a snipet from my 
server.xml:


  


Let me know if you see anything wrong.  Thanks.

--- Mike Millson <[EMAIL PROTECTED]> wrote:
> You could also set reloadable="true" in the Context element, but that
> requires significant overhead and is not recommended for production
> environments.
> 
> Mike
> 
> -Original Message-
> From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 11:37 AM
> To: [EMAIL PROTECTED]
> Subject: Answer: Reloading classes WITHOUT using shutdown.sh &
> startup.sh (newbies should read)
> 
> 
> I have been on this list for about a month and have see this question many
> time (myself included).
>  I have finally figured out how you can get a class to reload (e.g. Included
> JavaBean) without
> having to stop/start tomcat using shutdown.sh and startup.sh.  First, follow
> the directions in
> "Manager App HOW-TO" included with the tomcat documentation.  Once this is
> done, you can use the
> manager app reload function to reload the web app.  This also refreshes any
> newly compiled classes
> (e.g. javabeans) that you may have included in the JSPs.  To use the reload,
> do the following:
> 
> http:///manager/reload?path=
> 
> You can also use the manager to deploy new web apps, un-deploy web apps,
> start/stop web apps.
> This may be common sense to those tomcat veterans, but this was very helpful
> to me once I learned
> how to use it.
> 
> Adam
> 
> P.S.  If I have made any errors, please correct me.  Thanks.
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Answer: Reloading classes WITHOUT using shutdown.sh & startup.sh (newbies should read)

2002-06-05 Thread Adam Pfeiffer

I have been on this list for about a month and have see this question many time 
(myself included).
 I have finally figured out how you can get a class to reload (e.g. Included JavaBean) 
without
having to stop/start tomcat using shutdown.sh and startup.sh.  First, follow the 
directions in
"Manager App HOW-TO" included with the tomcat documentation.  Once this is done, you 
can use the
manager app reload function to reload the web app.  This also refreshes any newly 
compiled classes
(e.g. javabeans) that you may have included in the JSPs.  To use the reload, do the 
following:

http:///manager/reload?path=

You can also use the manager to deploy new web apps, un-deploy web apps, start/stop 
web apps. 
This may be common sense to those tomcat veterans, but this was very helpful to me 
once I learned
how to use it.

Adam

P.S.  If I have made any errors, please correct me.  Thanks.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to load properties into tomcat 4.0.3?

2002-06-04 Thread Adam Pfeiffer

Hello,
I have a bean that uses the Properties Object.  Currently, on each jsp that calls that 
bean I have
to do a bean.setPropsDir() which sets the directory where to find the properties file. 
 Is there a
way in server.xml, web.xml or some other way that I can put in a variable that will 
define the
directory where the properites file exists so that the class can access this?  

Thanks.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Manager App Question

2002-06-04 Thread Adam Pfeiffer

Hello,
I just began playing with the manager app and am confused on how it deploys a new web 
application.
 Here is the lowdown.

I had an existing one at:
/opt/jakarta-tomcat-4.0.3/webapps/trips

I did a cp -r from /opt/jakarta-tomcat-4.0.3/webapps/trips to
/opt/jakarta-tomcat-4.0.3/webapps/trips-dev in order to set up a development 
environment.

Then I ran the command:
http://localhost:8080/manager/install?path=/trips-dev?war=file:/opt/jakarta-tomcat-4.0.3/webapps/trips-dev

This worked, the web app deployed and I can now browse it perfectly.  What I am 
confused on it
that I can stop and start tomcat /opt/jakarta-tomcat-4.0.3/bin/shutdown.sh & 
startup.sh and it
still sees the trips-dev app.  Where does it store this information??  I have checked 
server.xml
and it does not contain any info on trips-dev.  I must be missing some config file, 
but for the
life of me I can't figure out what it is. 

Thanks,
Adam





__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to use Properties Object in a bean from a jsp

2002-05-21 Thread Adam Pfeiffer

Hello,
I am using the Properties object in a javabean that is being included in a jsp.  How 
can the
javabean get the base directory of the webserver in order to pass it to the Properties 
Object? 
Thanks for your help.

Adam

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Form submit question when using frames

2002-05-17 Thread Adam Pfeiffer

This is an html question, but I figure a lot of you have run into this.  I have a 2 
frame page
with a top and bottom frame.  The top frame has a form with a drop down box in it.  Is 
there a way
for the form to post to the the bottom frame without reloading the frameset?  Thanks 
for your help
in advance.

Adam 

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: exception management with beans and Jsps

2002-05-17 Thread Adam Pfeiffer

Thanks Phillip,
That give me some good ideas to start with!

--- Phillip Morelock <[EMAIL PROTECTED]> wrote:
> generally you should be using as few exceptions as possible...because they
> are very expensive.
> 
> But if the API's you are using throw exceptions, and such, you should
> definitely catch them at the bean level, and return negative or false values
> to the jsp or whatever, and just use simple conditionals to test them.
> Although, for particular exceptions, you might have specific conditions that
> cause those, in which case you'll want to use error-page directives (like
> SQL Exceptions if your database connection is lost, etc.).
> 
> Other people here can tell you perhaps how to make a particular error page
> come out of particular errors...but that, you might have to do at the JSP
> level, anyhow, in your case.
> 
> I personally find JSP inappropriate for complex error-handling and such (you
> can do it, but damn it's ugly).  That's why you might want to look into the
> MVC / "Model 2" type architecture, where you use servlets to handle complex
> server-side code, and just use JSP for display.  This is another step in the
> "fu" of java server coding, but it's made my life a lot easier since I just
> went for it.  In a servlet, it's pure code, so you can just concentrate on
> all your various error / invalid conditions, and handle them appropriately
> by forwarding to different JSP's for display, etc.  JSP's are really married
> to the way they look, and it's a lot harder to write a bunch of code in
> there that's very flexible or extensible.
> 
> It looks like this:  user sends a request (maybe with some form data) -->
> servlet processes it, scrubs everything, makes sure everything's cool -->
> forwards to a JSP for display -- can be different jsp's depending on your
> error conditions, etc.
> 
> My 2 cents.
> 
> fillup
> 
> 
> On 5/17/02 10:47 AM, "Adam Pfeiffer" <[EMAIL PROTECTED]> wrote:
> 
> > Does anyone know where I can find a good doc on how to handle exception with
> > JSP and beans.  I
> > would really like the bean to trap all the errors and set the messages and
> > send those back to the
> > jsp.  I am not sure how to do this.  I am still new with catching exceptions,
> > so if my question
> > doesn't make sense, I apologize in advance.
> > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > LAUNCH - Your Yahoo! Music Experience
> > http://launch.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




exception management with beans and Jsps

2002-05-17 Thread Adam Pfeiffer

Does anyone know where I can find a good doc on how to handle exception with JSP and 
beans.  I
would really like the bean to trap all the errors and set the messages and send those 
back to the
jsp.  I am not sure how to do this.  I am still new with catching exceptions, so if my 
question
doesn't make sense, I apologize in advance.



__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to end a JSP

2002-05-15 Thread Adam Pfeiffer

Thanks for all the input. return; worked perfect.  

Thanks.

--- James Mitchell <[EMAIL PROTECTED]> wrote:
> 
> that was a joke
> 
> 
> JM
> 
> > -Original Message-
> > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 15, 2002 4:37 PM
> > To: Tomcat Users List
> > Subject: RE: How to end a JSP
> >
> >
> > Try this.
> >
> >
> > System.exit(0);
> >
> > That works for me ;)
> >
> > JM
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, May 15, 2002 4:34 PM
> > > To: Tomcat Users List
> > > Subject: Re: How to end a JSP
> > >
> > >
> > >
> > > Since nobody else answered, not sure but I would think a simple
> > "return;"
> > > as placed would do what you want.
> > > troy
> > >
> > >
> > >
> > >
> > >
> > >   Adam Pfeiffer
> > >
> > >> > [EMAIL PROTECTED]
> > >   ahoo.com>cc:
> > >
> > >Subject: How to
> > > end a JSP
> >
> > >   05/15/2002 01:11
> > >
> > >   PM
> > >
> > >   Please respond
> > >
> > >   to "Tomcat Users
> > >
> > >   List"
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > <%@page contentType="text/html"%>
> > > 
> > > JSP Page
> > > 
> > >
> > > <%@ page import="java.io.*" %>
> > > <%@ page import="java.util.*" %>
> > >
> > >  > > ="mada.trips.PictureBrowserBean" />
> > >
> > > <%
> > > //pictureBrowserBean.setBaseDir(getServletConfig().getServletContext
> > > ().getRealPath("/"));
> > > pictureBrowserBean.setBaseDir("");
> > > pictureBrowserBean.setAlbumDir("images/");
> > > try {
> > >pictureBrowserBean.parseAlbums();
> > > }
> > > catch (NullPointerException e) {
> > >out.println(e.toString());
> > >return; // HERE
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




How to end a JSP

2002-05-15 Thread Adam Pfeiffer

If you have a try/catch block in a jsp and you catch an error that is know to cause 
the page not
to function, how can you gracefully skip the rest of the jsp page and print an error 
message.  For
example, in the below code pictureBrowserBean.parseAlbums(); is going to throw a null 
pointer
exception.  I want the catch block to print an error message and quit running the jsp. 
 How do I
do this?

<%@page contentType="text/html"%>

JSP Page


<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>



<%
//pictureBrowserBean.setBaseDir(getServletConfig().getServletContext().getRealPath("/"));
pictureBrowserBean.setBaseDir("");
pictureBrowserBean.setAlbumDir("images/");
try {
   pictureBrowserBean.parseAlbums();
}
catch (NullPointerException e) {
   out.println(e.toString());  

}


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: subclass constructor class

2002-05-09 Thread Adam Pfeiffer

Ah, that makes sense.  Thanks for the help!

--- Larry Meadors <[EMAIL PROTECTED]> wrote:
> They both subclass Object.
>  
> Change 
>   public class PictureBrowserBean {
> to 
>   public class PictureBrowserBean extends FileBrowserBean {
> 
> 
> >>> [EMAIL PROTECTED] 05/09/02 02:12PM >>>
> Hello,
> superclass is: FileBrowserBean.java
> subclass is:   PictureBrowserBean.java
> 
> 


__
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




subclass constructor class

2002-05-09 Thread Adam Pfeiffer

Hello,
superclass is: FileBrowserBean.java
subclass is:   PictureBrowserBean.java

When I try to call the constructor in FileBrowserBean.java from 
PictureBrowserBean.java I get the
following compile time error:

PictureBrowserBean.java:10: Object() in java.lang.Object cannot be applied to 
(java.lang.String)
  super("/");
  ^
1 error

Here is the FileBrowserBean class
###

package mada.trips;

import java.io.*;
import java.util.*;

public class FileBrowserBean {

String baseDirectory = null;
ArrayList directories = new ArrayList();
ArrayList files = new ArrayList();
Iterator filesIt = null;
Iterator directoriesIt = null;
File baseDir = null;

public FileBrowserBean (String directory) {
setBaseDirectory(directory);
}

public FileBrowserBean () {

}

public void setBaseDirectory(String directory) {
baseDirectory = directory;
baseDir = new File(baseDirectory);
}

public void parseDirectory () {
File fileList[] = null;

directories.clear();
files.clear();
fileList = baseDir.listFiles();
for(int i=0; i < fileList.length; i++) {
if (fileList[i].isDirectory()) {
directories.add(fileList[i].toString());
} else {
files.add(fileList[i].toString());
}
}
filesIt = files.iterator();
directoriesIt = directories.iterator();
}

public boolean hasNextFile() {
return filesIt.hasNext();
}

public String nextFile() {
return filesIt.next().toString();
}

public boolean hasNextDirectory() {
return directoriesIt.hasNext();
}

public String nextDirectory() {
return directoriesIt.next().toString();
}

public String getBaseDirectory() {
return baseDirectory;
}

}

Here is the PictureBrowserBean class:
#
package mada.trips;

import java.io.*;
import java.util.*;
import mada.trips.FileBrowserBean;

public class PictureBrowserBean {

   public PictureBrowserBean () {
  super("/");
   }

}


__
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




List file relative to jsp

2002-05-03 Thread Adam Pfeiffer

I am running Tomcat 4.0.  I am trying to list all files and directories in a directory 
relative to
a jsp.  Here an example:

My jsp page is at:
/opt/jakarta-tomcat-4.0.3/webapps/examples/jsp/TestPage.jsp

The directory which I want a listing of all files and directories in is at:
/opt/jakarta-tomcat-4.0.3/webapps/examples/jsp/trips/images

lets say there are 3 images with the names of image1.jpg, image2.jpg, image3.jpg. 

I want a method that would return 
trips/images/image1.jpg
trips/images/image2.jpg
/trip/images/image3.jsp

when called from TestPage.jsp

Thanks for you help in advance.

__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe:   
For additional commands: 
Troubles with the list: