Re: Install WAR via docBase within servlet.xml

2007-02-06 Thread Pid

Detlev Beutner wrote:

Hi there,

I have a WAR which normally should be deployed via myName.xml into
/tomcat/conf/Catalina/localhost, with docBase=AbsolutePathToWar.

Within that xml snippet, Context path=/myName
docBase=/webs/web123/tomcat/application.war debug=0 is used.

So I can call www.server.com/myName and it works.

Now I want to call myName.server.com instead.


This would mean that your webapp becomes the ROOT application of a 
virtual host.



I have tried to remove myName.xml from /tomcat/conf/Catalina/localhost and
added the following snippet within server.xml:

Host appBase=webapps name=myName.server.com  Context path=
docBase=/webs/web123/tomcat/application.war debug=0 ...

But it doesn't work, the application got undeployed (empty dirs), I even
deleted the empty dirs and restarted tomcat, nothing (seems as if tomcat
doesn't care about the context at all)...

I definitely want to run the application from the WAR (for upgrading
reasons), and the WAR definitely should NOT be put into the webapps
directory to get deployed (as it worked with the myName.xml deployment).


As you didn't specify which version of Tomcat, I'm going to assume 5.x.
Place the context here:

%TOMCAT/conf/Catalina/myName.server.com/ROOT.xml

... not in server.xml.


How to configure this?!

Thanks in advance
Detlev


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Applets in JSP - writing to a file server

2007-02-06 Thread Pid

Teh Noranis Mohd Aris wrote:

Dear all,
   
  I put my applet in jsp:plugin./jsp:plugin standard action tag. I want my applet to save data that the user input in a defined text area. The user also input the file name in a defined text field. When the user clicks the Save button, I want the file name and its contents to be saved in the apache tomcat server. I have seen my problem that was implemented using cgi scripts. How can I implement it using JSP? Please help me! Thank you.


http://www.google.co.uk/search?q=processing+forms+using+JSP



  Yours Sincerely,
  TEH NORANIS
   

 
-

Need a quick answer? Get one in minutes from people who know. Ask your question 
on Yahoo! Answers.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File permission problem not understood

2007-02-06 Thread Pid

Do you have a SecurityManager running?


Alan Chandler wrote:

I have just upgraded my Debian Etch system from tomcat5 to tomcat5.5

Now when I start my applications I am getting the following

javax.servlet.ServletException: Unable to initialize application 
servlet: access denied 
(java.io.FilePermission /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml 
read)



the root cause of this is ...
java.security.AccessControlException: access denied 
(java.io.FilePermission /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml 
read)



The file refered to exists and is accessable by tomcat
ls -l /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml

gives

-rw-r--r-- 1 tomcat55 nogroup  1035 2006-01-26 19:13 hivemodule.xml

so I puzzled as what I need to do to fix it.

Can anyone help please



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Install WAR via docBase within servlet.xml

2007-02-06 Thread Detlev Beutner
Hi Pid,

  I have a WAR which normally should be deployed via myName.xml into
  /tomcat/conf/Catalina/localhost, with docBase=AbsolutePathToWar.
  
  Within that xml snippet, Context path=/myName
  docBase=/webs/web123/tomcat/application.war debug=0 is used.
  
  So I can call www.server.com/myName and it works.
  
  Now I want to call myName.server.com instead.
 
 This would mean that your webapp becomes the ROOT application of a 
 virtual host.

Exactly.
 
 As you didn't specify which version of Tomcat, I'm going to assume 5.x.

Exactly, to be even more exact: 5.5.12

 Place the context here:
   
   %TOMCAT/conf/Catalina/myName.server.com/ROOT.xml
 
 ... not in server.xml.

Ahhh, that sounds as if would make sense... :-)

But the HOST entry for the virtual host would have to be in server.xml (with no 
context defined), right?! Correct me if I'm wrong...

I will give it a try this evening...

Thanks for your support
Detlev
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File permission problem not understood

2007-02-06 Thread David Smith

java.security.AccessControlException: access denied
(java.io.FilePermission 
/var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml

read)

This line (above) would indicate you have the security manager running.  
To fix this, you'll need to adjust conf/catalina.policy to allow read 
access to the file.  The OS's file permissions are probably fine.  As an 
aside, META-INF is typically a special folder in jar and war files -- 
you probably rename this META-INF to something else if for no other 
reason than to remove some potential confusion.


--David

Alan Chandler wrote:

I have just upgraded my Debian Etch system from tomcat5 to tomcat5.5

Now when I start my applications I am getting the following

javax.servlet.ServletException: Unable to initialize application 
servlet: access denied 
(java.io.FilePermission /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml 
read)



the root cause of this is ...
java.security.AccessControlException: access denied 
(java.io.FilePermission /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml 
read)



The file refered to exists and is accessable by tomcat
ls -l /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml

gives

-rw-r--r-- 1 tomcat55 nogroup  1035 2006-01-26 19:13 hivemodule.xml

so I puzzled as what I need to do to fix it.

Can anyone help please
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Install WAR via docBase within servlet.xml

2007-02-06 Thread Pid

Detlev Beutner wrote:

Hi Pid,


I have a WAR which normally should be deployed via myName.xml into
/tomcat/conf/Catalina/localhost, with docBase=AbsolutePathToWar.

Within that xml snippet, Context path=/myName
docBase=/webs/web123/tomcat/application.war debug=0 is used.

So I can call www.server.com/myName and it works.

Now I want to call myName.server.com instead.
This would mean that your webapp becomes the ROOT application of a 
virtual host.


Exactly.
 

As you didn't specify which version of Tomcat, I'm going to assume 5.x.


Exactly, to be even more exact: 5.5.12


Place the context here:

%TOMCAT/conf/Catalina/myName.server.com/ROOT.xml

... not in server.xml.


Ahhh, that sounds as if would make sense... :-)

But the HOST entry for the virtual host would have to be in server.xml (with no 
context defined), right?! Correct me if I'm wrong...


Correct.
Host... stays in server.xml, context xml is external.



(only reply to list pls, not me too)


I will give it a try this evening...

Thanks for your support
Detlev



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 4.1.35 coming soon

2007-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

Is there a changelog available for the 4.1 line? I can't seem to find it
on the website, using the search, or even googling for tomcat 4.1
changelog. All of the more recent lines (5.0, 5.5, etc.) seem to have
easily-findable changelogs.

Thanks,
- -chris

Mark Thomas wrote:
 All,
 
 The necessary votes permitting, I am planning to release 4.1.35 in the
 next week or so. Currently, Bugzilla shows no open bugs and 134 open
 enhancements against 4.1.35. If you have a bug to report against
 4.1.34 or a patch for one of the open enhancements now is the time to
 add it to Bugzilla.
 
 Mark
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyJdl9CaO5/Lv0PARAnW/AJ9rnK58jdYoAbj88eedIUCMG2MksQCfdh8I
Bll6gvEPJCW/l63rIOrm49s=
=km/7
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Still have log4j and CLASSPATH problems on linux

2007-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Oren,

Oren Livne wrote:
 - $tomcat_home/lib contains: (I copied the Struts and Hibernate libs
 over here)

Why did you do this? Unless you have a /really/ good reason, all of the
libs required for your webapp should be in $YOUR_APP/WEB-INF/lib. Get
all of that Struts and Hibernate stuff out of Tomcat's server libs.

 java.lang.NoClassDefFoundError: org/apache/log4j/Category
 java.lang.Class.getDeclaredConstructors0(Native Method)
 java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
 java.lang.Class.getConstructor0(Class.java:2699)
 java.lang.Class.getConstructor(Class.java:1657)
 org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
 
 org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
 
 org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
 
 org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
 
 org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
 org.apache.struts.util.MessageResources.clinit(MessageResources.java:54)

Nobody seems to believe us whenever we say classes loaded by one
classloader cannot see classes loaded by another (unrelated)
classloader. It's true!

The commons-logging classes are loaded by one of the server's
classloaders (because you have them in $CATALINA_HOME/lib or whatever).
The log4j classes are loaded by your webapp's classloader (because they
are in $YOUR_APP/WEB-INF/lib). Therefore, commons-logging cannot create
instances of the log4j classes loaded by that other classloader.

The Tomcat 6 Logging page
(http://tomcat.apache.org/tomcat-6.0-doc/logging.html) lays these steps
out quite clearly:

1. Put a log4j.properties file in $CATALINA_HOME/lib.
2. Download Log4J (v1.2 or later) and place the log4j jar in
   $CATALINA_HOME/lib.
3. Build the commons-logging additional component using the extras.xml
   Ant build script which is part of teh Tomcat source bundle.
4. Replace $CATALINA_HOME/bin/tomcat-juli.jar with
   output/extras/tomcat-juli.jar.
5. Place output/extras/tomcat-juli-adapters.jar in $CATALINA_HOME/lib.
6. Start Tomcat

You are missing (at least) step 2.

The good news is that since your log4j.jar file is in
$CATALINA_HOME/lib, you can also use log4j in your webapp (which is
probably what you want anyway).

For more information on where Tomcat loads which classes from where, and
what the relationship of the classloaders is, see the TC Classloader
Howto: http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyJue9CaO5/Lv0PARArAeAJ9ECUX3Ug7cp8uCIcpAFSlHqleyuACcD6Bi
a1fWzPIpIWF/l/vk5xXEA5s=
=Pl13
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Questions about Tomcat installation on Solaris Platform

2007-02-06 Thread Chittajalu, Ravi S.
Hello Users Group, 

Request your help on following questions

1. This one is more a clarification question. 
I used a Unix account 'devuser', which is not
associated  to any Unix group. I installed Tomcat
using this user account. I was able to
successfully install and Tomcat runs fine. With
the same user I am not able to execute any  Java
program. I get an
Exception in thread main
java.lang.NoClassDefFoundError: TestDB . The program
compiles well, but cannot execute. My question is how is
Tomcat able to Run under the same User account 'devuser'??

2. I configured a Database resource name with JNDI name
jdbc/oracle10g, but I do not have a way to test and it
does not look like the connection is happening.
I gave the 
 URL :jdbc:oracle:oci:@host:port:SID
Driver as: oracle.jdbc.driver.OracleDriver
Then userid / password.

I tested the SID from unix command line using
SQLPLUS and it works.
Can some suggest a way to test this and If there
is any  problem with the configuration.

Regards
Ravi Chittajalu


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about Tomcat installation on Solaris Platform

2007-02-06 Thread Hassan Schroeder

On 2/6/07, Chittajalu, Ravi S. [EMAIL PROTECTED] wrote:


2. I configured a Database resource name with JNDI name
jdbc/oracle10g, but I do not have a way to test


? Create a JSP with code to open a (non-pooled) connection directly
to confirm your connection parameters. Then you can move on to
getting the JNDI version working.


I gave the
 URL :jdbc:oracle:oci:@host:port:SID
Driver as: oracle.jdbc.driver.OracleDriver


And shouldn't that be 'jdbc:oracle:thin' with that driver? based on a
passing acquaintance with Oracle only :-)

FWIW,
--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Questions about Tomcat installation on Solaris Platform

2007-02-06 Thread Chittajalu, Ravi S.
Thanks for the response Hassan..
I was installing PagaSystems (BPM tool) on tomcat and the
product provided an app that can check the connections and verify Tomcat
environment. Its not able to find datasource. The tool verified all
other environment variable correctly.

I tried using thin, but did not work

Any ideas?

Regards
Ravi Chittajalu
Ph: 703-516-1172 

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 12:07 PM
To: Tomcat Users List
Subject: Re: Questions about Tomcat installation on Solaris Platform

On 2/6/07, Chittajalu, Ravi S. [EMAIL PROTECTED] wrote:

 2. I configured a Database resource name with JNDI
name
 jdbc/oracle10g, but I do not have a way to test

? Create a JSP with code to open a (non-pooled) connection directly
to confirm your connection parameters. Then you can move on to
getting the JNDI version working.

 I gave the
  URL :jdbc:oracle:oci:@host:port:SID
 Driver as: oracle.jdbc.driver.OracleDriver

And shouldn't that be 'jdbc:oracle:thin' with that driver? based on a
passing acquaintance with Oracle only :-)

FWIW,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about Tomcat installation on Solaris Platform

2007-02-06 Thread Hassan Schroeder

On 2/6/07, Chittajalu, Ravi S. [EMAIL PROTECTED] wrote:


product provided an app that can check the connections


If you're sure the connection data is good, then it's configuration --
you'll need to provide the relevant parts of your config files.

Assuming you've already read these, of course :-)

http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Large number of active sessions

2007-02-06 Thread Christer Nordvik

Hi!

I've got a website with pretty low traffic (200 visitors a day). Lately it's
been very slow and when I look in Tomcat's manager it says that it has a lot
of sessions.
Once I had 13000(!) active sessions. The session timeout is set to 30
minutes.

How can this happen? Isn't this something that Tomcat should handle itself?
Can it be related to my code somehow? I have only basic JSP/Servlet stuff so
nothing fancy going on.

Any help would be very appreciated!

-Christer


Re: Large number of active sessions

2007-02-06 Thread Pid

1) Lower your session timeout.
2) How are you measuring/calculating statistics?
3) Which version of Tomcat?
4) Are you url encoding all of your links?


Christer Nordvik wrote:

Hi!

I've got a website with pretty low traffic (200 visitors a day). Lately 
it's
been very slow and when I look in Tomcat's manager it says that it has a 
lot

of sessions.
Once I had 13000(!) active sessions. The session timeout is set to 30
minutes.

How can this happen? Isn't this something that Tomcat should handle itself?
Can it be related to my code somehow? I have only basic JSP/Servlet 
stuff so

nothing fancy going on.

Any help would be very appreciated!

-Christer




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Large number of active sessions

2007-02-06 Thread David Wall
It seems that Tomcat 5.5.17 (and earlier) has had some sort of problem 
in timing out sessions.  I'm not sure if it would clean itself up if the 
person really came back and did another HTTP transaction or not, but 
I've noted that Tomcat Manager will show sessions that are have been 
idle much longer than the session timeout value (based on the last 
access timestamp in the session).


Our application also has a registered listener HttpSessionListener and 
we've seen that these old sessions do not trigger that callback either 
as we also list the session as active.


As for suggestion (1), this won't matter and 30 minutes is the default.

As for suggestion (4), this could clearly create extra sessions for 
those few who don't allow session cookies, but even those sessions 
should time out.


David



Pid wrote:

1) Lower your session timeout.
2) How are you measuring/calculating statistics?
3) Which version of Tomcat?
4) Are you url encoding all of your links?


Christer Nordvik wrote:

Hi!

I've got a website with pretty low traffic (200 visitors a day). 
Lately it's
been very slow and when I look in Tomcat's manager it says that it 
has a lot

of sessions.
Once I had 13000(!) active sessions. The session timeout is set to 30
minutes.

How can this happen? Isn't this something that Tomcat should handle 
itself?
Can it be related to my code somehow? I have only basic JSP/Servlet 
stuff so

nothing fancy going on.

Any help would be very appreciated!

-Christer




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Large number of active sessions

2007-02-06 Thread Rashmi Rubdi
You can also activate server logs to log both visitor and bot activity by 
configuring AccessLogValve : 
http://tomcat.apache.org/tomcat-5.0-doc/config/valve.html . 

Some bots take up a lot of sessions, you can verfiy this by running a program 
like Xenu Link Sleuth on your site.

Then, you will be able to block certain bots by IP address or User Agent string.

-Rashmi

- Original Message 
From: David Wall [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, February 6, 2007 1:54:52 PM
Subject: Re: Large number of active sessions


It seems that Tomcat 5.5.17 (and earlier) has had some sort of problem 
in timing out sessions.  I'm not sure if it would clean itself up if the 
person really came back and did another HTTP transaction or not, but 
I've noted that Tomcat Manager will show sessions that are have been 
idle much longer than the session timeout value (based on the last 
access timestamp in the session).

Our application also has a registered listener HttpSessionListener and 
we've seen that these old sessions do not trigger that callback either 
as we also list the session as active.

As for suggestion (1), this won't matter and 30 minutes is the default.

As for suggestion (4), this could clearly create extra sessions for 
those few who don't allow session cookies, but even those sessions 
should time out.

David



Pid wrote:
 1) Lower your session timeout.
 2) How are you measuring/calculating statistics?
 3) Which version of Tomcat?
 4) Are you url encoding all of your links?


 Christer Nordvik wrote:
 Hi!

 I've got a website with pretty low traffic (200 visitors a day). 
 Lately it's
 been very slow and when I look in Tomcat's manager it says that it 
 has a lot
 of sessions.
 Once I had 13000(!) active sessions. The session timeout is set to 30
 minutes.

 How can this happen? Isn't this something that Tomcat should handle 
 itself?
 Can it be related to my code somehow? I have only basic JSP/Servlet 
 stuff so
 nothing fancy going on.

 Any help would be very appreciated!

 -Christer



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 

Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Large number of active sessions

2007-02-06 Thread Pid

David Wall wrote:
It seems that Tomcat 5.5.17 (and earlier) has had some sort of problem 
in timing out sessions.  I'm not sure if it would clean itself up if the 
person really came back and did another HTTP transaction or not, but 
I've noted that Tomcat Manager will show sessions that are have been 
idle much longer than the session timeout value (based on the last 
access timestamp in the session).


Our application also has a registered listener HttpSessionListener and 
we've seen that these old sessions do not trigger that callback either 
as we also list the session as active.


As for suggestion (1), this won't matter and 30 minutes is the default.


...

As for suggestion (4), this could clearly create extra sessions for 
those few who don't allow session cookies, but even those sessions 
should time out.


If the OP is using a javascript based logging tool he may be not 
counting the bot traffic he gets, which could account for larger numbers 
of sessions than expected...



David



Pid wrote:

1) Lower your session timeout.
2) How are you measuring/calculating statistics?
3) Which version of Tomcat?
4) Are you url encoding all of your links?


Christer Nordvik wrote:

Hi!

I've got a website with pretty low traffic (200 visitors a day). 
Lately it's
been very slow and when I look in Tomcat's manager it says that it 
has a lot

of sessions.
Once I had 13000(!) active sessions. The session timeout is set to 30
minutes.

How can this happen? Isn't this something that Tomcat should handle 
itself?
Can it be related to my code somehow? I have only basic JSP/Servlet 
stuff so

nothing fancy going on.

Any help would be very appreciated!

-Christer




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Large number of active sessions

2007-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Wall wrote:
 It seems that Tomcat 5.5.17 (and earlier) has had some sort of problem
 in timing out sessions.

I think it's still in 5.5.20, if this is the one you're talking about:
http://issues.apache.org/bugzilla/show_bug.cgi?id=37356

I don't think this would be triggered, though, unless you had heavy load
on the sessions themselves.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyNZQ9CaO5/Lv0PARArFfAJ9VroFKttkvzrWyVqH5nSSozEvywACfe6y7
RQ3q7XCoN5TU8nldQbyna9w=
=Mf7m
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Session Affinity and Session Replication

2007-02-06 Thread Rob Bugh
Hello All,

I'm trying to get a better understanding when to use Session Affinity and 
Session Replication and have a question. Let me set my question up by 
describing my configuration. It consists of an Apache server with mod_jk and 
two Tomcat servers, where the Apache server is configured to load-balance 
between the two Tomcat servers. So my question is, if I enable session affinity 
but not session replication, how can I failover a connection without losing the 
session data?

Let me restate my question more like a use case:

  - Given the above configuration of Apache and 2 Tomcat servers

  - A session has already been started on Tomcat-1 (session contains data)

  - A new request comes in with the same session id. Session affinity is on 
so the request should go to Tomcat-1. But Tomcat-1 is down so the request fails 
over to Tomcat-2.

  - Since session replication is not enabled how does Tomcat-2 get the 
session data? Or can it?


Can this problem be solved by using both sticky sessions and session 
replication? Or do I have to abandon session affinity and just use session 
replication. All the documentation I've read to date indicates not to use 
sticky sessions and session replication together.


Thanks,
Rob


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Affinity and Session Replication

2007-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rob,

Rob Bugh wrote:
 So my question is, if I enable session affinity but not session 
 replication, how can I failover a connection without losing the 
 session data?

You can't, unless you are using some other mechanism to share that data.

Many times, losing a session isn't a big deal if there's not too much
information held only in the session.

 - Since session replication is not enabled how does Tomcat-2 get the 
 session data? Or can it?

Tomcat-2 has to start over with a new session (i.e. there's no
recovery). In order to share sessions between servers, you must have
session replication enabled.

 Can this problem be solved by using both sticky sessions and session 
 replication?

That's generally the idea.

 Or do I have to abandon session affinity and just use session
 replication. All the documentation I've read to date indicates not to
 use sticky sessions and session replication together.

What have you been reading? I've never done either of these, but it
would seem that the two in concert is the best solution.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyNyB9CaO5/Lv0PARAv5TAJ4zap7ujCUpxTEZyUCQmF8buCgmuACgwGg7
iMwHkO1UcBkHRHRcbEojn7E=
=ZiJl
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Affinity and Session Replication

2007-02-06 Thread Hassan Schroeder

On 2/6/07, Rob Bugh [EMAIL PROTECTED] wrote:


All the documentation I've read to date indicates not to use sticky
sessions and session replication together.


Can you cite where you saw that?

I've set up a similar config (using mod_proxy_ajp) with both sticky
sessions and session replication and it worked fine.

FWIW,
--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



context placement

2007-02-06 Thread Alan Chandler
I am trying to use tomcat 5.5 for the first time - having just moved 
from tomcat5.

I am getting symptoms (I think) of my JDNI resource having not been set 
up properly

In particular, I have NO contexts in my $CATALINA_HOME/conf/server.xml, 
since I want to bring these in in my webapps .war file.

So in the .war file for my app I have a META-INF/context.xml file with 
the following in (apart from the password which I have changed)

?xml version=1.0 encoding=UTF-8?
Context docBase=usermgr path=/usermgr
Resource name =jdbc/usermgr auth=Container 
type=javax.sql.DataSource
driverClassName=org.postgresql.Driver 
url=jdbc:postgresql://127.0.0.1:5432/users
username=tomcat password=x
maxActive=20 maxIdle=10 maxWait=-1 /
/Context

and my application attempts to connect to the JDNI resource

java:/comp/env/jdbc/usermgr

But when I run it, I get the following in the error message

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


I am interpreting this as the JDNI resource has not been recognised.

Do I have the right interpretation?
Have I misunderstood how tomcat can find the contexts?

-- 
Alan Chandler
http://www.chandlerfamily.org.uk


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Need help finding a Java class

2007-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steve,

This might be off-topic, but there's really not a good forum for
general webapp what-the-heck-is-going-on discussion. But hey, we're
nice folks ;)

Steve Ingraham wrote:
 If no person is assigned to the case the phrase NO ASSIGNMENT shows
  up on the front page of the application where the person's name 
 should have been and there is no record created in the ASSIGN table 
 in the MySQL database for the case and subsequently no ASSIGN.ID that
  shows up in the web browser for that case.

Okay.

 I am attempting to create a report that will return all instances 
 where a person has not been assigned to a case.  There is nothing in
  the database in any fields that the NO ASSIGNMENT phrase is related
  to

This is not surprising. I'll bet that the code looks for an assignment
and, finding none, displays this message.

 I have been trying to track down within the code for the web page 
 where this NO ASSIGNMENT phrase is coming from in hopes of 
 understanding how the application knows to return this statement.  My
  theory is that if I can see how the application is returning this I 
 can figure out how to query the database to show me all instances 
 where this has occurred.

This sounds reasonable. Unfortunately, web application can grow to
significant complexity, and sometimes things like strings displayed in a
page can come from unlikely sources. Are you familiar with Java at all?
That might be helpful for your forensic reconstruction, here.

 Can someone give me some direction on where I can search for this 
 type of code?

Well, it's unlikely that the phrase NO ASSIGNMENT will appear in any
of your Java source code (that is, files with the .java extension).
You're more likely to find it in either a JSP file (ending in .jsp) or
in a properties file (ending in .properties).

You can search everything on a UNIX system using something similar to
the following:

$ grep -l NO ASSIGNMENT `find /path/to/application -type f`

(Note the use of back ticks).

This will display a list of files that contain that phrase.

 a 
 href=/occa/model.do?model=oscn.seq.prompt-Assignmentamp;assignType=1a
  mp;data=95972amp;caseMasterId=95972 NO ASSIGNMENT/a

Can you determine which file generated this output? Usually Java web
applications will use JSP or some other technology to generate the
actual HTML that the user sees. By locating the file that generates this
output, you can probably figure out how the decision is made that there
is no judicial assignment.

Otherwise, you'll have to start searching through code and basically
backtrack through the process.

I can probably take a stab at a query that might work. You mentioned
that you have tables like this (well, I'm guessing for most of this)

CASE
- 
id

ASSIGN
- --
case_id  (points to case.id?)
id   (points to assignee.id?)

If an assigned case has a record in the ASSIGN table, then an unassigned
case would probably have /no/ records in the ASSIGN table.

You could find those cases using a query like this:

SELECT case.id
FROM case
 LEFT OUTER JOIN assign ON assign.case_id=case.id
WHERE assign.id IS NULL

This should pull all CASE records who have no matching ASSIGN records in
the database.

Just a thought, but I have /no/ idea how your database is laid out or if
there's a better way to do this.

 If this question is better answered outside the Tomcat community
 please let me know and I will not waste your time any further.  Thank
 you in advance for any assistance you can provide.

This list typically deals with Tomcat-specific issues, but, as I said,
there's no really good forum for asking for this type of thing. Just
leave OT in the subject line and you'll generally be forgiven ;)

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyOBy9CaO5/Lv0PARAnpmAJ0ex2v8/jInKRZHHs9giVbC2ON1FACfZRvM
DqW5S1Ed/7vN7jfeRI+ln1g=
=7/cp
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: context placement

2007-02-06 Thread Alan Chandler
On Tuesday 06 February 2007 20:03, Alan Chandler wrote:

 I am getting symptoms (I think) of my JDNI resource having not been
 set up properly

I forgot to say that I have this working under eclipse on a development 
system, but it seems (as part of the Web App plugin) to copy the 
contents of context.xml into server.xml

My reading of the docs of tomcat5.5 is that I don't need to do this (nor 
to Catalina/ENGINE_NAME/HOST_NAME/usermgr.xml)


-- 
Alan Chandler
http://www.chandlerfamily.org.uk


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: context placement

2007-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alan,

Alan Chandler wrote:
 In particular, I have NO contexts in my $CATALINA_HOME/conf/server.xml, 
 since I want to bring these in in my webapps .war file.

Good.

 So in the .war file for my app I have a META-INF/context.xml file with 
 the following in (apart from the password which I have changed)
 
 ?xml version=1.0 encoding=UTF-8?
 Context docBase=usermgr path=/usermgr

Get rid of docBase and path. I believe they are illegal in a
context.xml file, since the server has already determined where your
application is and to what URL it will be deployed. It is rumored to be
bad to set these attributes in context.xml. It might even cause Tomcat
to double-deploy (or worse, double-deploy on top of each other) your
webapp and cause great confusion.

   Resource name =jdbc/usermgr auth=Container 
 type=javax.sql.DataSource
   driverClassName=org.postgresql.Driver 
 url=jdbc:postgresql://127.0.0.1:5432/users
   username=tomcat password=x
   maxActive=20 maxIdle=10 maxWait=-1 /
 /Context

The rest of this looks good, and matches the configuration I use for my
webapps.

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

Yup, this is going to be a subtle configuration error. Make the changes
I suggested above and see if that helps. If not, do a quick search in
the archives for cannot create jdbc driver null: this question comes
up occasionally.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyOGJ9CaO5/Lv0PARAploAJ4iTOetTTXFx1Vm1u7qH6JoZGlypACfYB34
X5BU6cSfeJxgEj3pIKFf7Ts=
=t4Qy
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Affinity and Session Replication

2007-02-06 Thread Rob Bugh

Thanks, for the information. My confusion in part stems from this comment in 
the The Apache Tomcat Connector - Reference Guide, 
http://tomcat.apache.org/connectors-doc/reference/workers.html

In the comments for sticky_session: ... Set sticky_session to False when 
Tomcat is using a Session Manager which can persist session data across 
multiple instances of Tomcat Also, I've seen other comments in this 
mailing list that would indicate not to use both at the same time.

Regards,
Rob

-Original Message-
From: Hassan Schroeder [EMAIL PROTECTED]
Sent: Feb 6, 2007 2:00 PM
To: Tomcat Users List users@tomcat.apache.org, Rob Bugh [EMAIL PROTECTED]
Subject: Re: Session Affinity and Session Replication

On 2/6/07, Rob Bugh [EMAIL PROTECTED] wrote:

 All the documentation I've read to date indicates not to use sticky
 sessions and session replication together.

Can you cite where you saw that?

I've set up a similar config (using mod_proxy_ajp) with both sticky
sessions and session replication and it worked fine.

FWIW,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Affinity and Session Replication

2007-02-06 Thread Hassan Schroeder

On 2/6/07, Rob Bugh [EMAIL PROTECTED] wrote:

My confusion in part stems from this comment in the The Apache
Tomcat Connector - Reference Guide,
http://tomcat.apache.org/connectors-doc/reference/workers.html


Ah, OK -- perhaps that's JK-specific. As I said, I used mod_proxy_ajp
which has no worker configuration to it. In fact, having used mod_jk
in the distant past, I was impressed by the simplicity of configuration
of the mod_proxy_ajp setup. Might be worth a look :-)

--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Load Balancing Configuration

2007-02-06 Thread Rob Bugh

Hello All,

I currently have the following load balancing configuration: Apache with mod_jk 
and 2 Tomcat servers and Apache acts as the load balancer for the two Tomcat 
servers. I'm concerned about the single point of failure with Apache, however. 
Is there an alternate configuration that, for instance, allows me to have more 
than one Apache server balancing the Tomcat servers?

Thanks,
Rob

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: context placement

2007-02-06 Thread Pid

Alan Chandler wrote:

On Tuesday 06 February 2007 20:03, Alan Chandler wrote:

I am getting symptoms (I think) of my JDNI resource having not been
set up properly


I forgot to say that I have this working under eclipse on a development 
system, but it seems (as part of the Web App plugin) to copy the 
contents of context.xml into server.xml


My reading of the docs of tomcat5.5 is that I don't need to do this (nor 
to Catalina/ENGINE_NAME/HOST_NAME/usermgr.xml)





Context first:

you don't need to specify the /path.
the path to the webapp is determined from the name of the deployed .war 
or the name of the context.xml file.


for:
 %tomcat_home%/webapps/appname1.war

the context xml file should deploy to:
 %tomcat_home%/conf/Catalina/localhost/appname1.xml



I posted last week a sample JNDI config which defines the DB globally, 
but ought to work with a tweak or two:


http://mail-archives.apache.org/mod_mbox/tomcat-users/200702.mbox/[EMAIL 
PROTECTED]



p

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Large number of active sessions

2007-02-06 Thread Christer Nordvik

1. Sure. But I have only 100 users.
2. Users: Google Analytics. Sessions: Tomcat manager
3. 5.5.17
4. Yes

Guess I have to go the long way of creating my own session listener then,
Had hoped there was an easy solution for this. 13000 sessions must indicate
that something is very very wrong? I've never had more than 300 visitors
according to Google Analytics...

-Christer


On 2/6/07, Pid [EMAIL PROTECTED] wrote:


1) Lower your session timeout.
2) How are you measuring/calculating statistics?
3) Which version of Tomcat?
4) Are you url encoding all of your links?


Christer Nordvik wrote:
 Hi!

 I've got a website with pretty low traffic (200 visitors a day). Lately
 it's
 been very slow and when I look in Tomcat's manager it says that it has a
 lot
 of sessions.
 Once I had 13000(!) active sessions. The session timeout is set to 30
 minutes.

 How can this happen? Isn't this something that Tomcat should handle
itself?
 Can it be related to my code somehow? I have only basic JSP/Servlet
 stuff so
 nothing fancy going on.

 Any help would be very appreciated!

 -Christer



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: context placement

2007-02-06 Thread Alan Chandler
On Tuesday 06 February 2007 20:34, Pid wrote:
 Alan Chandler wrote:
  On Tuesday 06 February 2007 20:03, Alan Chandler wrote:
  I am getting symptoms (I think) of my JDNI resource having not
  been set up properly

 Context first:

Yeh just took that out as per suggestion further up thread

 you don't need to specify the /path.
 the path to the webapp is determined from the name of the deployed
 .war or the name of the context.xml file.

 for:
   %tomcat_home%/webapps/appname1.war

 the context xml file should deploy to:
   %tomcat_home%/conf/Catalina/localhost/appname1.xml


When you say this, are you saying that tomcat automatically copies from 
the the META-INF/context.xml file in the .war file to that location

(in my case that would 
be /var/lib/tomcat5.5/conf/Catalina/appserv.home/usermgr.xml because my 
host is appserv.home)

BUT

I only have an EMPTY localhost directory in 
the /var/lib/tomcat5.5/conf/Catalina directory and
no appserv.home directory at all.




-- 
Alan Chandler
http://www.chandlerfamily.org.uk


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Socket time out exception in tomcat 5

2007-02-06 Thread tutim

When using tomcat 5 I'm getting a 'SocketTimeout Exception - read timed out'
after 3 minutes. I set the client to time out after an hour using the
follwing method:
((org.apache.axis.client.Call) _call).setTimeout(360);
I also disabled the timeout in the server.xml. Under the SSL and non-SSL
coyote connector I set 'connectionTimeout=0'.

The client doesn't time out under tomcat 4. Any suggestions?
Thanks very much!
-- 
View this message in context: 
http://www.nabble.com/Socket-time-out-exception-in-tomcat-5-tf3183025.html#a8833971
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[SOLVED] Re: context placement

2007-02-06 Thread Alan Chandler
On Tuesday 06 February 2007 20:46, Alan Chandler wrote:
 On Tuesday 06 February 2007 20:34, Pid wrote:
  Alan Chandler wrote:
   On Tuesday 06 February 2007 20:03, Alan Chandler wrote:
   I am getting symptoms (I think) of my JDNI resource having not
   been set up properly
...

  for:
%tomcat_home%/webapps/appname1.war
 
  the context xml file should deploy to:
%tomcat_home%/conf/Catalina/localhost/appname1.xml

 When you say this, are you saying that tomcat automatically copies
 from the the META-INF/context.xml file in the .war file to that
 location


Answer yes - but only if it has permissions.

I think this is a debian problem in that Catalina directory is owned by 
root with 755 access rights.  

-- 
Alan Chandler
http://www.chandlerfamily.org.uk


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Need help finding a Java class

2007-02-06 Thread Steve Ingraham
 Steve,
 
 This might be off-topic, but there's really not a good forum 
 for general webapp what-the-heck-is-going-on discussion. 
 But hey, we're nice folks ;)
 
 Steve Ingraham wrote:
  If no person is assigned to the case the phrase NO 
 ASSIGNMENT shows  
  up on the front page of the application where the person's 
 name should 
  have been and there is no record created in the ASSIGN table in the 
  MySQL database for the case and subsequently no ASSIGN.ID 
 that  shows 
  up in the web browser for that case.
 
 Okay.
 
  I am attempting to create a report that will return all instances
  where a person has not been assigned to a case.  There is nothing in
   the database in any fields that the NO ASSIGNMENT phrase is related
   to
 
 This is not surprising. I'll bet that the code looks for an 
 assignment and, finding none, displays this message.
 
  I have been trying to track down within the code for the web page
  where this NO ASSIGNMENT phrase is coming from in hopes of 
  understanding how the application knows to return this 
 statement.  My
   theory is that if I can see how the application is 
 returning this I 
  can figure out how to query the database to show me all instances 
  where this has occurred.
 
 This sounds reasonable. Unfortunately, web application can 
 grow to significant complexity, and sometimes things like 
 strings displayed in a page can come from unlikely sources. 
 Are you familiar with Java at all? That might be helpful for 
 your forensic reconstruction, here.
 
  Can someone give me some direction on where I can search for this
  type of code?
 
 Well, it's unlikely that the phrase NO ASSIGNMENT will 
 appear in any of your Java source code (that is, files with 
 the .java extension). You're more likely to find it in 
 either a JSP file (ending in .jsp) or in a properties file 
 (ending in .properties).
 
 You can search everything on a UNIX system using something 
 similar to the following:
 
 $ grep -l NO ASSIGNMENT `find /path/to/application -type f`
 
 (Note the use of back ticks).
 
 This will display a list of files that contain that phrase.
 
  a
  
 href=/occa/model.do?model=oscn.seq.prompt-Assignmentamp;assi
 gnType=1a
   mp;data=95972amp;caseMasterId=95972 NO ASSIGNMENT/a
 
 Can you determine which file generated this output? Usually 
 Java web applications will use JSP or some other technology 
 to generate the actual HTML that the user sees. By locating 
 the file that generates this output, you can probably figure 
 out how the decision is made that there is no judicial assignment.
 
 Otherwise, you'll have to start searching through code and 
 basically backtrack through the process.
 
 I can probably take a stab at a query that might work. You 
 mentioned that you have tables like this (well, I'm guessing 
 for most of this)
 
 CASE
 - 
 id
 
 ASSIGN
 - --
 case_id  (points to case.id?)
 id   (points to assignee.id?)
 
 If an assigned case has a record in the ASSIGN table, then an 
 unassigned case would probably have /no/ records in the ASSIGN table.
 
 You could find those cases using a query like this:
 
 SELECT case.id
 FROM case
  LEFT OUTER JOIN assign ON assign.case_id=case.id
 WHERE assign.id IS NULL
 
 This should pull all CASE records who have no matching ASSIGN 
 records in the database.
 
 Just a thought, but I have /no/ idea how your database is 
 laid out or if there's a better way to do this.
 
  If this question is better answered outside the Tomcat community 
  please let me know and I will not waste your time any 
 further.  Thank 
  you in advance for any assistance you can provide.
 
 This list typically deals with Tomcat-specific issues, but, 
 as I said, there's no really good forum for asking for this 
 type of thing. Just leave OT in the subject line and you'll 
 generally be forgiven ;)
 
 - -chris

Chris,
I appreciate your detailed help with this off topic issue.  You have
been very helpful.  To answer your question about my Java experience, I
do not know much at all.  I have started a Java for beginners class this
January that I am taking online and I am attempting to work through the
O'Reilley book Learning Java on my own.  I am a little overwhelmed but
trying to understand it all.  I appreciate the fact that this was not a
Tomcat issue but I knew you guys were a lot smarter than I on these
topics.  I was confident you guys could help.

I will take your advice in searching for the code for NO ASSIGNMENT.
This application is residing on a RedHat AS 3 server so I will try the
command you recommended.

I have to say that your recommended query was the advice that helped
more than anything else.  I ultimately have been trying to figure out
how the NO ASSIGNMENT data was returning in hopes of figuring out how to
query for these records in the database.  Your select statement was just
what I needed to jumpstart my brain.  If you are familiar with Crystal
Reports at all I have been attempting to query the 

Re: Load Balancing Configuration

2007-02-06 Thread Hassan Schroeder

On 2/6/07, Rob Bugh [EMAIL PROTECTED] wrote:


I currently have the following load balancing configuration: Apache with mod_jk 
and 2 Tomcat servers and Apache acts as the load balancer for the two Tomcat 
servers. I'm concerned about the single point of failure with Apache, however. 
Is there an alternate configuration that, for instance, allows me to have more 
than one Apache server balancing the Tomcat servers?


If you /need/ real-time redundancy/failover, you want dedicated load
balancer hardware.

If your budget doesn't cover that, here's the bargain way(tm):

Set up two servers with Apache httpd, call 'em X and Y.

X is configured with the Web server's public IP address. A cron job on
Y pings or gets a test page every N seconds from X.

If that fails (or depending on how trigger-happy you want to be, fails
for some # of attempts) then the cron job on Y ifconfigs the box to
respond to the IP of X.

(You can criss-cross this if you're using round-robin-DNS.)

Hacky zero-dollar failover, and duct tape left over :-)

FWIW!
--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Need help finding a Java class

2007-02-06 Thread Nelson, Tracy M.
| From: Steve Ingraham [mailto:[EMAIL PROTECTED]
| Sent: Tuesday, 06 February, 2007 15:18
|
| To answer your question about my Java experience, I
| do not know much at all.  I have started a Java for beginners class this
| January that I am taking online and I am attempting to work through the
| O'Reilley book Learning Java on my own.  I am a little overwhelmed but
| trying to understand it all.

I'd recommend the Head First series if you're serious about learning Java.
They're pretty readable, and are written in a tutorial fashion.  Especially
check out the Head First Java and Head First Servlets and JSP (teaches
about servlets and JSPs using Tomcat).


-

The information contained in this message is confidential
proprietary property of Nelnet, Inc. and its affiliated 
companies (Nelnet) and is intended for the recipient only.
Any reproduction, forwarding, or copying without the express
permission of Nelnet is strictly prohibited. If you have
received this communication in error, please notify us
immediately by replying to this e-mail.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Load Balancing Configuration

2007-02-06 Thread Hassan Schroeder

On 2/6/07, Rob Bugh [EMAIL PROTECTED] wrote:


If all of the incoming connections are over SSL can a harware load
balancer handle this?


Dunno -- my experience was a while back with Cisco Local Directors,
and SSL was never a requirement.

Hopefully someone else can chime in with relevant experience. Sorry!

--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: webapp, ServletContextListener and log files

2007-02-06 Thread Hugues Ferland
I apologize for this previous mail, I realized this was just plain wrong. It 
was stdout and stderr that was written to catalina_.log (though I don't 
know where that log file is configured - there is also a catalina.out which 
remains empty).

This lead me ask: What Context  swallowOutput=... really do? As I 
understood it, it was supposed to indicate to Tomcat whether it should smallow 
stdout and stderr and write them to its log file. But I tried both true and 
false with no apparent difference.

Thanks,

Hugues

Hugues Ferland [EMAIL PROTECTED] wrote: Hi,

I use Tomcat 5.5 with Java 1.6.0-b105 on a Debian Linux.

I have a context defined and want all of its logging to be in its own logfile. 
The first thing I tried is to modify the file logging.properties, in the conf 
directory of my Tomcat installation, adding a handler for my new context.

This looked good until I added a ServletContextListener. Now what is logged 
during the execution of the method contextInitialized, is written to  
catalina_.log (the logfile defined in the Tomcat startup script).

I'd like that to be logged in the same logfile as the rest of the context. I 
would really appreciate any help.

Thanks,

Hugues

   
-
Now you can have a huge leap forward in email: get the new Yahoo! Mail. 


-
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot 
with the All-new Yahoo! Mail  

Re: [OT] Need help finding a Java class

2007-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steve,

Steve Ingraham wrote:
 I have to say that your recommended query was the advice that helped
 more than anything else.  I ultimately have been trying to figure out
 how the NO ASSIGNMENT data was returning in hopes of figuring out how to
 query for these records in the database.  Your select statement was just
 what I needed to jumpstart my brain.

Well, just make sure that I know what I'm talking about. You gave very
few details about the structure of your database. I don't want to have
given you completely incorrect advice... based upon database schemas and
possible foreign keys, etc. you ought to be able to piece together what
it means to have no assignment and then simply rely on the database to
determine that.

Your webapp is likely doing the same thing, just with much more
complexity (since that notion probably goes through at least one level
of data objects and some type of HTML generation).

 When I
 wrote the SQL query in the MySQL Query Browser (with the appropriate
 table names of course) I got the returns I needed.

So, CR is being a pain in your neck? Try a simpler query. Perhaps CR is
trying to do too many thing automatically (such as interpreting the use
of LEFT OUTER JOIN) and you need to help it along a little more.

Good luck,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyP2/9CaO5/Lv0PARAgdmAKCvlADTBASVIS2EOrjOzOWluPd1BwCfazzv
lBmUsx1tIyhYm4nBSqnI2RM=
=GaW9
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat policy file, advice and clarification please

2007-02-06 Thread Hugues Ferland
Hi,

I have a Tomcat 5.5 installation on Debian Linux with Java 1.6.

I have a web application that create its own connection to an Oracle database. 
The ojdbc14.jar is included in the WEB-INF/lib directory of the web application.

Now with the default configuration with security enabled, a SecurityException 
java.lang.RuntimePermission getClassLoader is thrown.

I tried to apply a security policy to ojdbc14.jar with grant AllPermission, but 
without success. This is what I added to /etc/tomcat5.5/policy.d/50user.policy:

grant codeBase file:/the path to the web application/WEB-INF/lib/ojdbc.jar {
   permission java.security.AllPermission;
}

This did not work. One particularity of the web application is that I do not 
deploy it with a war file. I created it using a context xml file in 
${catalina.home}/conf/Catalina/localhost/context name.xml.

Also the docBase point outside the ${catalina.home}.

Of course, I'd like to know what I'm doing wrong... I looked on google, 
tomcat-docs, and other places without any luck... Maybe somebody could point me 
in the right direction? Or better yet tell me what is wrong :)

Thanks,

Hugues


-
All new Yahoo! Mail  
-
Get news delivered. Enjoy RSS feeds right on your Mail page.

Re: Tomcat 4.1.35 coming soon

2007-02-06 Thread Mark Thomas
Christopher Schultz wrote:
 Mark,
 
 Is there a changelog available for the 4.1 line? I can't seem to find it
 on the website, using the search, or even googling for tomcat 4.1
 changelog. All of the more recent lines (5.0, 5.5, etc.) seem to have
 easily-findable changelogs.

It is in the release notes. The version in svn is up to date and
available from
http://svn.apache.org/repos/asf/tomcat/container/branches/tc4.1.x/RELEASE-NOTES-4.1.txt

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SSL encryption serverice

2007-02-06 Thread 吳金能

Dear all

I want to confirm one thing that Tomcat only can provide SSL encryption 
serverice with sign-self certificate ?

Because i have tried SSL with certificate signed by our own CA, Tomcat would 
not work and occured SSL handshake Exception.  

Best Regards,

Leslie

smime.p7s
Description: S/MIME cryptographic signature


RE: Session Affinity and Session Replication

2007-02-06 Thread Tim Lucia
 -Original Message-
 From: Rob Bugh [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 06, 2007 3:22 PM
 To: Tomcat Users List
 Subject: Re: Session Affinity and Session Replication
 
 
 Thanks, for the information. My confusion in part stems from this comment
 in the The Apache Tomcat Connector - Reference Guide,
 http://tomcat.apache.org/connectors-doc/reference/workers.html
 
 In the comments for sticky_session: ... Set sticky_session to False when
 Tomcat is using a Session Manager which can persist session data across
 multiple instances of Tomcat Also, I've seen other comments in this
 mailing list that would indicate not to use both at the same time.

If session replication is on, and synchronous (the replication completes
prior to the request completing) then you do not need session affinity as
all cluster members will have the up-to-date session data.

If you use an asynchronous mechanism for replication, you will slightly
improve your response time, but at the possible cost of the next request
coming to a different cluster member which is not yet up-to-date.

Combining affinity and replication gives the session a preferred server,
with seamless failover.

Not only does it work, but it works really, really well.  I have been using
it in a production site now for almost a year, with one Apache+mod_jk, and
three Tomcats.  You can shut down one Tomcat for maintenance, bring it up,
and shut down the next, etc., and nobody is ever the wiser.

Tim

 Regards,
 Rob
 
 -Original Message-
 From: Hassan Schroeder [EMAIL PROTECTED]
 Sent: Feb 6, 2007 2:00 PM
 To: Tomcat Users List users@tomcat.apache.org, Rob Bugh
 [EMAIL PROTECTED]
 Subject: Re: Session Affinity and Session Replication
 
 On 2/6/07, Rob Bugh [EMAIL PROTECTED] wrote:
 
  All the documentation I've read to date indicates not to use sticky
  sessions and session replication together.
 
 Can you cite where you saw that?
 
 I've set up a similar config (using mod_proxy_ajp) with both sticky
 sessions and session replication and it worked fine.
 
 FWIW,
 --
 Hassan Schroeder  [EMAIL PROTECTED]
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Affinity and Session Replication

2007-02-06 Thread Rob Bugh
Fantastic! Thanks for the clarification.


On Tue, 06 Feb 2007 20:17:17 -0600, Tim Lucia [EMAIL PROTECTED] wrote:

 -Original Message-
 From: Rob Bugh [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 06, 2007 3:22 PM
 To: Tomcat Users List
 Subject: Re: Session Affinity and Session Replication


 Thanks, for the information. My confusion in part stems from this comment
 in the The Apache Tomcat Connector - Reference Guide,
 http://tomcat.apache.org/connectors-doc/reference/workers.html

 In the comments for sticky_session: ... Set sticky_session to False when
 Tomcat is using a Session Manager which can persist session data across
 multiple instances of Tomcat Also, I've seen other comments in this
 mailing list that would indicate not to use both at the same time.

 If session replication is on, and synchronous (the replication completes
 prior to the request completing) then you do not need session affinity as
 all cluster members will have the up-to-date session data.

 If you use an asynchronous mechanism for replication, you will slightly
 improve your response time, but at the possible cost of the next request
 coming to a different cluster member which is not yet up-to-date.

 Combining affinity and replication gives the session a preferred server,
 with seamless failover.

 Not only does it work, but it works really, really well.  I have been using
 it in a production site now for almost a year, with one Apache+mod_jk, and
 three Tomcats.  You can shut down one Tomcat for maintenance, bring it up,
 and shut down the next, etc., and nobody is ever the wiser.

 Tim

 Regards,
 Rob

 -Original Message-
 From: Hassan Schroeder [EMAIL PROTECTED]
 Sent: Feb 6, 2007 2:00 PM
 To: Tomcat Users List users@tomcat.apache.org, Rob Bugh
 [EMAIL PROTECTED]
 Subject: Re: Session Affinity and Session Replication
 
 On 2/6/07, Rob Bugh [EMAIL PROTECTED] wrote:
 
  All the documentation I've read to date indicates not to use sticky
  sessions and session replication together.
 
 Can you cite where you saw that?
 
 I've set up a similar config (using mod_proxy_ajp) with both sticky
 sessions and session replication and it worked fine.
 
 FWIW,
 --
 Hassan Schroeder  [EMAIL PROTECTED]
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Rob Bugh

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Large number of active sessions

2007-02-06 Thread John Hayward

I have the same problem.  Java 1.5_08, Tomcat 5.5.20.  Issue also happened
with JDK 1.4.2 and Tomcat 5.5.12

Our session timeout is set to 20 minutes and most of the time it works
fine.  At any given moment we have around 2000 active sessions, and we get
around 10 that won't timeout every hour.  We monitor the application with
Lambda Probe (formerly tomcat probe).  We can see dozens of sessions with an
idle time  20 minutes and an 'expiry time' that's quite a while in the
past.

Lambda probe allows us to manually expire the overdue sessions; but it's
something we have to do daily or our memory consumption grows unbounded as
the sessions never die.

What was the issue from 5.5.17 and how might I fix it?  Is occasional
session expiration failure a known issue?

Any help or direction is greatly appreciated.

--
John Hayward


SocketException: Invalid argument in catalina.out

2007-02-06 Thread Sreemani Tirumale
Hi,
 
We have a Severe error in our catalina.out which reads -
 
Jan 30, 2007 10:15:40 AM org.apache.tomcat.util.net.TcpWorkerThread
runIt
SEVERE: Remote Host /xx.xx.xx.xxx SocketException: Invalid argument
 
We are running Tomcat version 5.0.28 on HP-UX. Does anyone know
what causes this error and what it means?
 
Thanks,
Sreemani

This e-mail and any attachments may be confidential and/or legally privileged. 
If you have received this e-mail and you are not a named addressee, please 
inform Evolving Systems TIS at [EMAIL PROTECTED] and then delete the e-mail 
from your system. If you are not a named addressee you must not use, disclose, 
distribute, copy, print or rely on this e-mail. To ensure regulatory compliance 
and for the protection of our clients and business, Evolving Systems may 
monitor and read e-mails sent to and from its servers. Although Evolving 
Systems routinely screens for viruses, addressees should scan this e-mail and 
any attachments for viruses. Evolving Systems makes no representation or 
warranty as to the absence of viruses in this e-mail or any attachments.

Registered Office: 3rd Floor, HM Geneva House, 14 Cunningham Road, Bangalore - 
560 052 India


RE: Load Balancing Configuration

2007-02-06 Thread Narayanaswamy, Mohan

All the hardware load balancers are nowadays supporting SSL support.  It
uses hashing to support sticky session.

Check Alteon Load Balancer Home Page.

Regards,
Mohan

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 07, 2007 3:19 AM
To: Tomcat Users List; Rob Bugh
Subject: Re: Load Balancing Configuration

On 2/6/07, Rob Bugh [EMAIL PROTECTED] wrote:

 If all of the incoming connections are over SSL can a harware load
 balancer handle this?

Dunno -- my experience was a while back with Cisco Local Directors, and
SSL was never a requirement.

Hopefully someone else can chime in with relevant experience. Sorry!

--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This email is confidential. If you are not the addressee tell the sender 
immediately and destroy this email
without using, sending or storing it. Emails are not secure and may suffer 
errors, viruses, delay,
interception and amendment. Standard Chartered PLC and subsidiaries (SCGroup) 
do not accept liability for
damage caused by this email and may monitor email traffic.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Install WAR via docBase within servlet.xml

2007-02-06 Thread Detlev Beutner
Hi there,

It worked :-)

/conf/server.xml:

...
Engine defaultHost=localhost name=Catalina
  Realm className=org.apache.catalina.realm.UserDatabaseRealm/
  Host appBase=webapps name=localhost/
  Host appBase=webapps/myName name=myName.server.com/
/Engine
...

And within /conf/Catalina/myName.server.com/ROOT.xml

Context path= docBase=/path/to/some.war debug=0
Resource ... /
Manager ... /
/Context

Thanks again  best regards
Detlev

 I have a WAR which normally should be deployed via myName.xml into
 /tomcat/conf/Catalina/localhost, with docBase=AbsolutePathToWar.

 Within that xml snippet, Context path=/myName
 docBase=/webs/web123/tomcat/application.war debug=0 is used.

 So I can call www.server.com/myName and it works.

 Now I want to call myName.server.com instead.

 This would mean that your webapp becomes the ROOT application of a 
 virtual host.
 
 Exactly.
  
 As you didn't specify which version of Tomcat, I'm going to assume 5.x.
 
 Exactly, to be even more exact: 5.5.12
 
 Place the context here:
  
  %TOMCAT/conf/Catalina/myName.server.com/ROOT.xml

 ... not in server.xml.
 
 Ahhh, that sounds as if would make sense... :-)
 
 But the HOST entry for the virtual host would have to be in server.xml
 (with no context defined), right?! Correct me if I'm wrong...


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]