You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Eric Miller <je...@uchicago.edu> on 2002/01/11 22:02:57 UTC

Re: No startup.sh in RPM Distribution of Tomcat 4.0.1 for Linux

IMHO, I don't think it's a good idea to make customizations like this. IMHO,
all the distributions should contain the same files.

Jon

----- Original Message -----
From: "GOMEZ Henri" <hg...@slib.fr>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, November 09, 2001 7:13 AM
Subject: RE: No startup.sh in RPM Distribution of Tomcat 4.0.1 for Linux


> >Don't use the RPM to install this under Linux.  Get the nightly tarball
> >instead.  And I thought this was going to be easy! ;-)
> >
> >-----Original Message-----
> >From: Robert D. Morse [mailto:rmorse@mdesignz.com]
> >Sent: Friday, November 09, 2001 4:50 AM
> >To: tomcat-user@jakarta.apache.org
> >Subject: No startup.sh in RPM Distribution of Tomcat 4.0.1 for Linux
> >
> >
> >The RPM download of Tomcat 4.0.1 (14-oct-2001) does not contain the
> >startup.sh as described in the documentation.  The RPM installs, but
> >pointing to http://localhost:8080 produces nothing.  What's up
> >with this?
> >
>
> Did you read the RPM changelog ?
>
> the http port has been changed from 8080 to 8180 to let
> tomcat 4.0 works together with tomcat 3.2 or 3.3 !
>
> Also the startup.sh is not needed.
>
> Just use tomcat4 cmd instead ......
>
> Frankly do you find the name startup.sh is better
> than tomcat4 ?????
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Sessions across contexts, is it possible?

Posted by Chad Johnson <ch...@netnet.net>.
Great, thanks for the insight.  The persistance layer sounds most
pleasing.

-Chad


On Fri, 11 Jan 2002, Craig R. McClanahan wrote:

> No, virtual hosts are considered (by the servlet API) to be totally
> independent.
> 
> If you want to delve into container-specific behavior, classes that are
> loaded from a shared class loader in Tomcat (i.e. from the
> "$CATALINA_HOME?lib"  directory, for example) are global to all web apps,
> even across virtual hosts.  Static variables declared in such classes, for
> example, have only one instance across all web apps.
> 
> However, I would *****strongly***** urge you to reconsider your overall
> application architecture if you are tempted by depending on this kind of
> feature (even though shared libraries of some sort are very commonly
> implemented).  Dependence on global context like this (instead of writing
> APIs to an abstract persistence layer) is just going to get you into
> trouble later with scalability and maintainability issues.  You'd be much
> better off designing your individual web applications as modularly as
> possible -- delegate any required state sharing to mechanisms to get
> common persistence layer objects from whatever storage mechanisms you are
> using.
> 
> If you decide not to heed this advice (yes, I know, it is a lot more work
> up front), then don't expect any sympathy from me when you run into
> barriers trying to expand and enhance your application in the future.
> 
> Craig McClanahan


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Sessions across contexts, is it possible?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 11 Jan 2002, Chad Johnson wrote:

> Date: Fri, 11 Jan 2002 22:04:37 -0600 (CST)
> From: Chad Johnson <ch...@netnet.net>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: RE: Sessions across contexts, is it possible?
>
> Hey,
>   What if we change the scenario a little bit.  Is is possible to share
> objects between contexts that reside in differant <host>
> blocks?  getContext() does not seem to work in that scenario.
>
> -Chad Johnson

No, virtual hosts are considered (by the servlet API) to be totally
independent.

If you want to delve into container-specific behavior, classes that are
loaded from a shared class loader in Tomcat (i.e. from the
"$CATALINA_HOME?lib"  directory, for example) are global to all web apps,
even across virtual hosts.  Static variables declared in such classes, for
example, have only one instance across all web apps.

However, I would *****strongly***** urge you to reconsider your overall
application architecture if you are tempted by depending on this kind of
feature (even though shared libraries of some sort are very commonly
implemented).  Dependence on global context like this (instead of writing
APIs to an abstract persistence layer) is just going to get you into
trouble later with scalability and maintainability issues.  You'd be much
better off designing your individual web applications as modularly as
possible -- delegate any required state sharing to mechanisms to get
common persistence layer objects from whatever storage mechanisms you are
using.

If you decide not to heed this advice (yes, I know, it is a lot more work
up front), then don't expect any sympathy from me when you run into
barriers trying to expand and enhance your application in the future.

Craig McClanahan



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Sessions across contexts, is it possible?

Posted by Chad Johnson <ch...@netnet.net>.
Hey,
  What if we change the scenario a little bit.  Is is possible to share
objects between contexts that reside in differant <host>
blocks?  getContext() does not seem to work in that scenario.

-Chad Johnson

On Fri, 11 Jan 2002, Craig R. McClanahan wrote:

> Containers are not required to let you call ServletContext.getContext()
> and get a non-null value -- it is allowed to return null for all requests
> (for security reasons).  For Tomcat 4, the default is to disallow this
> kind of access, but you can turn it off (with the crossContext attribute).
> Other servers may or may not let you enable this facility.
> 
> Even if you get the reference to the other ServletContext, I would be more
> concerned about your reliance on getRealPath() at all -- which implies
> that you are going to use file I/O to retrieve static resources from
> within the "other" webapp.  This won't work at all when the application is
> *not* run from an unpacked directory -- you should use
> ServletContext.getResource() or ServletContext.getResourceAsStream()
> instead for maximum portability.
> 
> Craig


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Sessions across contexts, is it possible?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 11 Jan 2002, Brandon Cruz wrote:

> Date: Fri, 11 Jan 2002 18:07:00 -0600
> From: Brandon Cruz <bc...@norvax.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: RE: Sessions across contexts, is it possible?
>
> This seems to be breaking the jsp specification.  Will this really work, and
> will it bring headaches in the future if I switch to a different servlet
> container?
>

Containers are not required to let you call ServletContext.getContext()
and get a non-null value -- it is allowed to return null for all requests
(for security reasons).  For Tomcat 4, the default is to disallow this
kind of access, but you can turn it off (with the crossContext attribute).
Other servers may or may not let you enable this facility.

Even if you get the reference to the other ServletContext, I would be more
concerned about your reliance on getRealPath() at all -- which implies
that you are going to use file I/O to retrieve static resources from
within the "other" webapp.  This won't work at all when the application is
*not* run from an unpacked directory -- you should use
ServletContext.getResource() or ServletContext.getResourceAsStream()
instead for maximum portability.

Craig


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Sessions across contexts, is it possible?

Posted by Brandon Cruz <bc...@norvax.com>.
This seems to be breaking the jsp specification.  Will this really work, and
will it bring headaches in the future if I switch to a different servlet
container?



-----Original Message-----
From: Mario Felarca [mailto:gennadius@yahoo.com]
Sent: Friday, January 11, 2002 5:49 PM
To: Tomcat Users List
Subject: RE: Sessions across contexts, is it possible?


At 04:21 PM 01/11/2002 -0600, you wrote:

If you have your context's set to crossContext="true", you can receive the
request in one context, set a request attribute with the value
(setAttribute("otherContextPath", getServletContext().getRealPath("")), and
then forward the request to the other context.

In the other context, you just pull the data out of the request attribute
with that key.

I don't know if you were looking for something simpler than that, but if
you are just trying to pass data around, that should work.

M-



>I want to pass servletContext.getRealPath("") over to another context.  I
>don't want to have to do this with http parameters because of security
>reasons.  Am I out of luck, or is there a way?
>
>Thanks in advance for any help!
>
>-----Original Message-----
>From: Brandon Cruz [mailto:bcruz@norvax.com]
>Sent: Friday, January 11, 2002 3:45 PM
>To: Tomcat Users List; Jonathan Eric Miller
>Subject: Sessions across contexts, is it possible?
>
>
>Is it possible to use session attributes across contexts in tomcat 3.2.4?
>
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>



_________________________________________________________

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com




--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Sessions across contexts, is it possible?

Posted by Mario Felarca <ge...@yahoo.com>.
At 04:21 PM 01/11/2002 -0600, you wrote:

If you have your context's set to crossContext="true", you can receive the 
request in one context, set a request attribute with the value 
(setAttribute("otherContextPath", getServletContext().getRealPath("")), and 
then forward the request to the other context.

In the other context, you just pull the data out of the request attribute 
with that key.

I don't know if you were looking for something simpler than that, but if 
you are just trying to pass data around, that should work.

M-



>I want to pass servletContext.getRealPath("") over to another context.  I
>don't want to have to do this with http parameters because of security
>reasons.  Am I out of luck, or is there a way?
>
>Thanks in advance for any help!
>
>-----Original Message-----
>From: Brandon Cruz [mailto:bcruz@norvax.com]
>Sent: Friday, January 11, 2002 3:45 PM
>To: Tomcat Users List; Jonathan Eric Miller
>Subject: Sessions across contexts, is it possible?
>
>
>Is it possible to use session attributes across contexts in tomcat 3.2.4?
>
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Sessions across contexts, is it possible?

Posted by Matt Egyhazy <mw...@virginia.edu>.
heh, duh, i replied to your second message, didnt see the first one, sorry.
----- Original Message -----
From: "Matt Egyhazy" <mw...@virginia.edu>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, January 11, 2002 6:28 PM
Subject: Re: Sessions across contexts, is it possible?


> im not 100% sure but i dont think you can do that.  at least not on 3.2.4.
> for questions such as this, it would be helpful if you put the version of
> tomcat you are using.
>
> matt
> ----- Original Message -----
> From: "Brandon Cruz" <bc...@norvax.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Friday, January 11, 2002 5:21 PM
> Subject: RE: Sessions across contexts, is it possible?
>
>
> > I want to pass servletContext.getRealPath("") over to another context.
I
> > don't want to have to do this with http parameters because of security
> > reasons.  Am I out of luck, or is there a way?
> >
> > Thanks in advance for any help!
> >
> > -----Original Message-----
> > From: Brandon Cruz [mailto:bcruz@norvax.com]
> > Sent: Friday, January 11, 2002 3:45 PM
> > To: Tomcat Users List; Jonathan Eric Miller
> > Subject: Sessions across contexts, is it possible?
> >
> >
> > Is it possible to use session attributes across contexts in tomcat
3.2.4?
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Sessions across contexts, is it possible?

Posted by Matt Egyhazy <mw...@virginia.edu>.
im not 100% sure but i dont think you can do that.  at least not on 3.2.4.
for questions such as this, it would be helpful if you put the version of
tomcat you are using.

matt
----- Original Message -----
From: "Brandon Cruz" <bc...@norvax.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, January 11, 2002 5:21 PM
Subject: RE: Sessions across contexts, is it possible?


> I want to pass servletContext.getRealPath("") over to another context.  I
> don't want to have to do this with http parameters because of security
> reasons.  Am I out of luck, or is there a way?
>
> Thanks in advance for any help!
>
> -----Original Message-----
> From: Brandon Cruz [mailto:bcruz@norvax.com]
> Sent: Friday, January 11, 2002 3:45 PM
> To: Tomcat Users List; Jonathan Eric Miller
> Subject: Sessions across contexts, is it possible?
>
>
> Is it possible to use session attributes across contexts in tomcat 3.2.4?
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Sessions across contexts, is it possible?

Posted by Brandon Cruz <bc...@norvax.com>.
I want to pass servletContext.getRealPath("") over to another context.  I
don't want to have to do this with http parameters because of security
reasons.  Am I out of luck, or is there a way?

Thanks in advance for any help!

-----Original Message-----
From: Brandon Cruz [mailto:bcruz@norvax.com]
Sent: Friday, January 11, 2002 3:45 PM
To: Tomcat Users List; Jonathan Eric Miller
Subject: Sessions across contexts, is it possible?


Is it possible to use session attributes across contexts in tomcat 3.2.4?


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Sessions across contexts, is it possible?

Posted by Brandon Cruz <bc...@norvax.com>.
Is it possible to use session attributes across contexts in tomcat 3.2.4?  


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>