Multi-level context paths possible in TC 5.5.9?

2005-09-30 Thread David Kerber
I am trying to migrate a webapp from SilverStream 3.7.5 to Tomcat, while 
keeping the same URL for my users.  Right now, they hit it at 
www.myserver.com:port/level1/level2/Login.jsp, where level1 is a 
database name, and level2 is a name we assigned.


The .war that provides the content is called SiteData.war, so when I 
deploy it to tomcat, it shows up at context path /SiteData.  I would 
love it if Tomcat could present the same stuff at the /level1/level2 
path.  If I have to deploy it as individual files instead of in a .war 
file, that's ok to, as would be other mods to path names, etc.  If 
someone could just give me some hints, I'd be very grateful.


BTW, I spent several hours googling and searching newsgroups, and found 
nothing showing multi-level context paths, so I don't even know for sure 
if it's possible.


Thanks!

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



RE: Multi-level context paths possible in TC 5.5.9?

2005-09-30 Thread Trung Nguyen
David,

You can do this by modify the server.xml file from $TOMAT_HOME/conf/ directory:

Host name=www.myserver.com debug=0 unpackWARs=true
Context path=/level1/level2 docBase=/usr/var/apps/SiteData 
debug=0 reloadable=true crossContext=true /
/Host

Where docBase is where you store your app. (SiteData)

Hope this help

---Trung


-Original Message-
From: David Kerber [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 1:47 PM
To: Tomcat Users List
Subject: Multi-level context paths possible in TC 5.5.9?


I am trying to migrate a webapp from SilverStream 3.7.5 to Tomcat, while 
keeping the same URL for my users.  Right now, they hit it at 
www.myserver.com:port/level1/level2/Login.jsp, where level1 is a 
database name, and level2 is a name we assigned.

The .war that provides the content is called SiteData.war, so when I 
deploy it to tomcat, it shows up at context path /SiteData.  I would 
love it if Tomcat could present the same stuff at the /level1/level2 
path.  If I have to deploy it as individual files instead of in a .war 
file, that's ok to, as would be other mods to path names, etc.  If 
someone could just give me some hints, I'd be very grateful.

BTW, I spent several hours googling and searching newsgroups, and found 
nothing showing multi-level context paths, so I don't even know for sure 
if it's possible.

Thanks!

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


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



Re: Multi-level context paths possible in TC 5.5.9?

2005-09-30 Thread David Kerber
Awesome!!!  Worked first time.  I had tried messing with context 
paths in an application .xml, but never thought to try the server.xml.


One question:  what does the crossContext flag do?  Or is that what 
lets it look to a different path for the context path?  The help files I 
looked through don't list it...


Thanks a bunch!!


Trung Nguyen wrote:

David,

You can do this by modify the server.xml file from $TOMAT_HOME/conf/ directory:

Host name=www.myserver.com debug=0 unpackWARs=true
Context path=/level1/level2 docBase=/usr/var/apps/SiteData debug=0 
reloadable=true crossContext=true /
/Host

Where docBase is where you store your app. (SiteData)

Hope this help

---Trung


-Original Message-
From: David Kerber [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 1:47 PM
To: Tomcat Users List
Subject: Multi-level context paths possible in TC 5.5.9?


I am trying to migrate a webapp from SilverStream 3.7.5 to Tomcat, while 
keeping the same URL for my users.  Right now, they hit it at 
www.myserver.com:port/level1/level2/Login.jsp, where level1 is a 
database name, and level2 is a name we assigned.


The .war that provides the content is called SiteData.war, so when I 
deploy it to tomcat, it shows up at context path /SiteData.  I would 
love it if Tomcat could present the same stuff at the /level1/level2 
path.  If I have to deploy it as individual files instead of in a .war 
file, that's ok to, as would be other mods to path names, etc.  If 
someone could just give me some hints, I'd be very grateful.


BTW, I spent several hours googling and searching newsgroups, and found 
nothing showing multi-level context paths, so I don't even know for sure 
if it's possible.


Thanks!

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


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





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



RE: Multi-level context paths possible in TC 5.5.9?

2005-09-30 Thread Trung Nguyen
David,

Set crossContext to true if you want calls within this application to 
ServletContext.getContext() to successfully return a request dispatcher for 
other web applications running on this virtual host. Set to false (the default) 
in security conscious environments, to make getContext() always return null.

Hope this help.

---Trung


-Original Message-
From: David Kerber [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 2:47 PM
To: Tomcat Users List
Subject: Re: Multi-level context paths possible in TC 5.5.9?


Awesome!!!  Worked first time.  I had tried messing with context 
paths in an application .xml, but never thought to try the server.xml.

One question:  what does the crossContext flag do?  Or is that what 
lets it look to a different path for the context path?  The help files I 
looked through don't list it...

Thanks a bunch!!


Trung Nguyen wrote:
 David,
 
 You can do this by modify the server.xml file from $TOMAT_HOME/conf/ 
 directory:
 
 Host name=www.myserver.com debug=0 unpackWARs=true
   Context path=/level1/level2 docBase=/usr/var/apps/SiteData 
 debug=0 reloadable=true crossContext=true /
 /Host
 
 Where docBase is where you store your app. (SiteData)
 
 Hope this help
 
 ---Trung
 
 
 -Original Message-
 From: David Kerber [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 30, 2005 1:47 PM
 To: Tomcat Users List
 Subject: Multi-level context paths possible in TC 5.5.9?
 
 
 I am trying to migrate a webapp from SilverStream 3.7.5 to Tomcat, while 
 keeping the same URL for my users.  Right now, they hit it at 
 www.myserver.com:port/level1/level2/Login.jsp, where level1 is a 
 database name, and level2 is a name we assigned.
 
 The .war that provides the content is called SiteData.war, so when I 
 deploy it to tomcat, it shows up at context path /SiteData.  I would 
 love it if Tomcat could present the same stuff at the /level1/level2 
 path.  If I have to deploy it as individual files instead of in a .war 
 file, that's ok to, as would be other mods to path names, etc.  If 
 someone could just give me some hints, I'd be very grateful.
 
 BTW, I spent several hours googling and searching newsgroups, and found 
 nothing showing multi-level context paths, so I don't even know for sure 
 if it's possible.
 
 Thanks!
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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


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



Re: Multi-level context paths possible in TC 5.5.9?

2005-09-30 Thread David Kerber

It does help; thanks for the explanation.

Dave


Trung Nguyen wrote:

David,

Set crossContext to true if you want calls within this application to 
ServletContext.getContext() to successfully return a request dispatcher for other web 
applications running on this virtual host. Set to false (the default) in security 
conscious environments, to make getContext() always return null.

Hope this help.

---Trung


-Original Message-
From: David Kerber [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 2:47 PM
To: Tomcat Users List
Subject: Re: Multi-level context paths possible in TC 5.5.9?


Awesome!!!  Worked first time.  I had tried messing with context 
paths in an application .xml, but never thought to try the server.xml.


One question:  what does the crossContext flag do?  Or is that what 
lets it look to a different path for the context path?  The help files I 
looked through don't list it...


Thanks a bunch!!


Trung Nguyen wrote:


David,

You can do this by modify the server.xml file from $TOMAT_HOME/conf/ directory:

Host name=www.myserver.com debug=0 unpackWARs=true
Context path=/level1/level2 docBase=/usr/var/apps/SiteData debug=0 
reloadable=true crossContext=true /
/Host

Where docBase is where you store your app. (SiteData)

Hope this help

---Trung


-Original Message-
From: David Kerber [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 1:47 PM
To: Tomcat Users List
Subject: Multi-level context paths possible in TC 5.5.9?


I am trying to migrate a webapp from SilverStream 3.7.5 to Tomcat, while 
keeping the same URL for my users.  Right now, they hit it at 
www.myserver.com:port/level1/level2/Login.jsp, where level1 is a 
database name, and level2 is a name we assigned.


The .war that provides the content is called SiteData.war, so when I 
deploy it to tomcat, it shows up at context path /SiteData.  I would 
love it if Tomcat could present the same stuff at the /level1/level2 
path.  If I have to deploy it as individual files instead of in a .war 
file, that's ok to, as would be other mods to path names, etc.  If 
someone could just give me some hints, I'd be very grateful.


BTW, I spent several hours googling and searching newsgroups, and found 
nothing showing multi-level context paths, so I don't even know for sure 
if it's possible.


Thanks!



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



Possible Security Bug

2005-09-28 Thread John Caron

I have a _possible_ bug involving security in Tomcat 5.0.28. I dont see it in 
the bug database, although it may be described in a way that I didnt search for.

I would prefer to send it privately in case its real. If thats not feasible, I 
will post it here. Or is there a way to put it in the database but mark it 
private?

Can anyone advise?

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



Re: Possible Security Bug

2005-09-28 Thread Mark Thomas

John Caron wrote:
I have a _possible_ bug involving security in Tomcat 5.0.28. I dont see 
it in the bug database, although it may be described in a way that I 
didnt search for.


I would prefer to send it privately in case its real. If thats not 
feasible, I will post it here. Or is there a way to put it in the 
database but mark it private?


Can anyone advise?


Security bugs should be sent to [EMAIL PROTECTED] (who will send it 
on to the tomcat team). If you send it to me directly I'll take a look 
now.


One other point, when sending a message on a new topic to the list, 
please don't reply to an old message and change the subject line. 
Thread aware mail clients still recognise your new message as part 
of the old thread. The correct process is to create a new message.


Mark
[EMAIL PROTECTED]



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



Multiple Tomcats on the same machine possible?

2005-08-25 Thread Franklin Phan

Instead of having one Tomcat on each machine, we'd like to try to fit multiple 
on one.  Any advice on how to go about that?  We use Windows XP.  How would the 
start/stop services work then?  I
presume that we will need a different port number for each Tomcat install.


Thanks.




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



Re: Multiple Tomcats on the same machine possible?

2005-08-25 Thread David Boyer
Yep, different port for shutdown and any AJP/HTTP connectors you use. That and 
a unique service name should be all you need. 

 [EMAIL PROTECTED] 1:04 PM 8/25/200525/2005 
Instead of having one Tomcat on each machine, we'd like to try to fit multiple 
on one.  Any advice on how to go about that?  We use Windows XP.  How would the 
start/stop services work then?  I
presume that we will need a different port number for each Tomcat install.


Thanks.




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





Possible bug in request parameter decoding

2005-06-16 Thread Chris Burdess
In Tomcat 5.5.9, class org.apache.catalina.connector.Request, lines 
2307-2312, the charset used to decode request parameters is identified
as org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING, i.e.
ISO-8859-1.

According to

  http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars

request parameters are encoded in UTF-8. A simple form test suffices to
confirm that my user-agents (Camino and Safari) correctly encode both
POST and GET request parameters in UTF-8.

It seems this may be a long-standing bug in Tomcat, preventing the
posting of non-ASCII text from standards-compliant user-agents. I can't
find anything matching in Bugzilla though. Is there a good reason for
using Latin-1 here? 
-- 
Chris Burdess

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



Re: Possible bug in request parameter decoding

2005-06-16 Thread Tim Funk
The HTTP spec is vague. It has many references to ISO8859-1. IIRC, there is a 
connector option to decode parameters as UTF-8.


-Tim

Chris Burdess wrote:

In Tomcat 5.5.9, class org.apache.catalina.connector.Request, lines 
2307-2312, the charset used to decode request parameters is identified

as org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING, i.e.
ISO-8859-1.

According to

  http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars

request parameters are encoded in UTF-8. A simple form test suffices to
confirm that my user-agents (Camino and Safari) correctly encode both
POST and GET request parameters in UTF-8.

It seems this may be a long-standing bug in Tomcat, preventing the
posting of non-ASCII text from standards-compliant user-agents. I can't
find anything matching in Bugzilla though. Is there a good reason for
using Latin-1 here? 


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



RE: Possible bug in request parameter decoding

2005-06-16 Thread Caldarale, Charles R
 From: Chris Burdess [mailto:[EMAIL PROTECTED] 
 Subject: Possible bug in request parameter decoding
 
 According to
   http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars
 request parameters are encoded in UTF-8.

Well, that's not quite how I read it.  By definition (RFC 2396), URIs
are not supposed to contain non-ASCII values.  The HTML 4.0 appendix
referred to above makes the somewhat contradictory suggestion to use
UTF-8 to handle non-ASCII, ignoring the fact that UTF-8 encoding
produces byte values outside of the ASCII range.  Since the discussion
in this area of the appendix is related to browser, not server,
behavior, it's not really relevant to what Tomcat should do when it
encounters illegal (non-ASCII) values in a URI supplied on a browser
request.

In any event, as Tim noted, you can configure how the connector should
interpret non-ASCII bytes by specifying a value for URIEncoding in your
server.xml file.  I suspect that the default value of ISO-8859-1 is
there largely for historical reasons, since it was the predominant
encoding before UTF-8 became popular.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: Re: 5.0.28 w/ MX4J 3.0.1, possible?

2005-06-14 Thread Rick
Repost, hadn't heard anything...
 Anyone have a code example of talking to the JMX Http interface
pragmatically?  With latest MX4J or JMXRI?


Thanks Bill,
  So if I can only use the http method, then I assume I should be able to
make the code work using the newer MX4J HTTPConnector? Or am I missing
something.
Anyone have a code snippet using the HTTPConnector to connect to Tomcat's
Mbean server?  I seem to be having trouble getting the url syntax to work
with..

---
JMXServiceURL address = new JMXServiceURL(http, localhost, 9000);
---

I get the error..
---
java.net.MalformedURLException: Could not find provider for protocol http
---

So I'm a bit stumped, if I'm using http, why is it saying it has no provider
for it, is there some other I need to use in its place?

Thanks again
-Rick
 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker Posted At:
Thursday, June 09, 2005 9:55 PM Posted To: Tomcat Dev
Conversation: Re: 5.0.28 w/ MX4J 3.0.1, possible?
Subject: Re: 5.0.28 w/ MX4J 3.0.1, possible?



Rick [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,
  I have been trying to migrate to the latest version of MX4J (3.0.1) 
 from the old 1.1.1 version.
 And for the life of me, I don't seem to be able to get it to work.  I 
 use JMX to communicate to various servers in our webapp to show 
 session info on different nodes, and I would also like to implement 
 some other features..

 Old 1.1.1 implementation
 -- jk2.properties  mx.enabled=true
 mx.jrmpPort=1099
 mx.jrmpHost=localhost

 -- Code -- Hashtable environment = new 
 Hashtable();  environment.put(Context.INITIAL_CONTEXT_FACTORY,
 com.sun.jndi.rmi.registry.RegistryContextFactory);
  environment.put(Context.PROVIDER_URL,rmi://localhost:1099);

 JRMPConnector connector = new JMRPConnector(); 
 connector.connect(jrmp, environment);

 RemoteMBeanServer server = connector.getRemoteMBeanServer();
 

 Ok.. So I replaced jmx.jar with the latest version of mx4j.jar 
 (renamed to
 jmx.jar) under tomcat_home/bin
 And replaced or added
 Mx4j-jmx.jar
 Mx4j-tools.jar
 Mx4j-remote.jar
 To /tomcat_home/common/lib

 Now, when I start tomcat I get the error..
 MX4j RMI adapter not loaded: java.lang.ClassNotFoundException:
 mx4j.adaptor.rmi.jrmp.JRMPAdaptor 

 Which is correct, since that's not a valid class now, but how do I 
 configure tomcat to properly use the new mx4j.


Yep. The jrmp adapter is gone.

 If I enable mx.httpPort=9000/mx.httpHost=localhost then JMX does 
 enable and I get a pretty little message like...
 HttpAdapter version 3.0.1 started on port 9000 , but I have no idea 
 at this point how to properly use the HTTP connector.

 Any info or suggestions to getting the RMI adapter working, or how to 
 use the http adapter, or just the best way to go about Using MX4J, not 
 sure if either is possible with out updating to tomcat 5.5.x.


The RMI adapter is gone in mx4j 3.x.  There is nothing that Tomat can do
about it.  You can access the http adapter by simply typing
http://localhost:9000 in you favorite browser.  The only thing you gain by
upgrading to 5.5.x is the ability to use the http adapter in XML instead of
HTML.

 Thanks,

 Rick




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



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



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



Re: 5.0.28 w/ MX4J 3.0.1, possible?

2005-06-10 Thread Bill Barker

Rick [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hello,
  I have been trying to migrate to the latest version of MX4J (3.0.1) from
 the old 1.1.1 version.
 And for the life of me, I don't seem to be able to get it to work.  I use
 JMX to communicate to various servers in our webapp to show session info 
 on
 different nodes, and I would also like to implement some other features..

 Old 1.1.1 implementation
 -- jk2.properties 
 mx.enabled=true
 mx.jrmpPort=1099
 mx.jrmpHost=localhost

 -- Code --
 Hashtable environment = new Hashtable();
  environment.put(Context.INITIAL_CONTEXT_FACTORY,
 com.sun.jndi.rmi.registry.RegistryContextFactory);
  environment.put(Context.PROVIDER_URL,rmi://localhost:1099);

 JRMPConnector connector = new JMRPConnector();
 connector.connect(jrmp, environment);

 RemoteMBeanServer server = connector.getRemoteMBeanServer();
 

 Ok.. So I replaced jmx.jar with the latest version of mx4j.jar (renamed to
 jmx.jar) under tomcat_home/bin
 And replaced or added
 Mx4j-jmx.jar
 Mx4j-tools.jar
 Mx4j-remote.jar
 To /tomcat_home/common/lib

 Now, when I start tomcat I get the error..
 MX4j RMI adapter not loaded: java.lang.ClassNotFoundException:
 mx4j.adaptor.rmi.jrmp.JRMPAdaptor 

 Which is correct, since that's not a valid class now, but how do I 
 configure
 tomcat to properly use the new mx4j.


Yep. The jrmp adapter is gone.

 If I enable mx.httpPort=9000/mx.httpHost=localhost then JMX does enable 
 and
 I get a pretty little message like...
 HttpAdapter version 3.0.1 started on port 9000 , but I have no idea at
 this point how to properly use the HTTP connector.

 Any info or suggestions to getting the RMI adapter working, or how to use
 the http adapter, or just the best way to go about
 Using MX4J, not sure if either is possible with out updating to tomcat
 5.5.x.


The RMI adapter is gone in mx4j 3.x.  There is nothing that Tomat can do 
about it.  You can access the http adapter by simply typing 
http://localhost:9000 in you favorite browser.  The only thing you gain by 
upgrading to 5.5.x is the ability to use the http adapter in XML instead of 
HTML.

 Thanks,

 Rick 




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



RE: Re: 5.0.28 w/ MX4J 3.0.1, possible?

2005-06-10 Thread Rick
Thanks Bill,
  So if I can only use the http method, then I assume I should be able to
make the code work using the newer MX4J HTTPConnector? Or am I missing
something.
Anyone have a code snippet using the HTTPConnector to connect to Tomcat's
Mbean server?  I seem to be having trouble getting the url syntax to work
with..

---
JMXServiceURL address = new JMXServiceURL(http, localhost, 9000);
---

I get the error..
---
java.net.MalformedURLException: Could not find provider for protocol http
---

So I'm a bit stumped, if I'm using http, why is it saying it has no provider
for it, is there some other I need to use in its place?

Thanks again
-Rick
 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Posted At: Thursday, June 09, 2005 9:55 PM
Posted To: Tomcat Dev
Conversation: Re: 5.0.28 w/ MX4J 3.0.1, possible?
Subject: Re: 5.0.28 w/ MX4J 3.0.1, possible?



Rick [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,
  I have been trying to migrate to the latest version of MX4J (3.0.1) 
 from the old 1.1.1 version.
 And for the life of me, I don't seem to be able to get it to work.  I 
 use JMX to communicate to various servers in our webapp to show 
 session info on different nodes, and I would also like to implement 
 some other features..

 Old 1.1.1 implementation
 -- jk2.properties  mx.enabled=true
 mx.jrmpPort=1099
 mx.jrmpHost=localhost

 -- Code -- Hashtable environment = new 
 Hashtable();  environment.put(Context.INITIAL_CONTEXT_FACTORY,
 com.sun.jndi.rmi.registry.RegistryContextFactory);
  environment.put(Context.PROVIDER_URL,rmi://localhost:1099);

 JRMPConnector connector = new JMRPConnector(); 
 connector.connect(jrmp, environment);

 RemoteMBeanServer server = connector.getRemoteMBeanServer();
 

 Ok.. So I replaced jmx.jar with the latest version of mx4j.jar 
 (renamed to
 jmx.jar) under tomcat_home/bin
 And replaced or added
 Mx4j-jmx.jar
 Mx4j-tools.jar
 Mx4j-remote.jar
 To /tomcat_home/common/lib

 Now, when I start tomcat I get the error..
 MX4j RMI adapter not loaded: java.lang.ClassNotFoundException:
 mx4j.adaptor.rmi.jrmp.JRMPAdaptor 

 Which is correct, since that's not a valid class now, but how do I 
 configure tomcat to properly use the new mx4j.


Yep. The jrmp adapter is gone.

 If I enable mx.httpPort=9000/mx.httpHost=localhost then JMX does 
 enable and I get a pretty little message like...
 HttpAdapter version 3.0.1 started on port 9000 , but I have no idea 
 at this point how to properly use the HTTP connector.

 Any info or suggestions to getting the RMI adapter working, or how to 
 use the http adapter, or just the best way to go about Using MX4J, not 
 sure if either is possible with out updating to tomcat 5.5.x.


The RMI adapter is gone in mx4j 3.x.  There is nothing that Tomat can do
about it.  You can access the http adapter by simply typing
http://localhost:9000 in you favorite browser.  The only thing you gain by
upgrading to 5.5.x is the ability to use the http adapter in XML instead of
HTML.

 Thanks,

 Rick




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



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



5.0.28 w/ MX4J 3.0.1, possible?

2005-06-09 Thread Rick
Hello,
  I have been trying to migrate to the latest version of MX4J (3.0.1) from
the old 1.1.1 version.  
And for the life of me, I don't seem to be able to get it to work.  I use
JMX to communicate to various servers in our webapp to show session info on
different nodes, and I would also like to implement some other features..

Old 1.1.1 implementation
-- jk2.properties 
mx.enabled=true
mx.jrmpPort=1099
mx.jrmpHost=localhost

-- Code --
Hashtable environment = new Hashtable();
  environment.put(Context.INITIAL_CONTEXT_FACTORY,
com.sun.jndi.rmi.registry.RegistryContextFactory);
  environment.put(Context.PROVIDER_URL,rmi://localhost:1099);

JRMPConnector connector = new JMRPConnector();
connector.connect(jrmp, environment);

RemoteMBeanServer server = connector.getRemoteMBeanServer();


Ok.. So I replaced jmx.jar with the latest version of mx4j.jar (renamed to
jmx.jar) under tomcat_home/bin
And replaced or added
Mx4j-jmx.jar
Mx4j-tools.jar
Mx4j-remote.jar 
To /tomcat_home/common/lib

Now, when I start tomcat I get the error..
MX4j RMI adapter not loaded: java.lang.ClassNotFoundException:
mx4j.adaptor.rmi.jrmp.JRMPAdaptor 

Which is correct, since that's not a valid class now, but how do I configure
tomcat to properly use the new mx4j.

If I enable mx.httpPort=9000/mx.httpHost=localhost then JMX does enable and
I get a pretty little message like...
HttpAdapter version 3.0.1 started on port 9000 , but I have no idea at
this point how to properly use the HTTP connector.

Any info or suggestions to getting the RMI adapter working, or how to use
the http adapter, or just the best way to go about 
Using MX4J, not sure if either is possible with out updating to tomcat
5.5.x.

Thanks,
 
Rick




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



Possible to to log into db?

2005-05-26 Thread David
Hallo,

 

Anybody knows if how I can configure tomcat to store the access log into a
rational database? Is there an existing tutorial?

 

Regards

 

David



RE: Is it possible to run a Tomcat 4.x and Tomcat 5.x on one computer

2005-05-11 Thread Peter Crowther
 From: ojay78 [mailto:[EMAIL PROTECTED] 
 I have 2 webapplications and one of them have to run with the 
 tomcat 4.x
 Version the other one I want do install it on the new 5.x 
 version. Can I install both tomcat versions on the same server?

Yes.  I have that configuration running here - 4.1.31 and 5.0.28.

 Are both versions independent, so when one crashs it has no 
 influence on the other?

They are independent.  Each runs in its own JVM.

 I tried it today but I could only detect one Tomcat process in the
 Taskmanager and I could only connect to the 4.x manager tool 
 although I gave
 one version the port 8080 and the other one 9090.???!!!

As Tim pointed out, check the shutdown ports as well (near the top of
server.xml as it is distributed) - they also need to be different.

- Peter

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



Is it possible to run a Tomcat 4.x and Tomcat 5.x on one computer

2005-05-10 Thread ojay78
Hi,

 

I have 2 webapplications and one of them have to run with the tomcat 4.x
Version the other one I want do install it on the new 5.x version. Can I
install both tomcat versions on the same server?

 

Are both versions independent, so when one crashs it has no influence on the
other?

 

I tried it today but I could only detect one Tomcat process in the
Taskmanager and I could only connect to the 4.x manager tool although I gave
one version the port 8080 and the other one 9090.???!!!

 

 

Thanks for your help!

 

Oliver



Is it possible to run a Tomcat 4.x and Tomcat 5.x on one computer

2005-05-10 Thread ojay78
Hi,

 

I have 2 webapplications and one of them have to run with the tomcat 4.x
Version the other one I want do install it on the new 5.x version. Can I
install both tomcat versions on the same server?

 

Are both versions independent, so when one crashs it has no influence on the
other?

 

I tried it today but I could only detect one Tomcat process in the
Taskmanager and I could only connect to the 4.x manager tool although I gave
one version the port 8080 and the other one 9090.???!!!

 

 

Thanks for your help!

 

Oliver



Re: Is it possible to run a Tomcat 4.x and Tomcat 5.x on one computer

2005-05-10 Thread Tim Funk
Yes you can run as many tomats as you wish.
Make sure the shutdown ports are different. The default is 8005.
-Tim
ojay78 wrote:
Hi,
 

I have 2 webapplications and one of them have to run with the tomcat 4.x
Version the other one I want do install it on the new 5.x version. Can I
install both tomcat versions on the same server?
 

Are both versions independent, so when one crashs it has no influence on the
other?
 

I tried it today but I could only detect one Tomcat process in the
Taskmanager and I could only connect to the 4.x manager tool although I gave
one version the port 8080 and the other one 9090.???!!!
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Possible to include JSP document (.jspx) fragments that aren't well formed?

2005-04-25 Thread Jonathan Eric Miller
Does anyone know if it's possible to include a .jspx fragment in another 
.jspx file? When I say .jspx fragment, I mean a file that is in XML format, 
but, may not be well formed.

For example, I want to do something like the following. Currently, I'm 
receiving an error message like the following. I think what it's doing is 
assuming that the included files are .jsps instead of .jspxs. Previously, I 
tried naming the included files as .jspx, but, then, when I tried to compile 
it with Jasper, it wouldn't compile because it said the documents needed to 
be well formed. I need to see if I can figure out how to tell the jasper Ant 
task to only compile the page.jspx instead of all files ending with .jspx.

Does anyone know if it's possible to include .jspx fragments? i.e. ones that 
aren't well formed, or, do they have to be well formed? If the later is 
true, using JSPXs makes includes a lot less useful...

The goal here is to use XML syntax throughout and still have flexibility in 
using includes.

J:\at\reservations\build.xml:204: org.apache.jasper.JasperException: 
file:J:/at/
reservations/build/header.jspxf(9,7) lt;jsp:outputgt; must not be used in 
standard syntax

page.jspx
jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=2.0
jsp:directive.include file=../header.jspxf/
pHello, world!/p
jsp:directive.include file=../footer.jspxf/
/jsp:root
header.jspxf
html
title...
body...
footer.jspxf
/body
/html
Jon 

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


Re: mod_jk working together with mod_userdir - possible or not?

2005-04-25 Thread Torsten Krah
I got it partially working,

Listener className=org.apache.catalina.startup.UserConfig
directoryName=public_html
userClass=org.apache.catalina.startup.PasswdUserDatabase/

added in server.xml shows local users dirs. but local defined ones only.

Is there anyway to got user directories out from nss, to get home
directories from name service switch modules like nis or ldap?

best regards

Torsten Krah

Am Freitag, den 22.04.2005, 09:36 +0200 schrieb Mladen Turk:
 Torsten Krah wrote:
  Hello,
  
  is there any chance, to get mod_jk so configured, that it can handle jsp
  files, servlets ( complete webapps ) in the apache mod_userdir
  directory?
  I want to have ~/pubic_html/*.jsp interpreted by tomcat but it seems
  mod_jk isnt able to handle it, am i right or wrong?
  Any solutions for this problem? Pros  Cons?
 
 
 mod_userdir like most other apache modules presume that you are
 dealing with file system.
 For managing virtual uri spaces you will need to use mod_rewrite.
 Mod_rewrite documentation has an example how to deal with home
 directories.
 
 Regards,
 Mladen.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: mod_jk working together with mod_userdir - possible or not?

2005-04-22 Thread Mladen Turk
Torsten Krah wrote:
Hello,
is there any chance, to get mod_jk so configured, that it can handle jsp
files, servlets ( complete webapps ) in the apache mod_userdir
directory?
I want to have ~/pubic_html/*.jsp interpreted by tomcat but it seems
mod_jk isnt able to handle it, am i right or wrong?
Any solutions for this problem? Pros  Cons?
mod_userdir like most other apache modules presume that you are
dealing with file system.
For managing virtual uri spaces you will need to use mod_rewrite.
Mod_rewrite documentation has an example how to deal with home
directories.
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: mod_jk working together with mod_userdir - possible or not?

2005-04-22 Thread Steve Ochani
In order to get Tomcat to handle requests as in

http://www.xyz.com/~username

you need to use the Tomcat UserConfig class and then have apache pass off all 
requests to .jsp to tomcat with mod_jk.

Details to use UserConfig in tomcat are at a few places including

http://www.onjava.com/pub/a/onjava/2003/06/25/tomcat_tips.html?page=2

(tip #7)

Test if first by

http://www.xyz.com:8080/~username/nameOfFile.jsp

If you get beans and servlets working in user's public_html directory let me 
know 
because I've tried for 2 weeks and couldn't get them to work.

Good luck




On 22 Apr 2005 at 4:09, Torsten Krah wrote:

 Hello,
 
 is there any chance, to get mod_jk so configured, that it can handle jsp
 files, servlets ( complete webapps ) in the apache mod_userdir
 directory?
 I want to have ~/pubic_html/*.jsp interpreted by tomcat but it seems
 mod_jk isnt able to handle it, am i right or wrong?
 Any solutions for this problem? Pros  Cons?
 
 best regards
 
 Torsten Krah
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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



mod_jk working together with mod_userdir - possible or not?

2005-04-21 Thread Torsten Krah
Hello,

is there any chance, to get mod_jk so configured, that it can handle jsp
files, servlets ( complete webapps ) in the apache mod_userdir
directory?
I want to have ~/pubic_html/*.jsp interpreted by tomcat but it seems
mod_jk isnt able to handle it, am i right or wrong?
Any solutions for this problem? Pros  Cons?

best regards

Torsten Krah


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



Re: Is it possible to use a parameter other than JSESSIONID to maintain session?

2005-03-01 Thread Garth Patil
Changing the name in Globals.java seems to partially work. Now, in
order to have Tomcat just use that value, and not try to rewrite it
(or expect it in a specific format), I need to find where in the code
Tomcat looks up that parameter, and where it rewrites it to the URL.
Can anyone familiar with the code point me in the right direction?
Thanks again,
Garth

 You *might* be able to recompile tomcat with only changing:
 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
 
 -Tim
 
 Garth Patil [EMAIL PROTECTED] wrote:

 Hi,
 I'm currently working on a server application using Tomcat, and I've
 run into a snag. The clients for the application are custom HTTP
 clients (a provider's custom client that won't be changing on our
 behalf) that do not have the ability to persist the JSESSIONID in the
 request. However, there is already a unique parameter (let's call it
 CUSTOMPARAM) that they do send with every POST to us.  I still want to
 use Tomcat's sessioning, but I need it to do two things:
 1. Use the CUSTOMPARAM as the unique session parameter.
 2. Not rewrite the parameter in the response, leaving that control to
 my application.
 Is there a way to just tell Tomcat in the configuration that I want it
 to use a different parameter to identify the session, and that I don't
 need it to rewrite it in my response? I've been through the docs, a
 book on Tomcat 5, and the mailing list archives, and I haven't been
 able to find anything.
 Thanks,
 Garth


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



Re: Is it possible to use a parameter other than JSESSIONID to maintain session?

2005-03-01 Thread Tim Funk
1) Checkout the source
2) issue the command
cd {tomcat src base}
find . -name '*.java' | xargs grep -i jsessionid
This will tell you all the placed jsessionid is used.
-Tim
Garth Patil wrote:
Changing the name in Globals.java seems to partially work. Now, in
order to have Tomcat just use that value, and not try to rewrite it
(or expect it in a specific format), I need to find where in the code
Tomcat looks up that parameter, and where it rewrites it to the URL.
Can anyone familiar with the code point me in the right direction?
Thanks again,
Garth

You *might* be able to recompile tomcat with only changing:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
-Tim
Garth Patil [EMAIL PROTECTED] wrote:
Hi,
I'm currently working on a server application using Tomcat, and I've
run into a snag. The clients for the application are custom HTTP
clients (a provider's custom client that won't be changing on our
behalf) that do not have the ability to persist the JSESSIONID in the
request. However, there is already a unique parameter (let's call it
CUSTOMPARAM) that they do send with every POST to us.  I still want to
use Tomcat's sessioning, but I need it to do two things:
1. Use the CUSTOMPARAM as the unique session parameter.
2. Not rewrite the parameter in the response, leaving that control to
my application.
Is there a way to just tell Tomcat in the configuration that I want it
to use a different parameter to identify the session, and that I don't
need it to rewrite it in my response? I've been through the docs, a
book on Tomcat 5, and the mailing list archives, and I haven't been
able to find anything.
Thanks,
Garth

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

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


RE: Is it possible to use a parameter other than JSESSIONID to maintain session?

2005-03-01 Thread Subir Sengupta
You will have to change it in the connector source too.

Subir

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 01, 2005 3:13 PM
To: Tomcat Users List
Subject: Re: Is it possible to use a parameter other than JSESSIONID to
maintain session?


1) Checkout the source
2) issue the command

cd {tomcat src base}
find . -name '*.java' | xargs grep -i jsessionid

This will tell you all the placed jsessionid is used.

-Tim

Garth Patil wrote:

 Changing the name in Globals.java seems to partially work. Now, in 
 order to have Tomcat just use that value, and not try to rewrite it 
 (or expect it in a specific format), I need to find where in the code 
 Tomcat looks up that parameter, and where it rewrites it to the URL. 
 Can anyone familiar with the code point me in the right direction? 
 Thanks again, Garth
 
 
You *might* be able to recompile tomcat with only changing: 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals
.java

-Tim

Garth Patil [EMAIL PROTECTED] wrote:

Hi,
I'm currently working on a server application using Tomcat, and I've 
run into a snag. The clients for the application are custom HTTP 
clients (a provider's custom client that won't be changing on our
behalf) that do not have the ability to persist the JSESSIONID in the 
request. However, there is already a unique parameter (let's call it
CUSTOMPARAM) that they do send with every POST to us.  I still want to

use Tomcat's sessioning, but I need it to do two things: 1. Use the 
CUSTOMPARAM as the unique session parameter. 2. Not rewrite the 
parameter in the response, leaving that control to my application.
Is there a way to just tell Tomcat in the configuration that I want it
to use a different parameter to identify the session, and that I don't
need it to rewrite it in my response? I've been through the docs, a
book on Tomcat 5, and the mailing list archives, and I haven't been
able to find anything.
Thanks,
Garth

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

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

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



Is it possible to use a parameter other than JSESSIONID to maintain session?

2005-02-28 Thread Garth Patil
Hi,
I'm currently working on a server application using Tomcat, and I've
run into a snag. The clients for the application are custom HTTP
clients (a provider's custom client that won't be changing on our
behalf) that do not have the ability to persist the JSESSIONID in the
request. However, there is already a unique parameter (let's call it
CUSTOMPARAM) that they do send with every POST to us.  I still want to
use Tomcat's sessioning, but I need it to do two things:
1. Use the CUSTOMPARAM as the unique session parameter.
2. Not rewrite the parameter in the response, leaving that control to
my application.
Is there a way to just tell Tomcat in the configuration that I want it
to use a different parameter to identify the session, and that I don't
need it to rewrite it in my response? I've been through the docs, a
book on Tomcat 5, and the mailing list archives, and I haven't been
able to find anything.
Thanks,
Garth

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



Re: Is it possible to use a parameter other than JSESSIONID to maintain session?

2005-02-28 Thread Tim Funk
You *might* be able to recompile tomcat with only changing:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
-Tim
Garth Patil wrote:
Hi,
I'm currently working on a server application using Tomcat, and I've
run into a snag. The clients for the application are custom HTTP
clients (a provider's custom client that won't be changing on our
behalf) that do not have the ability to persist the JSESSIONID in the
request. However, there is already a unique parameter (let's call it
CUSTOMPARAM) that they do send with every POST to us.  I still want to
use Tomcat's sessioning, but I need it to do two things:
1. Use the CUSTOMPARAM as the unique session parameter.
2. Not rewrite the parameter in the response, leaving that control to
my application.
Is there a way to just tell Tomcat in the configuration that I want it
to use a different parameter to identify the session, and that I don't
need it to rewrite it in my response? I've been through the docs, a
book on Tomcat 5, and the mailing list archives, and I haven't been
able to find anything.
Thanks,
Garth
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Is it possible to setup a custom ServerSocketFactory?

2005-02-08 Thread Rodrigo Ruiz
Hi all,

I am using Tomcat 4.1.27, on a Windows XP SP2 host.

I have tried to implement a custom ServerSocketFactory, and configured
my CoyoteConnector to use it as its factory in the server.xml file.
But, although an instance is created on startup, it seems no call is
made to any of its createSocket() methods.

Is there anything special that must be done for the connector to use
my factory? It seems that CoyoteConnector is creating the ServerSocket
by itself, or at least, without asking the specified factory.

Thanks in advance,
Rodrigo Ruiz

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



Is it possible to deploy an MBean on Tomcat 4.1 ?

2005-02-04 Thread Marchioni Francesco
Hi all tomcat users,
I'm in need to deploy an MBean component that does some
admin functions for my webapp.
Is it possible to deploy the mbean on tomcat 4.1 -and access it from a
jsp/servlet- ?
or do I need to install other server-side components ?
Thanks a lot
Francesco



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



RE : is this possible?

2005-01-14 Thread VAN DER MARLIERE FREDERIC
Hi jungsoo,

Why don't you pass your sessionId in an applet parameter?

Something like:

applet height=200 width=200 class=applets.myApplet.class
  param name=mySessionId value=%=request.getSession().getId()% /
/applet

Thenafter, use the getParameter(paramterName) of the applet.

Hope this helped.
Fred.


-Message d'origine-
De : jungsoo kim [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 14 janvier 2005 08:13
À : tomcat-user@jakarta.apache.org
Objet : is this possible?


Hi all,

I have an applet that communicate with server. And, of course, the server
maintains a session.

If I insert the applet in the JSP page, the applet fails to communicate with
server because of session ID problem.

My problem is I can't chage applet's code. I can't get session id from a jsp
page.

Thus, I 'd like to know that whether there is a way to handle the session
problem at the Tomcat.

Thanks in advance.



Ce message et toutes les pieces jointes (ci-apres le message) sont 
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.Tout message 
electronique est susceptible d'alteration.
Le CREDIT DU NORD et ses filiales declinent toute responsabilite au titre de ce 
message s'il a ete altere, deforme ou falsifie.
This message and any attachments ( the message) are confidential and intended 
solely for the addressees.
Any unauthorised use or dissemination is prohibited.E-mails are susceptible to 
alteration.
Neither CREDIT DU NORD nor any of its subsidiaries or affiliates shall be 
liable for the message if altered, changed or falsified.



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



is this possible?

2005-01-13 Thread jungsoo kim
Hi all,

I have an applet that communicate with server. And, of course, the
server maintains a session.

If I insert the applet in the JSP page, the applet fails to
communicate with server because of session ID problem.

My problem is I can't chage applet's code. I can't get session id from
a jsp page.

Thus, I 'd like to know that whether there is a way to handle the
session problem at the Tomcat.

Thanks in advance.

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



RE: Possible to Authenticate from Servlet/Webapp Code?

2004-12-08 Thread Sawlor . TM
Thanks for the info Yoav; however, I've tried what you suggested, and
everything I can think of myself, and no luck.

I don't know of anything in the declarative security that would help with
this. Most of my apps use the standard for security, but there's one app
that uses it's own login from a database. I created my own Realm that uses
its table structure, thinking that in the login of this app, I could simply
get a reference to the Realm, pass the credentials to it and bingo, I'm
authenticated in both. 

I have tried:
1. Navigating the tomcat class hierarchy: problem is with class loaders.
When I'm in the webapp and I do ServerFactory.getServer(), there are no
services configured (ie ServerFactory.getServer().findServices() returns an
empty array.
2. Placing my custom Realm in the common/lib, so it would be available to
all classes. Then the catalina classes (which I extend, particularly
JdbcRealm) aren't visible causing ClassNotFoundExceptions on startup.
There's no way to break out of these dependencies that I can see.
3. Binding the Realm into JNDI from within the Realm constructor. Doesn't
seem to work, getting javax.naming.NameNotFoundException: Name java:comp is
not bound in this Context. Because the Realm is created first off, I don't
think the JNDI contexts are set up. 

Is there some way I could do it through the MBeans maybe? 

Any other ideas, or even explanations of why I'm bone-headed are
appreciated! :) 

Thanks in advance,
Tim Sawlor


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 7, December, 2004 11:51 AM
To: Tomcat Users List
Subject: RE: Possible to Authenticate from Servlet/Webapp Code?



Hi,
The Spec-mandated, and therefore portable, approach is via the web.xml
declarative security.

The Tomcat-specific way would mean you navigate down the container
hierarchy, starting with ServerFactory.getServer, down to Service,
Engine, Host, to find your Realm object.  You could probably do this
once on your app startup, e.g. in a listener or filter init.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 07, 2004 10:45 AM
To: [EMAIL PROTECTED]
Subject: Possible to Authenticate from Servlet/Webapp Code?

Question:
-
Is there a way to authenticate a user to the container (including SSO)
from
within a servlet? Something like:

protected void service(HttpServletRequest req, HttpServletResponse
resp) {
Realm tomcatRealm = //how to get the realm???
tomcatRealm.authenticate(dauser, dauserspassword);
...
}

Other Info:
---
I know how to configure the custom login pages, etc., but I need a way
to
authenticate in two places at once, due to a legacy application.

It seems like this should be easy to do, so I expect I'm missing
something
obvious, but I simply can't figure out how to do it. I've been
searching
for
a while...

While standards-based would be better, a Tomcat-specific way would be
fine
as well.

--
Tim Sawlor

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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.

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



Possible to Authenticate from Servlet/Webapp Code?

2004-12-07 Thread Sawlor . TM
Question: 
-
Is there a way to authenticate a user to the container (including SSO) from
within a servlet? Something like: 

protected void service(HttpServletRequest req, HttpServletResponse resp) {
Realm tomcatRealm = //how to get the realm???
tomcatRealm.authenticate(dauser, dauserspassword);
...
}

Other Info:
---
I know how to configure the custom login pages, etc., but I need a way to
authenticate in two places at once, due to a legacy application.

It seems like this should be easy to do, so I expect I'm missing something
obvious, but I simply can't figure out how to do it. I've been searching for
a while...

While standards-based would be better, a Tomcat-specific way would be fine
as well. 

--
Tim Sawlor

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



RE: Possible to Authenticate from Servlet/Webapp Code?

2004-12-07 Thread Shapira, Yoav

Hi,
The Spec-mandated, and therefore portable, approach is via the web.xml
declarative security.

The Tomcat-specific way would mean you navigate down the container
hierarchy, starting with ServerFactory.getServer, down to Service,
Engine, Host, to find your Realm object.  You could probably do this
once on your app startup, e.g. in a listener or filter init.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 07, 2004 10:45 AM
To: [EMAIL PROTECTED]
Subject: Possible to Authenticate from Servlet/Webapp Code?

Question:
-
Is there a way to authenticate a user to the container (including SSO)
from
within a servlet? Something like:

protected void service(HttpServletRequest req, HttpServletResponse
resp) {
Realm tomcatRealm = //how to get the realm???
tomcatRealm.authenticate(dauser, dauserspassword);
...
}

Other Info:
---
I know how to configure the custom login pages, etc., but I need a way
to
authenticate in two places at once, due to a legacy application.

It seems like this should be easy to do, so I expect I'm missing
something
obvious, but I simply can't figure out how to do it. I've been
searching
for
a while...

While standards-based would be better, a Tomcat-specific way would be
fine
as well.

--
Tim Sawlor

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




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


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



is it possible to go to https and return to http?

2004-11-03 Thread Acácio Furtado Costa
We need to use https  for authentication and in 1 or to 2 url´s in our application.

 

In other case we prefer to stay in http mode . To do this we need to redirect the 
connection to https and return to http . 

 

How can we do this?

 

 

Acacio Furtado Costa
Pesquisa e Tecnologia

GIA - Magnesita S/A
*(0xx31) 3368-1349
*  [EMAIL PROTECTED]

 



RE: is it possible to go to https and return to http?

2004-11-03 Thread Derek Clarkson

Hi,
Our site drops in and out of secure mode to do credit card transactions. We
have a single instance of tomcat sitting behind an apache server. We have
two virtual apache servers listed which talk to this tomcat. One os
non-secure which takes the bulk of the action, and the other is setup as
secure. When we want to take a user to secure, the next document is simple
linked as a https connection rather than http. As the secure server is
listening on the 443 port it picks it up instead of the non-secure one.

The only issue we encountered when doing this is that when this happens it
starts a new session. So anything stored in the http session (shopping
basket) cannot been seen. The original designers of the system got arround
this by using an RMI server and transfering objects through it to the new
session. To say this was complicated and error prone would be an
understatement. Recently we ripped this out and added the ID of the http
session as a parameter to the urls going into the secure instance. By doing
this, the Tomcat automatically looked for and reconnected to the orginal
session. Thus allowing us to keep things simple and remove a lot of bug
ridden code.

Hope this helps.

Regards,
Derek Clarkson
Global Applications
Lonely Planet Publications
ph: (03) 8379-8000 x8041
It's not a bug - it's an undocumented feature!

-Original Message-
From: Acácio Furtado Costa [mailto:[EMAIL PROTECTED]
Sent: Thursday, 4 November 2004 4:32 AM
To: [EMAIL PROTECTED]
Subject: is it possible to go to https and return to http?

We need to use https  for authentication and in 1 or to 2 url´s in our
application.



In other case we prefer to stay in http mode . To do this we need to
redirect the connection to https and return to http .



How can we do this?





Acacio Furtado Costa
Pesquisa e Tecnologia

GIA - Magnesita S/A
*(0xx31) 3368-1349
*  [EMAIL PROTECTED]





__
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or
communicate to others content that is confidential or subject to
copyright, unless you have the consent of the content owner.

Re: is it possible to go to https and return to http?

2004-11-03 Thread Ben
Hi Derek

Do you append the session to the address when you go to http? Are you
using the same session for http and https? Do you have any concern
about security?

I am facing this problem ATM and would love to hear your advise.

Thanks,
Ben


On Thu, 4 Nov 2004 11:04:46 +1100, Derek Clarkson
[EMAIL PROTECTED] wrote:
 
 Hi,
 Our site drops in and out of secure mode to do credit card transactions. We
 have a single instance of tomcat sitting behind an apache server. We have
 two virtual apache servers listed which talk to this tomcat. One os
 non-secure which takes the bulk of the action, and the other is setup as
 secure. When we want to take a user to secure, the next document is simple
 linked as a https connection rather than http. As the secure server is
 listening on the 443 port it picks it up instead of the non-secure one.
 
 The only issue we encountered when doing this is that when this happens it
 starts a new session. So anything stored in the http session (shopping
 basket) cannot been seen. The original designers of the system got arround
 this by using an RMI server and transfering objects through it to the new
 session. To say this was complicated and error prone would be an
 understatement. Recently we ripped this out and added the ID of the http
 session as a parameter to the urls going into the secure instance. By doing
 this, the Tomcat automatically looked for and reconnected to the orginal
 session. Thus allowing us to keep things simple and remove a lot of bug
 ridden code.
 
 Hope this helps.
 
 Regards,
 Derek Clarkson
 Global Applications
 Lonely Planet Publications
 ph: (03) 8379-8000 x8041
 It's not a bug - it's an undocumented feature!
 
 
 
 -Original Message-
 From: Acácio Furtado Costa [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 4 November 2004 4:32 AM
 To: [EMAIL PROTECTED]
 Subject: is it possible to go to https and return to http?
 
 We need to use https  for authentication and in 1 or to 2 url´s in our
 application.
 
 In other case we prefer to stay in http mode . To do this we need to
 redirect the connection to https and return to http .
 
 How can we do this?
 
 Acacio Furtado Costa
 Pesquisa e Tecnologia
 
 GIA - Magnesita S/A
 *(0xx31) 3368-1349
 *  [EMAIL PROTECTED]
 
 
 __
 This email, including attachments, is intended only for the addressee
 and may be confidential, privileged and subject to copyright.  If you
 have received this email in error, please advise the sender and delete
 it.  If you are not the intended recipient of this email, you must not
 use, copy or disclose its content to anyone.  You must not copy or
 communicate to others content that is confidential or subject to
 copyright, unless you have the consent of the content owner.


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



Re: is it possible to go to https and return to http?

2004-11-03 Thread Toby Vidler
Acácio Furtado Costa wrote:
We need to use https  for authentication and in 1 or to 2 url´s in our application.

In other case we prefer to stay in http mode . To do this we need to redirect the connection to https and return to http . 


How can we do this?
 

Check out sslext [ http://sslext.sourceforge.net ]. This is your best bet.
-Toby
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Multiple Hosts, multiple Root apps, path=/ -- Is it possible?

2004-10-25 Thread Shapira, Yoav

Hi,
The path for the root webapp is , not /.  Yes, if the separate
hosts have different names, each can have a webapp at path .  It would
be http://x.y.com, http://y.y.com, http://z.y.com, etc.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Brendan Colthurst [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 23, 2004 5:37 PM
To: 'Tomcat Users List'
Subject: Multiple Hosts, multiple Root apps, path=/ -- Is it
possible?


Can I setup my server.xml to have multiple root webapps, each with
path=/ in its Context tag, if I use multiple Host descriptors?

Has anyone done this who could share some server.xml configuration
code?

I mostly want to do this so that my session cookies don't have to have
the
webapp name in them...

Thanks,
Brendan


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Multiple Hosts, multiple Root apps, path=/ -- Is it possible?

2004-10-23 Thread Brendan Colthurst

Can I setup my server.xml to have multiple root webapps, each with
path=/ in its Context tag, if I use multiple Host descriptors?

Has anyone done this who could share some server.xml configuration code?

I mostly want to do this so that my session cookies don't have to have the
webapp name in them...

Thanks,
Brendan


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



[Help]Is it possible to using % in uri?

2004-10-13 Thread roy huang
Hi,all:
I am using a control to download file,when file name is non-ascii,it will generate 
the url like:
http://localhost:8080/Download/ID041012155059812154/$File/%u6279%u6587%u5904%u7406%u4EBA.xls?OpenElement1097572646
But tomcat will return http 400 Invalid URI error.

I check the maillist found % is not allow in URI for Tomcat,but I can't modified 
this control,so does any way to allow tomcat receive this url and allow application 
itself to decode the url?

Please Help!

Roy Huang

RE: [Possible bug?] Context configurations and .WAR deployment

2004-10-11 Thread raiden
Hello,

I will try including what I have in ROOT.xml as context.xml in META-INF,
and then remove the ROOT.xml each time I remove the webapps/ROOT tree to
copy in a new ROOT.war into webapps.

However, here is what is in my ROOT.xml right now (that is causing the
problem of ROOT.war not being expanded when ROOT.xml is updated):

Context path= docBase=ROOT debug=0
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/

  ResourceParams name=jdbc/DB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  namemaxActive/name
  value200/value
/parameter
parameter
  namemaxIdle/name
  value30/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
 nameusername/name
 valuetest/value
/parameter
parameter
 namepassword/name
 valuetestpassword/value
/parameter
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter
parameter
  nameurl/name

valuejdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true/value
/parameter
  /ResourceParams
/Context


Thank you,
-Raiden Johnson



On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote:

 A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat
 will create it under your host as ROOT.xml when it is deployed.  That
 doesn't solve the problem your experiencing, what does your ROOT.xml
 look like? What are you referencing your docBase? Ours word fine by
 referencing the ROOT.war.

 Note, if you update the context.xml in your webapp, it doesn't auto
 update the cached ROOT.xml; you would need to undeploy the webapp,
 delete the ROOT.xml from conf/Catalina/localhost  and redeploy the new
 webapp.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Saturday, October 09, 2004 3:33 AM
 To: [EMAIL PROTECTED]
 Subject: [Possible bug?] Context configurations and .WAR deployment

 Hello,

 I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28.

 I am now running into a conflict between ROOT.xml and ROOT.war.

 This happens when I deploy to production:
 1. I delete the ROOT.war and ROOT directory from
 /usr/local/tomcat/webapps
 2. I delete the ROOT.xml context configuration file in
 /usr/local/tomcat/conf/Catalina/localhost
 3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps
 4. I copy the new ROOT.xml file to
 /usr/local/tomcat/conf/Catalina/localhost

 This used to work fine in Tomcat 5.0.19.  Now, in 5.0.28, when I startup
 the server, I get the following error:

 INFO: Missing application web.xml, using defaults only
 StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

 And the new ROOT.war file is never expanded (which is why ROOT.xml can't
 find web.xml).

 The only way to get the .war file to expand, is to temporarily remove
 the
 ROOT.xml file, startup the server (which then expands the .war file),
 and
 then copy the ROOT.xml file over.

 The reason I'm using the ROOT.xml file is to setup DBCP for this webapp
 only.  In theory, it's not updated often, but when updates occur, it
 would be copied over during this process, which is why I do it in my
 deployment script.

 What happened since Tomcat 5.0.19 to make it not expand the ROOT.war
 archive at the same time that it's processing a new ROOT.xml file?

 Thank you,
 -Raiden Johnson

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




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


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



RE: [Possible bug?] Context configurations and .WAR deployment

2004-10-11 Thread D'Alessandro, Arthur
Try changing the docbase from ROOT TO ROOT.war.

 -Original Message-
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent:   Mon Oct 11 13:39:17 2004
To: Tomcat Users List
Subject:RE: [Possible bug?] Context configurations and .WAR deployment

Hello,

I will try including what I have in ROOT.xml as context.xml in META-INF,
and then remove the ROOT.xml each time I remove the webapps/ROOT tree to
copy in a new ROOT.war into webapps.

However, here is what is in my ROOT.xml right now (that is causing the
problem of ROOT.war not being expanded when ROOT.xml is updated):

Context path= docBase=ROOT debug=0
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/

  ResourceParams name=jdbc/DB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  namemaxActive/name
  value200/value
/parameter
parameter
  namemaxIdle/name
  value30/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
 nameusername/name
 valuetest/value
/parameter
parameter
 namepassword/name
 valuetestpassword/value
/parameter
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter
parameter
  nameurl/name

valuejdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true/value
/parameter
  /ResourceParams
/Context


Thank you,
-Raiden Johnson



On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote:

 A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat
 will create it under your host as ROOT.xml when it is deployed.  That
 doesn't solve the problem your experiencing, what does your ROOT.xml
 look like? What are you referencing your docBase? Ours word fine by
 referencing the ROOT.war.

 Note, if you update the context.xml in your webapp, it doesn't auto
 update the cached ROOT.xml; you would need to undeploy the webapp,
 delete the ROOT.xml from conf/Catalina/localhost  and redeploy the new
 webapp.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Saturday, October 09, 2004 3:33 AM
 To: [EMAIL PROTECTED]
 Subject: [Possible bug?] Context configurations and .WAR deployment

 Hello,

 I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28.

 I am now running into a conflict between ROOT.xml and ROOT.war.

 This happens when I deploy to production:
 1. I delete the ROOT.war and ROOT directory from
 /usr/local/tomcat/webapps
 2. I delete the ROOT.xml context configuration file in
 /usr/local/tomcat/conf/Catalina/localhost
 3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps
 4. I copy the new ROOT.xml file to
 /usr/local/tomcat/conf/Catalina/localhost

 This used to work fine in Tomcat 5.0.19.  Now, in 5.0.28, when I startup
 the server, I get the following error:

 INFO: Missing application web.xml, using defaults only
 StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

 And the new ROOT.war file is never expanded (which is why ROOT.xml can't
 find web.xml).

 The only way to get the .war file to expand, is to temporarily remove
 the
 ROOT.xml file, startup the server (which then expands the .war file),
 and
 then copy the ROOT.xml file over.

 The reason I'm using the ROOT.xml file is to setup DBCP for this webapp
 only.  In theory, it's not updated often, but when updates occur, it
 would be copied over during this process, which is why I do it in my
 deployment script.

 What happened since Tomcat 5.0.19 to make it not expand the ROOT.war
 archive at the same time that it's processing a new ROOT.xml file?

 Thank you,
 -Raiden Johnson

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




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


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




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



RE: [Possible bug?] Context configurations and .WAR deployment

2004-10-11 Thread raiden
Bingo!  That worked.  Thank you!

However, you brought up something that makes a lot more sense to me.  I
always thought it was strange that I had to have a ROOT.xml outside of the
webapp .war file.  It makes a whole lot more sense to me to include
ROOT.xml in the webapp .war file (under META-INF), and to just get rid of
the cached version of ROOT.xml that is generated, when redeploying a new
.war file.

(Though, you would think that Tomcat would get rid of the cached version
on its own.)

I think I'm going to change to that method, so that I can keep everything
in one .war file.

Thank you very much for your help!

-Raiden Johnson


On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:

 Try changing the docbase from ROOT TO ROOT.war.

  -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Mon Oct 11 13:39:17 2004
 To:   Tomcat Users List
 Subject:  RE: [Possible bug?] Context configurations and .WAR deployment

 Hello,

 I will try including what I have in ROOT.xml as context.xml in META-INF,
 and then remove the ROOT.xml each time I remove the webapps/ROOT tree to
 copy in a new ROOT.war into webapps.

 However, here is what is in my ROOT.xml right now (that is causing the
 problem of ROOT.war not being expanded when ROOT.xml is updated):

 Context path= docBase=ROOT debug=0
  Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=localhost_log. suffix=.txt
 timestamp=true/

   ResourceParams name=jdbc/DB
 parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
   namemaxActive/name
   value200/value
 /parameter
 parameter
   namemaxIdle/name
   value30/value
 /parameter
 parameter
   namemaxWait/name
   value1/value
 /parameter
 parameter
  nameusername/name
  valuetest/value
 /parameter
 parameter
  namepassword/name
  valuetestpassword/value
 /parameter
 parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
 /parameter
 parameter
   nameurl/name

 valuejdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true/value
 /parameter
   /ResourceParams
 /Context


 Thank you,
 -Raiden Johnson



 On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote:

  A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat
  will create it under your host as ROOT.xml when it is deployed.  That
  doesn't solve the problem your experiencing, what does your ROOT.xml
  look like? What are you referencing your docBase? Ours word fine by
  referencing the ROOT.war.
 
  Note, if you update the context.xml in your webapp, it doesn't auto
  update the cached ROOT.xml; you would need to undeploy the webapp,
  delete the ROOT.xml from conf/Catalina/localhost  and redeploy the new
  webapp.
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Saturday, October 09, 2004 3:33 AM
  To: [EMAIL PROTECTED]
  Subject: [Possible bug?] Context configurations and .WAR deployment
 
  Hello,
 
  I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28.
 
  I am now running into a conflict between ROOT.xml and ROOT.war.
 
  This happens when I deploy to production:
  1. I delete the ROOT.war and ROOT directory from
  /usr/local/tomcat/webapps
  2. I delete the ROOT.xml context configuration file in
  /usr/local/tomcat/conf/Catalina/localhost
  3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps
  4. I copy the new ROOT.xml file to
  /usr/local/tomcat/conf/Catalina/localhost
 
  This used to work fine in Tomcat 5.0.19.  Now, in 5.0.28, when I startup
  the server, I get the following error:
 
  INFO: Missing application web.xml, using defaults only
  StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
 
  And the new ROOT.war file is never expanded (which is why ROOT.xml can't
  find web.xml).
 
  The only way to get the .war file to expand, is to temporarily remove
  the
  ROOT.xml file, startup the server (which then expands the .war file),
  and
  then copy the ROOT.xml file over.
 
  The reason I'm using the ROOT.xml file is to setup DBCP for this webapp
  only.  In theory, it's not updated often, but when updates occur, it
  would be copied over during this process, which is why I do it in my
  deployment script.
 
  What happened since Tomcat 5.0.19 to make it not expand the ROOT.war
  archive at the same time that it's processing a new ROOT.xml file?
 
  Thank you,
  -Raiden Johnson
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED

RE: [Possible bug?] Context configurations and .WAR deployment

2004-10-11 Thread D'Alessandro, Arthur
You only need to get rid of the cached version if you made changes to it.

 -Original Message-
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent:   Mon Oct 11 14:05:58 2004
To: Tomcat Users List
Subject:RE: [Possible bug?] Context configurations and .WAR deployment

Bingo!  That worked.  Thank you!

However, you brought up something that makes a lot more sense to me.  I
always thought it was strange that I had to have a ROOT.xml outside of the
webapp .war file.  It makes a whole lot more sense to me to include
ROOT.xml in the webapp .war file (under META-INF), and to just get rid of
the cached version of ROOT.xml that is generated, when redeploying a new
.war file.

(Though, you would think that Tomcat would get rid of the cached version
on its own.)

I think I'm going to change to that method, so that I can keep everything
in one .war file.

Thank you very much for your help!

-Raiden Johnson


On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:

 Try changing the docbase from ROOT TO ROOT.war.

  -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Mon Oct 11 13:39:17 2004
 To:   Tomcat Users List
 Subject:  RE: [Possible bug?] Context configurations and .WAR deployment

 Hello,

 I will try including what I have in ROOT.xml as context.xml in META-INF,
 and then remove the ROOT.xml each time I remove the webapps/ROOT tree to
 copy in a new ROOT.war into webapps.

 However, here is what is in my ROOT.xml right now (that is causing the
 problem of ROOT.war not being expanded when ROOT.xml is updated):

 Context path= docBase=ROOT debug=0
  Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=localhost_log. suffix=.txt
 timestamp=true/

   ResourceParams name=jdbc/DB
 parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
   namemaxActive/name
   value200/value
 /parameter
 parameter
   namemaxIdle/name
   value30/value
 /parameter
 parameter
   namemaxWait/name
   value1/value
 /parameter
 parameter
  nameusername/name
  valuetest/value
 /parameter
 parameter
  namepassword/name
  valuetestpassword/value
 /parameter
 parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
 /parameter
 parameter
   nameurl/name

 valuejdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true/value
 /parameter
   /ResourceParams
 /Context


 Thank you,
 -Raiden Johnson



 On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote:

  A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat
  will create it under your host as ROOT.xml when it is deployed.  That
  doesn't solve the problem your experiencing, what does your ROOT.xml
  look like? What are you referencing your docBase? Ours word fine by
  referencing the ROOT.war.
 
  Note, if you update the context.xml in your webapp, it doesn't auto
  update the cached ROOT.xml; you would need to undeploy the webapp,
  delete the ROOT.xml from conf/Catalina/localhost  and redeploy the new
  webapp.
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Saturday, October 09, 2004 3:33 AM
  To: [EMAIL PROTECTED]
  Subject: [Possible bug?] Context configurations and .WAR deployment
 
  Hello,
 
  I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28.
 
  I am now running into a conflict between ROOT.xml and ROOT.war.
 
  This happens when I deploy to production:
  1. I delete the ROOT.war and ROOT directory from
  /usr/local/tomcat/webapps
  2. I delete the ROOT.xml context configuration file in
  /usr/local/tomcat/conf/Catalina/localhost
  3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps
  4. I copy the new ROOT.xml file to
  /usr/local/tomcat/conf/Catalina/localhost
 
  This used to work fine in Tomcat 5.0.19.  Now, in 5.0.28, when I startup
  the server, I get the following error:
 
  INFO: Missing application web.xml, using defaults only
  StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
 
  And the new ROOT.war file is never expanded (which is why ROOT.xml can't
  find web.xml).
 
  The only way to get the .war file to expand, is to temporarily remove
  the
  ROOT.xml file, startup the server (which then expands the .war file),
  and
  then copy the ROOT.xml file over.
 
  The reason I'm using the ROOT.xml file is to setup DBCP for this webapp
  only.  In theory, it's not updated often, but when updates occur, it
  would be copied over during this process, which is why I do it in my
  deployment script.
 
  What happened since Tomcat 5.0.19 to make it not expand the ROOT.war
  archive at the same time that it's processing a new ROOT.xml file?
 
  Thank you,
  -Raiden Johnson
 
  -
  To unsubscribe, e-mail

RE: [Possible bug?] Context configurations and .WAR deployment

2004-10-11 Thread raiden
Ok, sounds good.

One thing I noticed with the context.xml, is that it only seems to work
when it's packaged in a .war file.

However, in development, I am actually deploying a whole ROOT directory
directly, instead of a packaged .war file.  I noticed that when I just
copied a context.xml into webapps/ROOT/META-INF, tomcat does not seem to
generate a ROOT.xml file.

I guess for development I can copy context.xml as ROOT.xml directly into
the tomcat/conf/Catalina/localhost.  And then package context.xml in the
.war file under META-INF for production.

Anyone know why it works this way, though?

Thank you,
-Raiden



On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:

 You only need to get rid of the cached version if you made changes to it.

  -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Mon Oct 11 14:05:58 2004
 To:   Tomcat Users List
 Subject:  RE: [Possible bug?] Context configurations and .WAR deployment

 Bingo!  That worked.  Thank you!

 However, you brought up something that makes a lot more sense to me.  I
 always thought it was strange that I had to have a ROOT.xml outside of the
 webapp .war file.  It makes a whole lot more sense to me to include
 ROOT.xml in the webapp .war file (under META-INF), and to just get rid of
 the cached version of ROOT.xml that is generated, when redeploying a new
 .war file.

 (Though, you would think that Tomcat would get rid of the cached version
 on its own.)

 I think I'm going to change to that method, so that I can keep everything
 in one .war file.

 Thank you very much for your help!

 -Raiden Johnson


 On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:

  Try changing the docbase from ROOT TO ROOT.war.
 
   -Original Message-
  From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent:   Mon Oct 11 13:39:17 2004
  To: Tomcat Users List
  Subject:RE: [Possible bug?] Context configurations and .WAR deployment
 
  Hello,
 
  I will try including what I have in ROOT.xml as context.xml in META-INF,
  and then remove the ROOT.xml each time I remove the webapps/ROOT tree to
  copy in a new ROOT.war into webapps.
 
  However, here is what is in my ROOT.xml right now (that is causing the
  problem of ROOT.war not being expanded when ROOT.xml is updated):
 
  Context path= docBase=ROOT debug=0
   Logger className=org.apache.catalina.logger.FileLogger
   directory=logs  prefix=localhost_log. suffix=.txt
  timestamp=true/
 
ResourceParams name=jdbc/DB
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
namemaxActive/name
value200/value
  /parameter
  parameter
namemaxIdle/name
value30/value
  /parameter
  parameter
namemaxWait/name
value1/value
  /parameter
  parameter
   nameusername/name
   valuetest/value
  /parameter
  parameter
   namepassword/name
   valuetestpassword/value
  /parameter
  parameter
 namedriverClassName/name
 valuecom.mysql.jdbc.Driver/value
  /parameter
  parameter
nameurl/name
 
  valuejdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true/value
  /parameter
/ResourceParams
  /Context
 
 
  Thank you,
  -Raiden Johnson
 
 
 
  On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote:
 
   A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat
   will create it under your host as ROOT.xml when it is deployed.  That
   doesn't solve the problem your experiencing, what does your ROOT.xml
   look like? What are you referencing your docBase? Ours word fine by
   referencing the ROOT.war.
  
   Note, if you update the context.xml in your webapp, it doesn't auto
   update the cached ROOT.xml; you would need to undeploy the webapp,
   delete the ROOT.xml from conf/Catalina/localhost  and redeploy the new
   webapp.
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Sent: Saturday, October 09, 2004 3:33 AM
   To: [EMAIL PROTECTED]
   Subject: [Possible bug?] Context configurations and .WAR deployment
  
   Hello,
  
   I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28.
  
   I am now running into a conflict between ROOT.xml and ROOT.war.
  
   This happens when I deploy to production:
   1. I delete the ROOT.war and ROOT directory from
   /usr/local/tomcat/webapps
   2. I delete the ROOT.xml context configuration file in
   /usr/local/tomcat/conf/Catalina/localhost
   3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps
   4. I copy the new ROOT.xml file to
   /usr/local/tomcat/conf/Catalina/localhost
  
   This used to work fine in Tomcat 5.0.19.  Now, in 5.0.28, when I startup
   the server, I get the following error:
  
   INFO: Missing application web.xml, using defaults only
   StandardEngine[Catalina].StandardHost[localhost].StandardContext

RE: [Possible bug?] Context configurations and .WAR deployment

2004-10-11 Thread raiden
Actually, I spoke too soon... about it working in production.

While it's true that the application does load in Tomcat, and everything
is initialized correctly, I can no longer access my application from
Apache via jk2.

All requests are still making it to Tomcat, but the / address space no
longer seems accessible:  (like http://www.myserver.com/index.jsp)

Additionaly, servlets, which were mapped like:
http://www.myserver.com/servlet/TestServlet now throw errors like:
java.lang.NullPointerException

org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1774)

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1575)

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

com.net_basic.service.TestServlet.doPost(FetchRecentVisitors.java:30)

com.net_basic.service.TestServlet.doGet(TestServlet.java:22)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Any ideas?

Thank you,
-Raiden Johnson



On Mon, 11 Oct 2004 [EMAIL PROTECTED] wrote:

 Ok, sounds good.

 One thing I noticed with the context.xml, is that it only seems to work
 when it's packaged in a .war file.

 However, in development, I am actually deploying a whole ROOT directory
 directly, instead of a packaged .war file.  I noticed that when I just
 copied a context.xml into webapps/ROOT/META-INF, tomcat does not seem to
 generate a ROOT.xml file.

 I guess for development I can copy context.xml as ROOT.xml directly into
 the tomcat/conf/Catalina/localhost.  And then package context.xml in the
 .war file under META-INF for production.

 Anyone know why it works this way, though?

 Thank you,
 -Raiden



 On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:

  You only need to get rid of the cached version if you made changes to it.
 
   -Original Message-
  From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent:   Mon Oct 11 14:05:58 2004
  To: Tomcat Users List
  Subject:RE: [Possible bug?] Context configurations and .WAR deployment
 
  Bingo!  That worked.  Thank you!
 
  However, you brought up something that makes a lot more sense to me.  I
  always thought it was strange that I had to have a ROOT.xml outside of the
  webapp .war file.  It makes a whole lot more sense to me to include
  ROOT.xml in the webapp .war file (under META-INF), and to just get rid of
  the cached version of ROOT.xml that is generated, when redeploying a new
  .war file.
 
  (Though, you would think that Tomcat would get rid of the cached version
  on its own.)
 
  I think I'm going to change to that method, so that I can keep everything
  in one .war file.
 
  Thank you very much for your help!
 
  -Raiden Johnson
 
 
  On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:
 
   Try changing the docbase from ROOT TO ROOT.war.
  
-Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Sent: Mon Oct 11 13:39:17 2004
   To:   Tomcat Users List
   Subject:  RE: [Possible bug?] Context configurations and .WAR deployment
  
   Hello,
  
   I will try including what I have in ROOT.xml as context.xml in META-INF,
   and then remove the ROOT.xml each time I remove the webapps/ROOT tree to
   copy in a new ROOT.war into webapps.
  
   However, here is what is in my ROOT.xml right now (that is causing the
   problem of ROOT.war not being expanded when ROOT.xml is updated):
  
   Context path= docBase=ROOT debug=0
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=localhost_log. suffix=.txt
   timestamp=true/
  
 ResourceParams name=jdbc/DB
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 namemaxActive/name
 value200/value
   /parameter
   parameter
 namemaxIdle/name
 value30/value
   /parameter
   parameter
 namemaxWait/name
 value1/value
   /parameter
   parameter
nameusername/name
valuetest/value
   /parameter
   parameter
namepassword/name
valuetestpassword/value
   /parameter
   parameter
  namedriverClassName/name
  valuecom.mysql.jdbc.Driver/value
   /parameter
   parameter
 nameurl/name
  
   valuejdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true/value
   /parameter
 /ResourceParams
   /Context
  
  
   Thank you,
   -Raiden Johnson
  
  
  
   On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote:
  
A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat

RE: [Possible bug?] Context configurations and .WAR deployment

2004-10-11 Thread raiden
Never mind... this was my mistake.  It is working just fine.  Thanks
again, for the help!

-Raiden Johnson




On Mon, 11 Oct 2004 [EMAIL PROTECTED] wrote:

 Actually, I spoke too soon... about it working in production.

 While it's true that the application does load in Tomcat, and everything
 is initialized correctly, I can no longer access my application from
 Apache via jk2.

 All requests are still making it to Tomcat, but the / address space no
 longer seems accessible:  (like http://www.myserver.com/index.jsp)

 Additionaly, servlets, which were mapped like:
 http://www.myserver.com/servlet/TestServlet now throw errors like:
 java.lang.NullPointerException

 org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1774)

 org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1575)

 org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)

 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)

 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
   java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

 com.net_basic.service.TestServlet.doPost(FetchRecentVisitors.java:30)

 com.net_basic.service.TestServlet.doGet(TestServlet.java:22)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 Any ideas?

 Thank you,
 -Raiden Johnson



 On Mon, 11 Oct 2004 [EMAIL PROTECTED] wrote:

  Ok, sounds good.
 
  One thing I noticed with the context.xml, is that it only seems to work
  when it's packaged in a .war file.
 
  However, in development, I am actually deploying a whole ROOT directory
  directly, instead of a packaged .war file.  I noticed that when I just
  copied a context.xml into webapps/ROOT/META-INF, tomcat does not seem to
  generate a ROOT.xml file.
 
  I guess for development I can copy context.xml as ROOT.xml directly into
  the tomcat/conf/Catalina/localhost.  And then package context.xml in the
  .war file under META-INF for production.
 
  Anyone know why it works this way, though?
 
  Thank you,
  -Raiden
 
 
 
  On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:
 
   You only need to get rid of the cached version if you made changes to it.
  
-Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Sent: Mon Oct 11 14:05:58 2004
   To:   Tomcat Users List
   Subject:  RE: [Possible bug?] Context configurations and .WAR deployment
  
   Bingo!  That worked.  Thank you!
  
   However, you brought up something that makes a lot more sense to me.  I
   always thought it was strange that I had to have a ROOT.xml outside of the
   webapp .war file.  It makes a whole lot more sense to me to include
   ROOT.xml in the webapp .war file (under META-INF), and to just get rid of
   the cached version of ROOT.xml that is generated, when redeploying a new
   .war file.
  
   (Though, you would think that Tomcat would get rid of the cached version
   on its own.)
  
   I think I'm going to change to that method, so that I can keep everything
   in one .war file.
  
   Thank you very much for your help!
  
   -Raiden Johnson
  
  
   On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote:
  
Try changing the docbase from ROOT TO ROOT.war.
   
 -Original Message-
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent:   Mon Oct 11 13:39:17 2004
To: Tomcat Users List
Subject:RE: [Possible bug?] Context configurations and .WAR deployment
   
Hello,
   
I will try including what I have in ROOT.xml as context.xml in META-INF,
and then remove the ROOT.xml each time I remove the webapps/ROOT tree to
copy in a new ROOT.war into webapps.
   
However, here is what is in my ROOT.xml right now (that is causing the
problem of ROOT.war not being expanded when ROOT.xml is updated):
   
Context path= docBase=ROOT debug=0
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/
   
  ResourceParams name=jdbc/DB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  namemaxActive/name
  value200/value
/parameter
parameter
  namemaxIdle/name
  value30/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
 nameusername/name
 valuetest/value
/parameter
parameter
 namepassword/name
 valuetestpassword/value
/parameter
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter
parameter
  nameurl/name

[Possible bug?] Context configurations and .WAR deployment

2004-10-09 Thread raiden
Hello,

I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28.

I am now running into a conflict between ROOT.xml and ROOT.war.

This happens when I deploy to production:
1. I delete the ROOT.war and ROOT directory from /usr/local/tomcat/webapps
2. I delete the ROOT.xml context configuration file in 
/usr/local/tomcat/conf/Catalina/localhost
3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps
4. I copy the new ROOT.xml file to /usr/local/tomcat/conf/Catalina/localhost

This used to work fine in Tomcat 5.0.19.  Now, in 5.0.28, when I startup
the server, I get the following error:

INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

And the new ROOT.war file is never expanded (which is why ROOT.xml can't
find web.xml).

The only way to get the .war file to expand, is to temporarily remove the
ROOT.xml file, startup the server (which then expands the .war file), and
then copy the ROOT.xml file over.

The reason I'm using the ROOT.xml file is to setup DBCP for this webapp
only.  In theory, it's not updated often, but when updates occur, it
would be copied over during this process, which is why I do it in my
deployment script.

What happened since Tomcat 5.0.19 to make it not expand the ROOT.war
archive at the same time that it's processing a new ROOT.xml file?

Thank you,
-Raiden Johnson

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



RE: [Possible bug?] Context configurations and .WAR deployment

2004-10-09 Thread D'Alessandro, Arthur
A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat
will create it under your host as ROOT.xml when it is deployed.  That
doesn't solve the problem your experiencing, what does your ROOT.xml
look like? What are you referencing your docBase? Ours word fine by
referencing the ROOT.war.

Note, if you update the context.xml in your webapp, it doesn't auto
update the cached ROOT.xml; you would need to undeploy the webapp,
delete the ROOT.xml from conf/Catalina/localhost  and redeploy the new
webapp.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Saturday, October 09, 2004 3:33 AM
To: [EMAIL PROTECTED]
Subject: [Possible bug?] Context configurations and .WAR deployment

Hello,

I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28.

I am now running into a conflict between ROOT.xml and ROOT.war.

This happens when I deploy to production:
1. I delete the ROOT.war and ROOT directory from
/usr/local/tomcat/webapps
2. I delete the ROOT.xml context configuration file in
/usr/local/tomcat/conf/Catalina/localhost
3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps
4. I copy the new ROOT.xml file to
/usr/local/tomcat/conf/Catalina/localhost

This used to work fine in Tomcat 5.0.19.  Now, in 5.0.28, when I startup
the server, I get the following error:

INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

And the new ROOT.war file is never expanded (which is why ROOT.xml can't
find web.xml).

The only way to get the .war file to expand, is to temporarily remove
the
ROOT.xml file, startup the server (which then expands the .war file),
and
then copy the ROOT.xml file over.

The reason I'm using the ROOT.xml file is to setup DBCP for this webapp
only.  In theory, it's not updated often, but when updates occur, it
would be copied over during this process, which is why I do it in my
deployment script.

What happened since Tomcat 5.0.19 to make it not expand the ROOT.war
archive at the same time that it's processing a new ROOT.xml file?

Thank you,
-Raiden Johnson

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




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



Is it possible to configure the security manager such that my servlet can write into the tomcat-home/logs directory?

2004-09-21 Thread Chang, Betty
Hi -- With tomcat 5.0.16,  I could write into that directory (Windows),
But with tomcat 5.0.27, I can no longer do so.  I've tried all sorts of stuff in 
catalina.policy, but I still cannot configure it such that I can write my own log file 
into the logs directory.


Thanks

Betty



RE: Tomcat5 and Servlet Timeout: Possible?

2004-09-08 Thread Ralph Einfeldt

You may try following snippet as a base for a filter.
(I havn't tried it in a filter chain, so no garantee)

Filter
InterruptTimer mTimer = new InterruptTimer(5000, 10);
mTimer.start();
try {

  doChain() // Don't have the correct syntax at hand...

} catch (??InterruptedIOException?? ex) {

  // Log what you think to be helpfull

}
mTimer.reset();
/Filter


public class InterruptTimer extends Thread {
long oEndTime = 0;
int oSleepTime = 10;
Thread oStartingThread = Thread.currentThread();
Thread oRunningThread = null;

public InterruptTimer(int aLength, int aSleepTime) {
// Both times are in ms
oSleepTime = aSleepTime;
oEndTime = System.currentTimeMillis() + aLength;
}

public void run() {
oRunningThread = Thread.currentThread();
// Loop until the end time is reached or reset() was called.
while (System.currentTimeMillis()  oEndTime) {
try { 
Thread.sleep(oSleepTime);
} catch (InterruptedIOException ex) {
}
}
if (oEndTime  0) {
timeout();
}
}
public void reset() {
oEndTime = 0;
}

public void timeout() {
oStartingThread.interrupt();
}
}

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Andreas Schildbach
 Sent: Tuesday, September 07, 2004 9:19 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat5 and Servlet Timeout: Possible?
 
 
 Shapira, Yoav wrote:
 
  There's no such option in Tomcat.
 
 So if one thread hangs, it hangs forever.
 
 If it blocks other threads, the whole app hangs...
 
 Regards,
 
 Andreas
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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



RE: AW: Tomcat5 and Servlet Timeout: Possible?

2004-09-08 Thread Shapira, Yoav

Hi,
I would investigate the JDK bug more, and maybe switch to a different
JDK version, if I were you.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Schildbach
Sent: Tuesday, September 07, 2004 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: AW: Tomcat5 and Servlet Timeout: Possible?

SH Solutions wrote:

So if one thread hangs, it hangs forever.
If it blocks other threads, the whole app hangs...

 So, yes, if you application has a bug, it has a bug.

Well, unfortunately it is not my application that has this bug, but it
seems to be the JDK: The thread hangs in SocketOutputStream.write0() (a
native method that is called by write()).

 I would NOT want tomcat to kill one of my threads, doing security-
relevant
 modifications in some kind of transaction.

What's the problem? Isn't it the whole reason for transactions that the
whole thing completes or not?

Regards,

Andreas


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Tomcat5 and Servlet Timeout: Possible?

2004-09-07 Thread Andreas Schildbach
Hello everyone,
I'm a bit puzzled at the moment.
Isn't there an option to Tomcat5 that specifies a servlet timeout? 
(maximum the a servlet may take to execute, after which the 
corresponding thread is killed) I could only find connection timeout...

Regards,
Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat5 and Servlet Timeout: Possible?

2004-09-07 Thread Shapira, Yoav

Hi,
There's no such option in Tomcat.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Schildbach
Sent: Tuesday, September 07, 2004 3:09 PM
To: [EMAIL PROTECTED]
Subject: Tomcat5 and Servlet Timeout: Possible?

Hello everyone,

I'm a bit puzzled at the moment.

Isn't there an option to Tomcat5 that specifies a servlet timeout?
(maximum the a servlet may take to execute, after which the
corresponding thread is killed) I could only find connection timeout...

Regards,

Andreas


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Tomcat5 and Servlet Timeout: Possible?

2004-09-07 Thread Andreas Schildbach
Shapira, Yoav wrote:
There's no such option in Tomcat.
So if one thread hangs, it hangs forever.
If it blocks other threads, the whole app hangs...
Regards,
Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: Tomcat5 and Servlet Timeout: Possible?

2004-09-07 Thread SH Solutions
Hi

 So if one thread hangs, it hangs forever.
 If it blocks other threads, the whole app hangs...

So, yes, if you application has a bug, it has a bug.

I would NOT want tomcat to kill one of my threads, doing security-relevant
modifications in some kind of transaction.
Not even if other threads are waiting for these core modifications to
complere.

Regards,
  Steffen


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



Re: AW: Tomcat5 and Servlet Timeout: Possible?

2004-09-07 Thread Andreas Schildbach
SH Solutions wrote:
So if one thread hangs, it hangs forever.
If it blocks other threads, the whole app hangs...
So, yes, if you application has a bug, it has a bug.
Well, unfortunately it is not my application that has this bug, but it 
seems to be the JDK: The thread hangs in SocketOutputStream.write0() (a 
native method that is called by write()).

I would NOT want tomcat to kill one of my threads, doing security-relevant
modifications in some kind of transaction.
What's the problem? Isn't it the whole reason for transactions that the 
whole thing completes or not?

Regards,
Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Is it possible to force Tomcat to drop a servlet?

2004-08-31 Thread Varley, Roger
Hi

I'm experiencing odd failures when a servlets init procedure is called for a second 
time. What I *think* is happening is that Tomcat is deactivating the servlet (as it is 
allowed to do) but some of the singleton objects created by the servlet initialisation 
routine are not being culled at the same time. As a result, when Tomcat receives a 
request for this servlet and starts to re-load it, my servlet is falling over when it 
tries to create objects that already exist. Obviously this is a logic problem with my 
servlet rather than with Tomcat but so that I can test my theory (and soloution), how 
can I force tomcat to drop my servlet and reload it under controlled conditions 
without re-loading the entire web-app? Reloading the entire application through the 
manager doesn't appear to exhibit the problem.

Regards
Roger


__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__

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



RE: Is it possible to force Tomcat to drop a servlet?

2004-08-31 Thread Nitschke Michael
I know now way to do it.
You should do your clean-up in a method called destroy(), its called at
the time tomcat unloads the servlet.

mfg
Michael Nitschke

-Original Message-
From: Varley, Roger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 11:53 AM
To: [EMAIL PROTECTED]
Subject: Is it possible to force Tomcat to drop a servlet?

Hi

I'm experiencing odd failures when a servlets init procedure is called
for a second time. What I *think* is happening is that Tomcat is
deactivating the servlet (as it is allowed to do) but some of the
singleton objects created by the servlet initialisation routine are not
being culled at the same time. As a result, when Tomcat receives a
request for this servlet and starts to re-load it, my servlet is falling
over when it tries to create objects that already exist. Obviously this
is a logic problem with my servlet rather than with Tomcat but so that I
can test my theory (and soloution), how can I force tomcat to drop my
servlet and reload it under controlled conditions without re-loading the
entire web-app? Reloading the entire application through the manager
doesn't appear to exhibit the problem.

Regards
Roger



__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this

e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin
group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.

__

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



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



RE: Is it possible to force Tomcat to drop a servlet?

2004-08-31 Thread Nitschke Michael
Excange the now to no in the last mail from me.

mfg
Michael Nitschke

-Original Message-
From: Nitschke Michael 
Sent: Tuesday, August 31, 2004 12:41 PM
To: Tomcat Users List
Subject: RE: Is it possible to force Tomcat to drop a servlet?

I know now way to do it.
You should do your clean-up in a method called destroy(), its called at
the time tomcat unloads the servlet.

mfg
Michael Nitschke

-Original Message-
From: Varley, Roger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 11:53 AM
To: [EMAIL PROTECTED]
Subject: Is it possible to force Tomcat to drop a servlet?

Hi

I'm experiencing odd failures when a servlets init procedure is called
for a second time. What I *think* is happening is that Tomcat is
deactivating the servlet (as it is allowed to do) but some of the
singleton objects created by the servlet initialisation routine are not
being culled at the same time. As a result, when Tomcat receives a
request for this servlet and starts to re-load it, my servlet is falling
over when it tries to create objects that already exist. Obviously this
is a logic problem with my servlet rather than with Tomcat but so that I
can test my theory (and soloution), how can I force tomcat to drop my
servlet and reload it under controlled conditions without re-loading the
entire web-app? Reloading the entire application through the manager
doesn't appear to exhibit the problem.

Regards
Roger



__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this

e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin
group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.

__

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



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



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



Possible bug in Tomcat5.0.27

2004-08-06 Thread Viktor Malytskyy
Hi!

It seems that setting Content-Length header on response commits that
response (which shouldn't happen).

protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
httpServletResponse.setIntHeader(Content-Length, 0);
httpServletResponse.sendError(404);
}

After invoking such a servlet I'm getting IllegalStateException
java.lang.IllegalStateException

org.apache.coyote.tomcat5.CoyoteResponseFacade.sendError(CoyoteResponseFacade.java:338)
com.fcs.TestServlet.doGet(TestServlet.java:32)

I tried the following combination
httpServletResponse.setIntHeader(Content-Length, 0);
httpServletResponse.setStatus(304);

Using sniffer I see that there is no 304 response, but 200 Ok.

Can somebody clarify this?

Regards,
Viktor

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



RE: Is it possible to modify request parameter?

2004-08-02 Thread Shapira, Yoav

Hi,
Yes.  Use the HttpServletRequestWrapper, and modify the
getParameter/getAttribute/getHeader/getQueryString methods as you need.
You will need a Filter to go along with this, mapped to /servlet2 in
your example, which will intercept the request and wrap it with your
wrapper.


Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Steve Cheng [mailto:[EMAIL PROTECTED]
Sent: Monday, August 02, 2004 12:27 AM
To: Tomcat Users List
Subject: Is it possible to modify request parameter?

Dear all,

The question may be not a TC specific one.

I am using RequestDispatcher to forward a request object from Servlet1
to
Servlet2 as followings.

protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {

...
   RequestDispatcher rd = context.getRequestDispatcher(/Servlet2);
   rd.forward(request, response);
...

}

Is it possible to add or modify the parameters of the request object?

Thanks,
steve



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Is it possible to modify request parameter?

2004-08-01 Thread Steve Cheng
Dear all,

The question may be not a TC specific one.

I am using RequestDispatcher to forward a request object from Servlet1 to
Servlet2 as followings.

protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {

...
   RequestDispatcher rd = context.getRequestDispatcher(/Servlet2);
   rd.forward(request, response);
...

}

Is it possible to add or modify the parameters of the request object?

Thanks,
steve



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



Max possible ram usage

2004-07-21 Thread Albrecht Marcus
Hi everyone,
 
i want to run tomcat (version 5.0.25 and java j2sdk1.4.2_04) on my server with 5 GB 
RAM.
The server is a hp proliant with 2x3.06 Intel Xeon.
As i have enough ram i would allow him to use 3 GB at the max.
 
My java options are
JAVA_OPTS=-Xms512m -Xmx3072m
 
The tomcat won't start with this options.
 
This is the output of my catalina.out logfile:
Jul 21, 2004 2:28:12 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Error occurred during initialization of VM
Could not reserve enough space for object heap
 
If i lower the max value i get it running with a max of 1792 MB setting 
(JAVA_OPTS=-Xms512m -Xmx1792m).
 
Can anyone tell me the max ram size that tomcat/java can use?
I have't found that information anywhere on the net or mailing lists.
 
Thank's in advance ...
 
 
Marcus

_

 

Marcus Albrecht

OC-SYS / Systemadministration

 

SYCOR GmbH

Heinrich-von-Stephan-Straße 1-5

D - 37073 Göttingen

 

Telefon+49 (0) 551 / 490 - 0

Telefax+49 (0) 551 / 490 - 2000

 

mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

www.sycor.de http://www.sycor.de/ 



 




sycor plastics - die neue Branchenlösung für die Kunststoffindustrie

www.sycor-plastics.de






Diese E-Mail ist vertraulich und kann darüber hinaus persönliche Informationen 
beinhalten. Wenn Sie nicht der bestimmungsgemäße Empfänger sind, löschen Sie bitte die 
E-Mail und deren Anhänge sofort und benachrichtigen Sie uns darüber. Die Firma sycor 
willigt in keine Verträge oder vertragliche Verpflichtungen ein oder übermittelt 
rechtsverbindliche Angebote, die in Form von E-Mail versandt werden, sofern dies nicht 
ausdrücklich in schriftlicher Form zwischen den Parteien vereinbart wurde.

This e-mail is confidential and may contain personal and/or privileged information. If 
you are not the intended recipient please delete this e-mail and all attachments 
immediately and inform us. The company sycor does not agree with contracts or contract 
obligations sent by e-mail, neither do we transmit legally binding offers by e-mail, 
unless this is not expressly agreed upon between the parties and documented in written 
form.



RE: Max possible ram usage

2004-07-21 Thread Ralph Einfeldt

That is just java related. 
Tomcat has no upper limitations.

The maximal memory depends on the vm implementation.
You might try a newer version of the jdk or a jdk from a 
different vendor.

 -Original Message-
 From: Albrecht Marcus [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 21, 2004 2:54 PM
 To: [EMAIL PROTECTED]
 Subject: Max possible ram usage
 

 My java options are
 JAVA_OPTS=-Xms512m -Xmx3072m
  
 The tomcat won't start with this options.
  

 Error occurred during initialization of VM
 Could not reserve enough space for object heap
  
 If i lower the max value i get it running with a max of 1792 
 MB setting (JAVA_OPTS=-Xms512m -Xmx1792m).
  
 Can anyone tell me the max ram size that tomcat/java can use?
 I have't found that information anywhere on the net or mailing lists.
  

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



RE: Max possible ram usage

2004-07-21 Thread Shapira, Yoav
Hi,
I actually don't think any stable VM implementation at this time can
address more than 2GB.  But I'm sure they're all working on it and we'll
have 16GB and more soon enough.

Don't just use all this memory because you have it, though.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 21, 2004 9:00 AM
To: Tomcat Users List
Subject: RE: Max possible ram usage


That is just java related.
Tomcat has no upper limitations.

The maximal memory depends on the vm implementation.
You might try a newer version of the jdk or a jdk from a
different vendor.

 -Original Message-
 From: Albrecht Marcus [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 21, 2004 2:54 PM
 To: [EMAIL PROTECTED]
 Subject: Max possible ram usage


 My java options are
 JAVA_OPTS=-Xms512m -Xmx3072m

 The tomcat won't start with this options.


 Error occurred during initialization of VM
 Could not reserve enough space for object heap

 If i lower the max value i get it running with a max of 1792
 MB setting (JAVA_OPTS=-Xms512m -Xmx1792m).

 Can anyone tell me the max ram size that tomcat/java can use?
 I have't found that information anywhere on the net or mailing lists.


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


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



AW: Max possible ram usage

2004-07-21 Thread Gunnar Pörschke
It could be a matter of 
JAVA_OPTS=-Xms512m -Xmx3072m
Or thomething like this.
It seems to be a windows related problem (if you are using windows ;-)

Cheers,

Gunnar

-Ursprüngliche Nachricht-
Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 21. Juli 2004 15:00
An: Tomcat Users List
Betreff: RE: Max possible ram usage


That is just java related. 
Tomcat has no upper limitations.

The maximal memory depends on the vm implementation.
You might try a newer version of the jdk or a jdk from a different vendor.

 -Original Message-
 From: Albrecht Marcus [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 21, 2004 2:54 PM
 To: [EMAIL PROTECTED]
 Subject: Max possible ram usage
 

 My java options are
 JAVA_OPTS=-Xms512m -Xmx3072m
  
 The tomcat won't start with this options.
  

 Error occurred during initialization of VM Could not reserve enough 
 space for object heap
  
 If i lower the max value i get it running with a max of 1792 MB 
 setting (JAVA_OPTS=-Xms512m -Xmx1792m).
  
 Can anyone tell me the max ram size that tomcat/java can use?
 I have't found that information anywhere on the net or mailing lists.
  

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




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



AW: Max possible ram usage

2004-07-21 Thread Albrecht Marcus
Sorry, forgot to mention it.

We are running Suse Linux Enterprise 8.

-Ursprüngliche Nachricht-
Von: Gunnar Pörschke [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 21. Juli 2004 15:01
An: 'Tomcat Users List'
Betreff: AW: Max possible ram usage

It could be a matter of 
JAVA_OPTS=-Xms512m -Xmx3072m
Or thomething like this.
It seems to be a windows related problem (if you are using windows ;-)

Cheers,

Gunnar

-Ursprüngliche Nachricht-
Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 21. Juli 2004 15:00
An: Tomcat Users List
Betreff: RE: Max possible ram usage


That is just java related. 
Tomcat has no upper limitations.

The maximal memory depends on the vm implementation.
You might try a newer version of the jdk or a jdk from a different vendor.

 -Original Message-
 From: Albrecht Marcus [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 21, 2004 2:54 PM
 To: [EMAIL PROTECTED]
 Subject: Max possible ram usage
 

 My java options are
 JAVA_OPTS=-Xms512m -Xmx3072m
  
 The tomcat won't start with this options.
  

 Error occurred during initialization of VM Could not reserve enough 
 space for object heap
  
 If i lower the max value i get it running with a max of 1792 MB 
 setting (JAVA_OPTS=-Xms512m -Xmx1792m).
  
 Can anyone tell me the max ram size that tomcat/java can use?
 I have't found that information anywhere on the net or mailing lists.
  

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




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





sycor plastics - die neue Branchenlösung für die Kunststoffindustrie

www.sycor-plastics.de






Diese E-Mail ist vertraulich und kann darüber hinaus persönliche Informationen 
beinhalten. Wenn Sie nicht der bestimmungsgemäße Empfänger sind, löschen Sie bitte die 
E-Mail und deren Anhänge sofort und benachrichtigen Sie uns darüber. Die Firma sycor 
willigt in keine Verträge oder vertragliche Verpflichtungen ein oder übermittelt 
rechtsverbindliche Angebote, die in Form von E-Mail versandt werden, sofern dies nicht 
ausdrücklich in schriftlicher Form zwischen den Parteien vereinbart wurde.

This e-mail is confidential and may contain personal and/or privileged information. If 
you are not the intended recipient please delete this e-mail and all attachments 
immediately and inform us. The company sycor does not agree with contracts or contract 
obligations sent by e-mail, neither do we transmit legally binding offers by e-mail, 
unless this is not expressly agreed upon between the parties and documented in written 
form.


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



RE: Max possible ram usage

2004-07-21 Thread Carl Olivier
In addition, you also need to ensure that there is enough RAM left for the
OS to use when assigning native heap.

AFAIK the general rul of thumb is to have the same anount of RAM you assign
to the JAVA HEAP left to the OS for the native heap.

Carl

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 21, 2004 3:00 PM
To: Tomcat Users List
Subject: RE: Max possible ram usage


That is just java related. 
Tomcat has no upper limitations.

The maximal memory depends on the vm implementation.
You might try a newer version of the jdk or a jdk from a different vendor.

 -Original Message-
 From: Albrecht Marcus [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 21, 2004 2:54 PM
 To: [EMAIL PROTECTED]
 Subject: Max possible ram usage
 

 My java options are
 JAVA_OPTS=-Xms512m -Xmx3072m
  
 The tomcat won't start with this options.
  

 Error occurred during initialization of VM Could not reserve enough 
 space for object heap
  
 If i lower the max value i get it running with a max of 1792 MB 
 setting (JAVA_OPTS=-Xms512m -Xmx1792m).
  
 Can anyone tell me the max ram size that tomcat/java can use?
 I have't found that information anywhere on the net or mailing lists.
  

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

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



Re: Max possible ram usage

2004-07-21 Thread Wade Chandler
Albrecht Marcus wrote:
Hi everyone,
 
i want to run tomcat (version 5.0.25 and java j2sdk1.4.2_04) on my server with 5 GB RAM.
The server is a hp proliant with 2x3.06 Intel Xeon.
As i have enough ram i would allow him to use 3 GB at the max.
 
My java options are
JAVA_OPTS=-Xms512m -Xmx3072m
 
The tomcat won't start with this options.
 
This is the output of my catalina.out logfile:
Jul 21, 2004 2:28:12 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Error occurred during initialization of VM
Could not reserve enough space for object heap
 
If i lower the max value i get it running with a max of 1792 MB setting (JAVA_OPTS=-Xms512m -Xmx1792m).
 
Can anyone tell me the max ram size that tomcat/java can use?
I have't found that information anywhere on the net or mailing lists.
 
Thank's in advance ...
 
 
Marcus

_
 

Marcus Albrecht
OC-SYS / Systemadministration
 

SYCOR GmbH
Heinrich-von-Stephan-Straße 1-5
D - 37073 Göttingen
 

Telefon+49 (0) 551 / 490 - 0
Telefax+49 (0) 551 / 490 - 2000
 

mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

www.sycor.de http://www.sycor.de/ 


 


sycor plastics - die neue Branchenlösung für die Kunststoffindustrie
www.sycor-plastics.de


Diese E-Mail ist vertraulich und kann darüber hinaus persönliche Informationen 
beinhalten. Wenn Sie nicht der bestimmungsgemäße Empfänger sind, löschen Sie bitte die 
E-Mail und deren Anhänge sofort und benachrichtigen Sie uns darüber. Die Firma sycor 
willigt in keine Verträge oder vertragliche Verpflichtungen ein oder übermittelt 
rechtsverbindliche Angebote, die in Form von E-Mail versandt werden, sofern dies nicht 
ausdrücklich in schriftlicher Form zwischen den Parteien vereinbart wurde.
This e-mail is confidential and may contain personal and/or privileged information. If 
you are not the intended recipient please delete this e-mail and all attachments 
immediately and inform us. The company sycor does not agree with contracts or contract 
obligations sent by e-mail, neither do we transmit legally binding offers by e-mail, 
unless this is not expressly agreed upon between the parties and documented in written 
form.

Well, the real issue is with IA32.  IA32 systems currently only support 
up to 4GB of RAM per process (there are some software patches that trick 
this, but I don't know if there are any for windows or not..there are 
some for linux, but I've only read about them).  The OS kernel will use 
up the other 2GB and leaves you with 2GB (kernel has to be able to 
manage the memory...page and swap).  So unless you get an AMD32/64 or an 
Intel Itanium this is the limit you will face with the system you have 
for all processes (on 32/64 you'll need a 64-bit JVM...I think Sun makes 
one).  Of course a PowerPC64 or a Sparc64 would be able to do the same.

You could use the nio package in your application if you need to and 
create yourself some shared memory buffers and under neith this use some 
special file maps or shared memory to get around the memory issues, but 
more than likely you'll never really need that much memory.  If you 
really do then what you really need to do is to create some special 
memory class that will use a special shared memory resource for the 
operations that require huge amounts of memory and you will have to 
manage multiple chunks for shared memory pretty much.  This will also 
require you to write some native code.  basically you would make an 
implementation of java.nio.channels.FileChannel.

Linux* The large memory kernel patch may or may not help you...depends 
on the 32-bit JVM and how it is written.  I doubt it would address more 
space with a patch, though I would say that sooner or later there will 
be one that will when large memory addressing processes become more popular.

Wade
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Max possible ram usage

2004-07-21 Thread Wade Chandler
Wade Chandler wrote:
Albrecht Marcus wrote:
Hi everyone,
 
i want to run tomcat (version 5.0.25 and java j2sdk1.4.2_04) on my 
server with 5 GB RAM.
The server is a hp proliant with 2x3.06 Intel Xeon.
As i have enough ram i would allow him to use 3 GB at the max.
 
My java options are
JAVA_OPTS=-Xms512m -Xmx3072m
 
The tomcat won't start with this options.
 
This is the output of my catalina.out logfile:
Jul 21, 2004 2:28:12 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Error occurred during initialization of VM
Could not reserve enough space for object heap
 
If i lower the max value i get it running with a max of 1792 MB 
setting (JAVA_OPTS=-Xms512m -Xmx1792m).
 
Can anyone tell me the max ram size that tomcat/java can use?
I have't found that information anywhere on the net or mailing lists.
 
Thank's in advance ...
 
 
Marcus

_
 

Marcus Albrecht
OC-SYS / Systemadministration
 

SYCOR GmbH
Heinrich-von-Stephan-Straße 1-5
D - 37073 Göttingen
 

Telefon+49 (0) 551 / 490 - 0
Telefax+49 (0) 551 / 490 - 2000
 

mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
www.sycor.de http://www.sycor.de/

 


sycor plastics - die neue Branchenlösung für die Kunststoffindustrie
www.sycor-plastics.de


Diese E-Mail ist vertraulich und kann darüber hinaus persönliche 
Informationen beinhalten. Wenn Sie nicht der bestimmungsgemäße 
Empfänger sind, löschen Sie bitte die E-Mail und deren Anhänge sofort 
und benachrichtigen Sie uns darüber. Die Firma sycor willigt in keine 
Verträge oder vertragliche Verpflichtungen ein oder übermittelt 
rechtsverbindliche Angebote, die in Form von E-Mail versandt werden, 
sofern dies nicht ausdrücklich in schriftlicher Form zwischen den 
Parteien vereinbart wurde.

This e-mail is confidential and may contain personal and/or privileged 
information. If you are not the intended recipient please delete this 
e-mail and all attachments immediately and inform us. The company 
sycor does not agree with contracts or contract obligations sent by 
e-mail, neither do we transmit legally binding offers by e-mail, 
unless this is not expressly agreed upon between the parties and 
documented in written form.


Well, the real issue is with IA32.  IA32 systems currently only support 
up to 4GB of RAM per process (there are some software patches that trick 
this, but I don't know if there are any for windows or not..there are 
some for linux, but I've only read about them).  The OS kernel will use 
up the other 2GB and leaves you with 2GB (kernel has to be able to 
manage the memory...page and swap).  So unless you get an AMD32/64 or an 
Intel Itanium this is the limit you will face with the system you have 
for all processes (on 32/64 you'll need a 64-bit JVM...I think Sun makes 
one).  Of course a PowerPC64 or a Sparc64 would be able to do the same.

You could use the nio package in your application if you need to and 
create yourself some shared memory buffers and under neith this use some 
special file maps or shared memory to get around the memory issues, but 
more than likely you'll never really need that much memory.  If you 
really do then what you really need to do is to create some special 
memory class that will use a special shared memory resource for the 
operations that require huge amounts of memory and you will have to 
manage multiple chunks for shared memory pretty much.  This will also 
require you to write some native code.  basically you would make an 
implementation of java.nio.channels.FileChannel.

Linux* The large memory kernel patch may or may not help you...depends 
on the 32-bit JVM and how it is written.  I doubt it would address more 
space with a patch, though I would say that sooner or later there will 
be one that will when large memory addressing processes become more 
popular.

Wade
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Almost forgot...you also need to leave room for the JVM in the memory 
you allocate for the max.  Else it won't be able to peform properly it's 
own management tasks.

Wade
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JK2 possible JNI problem? nativeDispatch exceptions

2004-07-20 Thread Joshua Szmajda
Hi All,
I've got Tomcat 4.1.20 and Apache 2.0.46 running on Red Hat Enterprise 
Linux AS 3. I'm using the jk2 connector (connectors version 2.0.4) with 
a unixSocket channel. My problem is that the catalina.out file 
constantly gets the following two entries:

this one comes constantly..
[Mon Jul 19 19:20:51 2004] ( info ) [jk_jni_aprImpl.c (431)]  jkInvoke() 
invoke a971c670

and an exception (very often):
Jul 19, 2004 7:20:11 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error -3
java.lang.Throwable
   at 
org.apache.jk.common.JniHandler.nativeDispatch(JniHandler.java:310)
   at org.apache.jk.common.ChannelUn.send(ChannelUn.java:218)
   at org.apache.jk.common.ChannelUn.invoke(ChannelUn.java:303)
   at 
org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:279)
   at org.apache.coyote.Response.doWrite(Response.java:586)
   at 
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:405)
   at 
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:436)
   at 
org.apache.coyote.tomcat4.OutputBuffer.doFlush(OutputBuffer.java:354)
   at 
org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:336)
   at 
org.apache.coyote.tomcat4.CoyoteWriter.flush(CoyoteWriter.java:117)
   at 
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209)
   at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:810)
   at org.apache.jsp.error_jsp._jspService(error_jsp.java:337)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
   at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
   at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
   at 
org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.java:420)
   at 
org.apache.catalina.valves.ErrorDispatcherValve.throwable(ErrorDispatcherValve.java:258)
   at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:179)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
   at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:324)
   at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:395)
   at 
org.apache.jk.common.ChannelUn.processConnection(ChannelUn.java:286)
   at org.apache.jk.common.AprConnection.runIt(ChannelUn.java:347)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
   at java.lang.Thread.run(Thread.java:534)
   
I'm running a very high traffic site and so I was wondering if perhaps 
this was due to file locking collisions on the socket? I'm not sure 
there. This didn't used to happen when I was using regular domain 
sockets. I do need the unixSocket channel however, as it's proven to be 
much much faster.

I've tried commenting out the line that writes the first line, but that 
only seems to exacerbate the number of exceptions. I also was able to 
diminish the number of exceptions by changing the shm file from anon to 
a real file on the system. I'm thinking this is slowing down the JNI 
somehow? (leading me back to the collisions theory).

Any help is greatly appreciated! Otherwise I'm left with trying to read 
the code and learn JNI =/

Thanks Again,
-Joshua Szmajda
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Is it possible to include an action in /welcome-list

2004-07-19 Thread R A
Is it possible to include an action (i.e. welcome-listindex.do/welcome-list) in 
the /welcome-list. After I add the action, it retruned a directory listing. Is this 
a bug?


-
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

RE: NPE in ActionForm where it is not be possible

2004-07-14 Thread Shapira, Yoav

Hi,
Because Log is not Serializable, you can't put it in the session.  So
making it transient is fine.  I also saw your reasoning for making it
dynamic rather than static.

Tomcat will save and restore your sessions across server restarts by
default.  That includes session attributes that are Serializable.  If
the Form was in the session, it will be deserialized: this is not the
same process as reconstruction.  So if you choose to stick with this
transient modifier, you will need to check for the log being null before
every time you use it.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 13, 2004 6:26 PM
To: Tomcat Users List
Subject: RE: NPE in ActionForm where it is not be possible

QM mailto:[EMAIL PROTECTED] wrote:
 On Sat, Jul 10, 2004 at 12:31:21PM -0700, Richard Mixon (qwest)
wrote:
 The log variable is initialized when the Action form is
   instantiated, like so: public class ChartWizardForm extends
   ActionForm implements java.io.Serializable { private transient
 Log log =
 LogFactory.getLog(ChartWizardForm.class);
   ...

 Obviously I'm missing something pretty basic. Is Tomcat re-using a
 form instance across restarts? I've got pretty much default settings
 in Tomcat:

 I notice, you define/initialize the instance variable log at its
 declaration point.

 Humor me: what happens if you initialize log in the ctor?

 -QM

I've had to look at higher priorities for a couple of days :)

Thanks for the idea. I changed as follows:
...
// private transient Log log =
LogFactory.getLog(ChartWizardForm.class);
private transient Log log; // Logging instance for this class
...

public ChartWizardForm() {
showInactive = false;
altClassMeasOrder = false;
...
outputFmt=;
scaleFactor=;
log = LogFactory.getLog(ChartWizardForm.class); // -- ADDED
INITIALIZATION HERE
}
...

But, still get the NPE :(

I'm defininig the instance variable as transient because Tomcat
complains about saving sessions that contain a private instance
variable
(non-transient) of type Log. I was trying to get my sessions to persist
across restarts. Does that suggest anything?

Thank you again - Richard


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: NPE in ActionForm where it is not be possible

2004-07-14 Thread Richard Mixon (qwest)
Yoav,

Wow, had not considered that. I'm going to sort of say this back to be
sure I understand though :)

So if we stop Tomcat then my session, with any stored attributes that
contain an ActionForm, will be serialized to persistent storage
(disk). Upon restart the sesson and its attributes are
deserialized(reconstituted so to speak). The CATCH is that for any
included ActionForms, standard object initialization does not occur -
either through static initializers or through the constructor. So I can
end up with a NPE when I reference the log instance variable.

OK, that definitely explains the problem. It is only after a restart
that this is occurring - consistently. So, how to fix this.

Ugh! I've got 127 classes that use this construct! The good news is that
the objects that are likely to be persisted to the session tend to be
either ActionForms or a limited number of domain objects - about 50 in
total. They mostly derive from common superclasses so I might get some
help by putting an inner class that wraps the Log type in the
superclass. But, I need access to the actual class name of the instance
so I can initialize the Log object with objectname.class.

Is there a more elegant way to do this? I know using AOP would offer
some much more elegant solutions, but do not think I'm ready to throw
this at a production system.

Any comments/ideas are welcome. And thanks again to Yoav for helping me
to see the light here.

 - Richard

Shapira, Yoav mailto:[EMAIL PROTECTED] wrote:
 Hi,
 Because Log is not Serializable, you can't put it in the session.  So
 making it transient is fine.  I also saw your reasoning for making it
 dynamic rather than static.

 Tomcat will save and restore your sessions across server restarts by
 default.  That includes session attributes that are Serializable.  If
 the Form was in the session, it will be deserialized: this is not the
 same process as reconstruction.  So if you choose to stick with this
 transient modifier, you will need to check for the log being null
 before
 every time you use it.

 Yoav Shapira
 Millennium Research Informatics


 -Original Message-
 From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 13, 2004 6:26 PM
 To: Tomcat Users List
 Subject: RE: NPE in ActionForm where it is not be possible

 QM mailto:[EMAIL PROTECTED] wrote:
 On Sat, Jul 10, 2004 at 12:31:21PM -0700, Richard Mixon (qwest)
 wrote:
 The log variable is initialized when the Action form is
   instantiated, like so: public class ChartWizardForm extends
   ActionForm implements java.io.Serializable { private
 transient Log log = LogFactory.getLog(ChartWizardForm.class);
   ...

 Obviously I'm missing something pretty basic. Is Tomcat re-using a
 form instance across restarts? I've got pretty much default
 settings in Tomcat:

 I notice, you define/initialize the instance variable log at its
 declaration point.

 Humor me: what happens if you initialize log in the ctor?

 -QM

 I've had to look at higher priorities for a couple of days :)

 Thanks for the idea. I changed as follows:
...
// private transient Log log =
 LogFactory.getLog(ChartWizardForm.class);
private transient Log log; // Logging instance for this class
 ...

public ChartWizardForm() {
showInactive = false;
altClassMeasOrder = false;
...
outputFmt=;
scaleFactor=;
log = LogFactory.getLog(ChartWizardForm.class); // -- ADDED
INITIALIZATION HERE }
...

 But, still get the NPE :(

 I'm defininig the instance variable as transient because Tomcat
 complains about saving sessions that contain a private instance
 variable (non-transient) of type Log. I was trying to get my
 sessions to persist across restarts. Does that suggest anything?

 Thank you again - Richard


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




 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an)
 intended recipient, please immediately delete this e-mail from your
 computer system and notify the sender.  Thank you.


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



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



RE: NPE in ActionForm where it is not be possible

2004-07-14 Thread Shapira, Yoav

Hi,
I just wanted to confirm your understanding is correct.  It's
unfortunate to discover this now, from your perspective, since you
already have many classes affected by this, but then again better late
than never ;)

I tend to agree about throwing AOP into a production system at this
point in time.

In production code I tend to use static loggers so this is not an issue
for me, and there are other workarounds of varying applicability, such
as checking for a null logger before using it (a tiny checkLogger method
in your superclass called by every method, or something like that: it's
slow and ugly, but it works and depending on other constraints you may
want this).

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 14, 2004 1:43 PM
To: Tomcat Users List
Subject: RE: NPE in ActionForm where it is not be possible

Yoav,

Wow, had not considered that. I'm going to sort of say this back to be
sure I understand though :)

So if we stop Tomcat then my session, with any stored attributes that
contain an ActionForm, will be serialized to persistent storage
(disk). Upon restart the sesson and its attributes are
deserialized(reconstituted so to speak). The CATCH is that for any
included ActionForms, standard object initialization does not occur -
either through static initializers or through the constructor. So I can
end up with a NPE when I reference the log instance variable.

OK, that definitely explains the problem. It is only after a restart
that this is occurring - consistently. So, how to fix this.

Ugh! I've got 127 classes that use this construct! The good news is
that
the objects that are likely to be persisted to the session tend to be
either ActionForms or a limited number of domain objects - about 50 in
total. They mostly derive from common superclasses so I might get some
help by putting an inner class that wraps the Log type in the
superclass. But, I need access to the actual class name of the instance
so I can initialize the Log object with objectname.class.

Is there a more elegant way to do this? I know using AOP would offer
some much more elegant solutions, but do not think I'm ready to throw
this at a production system.

Any comments/ideas are welcome. And thanks again to Yoav for helping me
to see the light here.

 - Richard

Shapira, Yoav mailto:[EMAIL PROTECTED] wrote:
 Hi,
 Because Log is not Serializable, you can't put it in the session.  So
 making it transient is fine.  I also saw your reasoning for making it
 dynamic rather than static.

 Tomcat will save and restore your sessions across server restarts by
 default.  That includes session attributes that are Serializable.  If
 the Form was in the session, it will be deserialized: this is not the
 same process as reconstruction.  So if you choose to stick with this
 transient modifier, you will need to check for the log being null
 before
 every time you use it.

 Yoav Shapira
 Millennium Research Informatics


 -Original Message-
 From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 13, 2004 6:26 PM
 To: Tomcat Users List
 Subject: RE: NPE in ActionForm where it is not be possible

 QM mailto:[EMAIL PROTECTED] wrote:
 On Sat, Jul 10, 2004 at 12:31:21PM -0700, Richard Mixon (qwest)
 wrote:
 The log variable is initialized when the Action form is
   instantiated, like so: public class ChartWizardForm extends
   ActionForm implements java.io.Serializable { private
 transient Log log = LogFactory.getLog(ChartWizardForm.class);
   ...

 Obviously I'm missing something pretty basic. Is Tomcat re-using a
 form instance across restarts? I've got pretty much default
 settings in Tomcat:

 I notice, you define/initialize the instance variable log at its
 declaration point.

 Humor me: what happens if you initialize log in the ctor?

 -QM

 I've had to look at higher priorities for a couple of days :)

 Thanks for the idea. I changed as follows:
...
// private transient Log log =
 LogFactory.getLog(ChartWizardForm.class);
private transient Log log; // Logging instance for this class
 ...

public ChartWizardForm() {
showInactive = false;
altClassMeasOrder = false;
...
outputFmt=;
scaleFactor=;
log = LogFactory.getLog(ChartWizardForm.class); // -- ADDED
INITIALIZATION HERE }
...

 But, still get the NPE :(

 I'm defininig the instance variable as transient because Tomcat
 complains about saving sessions that contain a private instance
 variable (non-transient) of type Log. I was trying to get my
 sessions to persist across restarts. Does that suggest anything?

 Thank you again - Richard



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




 This e-mail, including any attachments, is a confidential business
 communication

RE: NPE in ActionForm where it is not be possible

2004-07-14 Thread Richard Mixon (qwest)
Yoav - thanks for the confirmation. Its not that bad - 1) We do not
restart very often; 2) I've been wanting to clean up the logging in this
system for a while. This will provide that opportunity :) Peace -
Richard


Shapira, Yoav mailto:[EMAIL PROTECTED] wrote:
 Hi,
 I just wanted to confirm your understanding is correct.  It's
 unfortunate to discover this now, from your perspective, since you
 already have many classes affected by this, but then again better late
 than never ;)

 I tend to agree about throwing AOP into a production system at this
 point in time.

 In production code I tend to use static loggers so this is not an
 issue
 for me, and there are other workarounds of varying applicability, such
 as checking for a null logger before using it (a tiny checkLogger
 method
 in your superclass called by every method, or something like that:
 it's
 slow and ugly, but it works and depending on other constraints you may
 want this).

 Yoav Shapira
 Millennium Research Informatics


 -Original Message-
 From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 14, 2004 1:43 PM
 To: Tomcat Users List
 Subject: RE: NPE in ActionForm where it is not be possible

 Yoav,

 Wow, had not considered that. I'm going to sort of say this back to
 be sure I understand though :)

 So if we stop Tomcat then my session, with any stored attributes that
 contain an ActionForm, will be serialized to persistent storage
 (disk). Upon restart the sesson and its attributes are
 deserialized(reconstituted so to speak). The CATCH is that for any
 included ActionForms, standard object initialization does not
 occur - either through static initializers or through the
 constructor. So I can end up with a NPE when I reference the log
 instance variable.

 OK, that definitely explains the problem. It is only after a restart
 that this is occurring - consistently. So, how to fix this.

 Ugh! I've got 127 classes that use this construct! The good news is
 that the objects that are likely to be persisted to the session tend
 to be either ActionForms or a limited number of domain objects -
 about 50 in total. They mostly derive from common superclasses so I
 might get some help by putting an inner class that wraps the Log
 type in the superclass. But, I need access to the actual class name
 of the instance so I can initialize the Log object with
 objectname.class.

 Is there a more elegant way to do this? I know using AOP would offer
 some much more elegant solutions, but do not think I'm ready to
 throw this at a production system.

 Any comments/ideas are welcome. And thanks again to Yoav for helping
 me to see the light here.

 - Richard

 Shapira, Yoav mailto:[EMAIL PROTECTED] wrote:
 Hi,
 Because Log is not Serializable, you can't put it in the session.
 So making it transient is fine.  I also saw your reasoning for
 making it dynamic rather than static.

 Tomcat will save and restore your sessions across server restarts by
 default.  That includes session attributes that are Serializable.
 If the Form was in the session, it will be deserialized: this is
 not the same process as reconstruction.  So if you choose to stick
 with this transient modifier, you will need to check for the log
 being null before every time you use it.

 Yoav Shapira
 Millennium Research Informatics


 -Original Message-
 From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 13, 2004 6:26 PM
 To: Tomcat Users List
 Subject: RE: NPE in ActionForm where it is not be possible

 QM mailto:[EMAIL PROTECTED] wrote:
 On Sat, Jul 10, 2004 at 12:31:21PM -0700, Richard Mixon (qwest)
 wrote:
 The log variable is initialized when the Action form is
   instantiated, like so: public class ChartWizardForm extends
   ActionForm implements java.io.Serializable { private
 transient Log log = LogFactory.getLog(ChartWizardForm.class);
 ...

 Obviously I'm missing something pretty basic. Is Tomcat re-using
 a form instance across restarts? I've got pretty much default
 settings in Tomcat:

 I notice, you define/initialize the instance variable log at
 its declaration point.

 Humor me: what happens if you initialize log in the ctor?

 -QM

 I've had to look at higher priorities for a couple of days :)

 Thanks for the idea. I changed as follows:
...
// private transient Log log =
 LogFactory.getLog(ChartWizardForm.class);
private transient Log log; // Logging instance for this class
 ...

public ChartWizardForm() {
showInactive = false;
altClassMeasOrder = false;
...
outputFmt=;
scaleFactor=;
log = LogFactory.getLog(ChartWizardForm.class); // --
ADDEDINITIALIZATION HERE } ...

 But, still get the NPE :(

 I'm defininig the instance variable as transient because Tomcat
 complains about saving sessions that contain a private instance
 variable (non-transient) of type Log. I was trying to get my
 sessions to persist across restarts. Does

RE: NPE in ActionForm where it is not be possible

2004-07-13 Thread Richard Mixon (qwest)
QM mailto:[EMAIL PROTECTED] wrote:
 On Sat, Jul 10, 2004 at 12:31:21PM -0700, Richard Mixon (qwest) wrote:
 The log variable is initialized when the Action form is
   instantiated, like so: public class ChartWizardForm extends
   ActionForm implements java.io.Serializable { private transient
 Log log =
 LogFactory.getLog(ChartWizardForm.class);
   ...

 Obviously I'm missing something pretty basic. Is Tomcat re-using a
 form instance across restarts? I've got pretty much default settings
 in Tomcat:

 I notice, you define/initialize the instance variable log at its
 declaration point.

 Humor me: what happens if you initialize log in the ctor?

 -QM

I've had to look at higher priorities for a couple of days :)

Thanks for the idea. I changed as follows:
...
// private transient Log log =
LogFactory.getLog(ChartWizardForm.class);
private transient Log log; // Logging instance for this class
...

public ChartWizardForm() {
showInactive = false;
altClassMeasOrder = false;
...
outputFmt=;
scaleFactor=;
log = LogFactory.getLog(ChartWizardForm.class); // -- ADDED
INITIALIZATION HERE
}
...

But, still get the NPE :(

I'm defininig the instance variable as transient because Tomcat
complains about saving sessions that contain a private instance variable
(non-transient) of type Log. I was trying to get my sessions to persist
across restarts. Does that suggest anything?

Thank you again - Richard


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



RE: NPE in ActionForm where it is not be possible

2004-07-13 Thread Richard Mixon (qwest)
Craig Berry mailto:[EMAIL PROTECTED] wrote:
 From:QM [mailto:[EMAIL PROTECTED]

 I notice, you define/initialize the instance variable log at its
 declaration point.

 Humor me: what happens if you initialize log in the ctor?

 Or for that matter, why not make the log member static?  There's no
 harm in one log instance being shared by multiple objects.

Craig, I am not making the member static because that would cause me to
lose track of what thread the message is comming from. E.G. currently my
logging containst the thread id, like follows:
  06:59:39,869  INFO [TP-Processor8] ActionFilter:173 - Handling request
URI: '/stars/HomePage.do', user='jpsdorg', host='64.216.181.157'
  06:59:39,917  INFO [TP-Processor8] ActionFilter:413 - Handled  request
URI: '/stars/HomePage.do', user='jpsdorg', host='64.216.181.157'
  06:59:56,006  INFO [TP-Processor6] ActionFilter:173 - Handling request
URI: '/stars/config/PoStudentAction.do', user='jpsdorg',
host='64.216.181.157'

Yeah, it makes the message that much longer, but lets me figure out
which messages belong to which requests.

Thanks - Richard


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



Possible to retrieve ServletContext from any class used in the web application??

2004-07-12 Thread Fredrik Liden
Hi,

Does anyone know if it's possible to retrieve the ServletContext from
any class (like a helper class) that is being used in the Web app, even
though the request object is not being passed to the object?

Any ideas would be greatly appreciated.

/Fredrik

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



Re: NPE in ActionForm where it is not be possible

2004-07-11 Thread QM
On Sat, Jul 10, 2004 at 12:31:21PM -0700, Richard Mixon (qwest) wrote:
: The log variable is initialized when the Action form is instantiated,
: like so:
:   public class ChartWizardForm extends ActionForm implements
: java.io.Serializable {
:   private transient Log log =
: LogFactory.getLog(ChartWizardForm.class);
:   ...
: 
: Obviously I'm missing something pretty basic. Is Tomcat re-using a form
: instance across restarts? I've got pretty much default settings in
: Tomcat:

I notice, you define/initialize the instance variable log at its
declaration point.

Humor me: what happens if you initialize log in the ctor?

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: NPE in ActionForm where it is not be possible

2004-07-11 Thread Craig Berry
 From: QM [mailto:[EMAIL PROTECTED]

 I notice, you define/initialize the instance variable log at its
 declaration point.

 Humor me: what happens if you initialize log in the ctor?

Or for that matter, why not make the log member static?  There's no harm in one log 
instance being shared by multiple objects.



NPE in ActionForm where it is not be possible

2004-07-10 Thread Richard Mixon (qwest)
I am getting a NullPointerException in an action form that should
theoretically not be possible :(
Any ideas/help/suggestions are appreciated. Obviously it is possible
:).

I happens when I'm testing. I find a problem, leave my browser up, then
stop/start Tomcat. I select a home page link from the page that is
still displayed - its simply an action wrapped simple JSP page with no
dynamic data that serves as  a central bulletin board for my users.
After that is displayed, I go back to the page that I am developing on.
Boom! I get the NPE in the middle of a getter method on the action form.

Here is the method - the NPE is flagged at the line if
(log.isDebugEnabled()) {.
...
public String getMeasParmsId() {
if (log.isDebugEnabled()) {
log.debug(getMeasParmsId()= + measParmsId);
}
return measParmsId;
}
...

The log variable is initialized when the Action form is instantiated,
like so:
  public class ChartWizardForm extends ActionForm implements
java.io.Serializable {
  private transient Log log =
LogFactory.getLog(ChartWizardForm.class);
  ...

Obviously I'm missing something pretty basic. Is Tomcat re-using a form
instance across restarts? I've got pretty much default settings in
Tomcat:


Here is the exception stack trace:
2004-07-10 12:21:00 StandardWrapperValve[action]: Servlet.service() for
servlet action threw exception
java.lang.NullPointerException
at
com.ltoj.webapp.form.ChartWizardForm.getMeasParmsId(ChartWizardForm.java
:137)
at
com.ltoj.webapp.action.AdminChartWizardAction.stepMeasParms(AdminChartWi
zardAction.java:88)
at
com.ltoj.webapp.action.AdminChartWizardAction.unspecified(AdminChartWiza
rdAction.java:66)
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:260)
at
com.ltoj.webapp.action.BaseAction.execute(BaseAction.java:162)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:204)
at
com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingF
ilter.java:132)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:233)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:204)
at
com.ltoj.webapp.filter.BreadCrumbFilter.doFilter(BreadCrumbFilter.java:9
4)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:233)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:204)
at
com.ltoj.webapp.filter.ActionFilter.doFilter(ActionFilter.java:372)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:233)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:204)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:257)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
67)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:245)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:199)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:151)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:587)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
67)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:184)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:164)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:149)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:149

RE: Sybase and Tomcat 5, Possible Problem

2004-06-24 Thread Matt Anderson
I use Sybase ASE12.5 along with Tomcat 5.0.24

I place the JConnect (jconn2d.jar) file in the %tomcathome%/common/lib
directory. Sybase and Tomcat 5.0.24 can work together. I don't have my
web.xml or root.xml (I use virtual hosting) here however I can provide them
tomorrow once I am at work.

Matt Anderson


-Original Message-
From: Jeff Sexton [mailto:[EMAIL PROTECTED]
Sent: Friday, June 18, 2004 1:40 AM
To: [EMAIL PROTECTED]
Subject: Sybase and Tomcat 5, Possible Problem


After a lot of effort, I feel there may be some reason that the Sybase
JConnect JDBC driver doesn't work in Tomcat 5.0.24 (I use Tomcat 4 for my
Sybase driven apps quite a bit).

The exception is:

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause: null

META-INF/context.xml is:

   Context path=/forteCommon docBase=forteCommon reloadable=true
   ResourceLink name=jdbc/odsdb03 global=jdbc/odsdb03
 type=javax.sql.DataSource/
   /Context

 From conf/server.xml contains:

   GlobalNamingResources
 Resource name=jdbc/odsdb03
   auth=Container
   type=javax.sql.DataSource/
 ResourceParams name=jdbc/odsdb03
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 nameusername/name
 valueexcalibur/value
   /parameter
   parameter
 namepassword/name
 valuemypassword/value
   /parameter
   parameter
 namedriverClassName/name
 valuecom.sybase.jdbc2.jdbc.SybDriver/value
   /parameter
parameter
  namedriverName/name
  valuejdbc:sybase:Tds:pdxax12:4100/value
/parameter
   parameter
 nameurl/name
 valuejdbc:sybase:Tds:pdxax12:4100/value
   /parameter
   parameter
 namemaxActive/name
 value5/value
   /parameter
 /ResourceParams 
   /GlobalNamingResources

web.xml contains:

web-app
 servlet
 servlet-name
 ProvCICS
 /servlet-name
 servlet-class
 com.ods.forte.cics.servlet.ProvCICS
 /servlet-class
 load-on-startup1/load-on-startup
 /servlet

 servlet-mapping
   servlet-nameProvCICS/servlet-name
   url-pattern/ProvCICS/url-pattern
 /servlet-mapping

 resource-ref
   descriptionodsdb03 Connection Pool/description
   res-ref-namejdbc/odsdb03/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
/web-app


I have also tried working with the context placed in server.xml
and with the Resource defined in the context, all combinations
yield the same behavior.

*Tomcat does actually log into the database server when it starts*

I can see it from the database side.  Therefore I know the jdbc
jar file is loaded and the connection specification correct and working.
In addition, the stack trace in catalina.out includes a point
in Sybase code:

Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
 at com.sybase.jdbc2.jdbc.SybDriver.acceptsURL(SybDriver.java:197)
 at java.sql.DriverManager.getDriver(DriverManager.java:249)
 at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:743)
 ...

So can I conclude that the app is actually linked to the resource?  If
so then the problem seems to be that the information required somehow
does not reach down the driver?

Ideas?

Should I rollback to TC 4x for awhile?

--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com

This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.


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



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



RE: Sybase and Tomcat 5, Possible Problem

2004-06-18 Thread Shapira, Yoav

Hi,
Hmm... It's good you can verify the login on the DB side.  You should
try to debug this in tomcat 5 rather than rolling back, if possible.

Where is the driver jar located in your server?

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Jeff Sexton [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 17, 2004 12:35 PM
To: [EMAIL PROTECTED]
Subject: Sybase and Tomcat 5, Possible Problem

After a lot of effort, I feel there may be some reason that the Sybase
JConnect JDBC driver doesn't work in Tomcat 5.0.24 (I use Tomcat 4 for
my
Sybase driven apps quite a bit).

The exception is:

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
class '' for connect URL 'null', cause: null

META-INF/context.xml is:

Context path=/forteCommon docBase=forteCommon
reloadable=true
ResourceLink name=jdbc/odsdb03 global=jdbc/odsdb03
  type=javax.sql.DataSource/
/Context

  From conf/server.xml contains:

GlobalNamingResources
  Resource name=jdbc/odsdb03
auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/odsdb03
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  nameusername/name
  valueexcalibur/value
/parameter
parameter
  namepassword/name
  valuemypassword/value
/parameter
parameter
  namedriverClassName/name
  valuecom.sybase.jdbc2.jdbc.SybDriver/value
/parameter
 parameter
   namedriverName/name
   valuejdbc:sybase:Tds:pdxax12:4100/value
 /parameter
parameter
  nameurl/name
  valuejdbc:sybase:Tds:pdxax12:4100/value
/parameter
parameter
  namemaxActive/name
  value5/value
/parameter
  /ResourceParams 
/GlobalNamingResources

web.xml contains:

web-app
  servlet
  servlet-name
  ProvCICS
  /servlet-name
  servlet-class
  com.ods.forte.cics.servlet.ProvCICS
  /servlet-class
  load-on-startup1/load-on-startup
  /servlet

  servlet-mapping
servlet-nameProvCICS/servlet-name
url-pattern/ProvCICS/url-pattern
  /servlet-mapping

  resource-ref
descriptionodsdb03 Connection Pool/description
res-ref-namejdbc/odsdb03/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref
/web-app


I have also tried working with the context placed in server.xml
and with the Resource defined in the context, all combinations
yield the same behavior.

*Tomcat does actually log into the database server when it starts*

I can see it from the database side.  Therefore I know the jdbc
jar file is loaded and the connection specification correct and
working.
In addition, the stack trace in catalina.out includes a point
in Sybase code:

Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
  at
com.sybase.jdbc2.jdbc.SybDriver.acceptsURL(SybDriver.java:197)
  at java.sql.DriverManager.getDriver(DriverManager.java:249)
  at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
va:743)
  ...

So can I conclude that the app is actually linked to the resource?  If
so then the problem seems to be that the information required somehow
does not reach down the driver?

Ideas?

Should I rollback to TC 4x for awhile?

--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com

This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is
privileged,
confidential and exempt from disclosure under applicable law. If you
are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.


--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com

This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is
privileged,
confidential and exempt from disclosure under applicable law. If you
are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message

Sybase and Tomcat 5, Possible Problem

2004-06-18 Thread Jeff Sexton
After a lot of effort, I feel there may be some reason that the Sybase
JConnect JDBC driver doesn't work in Tomcat 5.0.24 (I use Tomcat 4 for my
Sybase driven apps quite a bit).
The exception is:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null', cause: null

META-INF/context.xml is:
  Context path=/forteCommon docBase=forteCommon reloadable=true
  ResourceLink name=jdbc/odsdb03 global=jdbc/odsdb03
type=javax.sql.DataSource/
  /Context
From conf/server.xml contains:
  GlobalNamingResources
Resource name=jdbc/odsdb03
  auth=Container
  type=javax.sql.DataSource/
ResourceParams name=jdbc/odsdb03
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameusername/name
valueexcalibur/value
  /parameter
  parameter
namepassword/name
valuemypassword/value
  /parameter
  parameter
namedriverClassName/name
valuecom.sybase.jdbc2.jdbc.SybDriver/value
  /parameter
   parameter
 namedriverName/name
 valuejdbc:sybase:Tds:pdxax12:4100/value
   /parameter
  parameter
nameurl/name
valuejdbc:sybase:Tds:pdxax12:4100/value
  /parameter
  parameter
namemaxActive/name
value5/value
  /parameter
/ResourceParams 
  /GlobalNamingResources
web.xml contains:
web-app
servlet
servlet-name
ProvCICS
/servlet-name
servlet-class
com.ods.forte.cics.servlet.ProvCICS
/servlet-class
load-on-startup1/load-on-startup
/servlet
servlet-mapping
  servlet-nameProvCICS/servlet-name
  url-pattern/ProvCICS/url-pattern
/servlet-mapping
resource-ref
  descriptionodsdb03 Connection Pool/description
  res-ref-namejdbc/odsdb03/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
/web-app
I have also tried working with the context placed in server.xml
and with the Resource defined in the context, all combinations
yield the same behavior.
*Tomcat does actually log into the database server when it starts*
I can see it from the database side.  Therefore I know the jdbc
jar file is loaded and the connection specification correct and working.
In addition, the stack trace in catalina.out includes a point
in Sybase code:
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
at com.sybase.jdbc2.jdbc.SybDriver.acceptsURL(SybDriver.java:197)
at java.sql.DriverManager.getDriver(DriverManager.java:249)
at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
...

So can I conclude that the app is actually linked to the resource?  If
so then the problem seems to be that the information required somehow
does not reach down the driver?
Ideas?
Should I rollback to TC 4x for awhile?
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Sybase and Tomcat 5, Possible Problem

2004-06-18 Thread Jeff Sexton
Shapira, Yoav wrote:
Hi,
Hmm... It's good you can verify the login on the DB side.  You should
try to debug this in tomcat 5 rather than rolling back, if possible.
Where is the driver jar located in your server?
I've been trying to stick with common/lib.  That seems to work.
Since I was able to get a version 4.1.30 to work, I started over,
using those elements, on the 5.0.24 server.  I was able to get the
5.0.24 server to work this time!  Not sure why, however.
I imagine that the original exception was a red herring and my problem
was really some misplaced tags or typo.  I guess.  It all still
seems much harder than it should be.  But once it works, it's rock
solid.
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sybase and Tomcat 5, Possible Problem

2004-06-17 Thread Jeff Sexton
After a lot of effort, I feel there may be some reason that the Sybase
JConnect JDBC driver doesn't work in Tomcat 5.0.24 (I use Tomcat 4 for my
Sybase driven apps quite a bit).
The exception is:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause: null
META-INF/context.xml is:
   Context path=/forteCommon docBase=forteCommon reloadable=true
   ResourceLink name=jdbc/odsdb03 global=jdbc/odsdb03
 type=javax.sql.DataSource/
   /Context
 From conf/server.xml contains:
   GlobalNamingResources
 Resource name=jdbc/odsdb03
   auth=Container
   type=javax.sql.DataSource/
 ResourceParams name=jdbc/odsdb03
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 nameusername/name
 valueexcalibur/value
   /parameter
   parameter
 namepassword/name
 valuemypassword/value
   /parameter
   parameter
 namedriverClassName/name
 valuecom.sybase.jdbc2.jdbc.SybDriver/value
   /parameter
parameter
  namedriverName/name
  valuejdbc:sybase:Tds:pdxax12:4100/value
/parameter
   parameter
 nameurl/name
 valuejdbc:sybase:Tds:pdxax12:4100/value
   /parameter
   parameter
 namemaxActive/name
 value5/value
   /parameter
 /ResourceParams 
   /GlobalNamingResources
web.xml contains:
web-app
 servlet
 servlet-name
 ProvCICS
 /servlet-name
 servlet-class
 com.ods.forte.cics.servlet.ProvCICS
 /servlet-class
 load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
   servlet-nameProvCICS/servlet-name
   url-pattern/ProvCICS/url-pattern
 /servlet-mapping
 resource-ref
   descriptionodsdb03 Connection Pool/description
   res-ref-namejdbc/odsdb03/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
/web-app
I have also tried working with the context placed in server.xml
and with the Resource defined in the context, all combinations
yield the same behavior.
*Tomcat does actually log into the database server when it starts*
I can see it from the database side.  Therefore I know the jdbc
jar file is loaded and the connection specification correct and working.
In addition, the stack trace in catalina.out includes a point
in Sybase code:
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
 at com.sybase.jdbc2.jdbc.SybDriver.acceptsURL(SybDriver.java:197)
 at java.sql.DriverManager.getDriver(DriverManager.java:249)
 at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
 ...
So can I conclude that the app is actually linked to the resource?  If
so then the problem seems to be that the information required somehow
does not reach down the driver?
Ideas?
Should I rollback to TC 4x for awhile?
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


is it possible to bind something under the java:comp/env?

2004-06-15 Thread Guy Katz
hi;
i am using tomcat 5.0.24
i want to bind an object into the java:comp/env programatically to tomcat
initial context. is this possible.
the  exception i get:
javax.naming.NamingException: Context is read only
at
org.apache.naming.NamingContext.checkWritable(NamingContext.java:947)
at org.apache.naming.NamingContext.bind(NamingContext.java:875)
at org.apache.naming.NamingContext.rebind(NamingContext.java:252)
at org.apache.naming.NamingContext.rebind(NamingContext.java:267)
at
org.apache.naming.SelectorContext.rebind(SelectorContext.java:253)
at javax.naming.InitialContext.rebind(InitialContext.java:363)

how can i make the context writable?

Guy Katz
Allot Communications
[EMAIL PROTECTED]
tel: +972 9 7619288
fax: +972 9 7443626


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



No hot deploy possible for ROOT context app?

2004-06-10 Thread Fred Toth
Hi all,
I've been working on setting up an application in the root
context, meaning I configure it via this in server.xml:
Context path= docBase=/path/to/my/war debug=0 /
This works fine, and my application gets loaded properly
at tomcat start-up.
I just want to make sure I'm not missing any tricks. This
approach seems to eliminate the possibility of hot deploy,
right? Meaning, any time I change my war file, I need to
restart tomcat?
Next I will try an expanded war and reloadable classes, but
any comments would be appreciated.
This is 4.1.29 under jboss.
Thanks,
Fred
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Weird Classloader Scenario - Is This Possible?

2004-06-02 Thread Matthew . Hanson
Hi,

We have a fairly generic servlet framework that is used across more than 
one web app deployed to tomcat 4.1.30 on win2k using java 1.4.2_03-b02. 
The framework was initially included in the WEB-INF/lib for each 
application.  However, I was hoping the framework jar could reside in 
shared/lib.  This framework code basically uses a request handler to pass 
incoming requests to a webapp-specific request processor.  The request 
handler instantiates a request processor via 
handler.getClass().getClassLoader().loadClass(SOME_PROCESSOR).newInstance(). 
 Basically, as expected, the classloader fails to load the request 
processor class with the framework jar now in shared/lib.

Is there a loader scheme that I can use in the shared/lib jar that can be 
used to instantiate classes from my webapp (WEB-INF/classes)?

Thanks!
Matt Hanson

RE: Weird Classloader Scenario - Is This Possible?

2004-06-02 Thread Shapira, Yoav

Hi,
You can try Thread.currentThread().getContextClassLoader() instead of
handler.getClass().getClassLoader().

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 02, 2004 2:37 PM
To: [EMAIL PROTECTED]
Subject: Weird Classloader Scenario - Is This Possible?

Hi,

We have a fairly generic servlet framework that is used across more
than
one web app deployed to tomcat 4.1.30 on win2k using java 1.4.2_03-b02.
The framework was initially included in the WEB-INF/lib for each
application.  However, I was hoping the framework jar could reside in
shared/lib.  This framework code basically uses a request handler to
pass
incoming requests to a webapp-specific request processor.  The request
handler instantiates a request processor via
handler.getClass().getClassLoader().loadClass(SOME_PROCESSOR).newInstan
ce()
.
 Basically, as expected, the classloader fails to load the request
processor class with the framework jar now in shared/lib.

Is there a loader scheme that I can use in the shared/lib jar that can
be
used to instantiate classes from my webapp (WEB-INF/classes)?

Thanks!
Matt Hanson



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Weird Classloader Scenario - Is This Possible?

2004-06-02 Thread Matthew . Hanson
I think that may have been the ticket.  Thanks for all the help!




Shapira, Yoav [EMAIL PROTECTED]
06/02/2004 01:37 PM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: Weird Classloader Scenario - Is This Possible?



Hi,
You can try Thread.currentThread().getContextClassLoader() instead of
handler.getClass().getClassLoader().

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 02, 2004 2:37 PM
To: [EMAIL PROTECTED]
Subject: Weird Classloader Scenario - Is This Possible?

Hi,

We have a fairly generic servlet framework that is used across more
than
one web app deployed to tomcat 4.1.30 on win2k using java 1.4.2_03-b02.
The framework was initially included in the WEB-INF/lib for each
application.  However, I was hoping the framework jar could reside in
shared/lib.  This framework code basically uses a request handler to
pass
incoming requests to a webapp-specific request processor.  The request
handler instantiates a request processor via
handler.getClass().getClassLoader().loadClass(SOME_PROCESSOR).newInstan
ce()
.
 Basically, as expected, the classloader fails to load the request
processor class with the framework jar now in shared/lib.

Is there a loader scheme that I can use in the shared/lib jar that can
be
used to instantiate classes from my webapp (WEB-INF/classes)?

Thanks!
Matt Hanson



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


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






Possible to forward a request to another server?

2004-05-27 Thread Wendell Holmes
Is it possible to forward a request from one Tomcat server to another?  I
looked at the API's and it seems to say the resource must be located on the
same server and in the same servlet context.  I'm needing to have some way
to forward http requests from an external IIS web server to an internal
tomcat server.  Basically, I just want to be able to do the equivalent to an
Apache ProxyPass/ProxyPassReverse.  Could this be done by writing a servlet
to wrap the original request and forward on?

Thanks 

Wendell Holmes, MCSE
Education Logistics, Inc.
406 728-0893 ext. 2107


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



RE: Possible to forward a request to another server?

2004-05-27 Thread Shapira, Yoav

Hi,
Like HttpServletResponse#sendRedirect?  It's not like a forward in that
the client URL changes, but it does pass the request to another server.
Beyond that, you COULD write something that'd wrap the request, invoke
another server to handle it, and stream the response to your own client.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Wendell Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 27, 2004 1:49 PM
To: '[EMAIL PROTECTED]'
Subject: Possible to forward a request to another server?

Is it possible to forward a request from one Tomcat server to another?
I
looked at the API's and it seems to say the resource must be located on
the
same server and in the same servlet context.  I'm needing to have some
way
to forward http requests from an external IIS web server to an internal
tomcat server.  Basically, I just want to be able to do the equivalent
to
an
Apache ProxyPass/ProxyPassReverse.  Could this be done by writing a
servlet
to wrap the original request and forward on?

Thanks

Wendell Holmes, MCSE
Education Logistics, Inc.
406 728-0893 ext. 2107


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



  1   2   3   4   5   >