Tomcat 5.0.28, Socket hanging on sending 20KB data for 16 minutes

2006-05-19 Thread Kumar Pandey
Hi
  I'm using Tomcat 5.0.26 that comes with JBoss 3.2.5
with default configurations

A servlet creates pie/bar charts using JFreeChart.
This is refreshed every 5 seconds via javascript
refresh in the brower. All this has been workign fine
for most customers.
Suddenly for a specific customer sessions coming from
a specific newtwork/georaphical location we see that
the 5 seconds chart refreshes are hanging the thread.
Charts are 20 KB. For a single user in the system
sometimes these requests are talking up 20 ~30 threads
and each stuck for 15~16 minutes before it finally
clears up.
We ran ethereal on the tcp packet and see that when
the threads are hung, browser is sending FIN, ACK
eventhough server hasn't completed sending the data.
Thus we see TCP retranmissions of same packets as its
not receiveing any ack from the client.

How do I troubleshoot this issue.
System is not memory starved and cpu is 98% idle.

Any pointers on trouble shooting this would be greatly
appreciated.

Thanks
Kumar
 
Here's the thread dump of one of the hung request.

java.net.SocketOutputStream.socketWrite0(Native
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:714)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398)
org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:318)
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:737)
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:125)
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:569)
org.apache.coyote.Response.doWrite(Response.java:542)
org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:368)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398)
org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:318)
org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297)
org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:85)
sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native
locked
sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:472)
sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:228)
locked
sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:235)
locked
org.jfree.chart.encoders.SunJPEGEncoderAdapter.encode(SunJPEGEncoderAdapter.java:139)
org.jfree.chart.encoders.EncoderUtil.writeBufferedImage(EncoderUtil.java:136)
org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:442)
org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:388)
com.transerainc.rtmcui.util.ChartUtil.drawChartAsJPEG(ChartUtil.java:46)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Client certificate

2006-05-19 Thread Jack

A trusted certificate is one signed by a CA. You might need to be
storing the entire certifcate chain?

Jack...

On 16/05/06, Srikanth Madarapu [EMAIL PROTECTED] wrote:

I am sorry forgot to mention the error message, the error I get is

java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException:
java.security.PrivilegedActionException: javax.xml.soap.SOAPException:
Message send failed: sun.security.validator.ValidatorException: No
trusted certificate found

Thanks

-Original Message-
From: Srikanth Madarapu
Sent: Tuesday, May 16, 2006 11:34 AM
To: users@tomcat.apache.org
Subject: Client certificate

Hi

  I am new to tomcat. I have a jsp that connects to a web service
available on a secure server. I need to have the client certificate so I
have set the following system properties.

   System.setProperty( javax.net.ssl.trustStore, C:/Tomcat
5.5/webapps/SSO/client.keystore );
   System.setProperty( javax.net.ssl.trustStorePassword, changeit);

 But it doesn't work, can somebody help how to achieve this.

Thanks
Srikanth

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





--
Cheers
Jack...

The claim natural is not synonymous with safe.

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



tomcat response slow

2006-05-19 Thread Patil, Sheetal








Hello all

I am using tomcat 5.0 for my application. My application in created
be using struts+jsp

Tomcat was functioning very well before few days 

Mean while I deploy another module on server in my
application 

After few days tomcat become
slow, means it give starting page fast
but when connection to database server
it dose not reply (just showing process is going on.)





So is there any way to checkout why tomcat becomes slow here
is the picture of server 



status



Sp










Re: Tomcat 5.0.28, Socket hanging on sending 20KB data for 16 minutes

2006-05-19 Thread Kumar Pandey
Sorry I forgot to include couple of more stats

Tomcat is running on linux FC4
Client browser is IE 6.0

First line of the dump is
http-0.0.0.0-80-Processor99 daemon prio=1
tid=0x8b09b4b8 nid=0x46ec runnable
[0x84be7000..0x84be91c0]

Thx

--- Kumar Pandey [EMAIL PROTECTED] wrote:

 Hi
   I'm using Tomcat 5.0.26 that comes with JBoss
 3.2.5
 with default configurations
 
 A servlet creates pie/bar charts using JFreeChart.
 This is refreshed every 5 seconds via javascript
 refresh in the brower. All this has been workign
 fine
 for most customers.
 Suddenly for a specific customer sessions coming
 from
 a specific newtwork/georaphical location we see that
 the 5 seconds chart refreshes are hanging the
 thread.
 Charts are 20 KB. For a single user in the system
 sometimes these requests are talking up 20 ~30
 threads
 and each stuck for 15~16 minutes before it finally
 clears up.
 We ran ethereal on the tcp packet and see that when
 the threads are hung, browser is sending FIN, ACK
 eventhough server hasn't completed sending the data.
 Thus we see TCP retranmissions of same packets as
 its
 not receiveing any ack from the client.
 
 How do I troubleshoot this issue.
 System is not memory starved and cpu is 98% idle.
 
 Any pointers on trouble shooting this would be
 greatly
 appreciated.
 
 Thanks
 Kumar
  
 Here's the thread dump of one of the hung request.
 
 java.net.SocketOutputStream.socketWrite0(Native

java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)

java.net.SocketOutputStream.write(SocketOutputStream.java:136)

org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:714)

org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398)

org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:318)

org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:737)

org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:125)

org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:569)

org.apache.coyote.Response.doWrite(Response.java:542)

org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:368)

org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398)

org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:318)

org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297)

org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:85)

sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native
 locked

sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:472)

sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:228)
 locked

sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:235)
 locked

org.jfree.chart.encoders.SunJPEGEncoderAdapter.encode(SunJPEGEncoderAdapter.java:139)

org.jfree.chart.encoders.EncoderUtil.writeBufferedImage(EncoderUtil.java:136)

org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:442)

org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:388)

com.transerainc.rtmcui.util.ChartUtil.drawChartAsJPEG(ChartUtil.java:46)
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: Reloadable context

2006-05-19 Thread Akoulov, Alexandre [SB]
Hi , 

just wondering if anyone has come across similar problem (pls refer to the 
email below).


Kind regards,

Alex. 

-Original Message-
From: Akoulov, Alexandre [SB] 
Sent: Wednesday, 17 May 2006 2:17 PM
To: Tomcat Users List
Subject: Reloadable context


Hi ,

I am using tomcat-5.5.12 and would like it to auto reload my web app as soon as 
it detects the change  of the web app class(es). That's why i've turned on the 
reloadable attribute of the Context element that defines my web app:

Context path=/myWebApp docBase=/home/testUser/myWebApp  reloadable=true 
crossContext=true allowLinking=true /

It does not seem to work. When I recompile one of myWebApp's servlets tomcat 
detects the change but then throws a warning:

May 17, 2006 7:33:41 AM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
May 17, 2006 7:34:01 AM org.apache.catalina.core.ApplicationDispatcher invoke
WARNING: Servlet invoker is currently unavailable

So I've got to restart tomcat to get my change deployed.

Any idea on what I am missing?


Thanks a lot.


Alex.

-
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: deploying myapp.war as / - confused

2006-05-19 Thread Nikita Tovstoles
 Thanks - that was simpler than I thought. Follow up bonus question: 
what's the new current directory of ServletContext? Here's what I mean:


I had the following code in servlet context listener inside myapp.war 
getting properties from a .properties file *outside* the .war:


ServletContext.getResourceAsStream(../myapp.properties);

This used to be my directory structure:

$catalina.base/
   webapps/myapp.war
   webapps/myapp
   webapps/myapp.properties

Now that I'm deploying ROOT.war instead of myapp.war, the above line 
can't find myapp.properties. Here's the current dir structure:


$catalina.base/
   webapps/ROOT.war
   webapps/ROOT
   webapps/myapp.properties

So, when I was deploying myapp.war, ServletContext's current dir was 
webapps/myapp. What's the new current directory of ServletContext for 
ROOT application?


thanks
-nikita



Mark Thomas wrote:

Nikita Tovstoles wrote:

Hi,

I have myapp.war that I'd like to deploy by copying myapp.war to
catalina.base/webapps; but I would like to bind the app to context /.


Rename it to ROOT.war

Mark

-
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: deploying myapp.war as / - confused

2006-05-19 Thread Martin Grogan

Hello,
I'm not sure if I understand your question, but for finding files that 
are relative to the current context, I use

   ServletConfig config
   config.getServletContext().getRealPath(your_file_here)
Maybe that's not the correct way to be doing things??? But it works for me.
Martin


Nikita Tovstoles wrote:

 Thanks - that was simpler than I thought. Follow up bonus question: 
what's the new current directory of ServletContext? Here's what I mean:


I had the following code in servlet context listener inside myapp.war 
getting properties from a .properties file *outside* the .war:


ServletContext.getResourceAsStream(../myapp.properties);

This used to be my directory structure:

$catalina.base/
   webapps/myapp.war
   webapps/myapp
   webapps/myapp.properties

Now that I'm deploying ROOT.war instead of myapp.war, the above line 
can't find myapp.properties. Here's the current dir structure:


$catalina.base/
   webapps/ROOT.war
   webapps/ROOT
   webapps/myapp.properties

So, when I was deploying myapp.war, ServletContext's current dir was 
webapps/myapp. What's the new current directory of ServletContext 
for ROOT application?


thanks
-nikita
   
Mark Thomas wrote:



Nikita Tovstoles wrote:


Hi,

I have myapp.war that I'd like to deploy by copying myapp.war to
catalina.base/webapps; but I would like to bind the app to context /.



Rename it to ROOT.war

Mark

-
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]






--

Martin Grogan
Keizen Software

[EMAIL PROTECTED]
www.keizensoftware.com


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



stop and start an application

2006-05-19 Thread Ingo . Bischofs
Hi list

As i am a newbie to tomcat this question might be easy to answer for you:

I have succesfully deployed a .war application with eclipse wtp. 
Installing that .war file to tomcat works fine, but...

After stopping the application and starting it again, tomcat comes up with 
errors telling me there is a null pointer exception.
Does anyone have an idea why?

Thanks

Re: tomcat response slow

2006-05-19 Thread Rajeev Jha

what does the logs say? turn debug on and check the logs.
Also see if the DB URL, user password etc are correct.
And I dont think people will like your posting image blobs in mail.

Thanks
- Rajeev.

Patil, Sheetal wrote:


Hello all

I am using tomcat 5.0 for my application. My application in created be 
using struts+jsp


Tomcat was functioning very well before few days

Mean while I deploy another module on server in my application

After few days *tomcat become slow*, means it give *starting page 
fast* but when *connection to database server* it dose not reply (just 
showing process is going on….)


So is there any way to checkout why tomcat becomes slow here is the 
picture of server


status

Sp




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



Re: Tomcat 5.0.28, Socket hanging on sending 20KB data for 16 minutes

2006-05-19 Thread Rajeev Jha

looking at http://www.jfree.org/jfreechart/javadoc/ ,

org.jfree.chart.encoders.EncoderUtil.writeBufferedImage does not look 
thread-safe.
try checking sun.awt.image.codec.JPEGImageEncoderImpl.encode API.

Try increasing the latency by re-requesting the servlet every 30 secs/ 1 min 
and see if that works fine or not.




Kumar Pandey wrote:




Sorry I forgot to include couple of more stats

Tomcat is running on linux FC4
Client browser is IE 6.0

First line of the dump is
http-0.0.0.0-80-Processor99 daemon prio=1
tid=0x8b09b4b8 nid=0x46ec runnable
[0x84be7000..0x84be91c0]

Thx

 




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



Re: tomcat response slow

2006-05-19 Thread vineesh kumar

Undeploy the other application and make sure that the problem is
caused by the new application or some changes in older one. Also check
the database for performance. There can be many reasons like, the
buffers may not be configures correctly to share the load etc on the
db.Aslo check that whether the application is spawning too many
connections and also check whether the uptodate driver is used.
offcourse People won't like big images bcos it takes long time to
load.Better u send log messages from the server in TEXT format


On 5/19/06, Rajeev Jha [EMAIL PROTECTED] wrote:

what does the logs say? turn debug on and check the logs.
Also see if the DB URL, user password etc are correct.
And I dont think people will like your posting image blobs in mail.

Thanks
- Rajeev.

Patil, Sheetal wrote:

 Hello all

 I am using tomcat 5.0 for my application. My application in created be
 using struts+jsp

 Tomcat was functioning very well before few days

 Mean while I deploy another module on server in my application

 After few days *tomcat become slow*, means it give *starting page
 fast* but when *connection to database server* it dose not reply (just
 showing process is going on….)

 So is there any way to checkout why tomcat becomes slow here is the
 picture of server

 status

 Sp



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





--
Vineesh Kumar
Software Engineer
ISS-RnD Department
HCL infosystems Ltd
Cochin

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



Virtual Host problem with classpath

2006-05-19 Thread adamm
Short description :
Without virtual host everything works fine.
But, when I set my Virtual Host http://www.mysite.com
then http://www.mysite.com/widget/index.jsp doesn't find imported classes and
can't compile.

Longer description : 
In server.xml I have something like :
Host name=www.mysite.com debug=0 appBase=webapps/mysite
unpackWARs=false autoDeploy=true
Context path= docBase=./
/Host

When I access http://www.mysite.com/index.jsp everything is OK, but when I try 
to
access 
http://www.mysite.com/widget/index.jsp

I've got classpath related problem :

*exception*

org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 14 in the jsp file: /index.jsp
Generated servlet error: common.MyCommonClass cannot be resolved

In the begin of mysite/widget/index.jsp I have import=common.*;
So Tomcat don't look for classes where I expect it to seek. 

How to solve this problem ? I played a bit with Context tag but without success.





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



Re: Tomcat 5.0.28, Socket hanging on sending 20KB data for 16 minutes

2006-05-19 Thread Sameer Acharya
Try synchronizing the code that uses Jfreechart classes.

-Sameer

Kumar Pandey [EMAIL PROTECTED] wrote: Hi
  I'm using Tomcat 5.0.26 that comes with JBoss 3.2.5
with default configurations

A servlet creates pie/bar charts using JFreeChart.
This is refreshed every 5 seconds via javascript
refresh in the brower. All this has been workign fine
for most customers.
Suddenly for a specific customer sessions coming from
a specific newtwork/georaphical location we see that
the 5 seconds chart refreshes are hanging the thread.
Charts are 20 KB. For a single user in the system
sometimes these requests are talking up 20 ~30 threads
and each stuck for 15~16 minutes before it finally
clears up.
We ran ethereal on the tcp packet and see that when
the threads are hung, browser is sending FIN, ACK
eventhough server hasn't completed sending the data.
Thus we see TCP retranmissions of same packets as its
not receiveing any ack from the client.

How do I troubleshoot this issue.
System is not memory starved and cpu is 98% idle.

Any pointers on trouble shooting this would be greatly
appreciated.

Thanks
Kumar
 
Here's the thread dump of one of the hung request.

java.net.SocketOutputStream.socketWrite0(Native
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:714)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398)
org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:318)
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:737)
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:125)
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:569)
org.apache.coyote.Response.doWrite(Response.java:542)
org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:368)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398)
org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:318)
org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297)
org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:85)
sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native
locked
sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:472)
sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:228)
locked
sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:235)
locked
org.jfree.chart.encoders.SunJPEGEncoderAdapter.encode(SunJPEGEncoderAdapter.java:139)
org.jfree.chart.encoders.EncoderUtil.writeBufferedImage(EncoderUtil.java:136)
org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:442)
org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:388)
com.transerainc.rtmcui.util.ChartUtil.drawChartAsJPEG(ChartUtil.java:46)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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




-
Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone.  Get Yahoo! 
Messenger with Voice

Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Michael Decker
Hi!

Two question, one problem.

I've an application running on tomcat 5.5. And before it apache is running.

The primer aim is to join tomcat application session with ssl session to
avoid session hijacking.


1.) Which mod should I use?
Configuration: Apache and Tomcat are running on same pc. I expect low
traffic, because it's an intranet application.

I've read about mod_jk, mod_jk2, mod_proxy [1], mod_proxy_ajp [2]

According to Apache FAQ [3] and JBoss FAQ [4] only mod_jk or
mod_proxy_ajp should be used.

What are the differences?

2.) How to join application and SSL session?
I've read in an old tomcat-apache-ssl documentation [5] that mod_jk is
able to forward SSL session information to tomcat. So I wonder, how
configure tomcat using ssl session as application session.

Perhaps you can help me.

Bye,
Michael


[1] http://httpd.apache.org/docs/2.0/mod/mod_proxy.html
[2] http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html
[3] http://tomcat.apache.org/faq/connectors.html#vs
[4] http://wiki.jboss.org/wiki/Wiki.jsp?page=ModJK_FAQ
[5] http://tomcat.apache.org/tomcat-3.3-doc/tomcat-ssl-howto.html
-- 
Michael Decker  [EMAIL PROTECTED]
TESIS SYSware GmbH  http://www.tesis.de
Baierbrunnerstr. 15 * 81379 Muenchen * Tel. +49 89 747377-0


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



Re: Connecting Apache2.2 with Tomcat 5 using mod_proxy_ajp

2006-05-19 Thread Warren Pace


  PROXY_AJP_.CONF ***
 
 ProxyPass /contact/*.jsp ajp://localhost:8080/contact/
 ProxyPassReverse /contact/*.jsp ajp://localhost:8080/contact/

Use port 8009 (the ajp connector uses 8009) instead of 8080
Add a line in your HTTPD.conf to include your PROXY_AJP_CONF file as below:
Include /etc/apache2/extra/PROXY_AJP_CONF (whatever you've named your file).
Use the Location directive inside your proxy_ajp_conf file
Location /contact/
ProxyPass ajp://localhost:8009/contact/
/Location

 -
 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: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Darryl Miles

Michael Decker wrote:

1.) Which mod should I use?
Configuration: Apache and Tomcat are running on same pc. I expect low
traffic, because it's an intranet application.

I've read about mod_jk, mod_jk2, mod_proxy [1], mod_proxy_ajp [2]

According to Apache FAQ [3] and JBoss FAQ [4] only mod_jk or
mod_proxy_ajp should be used.

What are the differences?


The FAQs are sound, my understanding:

mod_jk (good for apache 1.3.x and 2.0.x)
mod_proxy_ajp (good for apache 2.2.x, maybe 2.0.x ???)

mod_jk2 (is abandonded development now)
mod_proxy (is a supporting library in apache, which I think you need to 
load in order to use mod_proxy_ajp or mod_proxy_xyzanything).





2.) How to join application and SSL session?
I've read in an old tomcat-apache-ssl documentation [5] that mod_jk is
able to forward SSL session information to tomcat. So I wonder, how
configure tomcat using ssl session as application session.


If you are front ending with apache, then you want mod_ssl.  If you are 
using mod_ssl it will handle the SSL session.


The AJP protocol will convery the SSL information to tomcat fairly 
seamlessly, the idea being from the web-app's point of view it can't 
tell the difference between an Apache fronted HTTP session and one 
coming in via a AJP connector.


The AJP protocol is not secure from traffic snooping or secure again 
pirate connections hijacking it directly, if you intend to run both on 
the same machine I suggesting making Tomcat listen on 127.0.0.1:8007. 
Otherwise run on a private network address and firewall accordingly.




HTH

Darryl

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



Re: stop and start an application

2006-05-19 Thread Calvin Deiterich
This seems to be similar to a post that got started under another
thread.  I have included the info below.
What I have found so far is that the complete tree does not get
transfered to the Tomcat webapps folder from the .war.
I have to do some testing to see if I can come up with exactly what it
happening.
Calvin


 [EMAIL PROTECTED] 5/19/2006 3:36:39 AM 
Hi list

As i am a newbie to tomcat this question might be easy to answer for
you:

I have succesfully deployed a .war application with eclipse wtp. 
Installing that .war file to tomcat works fine, but...

After stopping the application and starting it again, tomcat comes up
with 
errors telling me there is a null pointer exception.
Does anyone have an idea why?

Thanks

Tony,
I have the same problem. Eclipse 3.1 WTP install.
I ended up shutting down tomcat and deleting the .war and the folder,
then saving the new .war file and start the tomcat up again.
I also publish to another tomcat server and still have to do the same
thing.  On both machines I am running tomcat 5.5.17.
Hope someone has a solution as this is a pain.
Calvin

Tony Smith wrote the following on 5/18/2006 7:30 PM:
 Hi, 
  
  I am using Tomcat 5.5.9 on Windows. I use Eclipse to
  write my server code. Every time I change my code, I
  export the jar directly to the myapp/WEB-INF/lib
  directory and restart Tomcat. I found that the new
  code is not immediately used by Tomcat, I have to
  re-export, re-start Tomcat a couple times to make
  Tomcat pickup my new code.
  
  Anyone know why?
  
  Thanks,
  
  qq

 _

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



Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Michael Decker
Hi!

 1.) Which mod should I use?
 mod_proxy (is a supporting library in apache, which I think you need to
 load in order to use mod_proxy_ajp or mod_proxy_xyzanything).

The advantage seems to be, that it's easier to configure.

 2.) How to join application and SSL session?
 I've read in an old tomcat-apache-ssl documentation [5] that mod_jk is
 able to forward SSL session information to tomcat. So I wonder, how
 configure tomcat using ssl session as application session.
 
 If you are front ending with apache, then you want mod_ssl.  If you are
 using mod_ssl it will handle the SSL session.

Yes of cause... You're right...

 The AJP protocol will convery the SSL information to tomcat fairly
 seamlessly, the idea being from the web-app's point of view it can't
 tell the difference between an Apache fronted HTTP session and one
 coming in via a AJP connector.

You mean, that the session will be created by apache not by tomcat?

 The AJP protocol is not secure from traffic snooping or secure again
 pirate connections hijacking it directly, if you intend to run both on
 the same machine I suggesting making Tomcat listen on 127.0.0.1:8007.

Yes, that is, what I'm going to do.

My problem is, that the application session (set by cookie or url
parameter) is not associated with the SSL session. And I hope, there is
an easy way to that.

Thanks a lot,
Michael

-- 
Michael Decker  [EMAIL PROTECTED]
TESIS SYSware GmbH  http://www.tesis.de
Baierbrunnerstr. 15 * 81379 Muenchen * Tel. +49 89 747377-0


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



Re: Help with Tomcat MySQL using JNDI

2006-05-19 Thread Stephen More

On 5/17/06, Parsons Technical Services [EMAIL PROTECTED] wrote:

Now I will assume you have reviewed

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

for a per context and


Yes


http://tomcat.apache.org/tomcat-5.5-doc/config/globalresources.html for a
global approach.


Yes.


Now for a few questions.
Is the jndi for one app or several?


Right now, one app.


Well if for one app, you can set it up in the context of the app.


I have been trying to do this.


Both cases you need to add the drivers to the common/lib (thus the reason a
simple war won't do).


I have copied mysql-connector-java-3.1.12-bin.jar to
apache-tomcat-5.5.17/common/lib


Class.forName(com.mysql.jdbc.Driver);

connection =
 DriverManager.getConnection(
  jdbc:mysql://192.168.1.19:3306/golive,
  daname,
  depassword);



I have this working fine.

Now that we have verified this first layer ( JDBC Driver installed OK
), how can I test the next layer ?

$CATALINA_HOME/webapps/DBTest/META-INF/context.xml

What can I do to verify that my context.xml is set correctly ?



-Thanks
Steve More


- Original Message -
From: Stephen More [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Wednesday, May 17, 2006 5:34 PM
Subject: Help with Tomcat  MySQL using JNDI


Is there a war file available for download that will do nothing more than:
select 'HelloWorld from MySQL'; using JNDI ?


I have tried following many examples on the web and I keep ending up with:
Cannot create JDBC driver of class '' for connect URL 'null'

At this point I am pulling out my hair and thinking their must be a
bug in tomcat 5.5.17 !

Can anyone provide me with a simple working war using MySQL ?


-Thanks
Steve More

-
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: Tomcat: The Definitive Guide Question

2006-05-19 Thread Gaël Lams

Hi


Can you provide a direct link(s) for that Tomcat online
documentation?

Any information is appreciated.  Thank you.


It's a book, Professional Apache Tomcat 5, by Wrox.
Regards,

Gaël


Re: Catching RequestDispatcher not found errors

2006-05-19 Thread Mark Thomas
Stephen Suen wrote:

 The call to sendError should be ignored, then why a 404 error page returns?
 I think maybe Tomcat overrides this behaviour or does some trick elsewhere.
 Can you give me more help?

The RequestDispatcher is created in this class:
http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java

ApplicationDispatcher implements RequestDispatcher
http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

The wrapper that checks if it is included before calling sendError is
http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java

HTH,

Mark

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



settingheap sizes for JVM in tomcat

2006-05-19 Thread Siddesh Prabhu
hi ppl,
   
  Is there any criteria/way  to determine the  suitable heap sizes ( -Xms nad 
-Xmx ) for JVM in tomcat ??
   
  Thanks in advance
Siddesh




-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.

Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Darryl Miles

Michael Decker wrote:

The AJP protocol will convery the SSL information to tomcat fairly
seamlessly, the idea being from the web-app's point of view it can't
tell the difference between an Apache fronted HTTP session and one
coming in via a AJP connector.


You mean, that the session will be created by apache not by tomcat?


We're getting ambigious here.  Maybe I should have used the term HTTP 
request response cycle instead of HTTP session.


An SSL session to me is a single TLS/SSL connection that securely sets 
up a network connection to exchange data.  At the start of this a key 
exchange is done and the SSL session data maybe cached by mod_ssl into a 
file like /opt/apache/logs/ssl_scache.{dir,pag} for later use.  SSL 
session data can be seen with:


openssl s_client -connect www.yourdomain.com:443


However I think the only session you are really talking about, is an 
application session which is generally what HTTP Cookies are used for.





My problem is, that the application session (set by cookie or url
parameter) is not associated with the SSL session. And I hope, there is
an easy way to that.


I dont understand why you want to connect to two (under my definition of 
each explained above).  It is not normal to connect the SSL session in 
this way, as the HTTP protocol may (or may not) use the same SSL session 
details during the next request, the client may (or may not) support 
persistent connections.  The SSL session cache is a performance 
optimization, not something an application gets to see or use directly.


It more normal to issue client certificates to your userbase and 
validate those certificates with a per-website certificate authority. 
In which case the certificate will have an Issue Number and it is this 
issue number you can use as an authentication token (providing the 
certificate has passed validity testing, I'm sure both apache and tomcat 
can help with your application specific validity rules).


Even if you have a self-signed CA on your website a regular Cookie based 
login mechanism should be secure enough for most applications.  The 
JSESSIONID cookie is the primary mechanism for session handling with 
most containers.




Darryl

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



javamail for numerous mail servers on tomcat

2006-05-19 Thread lio tomcat

Hello world,

I'm trying to use javamail api in order to fecth/sen mails in a tomcat servlet.
Sor far, it's fine. more : it works.
But my needs are going beyond this firsyt step.

As i understand, the mail servers (smtp, pop, ...) are defined as
resources in tomcat (or watever servlet) in its specific config file
(server.xml).
Then the servlet is able to retrieve one of these server throught a
context, a session and a transport objects. Right?

My aim is to build dynamically (by the servlet) a transport with
parameters received in request. Clear?

By the way, i read :
In general, applications should not need to use the classes in this
package directly.
Instead, they should use the APIs defined by javax.mail package (and
subpackages).
Applications should never construct instances of SMTPTransport directly.
Instead, they should use the Session method getTransport to acquire an
appropriate Transport object. 
(see : 
file:///C:/lionel/dwd/sw/javamail-1_4/javamail-1.4/docs/javadocs/index.html?index-filesindex-1.html)

So i'm wondering how i should use the Session method getTransport to
acquire an appropriate Transport object.

Or if i should let javamail down and look for another solution.

Any comment/idea/link is welcome

thx,

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



Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Michael Decker
Hi!

 My problem is, that the application session (set by cookie or url
 parameter) is not associated with the SSL session. And I hope, there is
 an easy way to that.
 
 I dont understand why you want to connect to two (under my definition of
 each explained above).

Why I want that? If you've an application with session. So you can get
the application information by spying (XSS, browser plugin etc.) or
copying (URL with session ID).

Because of that the idea was to join SSL session id and application
session id, you can avoid that.

 It is not normal to connect the SSL session in
 this way, as the HTTP protocol may (or may not) use the same SSL session
 details during the next request, the client may (or may not) support
 persistent connections.  The SSL session cache is a performance
 optimization, not something an application gets to see or use directly.

I'm not sure if I completely understand you: The SSL session (ID) can
change between two requests?

 It more normal to issue client certificates to your userbase and
 validate those certificates with a per-website certificate authority. In
 which case the certificate will have an Issue Number and it is this
 issue number you can use as an authentication token (providing the
 certificate has passed validity testing, I'm sure both apache and tomcat
 can help with your application specific validity rules).

Okay, yes. That is a possibility, the application will offers, but it's
not forced to configure that way.

Thanks a lot!

Michael
-- 
Michael Decker  [EMAIL PROTECTED]
TESIS SYSware GmbH  http://www.tesis.de
Baierbrunnerstr. 15 * 81379 Muenchen * Tel. +49 89 747377-0


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



Re: javamail for numerous mail servers on tomcat

2006-05-19 Thread David Kerber
Dynamically-defined mail servers work fine in Tomcat; I'd be in deep 
kimshe if they didn't.  Here are some excerpts from the code I use:


 Properties props = new Properties();
 props.put( mail.smtp.host, however you get the 
server name );
 Session mailSession = 
Session.getDefaultInstance(props, null);

 msg= new MimeMessage(mailSession);
 msg.setRecipients(Message.RecipientType.TO, 
internetAddresses);
 fromAddress = new InternetAddress( however you get 
the FROM address );

 msg.setFrom( fromAddress );
 msg.setSubject( the subject line );
  
   ...


 msg.setText( the message body content );
  Transport.send(msg);

...

lio tomcat wrote:


Hello world,

I'm trying to use javamail api in order to fecth/sen mails in a tomcat 
servlet.

Sor far, it's fine. more : it works.
But my needs are going beyond this firsyt step.

As i understand, the mail servers (smtp, pop, ...) are defined as
resources in tomcat (or watever servlet) in its specific config file
(server.xml).
Then the servlet is able to retrieve one of these server throught a
context, a session and a transport objects. Right?

My aim is to build dynamically (by the servlet) a transport with
parameters received in request. Clear?

By the way, i read :
In general, applications should not need to use the classes in this
package directly.
Instead, they should use the APIs defined by javax.mail package (and
subpackages).
Applications should never construct instances of SMTPTransport directly.
Instead, they should use the Session method getTransport to acquire an
appropriate Transport object. 
(see : 
file:///C:/lionel/dwd/sw/javamail-1_4/javamail-1.4/docs/javadocs/index.html?index-filesindex-1.html) 



So i'm wondering how i should use the Session method getTransport to
acquire an appropriate Transport object.

Or if i should let javamail down and look for another solution.

Any comment/idea/link is welcome

thx,





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



Re: JSSE13SocketFactory in a 1.5 JVM and SUN-SPECIFIC classes

2006-05-19 Thread Joe Bohn

Thanks for the quick response!

I think I've discovered some more problems while looking into this class 
and references to it.


JSSEImplementation contains code to select the correct factory based 
upon the JVM version.  However, it appears that there is a typo in the 
class name.


IIUC, this code in JSSEImplementation:

static final String JSSE13Factory =
org.apache.tomcat.util.net.jsse.JSSE13Support;

should be:

static final String JSSE13Factory =
org.apache.tomcat.util.net.jsse.JSSE13Factory;

since there is no JSSE13Support class.

The code is unchanged in 5.5.17.

Rather than correct this one line of code, I think it would make sense 
to completely remove the JSSE13* classes.  This resolves the problems 
that I'm having with building on a non-Sun JDK.  It would also seem that 
nobody is using this support since the problem has not been reported. 
Does Tomcat 5.5.17 still support running on a 1.3 JVM?


Should I create a bug report for this problem and do you think it would 
be feasible to remove the broken 1.3 support?


Thanks,
Joe


Mark Thomas wrote:

Joe Bohn wrote:


Have other folks built Tomcat using JDKs other than Sun's?  How do you
work around problems like this?



Deleting the class any any reference seems like the way to go to me.

Mark


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





--
Joe Bohn
joe.bohn at earthlink.net

He is no fool who gives what he cannot keep, to gain what he cannot 
lose.   -- Jim Elliot


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



RE: [javajni.c] [error] CreateJavaVM Failed

2006-05-19 Thread Asensio, Rodrigo
Your right, thanks. 

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 18, 2006 9:06 PM
To: Tomcat Users List
Subject: Re: [javajni.c] [error] CreateJavaVM Failed

Asensio, Rodrigo wrote:
 Hello, I have a production server tomcat 5.5 java 1.5_06 I have set 
 memory min and max as 2048m and thorows this error
 
 [javajni.c] [error] CreateJavaVM Failed
 
 =) obviosly my server has 4 GB of memory
 
 
 It work with 1600m , 1024m, etc, but no more than 2000m
 
 Any clue ??
Windows OS?

Windows process are limited to 4GB per process on 32-bit systems but 2GB
is reserved for the kernel so each process really only has 2GB to play
with.

You can increase this to 3GB per process using the /3GB switch in
boot.ini but there are side-effects you might not like. Google for
details.

Mark


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


This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

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



Re: Virtual Host problem with classpath

2006-05-19 Thread Hassan Schroeder

On 5/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


But, when I set my Virtual Host http://www.mysite.com
then http://www.mysite.com/widget/index.jsp doesn't find imported classes and
can't compile.



In server.xml I have something like :
Host name=www.mysite.com debug=0 appBase=webapps/mysite
unpackWARs=false autoDeploy=true
Context path= docBase=./


The appBase is where you place your webapps: ROOT, widgets, etc.
So your default app would go in 'webapps/mysite/ROOT', widgets (if
it's a separate all) 'webapps/mysite/widgets', and so on.

{appBase}/{docBase}/WEB-INF
 /index.jsp
 ...

Try that and see if your classpath issues disappear.

And for troubleshooting at least, it may help to use absolute paths in
your configs to avoid confusion...

HTH,
--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Darryl Miles

Michael Decker wrote:

My problem is, that the application session (set by cookie or url
parameter) is not associated with the SSL session. And I hope, there is
an easy way to that.

I dont understand why you want to connect to two (under my definition of
each explained above).


Why I want that? If you've an application with session. So you can get
the application information by spying (XSS, browser plugin etc.) or
copying (URL with session ID).

Because of that the idea was to join SSL session id and application
session id, you can avoid that.


Understood on what you are trying to do now.  Maybe: 
http://java.sun.com/products/servlet/2.1/api/javax.servlet.ServletRequest.html 
and :


javax.net.ssl.SSLSession sslSession = (javax.net.ssl.SSLSession) 
request.getAttribute(javax.net.ssl.session);

byte[] sslId = sslSession.getId()

Will do the trick.


Before all HttpSession object usage you want to validate it, maybe a 
Servlet Filter would be a good way to handle this. 
http://java.sun.com/products/servlet/Filters.html



The AJP protocol seamlessly conveys the SSL related information between 
apache and tomcat.  Although apache+mod_ssl is the SSL endpoint, the 
web-app still have access to it just as-if you had setup SSL on tomcat 
directly.





It is not normal to connect the SSL session in
this way, as the HTTP protocol may (or may not) use the same SSL session
details during the next request, the client may (or may not) support
persistent connections.  The SSL session cache is a performance
optimization, not something an application gets to see or use directly.


I'm not sure if I completely understand you: The SSL session (ID) can
change between two requests?


HTTP is a stateless protocol.  So from a pure HTTP perspective, yes sure 
the ID can change between requests.  In practice with featurefull 
browsers and a normal usage pattern linking them is probably safe you'll 
have to test with your userbase to be sure.



Darryl


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



Re: Virtual Host problem with classpath

2006-05-19 Thread Mladen Adamovic

Hassan Schroeder wrote:

The appBase is where you place your webapps: ROOT, widgets, etc.
So your default app would go in 'webapps/mysite/ROOT', widgets (if
it's a separate all) 'webapps/mysite/widgets', and so on.
{appBase}/{docBase}/WEB-INF
 /index.jsp
 ...
Try that and see if your classpath issues disappear.

Hassan, thank you very much.
I have resolved the problem by putting everything (subdirectories) in 
'webapps/mysite/ROOT'  and changed the Host Context into :

Context path= docBase=ROOT/
And now www.mysite.com/widgetX/index.jsp works :).

thanx x10

--
Mladen Adamovic
http://home.blic.net/adamm
http://www.shortopedia.com 
http://www.froola.com 



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



Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Michael Decker
Hi!

 Why I want that? If you've an application with session. So you can get
 the application information by spying (XSS, browser plugin etc.) or
 copying (URL with session ID).

 Because of that the idea was to join SSL session id and application
 session id, you can avoid that.
 
 Understood on what you are trying to do now.  Maybe:
 http://java.sun.com/products/servlet/2.1/api/javax.servlet.ServletRequest.html
 and :
 [...]
 Before all HttpSession object usage you want to validate it, maybe a
 Servlet Filter would be a good way to handle this.
 http://java.sun.com/products/servlet/Filters.html

Thanks... That would be my way...

 I'm not sure if I completely understand you: The SSL session (ID) can
 change between two requests?
 
 HTTP is a stateless protocol.  So from a pure HTTP perspective, yes sure
 the ID can change between requests.  In practice with featurefull
 browsers and a normal usage pattern linking them is probably safe you'll
 have to test with your userbase to be sure.

Oh now I understand what you want say... Yes of cause HTTP is stateless.
That was the reason of creating session handled with cookies, URL
parameters, referrers etc.

You was a great help.

Thanks a lot!
Michael
-- 
Michael Decker  [EMAIL PROTECTED]
TESIS SYSware GmbH  http://www.tesis.de
Baierbrunnerstr. 15 * 81379 Muenchen * Tel. +49 89 747377-0


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



Re: Tomcat 5.0.28, Socket hanging on sending 20KB data for 16 minutes

2006-05-19 Thread Kumar Pandey
If it was synchronization issue at the code level then
I should have seen the issue during load test in our
env.

We see the issue only for the traffic coming from this
specific network even for just one user in the system.
Cpu is 99% idle.

Also IE just allows 2 socket connection from the
browser at any given time for that instance of IE.I
see upto 30 threads tied up to service one user
session requests for 20KB of data. Each finally clears
up after 16 minutes. Meanhile other users accessing
from other networks (even from India)
does not have this issue. Their request for same data
is getting serviced under sub seconds. by remaining
threads not tied up.

Does anyone have any idea on the re-transmissions of
the same packets from server tcp layer to broswer thus
hanging the connection for upto 16 minutes in Linux
FC4, Tomcat 5.0.28. Who is closing the connection
after  ~16 minutes etc.

Thanks
Kumar

--- Rajeev Jha [EMAIL PROTECTED] wrote:

 looking at http://www.jfree.org/jfreechart/javadoc/
 ,
 

org.jfree.chart.encoders.EncoderUtil.writeBufferedImage
 does not look thread-safe.
 try checking
 sun.awt.image.codec.JPEGImageEncoderImpl.encode API.
 
 Try increasing the latency by re-requesting the
 servlet every 30 secs/ 1 min and see if that works
 fine or not.
 
 
 
 
 Kumar Pandey wrote:
 
 
 
 Sorry I forgot to include couple of more stats
 
 Tomcat is running on linux FC4
 Client browser is IE 6.0
 
 First line of the dump is
 http-0.0.0.0-80-Processor99 daemon prio=1
 tid=0x8b09b4b8 nid=0x46ec runnable
 [0x84be7000..0x84be91c0]
 
 Thx
 
   
 
 
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Tomcat service dying without a trace on Windows Server 2003

2006-05-19 Thread Praveen Patle

Hello Tomcat Users:

We are running Tomcat 5.5 on Windows 2003 Server and having a problem of
Tomcat service dying without a trace.
There are no exceptions in server log or any of the servlet logs.

We are using JRE 1.4.2_10-b03.

Is there a way I can find out why the Tomcat is exiting on us?

Thanks a lot,

Praveen


Object sharing

2006-05-19 Thread Arvind S.

Hi,

If a web application wants to access a object being used by another
web-application(with a different context root) running on the same
webserver, is that possible?

If yes, how can it be achieved?Through sharing attributes of ServletContext?
Will getting an attribute from the servletContext, return a copy of the
object or the reference itself?

Thanks  Regards


Posting questions to the list

2006-05-19 Thread keyur sheth
  

-
Be a chatter box. Enjoy free PC-to-PC calls  with Yahoo! Messenger with Voice.

Re: Posting questions to the list

2006-05-19 Thread keyur sheth
Hi everybody,
   
I am trying to convert the tomcat container from http to 
https. First of all I created the keystore by reading the documentation and 
also made necessary changes to $CATALINA_HOME/conf/server.xml by uncommenting 
the SSL Connector HTTP tag and added new parameter keystoreFile for including 
the location of the file .keystore. And then restarted the tomcat. But when I 
give my URL https://coit-grid04.uncc.edu:8080/gridsphere  or 
https://coit-grid04.uncc.edu:8080/ it still doesn't open the page and gives the 
error as page cannot be displayed. So can you tell me the reason why I am 
unable to do that.
   
  Thanking you 
  Keyur

keyur sheth [EMAIL PROTECTED] wrote:
  

-
Be a chatter box. Enjoy free PC-to-PC calls with Yahoo! Messenger with Voice.


-
Ring'em or ping'em. Make  PC-to-phone calls as low as 1¢/min with Yahoo! 
Messenger with Voice.

Re: Posting questions to the list

2006-05-19 Thread Markus Schönhaber
keyur sheth wrote:
 I am trying to convert the tomcat container from http
 to https. First of all I created the keystore by reading the documentation
 and also made necessary changes to $CATALINA_HOME/conf/server.xml by
 uncommenting the SSL Connector HTTP tag and added new parameter
 keystoreFile for including the location of the file .keystore. And then
 restarted the tomcat. But when I give my URL
 https://coit-grid04.uncc.edu:8080/gridsphere  or
 https://coit-grid04.uncc.edu:8080/ it still doesn't open the page and gives
 the error as page cannot be displayed. So can you tell me the reason why I
 am unable to do that.

Access the port you configured the HTTPS Connector for, propably:
https://coit-grid04.uncc.edu:8443

Regards
  mks

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



Re: Posting questions to the list

2006-05-19 Thread Hassan Schroeder

On 5/19/06, keyur sheth [EMAIL PROTECTED] wrote:

So can you tell me the reason why I am unable to do that.


No. :-)

Certainly not without seeing the relevant part of your server.xml and
the relevant parts of your server logs.

P.S. Using a real subject line would be a good idea...
--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Posting questions to the list

2006-05-19 Thread keyur sheth
Thankyou for your reply, but the thing is that even if I give 
https://coit-grid04.uncc.edu:8443/gridsphere or 
https://coit-grid04.uncc.edu:8443
it doesn't work. And in the connector tag for non-SSL there is a parameter 
called redirectPort which is already 8443. So it should be redirected to port 
8443. So what else can be the problem. Is there anything else to setup.
   
  Keyur
   
  
 


-
Blab-away for as little as 1¢/min. Make  PC-to-Phone Calls using Yahoo! 
Messenger with Voice.

Re: Posting questions to the list

2006-05-19 Thread Hassan Schroeder

On 5/19/06, keyur sheth [EMAIL PROTECTED] wrote:

  So attached is the part of the server.xml file for non-SSL and SSL



  !-- Define a SSL HTTP/1.1 Connector on port 8443 --
  Connector port=8443 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 scheme=https secure=true
   clientAuth=false sslProtocol=TLS
   keystoreFile=/home/tomcat/.keystore /


? no keystorePass? or just using the default?

In any case, the critical information is: what do your logs say?

--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Posting questions to the list

2006-05-19 Thread keyur sheth
Ok I will add the keystorePass tag in the SSL connector. But I don't know what 
should see in the log directory and which file specifically. Can you please let 
me know
   
  Keyur

Hassan Schroeder [EMAIL PROTECTED] wrote:
  On 5/19/06, keyur sheth wrote:
 So attached is the part of the server.xml file for non-SSL and SSL

 
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
 enableLookups=false disableUploadTimeout=true
 acceptCount=100 scheme=https secure=true
 clientAuth=false sslProtocol=TLS
 keystoreFile=/home/tomcat/.keystore /

? no keystorePass? or just using the default?

In any case, the critical information is: what do your logs say?

-- 
Hassan Schroeder  [EMAIL PROTECTED]

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




-
Blab-away for as little as 1¢/min. Make  PC-to-Phone Calls using Yahoo! 
Messenger with Voice.

Re: Posting questions to the list

2006-05-19 Thread Hassan Schroeder

On 5/19/06, keyur sheth [EMAIL PROTECTED] wrote:

But I don't know what should see in the log directory and which file 
specifically.


There shouldn't be that many to choose from, but in any case, the
one with errors in it :-)

--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Posting questions to the list

2006-05-19 Thread keyur sheth
Well, unfortunately our network is down due to power outage so I cannot connect 
to the server remotely. I was just going to see the log file generated for 
today and it got disconnected. So will mail later regarding the error in the 
log file

Hassan Schroeder [EMAIL PROTECTED] wrote:  On 5/19/06, keyur sheth wrote:
 But I don't know what should see in the log directory and which file 
 specifically.

There shouldn't be that many to choose from, but in any case, the
one with errors in it :-)

-- 
Hassan Schroeder  [EMAIL PROTECTED]

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




-
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

JSP error page results in HTTP 500

2006-05-19 Thread Zohar Amir
Hello list,
I'm using tomcat 5.5.16 .
I'm trying to use JSP's error page mechanism. In my main.jsp I have [EMAIL 
PROTECTED] errorPage=error.jsp %When an exception is thrown in main.jsp it 
is indeed forwarded to error.jsp, where I have [EMAIL PROTECTED] 
isErrorPage=true % I can see the code in error.jsp being executed (I've put 
some println's there), but the calling HTTP browser gets an HTTP 500 
response.Is this a known issue with tomcat? If not, then can anyone please help 
me with this.Thanks,Zohar.  
 
_
It's the future, it's here, and it's free: Windows Live Mail beta
http://www2.imagine-msn.com/minisites/mail/Default.aspx?locale=en-us

Re: Can't build Tomcat 4: Help!?

2006-05-19 Thread R. Christian Call
Actually, I eventually was able to build it without downloading JSX; but 
there were several things I needed to do that didn't appear in the 
BUILDING.txt file:


1. I had to downloat jakarta-tomcat-connectors using svn, because it's 
not available any other way that I could find.  To build version 4.1.24 
of Tomcat, I used the TOMCAT_4_1_25 tag (there was no 4.1.24 tag for the 
connectors).  I also built Tomcat 4.1.31, but I found that the 
TOMCAT_4_1_31 tagged version of the connectors didn't work, though I 
found that the 4_1_25 did.  Go figure.


2. I had to download jakarta-tomcat-jasper, which the BUILD.txt doesn't 
say anything about.


3. I had to make a jakarta-tomcat-connectors directory both at the same 
level of the directory tree as jakarta-tomcat, and one as a subdirectory 
in jakarta-tomcat.


4. I had to use the *exact* versions of the various commons packages 
that were specified in the sample build.properties file, despite the 
version xxx or later verbiage.  Later versions simply wouldn't work.


5. For 4.1.31, I needed to download another package 
(commons-modeler-1.1) that isn't mentioned in BUILD.txt, but that shows 
up in the sample build.properties file for this Tomcat version.


If you're so inclined, you might want to note some or all of the above 
things in the BUILD.txt file, to make things easier for others in the 
future.


Chris

Mark Thomas wrote:

R. Christian Call wrote:

I could use some help in getting Tomcat 4 to build.

I've downloaded the source for Tomcat 4.1.31, and I've installed the
various other packages required by steps 1-11, as documented in
BUILDING.txt, yet I still seem to be missing some pieces--at this point,
the build is complaining that javax.management doesn't exist.

I'd appreciate any help that anyone could offer.

Thanks,

Chris


There is an undocumented dependancy on JMX for building the connectors.
You need to include the JMX library. I'll update BUILDING.txt

For the record, it is only required for building.

mark

-
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: JSSE13SocketFactory in a 1.5 JVM and SUN-SPECIFIC classes

2006-05-19 Thread Mark Thomas
Joe Bohn wrote:
 IIUC, this code in JSSEImplementation:
 
 static final String JSSE13Factory =
 org.apache.tomcat.util.net.jsse.JSSE13Support;
 
 should be:
 
 static final String JSSE13Factory =
 org.apache.tomcat.util.net.jsse.JSSE13Factory;
 
 since there is no JSSE13Support class.

 Rather than correct this one line of code, I think it would make sense
 to completely remove the JSSE13* classes.  This resolves the problems
 that I'm having with building on a non-Sun JDK.  It would also seem that
 nobody is using this support since the problem has not been reported.

There are no references to the static String JSSE13Factory in the code
base so it actually doesn't matter about the typo. This is no-one has
complained - it isn't actually broken.

 Does Tomcat 5.5.17 still support running on a 1.3 JVM?

Tomcat 5 requires 1.4+ but the connectors (of which this class is a
part) are used by both TC4 and TC3. The code needs to stay.

 Should I create a bug report for this problem and do you think it would
 be feasible to remove the broken 1.3 support?

No need. I've corrected it in SVN just in case someone makes use of it
in some custom code - unlikely I know.


Mark

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



Re: Posting questions to the list

2006-05-19 Thread Markus Schönhaber
keyur sheth wrote:
 And in the connector tag 
 for non-SSL there is a parameter called redirectPort which is already 8443.

Which is completely irrelevant. If try to connect to a HTTP Connector via 
HTTPS this will fail before any data is transmitted that would enable Tomcat 
to decide whether or not to redirect the client.

 So it should be redirected to port 8443.

No. See above.

Regards
  mks

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



Re: Can't build Tomcat 4: Help!?

2006-05-19 Thread Mark Thomas
R. Christian Call wrote:
 1. I had to download jakarta-tomcat-connectors using svn, because it's
 not available any other way that I could find.  To build version 4.1.24
 of Tomcat, I used the TOMCAT_4_1_25 tag (there was no 4.1.24 tag for the
 connectors).

That's not good. I'll go take a look.

  I also built Tomcat 4.1.31, but I found that the
 TOMCAT_4_1_31 tagged version of the connectors didn't work, though I
 found that the 4_1_25 did.  Go figure.

This has certainly worked for me in the past.

 2. I had to download jakarta-tomcat-jasper, which the BUILD.txt doesn't
 say anything about.

The 4.1.32 source release will fix this. It will wrap up all the
necessary sources into a single zip.

 3. I had to make a jakarta-tomcat-connectors directory both at the same
 level of the directory tree as jakarta-tomcat, and one as a subdirectory
 in jakarta-tomcat.

Sounds like dodgy default values in the build script. There have been
issues in the past that I believe I have fixed for 4.1.32. Basically,
with the 4.1.32 source distro, assuming you have all the libs, a simple
ant build from the root of the source directory should be all the is
required.

 4. I had to use the *exact* versions of the various commons packages
 that were specified in the sample build.properties file, despite the
 version xxx or later verbiage.  Later versions simply wouldn't work.

That is really odd. What were the errors? SVN trunk builds quite happily
with all the latest versions. The struts upgrade was a PITA but the rest
were pretty painless.

 5. For 4.1.31, I needed to download another package
 (commons-modeler-1.1) that isn't mentioned in BUILD.txt, but that shows
 up in the sample build.properties file for this Tomcat version.

I'll add this one.

 If you're so inclined, you might want to note some or all of the above
 things in the BUILD.txt file, to make things easier for others in the
 future.

I am so inclined - working on it now. Having all the source in a single
zip (with the right structure) should make things easier.


Thanks for the info.

Mark

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



Re: Can't build Tomcat 4: Help!?

2006-05-19 Thread Mark Thomas
Mark Thomas wrote:
 R. Christian Call wrote:
 1. I had to download jakarta-tomcat-connectors using svn, because it's
 not available any other way that I could find.  To build version 4.1.24
 of Tomcat, I used the TOMCAT_4_1_25 tag (there was no 4.1.24 tag for the
 connectors).

Where were you looking?
http://svn.apache.org/repos/asf/tomcat/connectors/tags/tc4.1.x/TOMCAT_4_1_24/
looks to be fine to me.

Mark

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



Re: stop and start an application

2006-05-19 Thread Tony Smith
For my case, I do not use war. I exported jar files
directly to WEB-INF/lib. But it is not pick up when I
re-started Tomcat. I have to re-start Tomcat a couple
of times for it to be used.

Tony

--- Calvin  Deiterich [EMAIL PROTECTED] wrote:

 This seems to be similar to a post that got started
 under another
 thread.  I have included the info below.
 What I have found so far is that the complete tree
 does not get
 transfered to the Tomcat webapps folder from the
 .war.
 I have to do some testing to see if I can come up
 with exactly what it
 happening.
 Calvin
 
 
  [EMAIL PROTECTED] 5/19/2006
 3:36:39 AM 
 Hi list
 
 As i am a newbie to tomcat this question might be
 easy to answer for
 you:
 
 I have succesfully deployed a .war application with
 eclipse wtp. 
 Installing that .war file to tomcat works fine,
 but...
 
 After stopping the application and starting it
 again, tomcat comes up
 with 
 errors telling me there is a null pointer exception.
 Does anyone have an idea why?
 
 Thanks
 
 Tony,
 I have the same problem. Eclipse 3.1 WTP install.
 I ended up shutting down tomcat and deleting the
 .war and the folder,
 then saving the new .war file and start the tomcat
 up again.
 I also publish to another tomcat server and still
 have to do the same
 thing.  On both machines I am running tomcat 5.5.17.
 Hope someone has a solution as this is a pain.
 Calvin
 
 Tony Smith wrote the following on 5/18/2006 7:30 PM:
  Hi, 
   
   I am using Tomcat 5.5.9 on Windows. I use Eclipse
 to
   write my server code. Every time I change my
 code, I
   export the jar directly to the myapp/WEB-INF/lib
   directory and restart Tomcat. I found that the
 new
   code is not immediately used by Tomcat, I have to
   re-export, re-start Tomcat a couple times to make
   Tomcat pickup my new code.
   
   Anyone know why?
   
   Thanks,
   
   qq
 
  _
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Catching RequestDispatcher not found errors

2006-05-19 Thread Stephen Suen

On 5/19/06, Mark Thomas [EMAIL PROTECTED] wrote:



The RequestDispatcher is created in this class:

http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java

ApplicationDispatcher implements RequestDispatcher

http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

The wrapper that checks if it is included before calling sendError is

http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java

HTH,

Mark




Thanks for your help.

Acording to the API, sendError from the *included servlet* will be ignored.
I think maybe this doesn't necessarily mean *Tomcat itself* can't do it. If
i'm trying to include a resource not existed after the response being
committed, the error message will be appended to the response, and sendError
be ignored.

Here's the snippet from
http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
:

   if (requestUri == null) {
   requestUri = request.getRequestURI();
   } else {
   // We're included, and the response.sendError() below is going
   // to be ignored by the resource that is including us.
   // Therefore, the only way we can let the including resource
   // know is by including warning message in response
   response.getWriter().write(
   sm.getString(defaultServlet.missingResource ,
   requestUri));
   }

   response.sendError(HttpServletResponse.SC_NOT_FOUND,
  requestUri);

If the response has already been committed, doing that will get a 404 error
page returned to the client, that means Tomcat set this status somewhere
else, or from some wrapper, but I failed to find it.

Any idea?

Best Regards

Stephen


Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Bill Barker

Darryl Miles [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Michael Decker wrote:
 My problem is, that the application session (set by cookie or url
 parameter) is not associated with the SSL session. And I hope, there is
 an easy way to that.
 I dont understand why you want to connect to two (under my definition of
 each explained above).

 Why I want that? If you've an application with session. So you can get
 the application information by spying (XSS, browser plugin etc.) or
 copying (URL with session ID).

 Because of that the idea was to join SSL session id and application
 session id, you can avoid that.

 Understood on what you are trying to do now.  Maybe: 
 http://java.sun.com/products/servlet/2.1/api/javax.servlet.ServletRequest.html
  
 and :

 javax.net.ssl.SSLSession sslSession = (javax.net.ssl.SSLSession) 
 request.getAttribute(javax.net.ssl.session);
 byte[] sslId = sslSession.getId()

 Will do the trick.


Actually, no.  This will just result in an NPE :).  And, if you think about 
it, if Apache is handling the SSL traffic, then there would be no way to get 
this.

What does work is:
   String sslid = 
(String)request.getAttribute(javax.servlet.request.ssl_session);

This will give you the SSL Session-ID even if you are fronting with Apache 
(Apache passes it to Tomcat).  However, be warned that this is a 
Tomcat-specific feature:  It won't work if you try and port your app to 
another Servlet Container.


 Before all HttpSession object usage you want to validate it, maybe a 
 Servlet Filter would be a good way to handle this. 
 http://java.sun.com/products/servlet/Filters.html


 The AJP protocol seamlessly conveys the SSL related information between 
 apache and tomcat.  Although apache+mod_ssl is the SSL endpoint, the 
 web-app still have access to it just as-if you had setup SSL on tomcat 
 directly.



 It is not normal to connect the SSL session in
 this way, as the HTTP protocol may (or may not) use the same SSL session
 details during the next request, the client may (or may not) support
 persistent connections.  The SSL session cache is a performance
 optimization, not something an application gets to see or use directly.

 I'm not sure if I completely understand you: The SSL session (ID) can
 change between two requests?

 HTTP is a stateless protocol.  So from a pure HTTP perspective, yes sure 
 the ID can change between requests.  In practice with featurefull browsers 
 and a normal usage pattern linking them is probably safe you'll have to 
 test with your userbase to be sure.


 Darryl 




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



Re: Catching RequestDispatcher not found errors

2006-05-19 Thread Stephen Suen

Hi, Mark

Thanks for your patient help. I have figured out the problem. It's
not relevant to Tomcat.

I tested my web application from NetBeans IDE with HTTP monitor enabled,
NetBeans put a wrapper on the Tomcat's response object. I think that wrapper
caused the problem.

Thanks

Best Regards

Stephen


Directory Structure and Can't Find Resources in Tomcat

2006-05-19 Thread Allen Williams

Well, I can't figure out this directory structure and finding stuff at all.
 
Here are my directory listings

docroot= /usr/share/tomcat5/webapps/smsinfo
***
anw-dev:/usr/share/tomcat5/webapps/smsinfo$ ls -laF
total 20
drwxr-xr-x  3 anw     root 4096 2006-05-19 21:14 ./
drwxr-xr-x  9 tomcat5 root 4096 2006-05-13 16:10 ../
-rw-r--r--  1 anw     anw   564 2006-05-19 21:20 login.jsp
drwxr-xr-x  4 anw     anw  4096 2006-05-19 21:15 WEB-INF/
-rw-r--r--  1 anw     anw   241 2006-05-19 21:20 welcome.jsp


anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF$ ls -laF
total 20
drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ./
drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ../
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 classes/
drwxr-xr-x  2 anw root 4096 2006-05-13 15:49 lib/
-rw-r--r--  1 anw anw   440 2006-05-19 21:18 web.xml

(lib is empty)
***
anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes$ ls -laF
total 12
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ./
drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ../
drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 UserConfig/
*
anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes/UserConfig$
ls -laF
total 12
drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 ./
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ../
-rwxr-xr-x  1 anw root 1322 2006-05-19 21:18 login.class*
*

Here is the source to login.jsp (located in docroot,
/usr/share/tomcat5/webapps/smsinfo):

html
head
titleSMS Information Transfer Login Page/title
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
/head

body bgcolor=#FF onload=document.loginForm.username.focus()
!-- form name=loginForm method=post
action=/servlet/UserConfig.login --
form name=loginForm method=post
action=WEB-INF/classes/UserConfig.login
pUser Name:input type=text name=username/p
pPassword:input type=password name=password/p
pinput type=Submit name=Submit/p
/form
/body
/html

*
Here is the source to login.class:

package UserConfig;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class login extends HttpServlet
{
private String target=/welcome.jsp;
private String getUser(String username, String password)
{
return username;
}
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
// If it is a Get request, forward to doPost
doPost(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
// Get user name and password:
String username= request.getParameter(username);
String password= request.getParameter(password);
String user= getUser(username, password);
// Add fake user to the request
request.setAttribute(USER, user);
ServletContext context= getServletContext();
RequestDispatcher dispatcher= context.getRequestDispatcher(target);
//target defined above
dispatcher.forward(request, response);
}
}
***
Here is the source for my web.xml file:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;

web-app
servlet
servlet-namelogin/servlet-name
servlet-classUserConfig.login/servlet-class
/servlet
servlet-mapping
servlet-namelogin/servlet-name
url-pattern/servlet/login/url-pattern
/servlet-mapping
/web-app
***

As can be seen, all this is very simple, my very first Tomcat web app.  I
have
followed the instructions in

http://tomcat.apache.org/tomcat-5.5-doc/appdev/index.html

When I go to http://localhost:8180/smsinfo/login.jsp, I get the form, input
some text, then get the following screen from tomcat:

HTTP Status 404 - /smsinfo/WEB-INF/classes/UserConfig.login

Type: Status report

Message: /smsinfo/WEB-INF/classes/UserConfig.login

Description: The requested resource
(/smsinfo/WEB-INF/classes/UserConfig.login) is not available.
Apache Tomcat/5.0
*

I've been screwing around with this for days, reading books and the web
help,
but can't find out what's wrong.  Any help is greatly appreciated.

TIA and regards,
anw


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