Re: problem after mod_jk update

2006-10-23 Thread Rainer Jung
Hi Torsten,

you could try the FlushPakets JkOption from

http://tomcat.apache.org/connectors-doc/config/apache.html

Please let us know, if this helps. If not, please open a bugzilla ticket
and include your config and a simple test case.

Regards,

Rainer

Torsten R. schrieb:
 hi,
 
 i used tomcat 5.0.27 with mod_jk 1.2.13 an apache 2.0.58 and everything
 worked fine. tomcat's task is to serve several (about 1.000)
 chatstreams, so the tomcat-connections are open a long time.
 
 now, i updated to mod_jk 1.2.19 and the chat-users just see a white
 page while they are logged in. however, when they logout, suddenly all
 the html-output appears. while the chatstream is active (the connection
 is open), i can post as many messages as i want, i see none of them,
 just the white page. when i logout and tomcat closes the connection,
 then _all_ the messages appear within a second.
 
 for now, i packported to mod_jk 1.2.13 and everything is fine again.
 however, i don't want to use 1.2.13 all time long, so i hope anybody can
 give me some help!
 
 torsten
 
 -
 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: some bug

2006-10-23 Thread Сергей Ковтун

В , Caldarale, Charles R [EMAIL PROTECTED] писал:


SSL configuration is different with APR (tcnative-1.dll).

I have adjusted and now all works, for exception of one
now I cannot obtain the data of the certificate of the client in Servlet
X509Certificate [] cr = (X509Certificate[])  
request.getAttribute(javax.servlet.request.X509Certificate);
always returns null. Since the given attribute does not exist any more  
in request

I do not know as to me now to obtain the data on connection :(

To me who is necessary to know has incorporated at present, and here it is  
not enough IP address, the data of the certificate are necessary for me.  
Without tcnative I could obtain these data


Best regards,
Sergey Kowtoon

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



changing the length of the jsessionid

2006-10-23 Thread Assaf Flatto

Hello

Does anyone know how i can shorten the length of the jsessionid from 32 
chars to 30 ?



thanks

Assaf


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



Apache2 forward job for directory listing to Tomcat

2006-10-23 Thread Werner Franke
Hi,

instead of apache2 make a directory listing the tomcat want to do that
and returns 

  The requested resource (/info/) is not available.

URL: http://ong.de.lucent.com/info

With the URL http://ong.de.lucent.com/tools; the dir listing works but also
made by Tomcat.

I have two Apache2/Tomcat installations on Solaris. One as test environment 
and one as planned productive environment.
On the test environment the apache make all the directorry listings. - OK.
On the planned prod environment the tomcat do that.
The config files should be the same in both environment (exept some pathes,
hostnames and IP addresses; diff checked)

How it is possible to prevent the forward from Apache to tomcat ?

If I remove all Jk- directives from the httpd.conf and do not load mod_jk.so
then it works. But then no java support.

I have searched on google, on the Apache/Tomcat docu and
the log output of mod_jk say me nothing.

Does anybody have a hint ?

If more infos/configs needed please let me know.

Thanks a lot.

Werner Franke
---

Test SUN:  Solaris 8
Prod. SUN: Solaris 9
Apache2:   2.0.55
Tomcat:5.5.12
---

Part of httpd.conf.

JkWorkersFile common/workers.properties
JkLogFile ong/logs/mod_jk.log
JkShmFile ong/logs/jk-runtime-status
JkLogLeveldebug
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkRequestLogFormat %w %V %T

VirtualHost 112.456.789.22:80
   DocumentRoot /vol/www

# all JkMount directives commented out
---
The directory info is part of /vol/www

---
File workers.properties:

workers.tomcat_home=/opt/local/tomcat
workers.java_home=/opt/local/java/jre1.5.0_06
ps=/
worker.list=default
worker.default.port=8009
worker.default.host=host1.de.lucent.com
worker.default.type=ajp13
worker.default.lbfactor=100


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



WAR file strangeness

2006-10-23 Thread syg6

Hello everyone.

I am using Tomcat 5.5 and have a webapp called vcs. The config is like this:

 Host name=localhost appBase=/var/local/projects/vcs ...
Context path= docBase=/var/local/projects/vcs/vcs.war ...

This WAR contains the WEB-INF folder and its contents, nothing else.

When I start Tomcat it unpacks the WAR in as

/var/local/projects/vcs/ROOT/WEB-INF

Any idea why this is happening? The application seems to be working, that's
the crazy thing. But as far as I know the only time the ROOT directory is
created is when you unpack a ROOT.war, which I don't have ...

Many thanks,
Bob

ps. I know I shouldn't be putting this stuff in server.xml but rather in
seperate context.xml files, but I inherited the config this way and my
client seems to fear change ...
-- 
View this message in context: 
http://www.nabble.com/WAR-file-strangeness-tf2493401.html#a6951325
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]



SV: Problem with filter and calling Perl-script with Tomcat 5.5.20

2006-10-23 Thread Gunnar.Bostrom
Hi,

I've no manged to get things working with Tomcat 5.5.20.
I've changed my servlet filter so it appends the parameter to the query string 
as proposed.

As I now understand it the standard CGIServlet will not work if there is a 
servlet-filter that do getParameters() and adds a new parameter as my filter 
did.

Attached is a CGIServlet that work with my old filter and also with multipart 
forms.
It has other drawbacks like reading the whole multipart into memory.

Feel free to use the code or ideas in the attachment.

Regards
Gunnar


 -Ursprungligt meddelande-
 Från: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Skickat: den 19 oktober 2006 15:08
 Till: users@tomcat.apache.org
 Kopia: [EMAIL PROTECTED]; Bengtsson Henrik
 Ämne: RE: Problem with filter and calling Perl-script with 
 Tomcat 5.5.20
 
 Hi Mark,
 
 You are absolutly right.
 
 I changed my filter and the CGI.pm as you proposed and it now 
 works for POST and GET but NOT with multipart forms.
 
 I've looked into the CGI.pm to see if there was a similar 
 change for multpart but I have not found any and my perl 
 knowledge is not good enough.
 
 Any one out there who knows how to do this?
 
 Regards
 Gunnar
 
 
  -Ursprungligt meddelande-
  Från: Mark Thomas [mailto:[EMAIL PROTECTED]
  Skickat: den 19 oktober 2006 13:24
  Till: Tomcat Users List
  Ämne: Re: SV: Problem with filter and calling Perl-script 
 with Tomcat 
  5.5.20
  
  [EMAIL PROTECTED] wrote:
   Hi,
   
   That is odd because I have the following problems:
   
   1) When I post an ordinary form, not a multipart, no
  parameters will be sent to the Perl script.
  
  And light dawns. Sorry - should have spotted this sooner. You call
  getParameterMap() in your filter which will drain stdin so 
 there won't 
  be any parameters there for the CGI script to read from the POST.
  
  A safer bet would be to add your parameter to the end of the URL as 
  part of the query string. I did read 
  http://users.easystreet.com/ovid/cgi_course/lessons/lesson_two.html
  that suggested you would need to tweak your Perl implementation to 
  combine parameters from POST and GET.
  
  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]
  
  
 
 -
 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]

threads and keep-alive connections

2006-10-23 Thread dima
Hello,

How many threads tomcat with APR and without APR uses to handle
keep-alive connections? 

As I understand tomcat without APR uses 1 thread per keep-alive
connection as tomcat does not use NIO.

APR may use epoll to handle keep-alive connections
http://tomcat.apache.org/tomcat-5.5-doc/apr.html

I guess this means 1 thread per ALL keep-alive.
Is that true?

I have not found any additional documentation.

There is nothing said about SSL keep-alive connections also.

-- 
Best regards,
 dima  mailto:[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]



Cannot start application: SEVERE: Error listenerStart

2006-10-23 Thread evimail
Hello,
 
I am trying to run Jetspeed on Tomcat 5.5.20 but the application does not
start. Catalina log file shows SEVERE: Error listenerStart - all logs are
listed on below. Please advise where to look for solution. 
 
Regads,
Evi
 
Localhost.log:
 
Oct 23, 2006 2:52:15 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 23, 2006 2:52:15 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 23, 2006 2:52:15 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 23, 2006 2:52:15 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 23, 2006 2:53:10 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Oct 23, 2006 2:53:11 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 23, 2006 2:53:11 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 23, 2006 2:53:11 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 23, 2006 2:53:11 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()

 
Manager.log:
 
Oct 23, 2006 2:53:43 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Associated with Deployer
'Catalina:type=Deployer,host=localhost'
Oct 23, 2006 2:53:43 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Global resources are available
Oct 23, 2006 2:53:43 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Oct 23, 2006 2:53:48 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: start: Starting web application at '/jetspeed'
Oct 23, 2006 2:53:49 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
 
Catalina.log file:
 
Oct 23, 2006 2:52:14 PM org.apache.coyote.http11.Http11AprProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Oct 23, 2006 2:52:14 PM org.apache.coyote.ajp.AjpAprProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
Oct 23, 2006 2:52:15 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 23, 2006 2:52:15 PM org.apache.coyote.http11.Http11AprProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Oct 23, 2006 2:52:15 PM org.apache.coyote.ajp.AjpAprProtocol destroy
INFO: Stopping Coyote AJP/1.3 on ajp-8009
Oct 23, 2006 2:53:07 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 23, 2006 2:53:07 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Oct 23, 2006 2:53:07 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1282 ms
Oct 23, 2006 2:53:08 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 23, 2006 2:53:08 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
Oct 23, 2006 2:53:08 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 23, 2006 2:53:09 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive jetspeed.war
Oct 23, 2006 2:53:10 PM org.apache.catalina.startup.ContextConfig
validateSecurityRoles
INFO: WARNING: Security role name admin used in an auth-constraint without
being defined in a security-role
Oct 23, 2006 2:53:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Oct 23, 2006 2:53:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jetspeed] startup failed due to previous errors
Oct 23, 2006 2:53:11 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 23, 2006 2:53:11 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Oct 23, 2006 2:53:11 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 23, 2006 2:53:12 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4140 ms
Oct 23, 2006 2:53:49 PM org.apache.catalina.startup.ContextConfig
validateSecurityRoles
INFO: WARNING: Security role name admin used in an auth-constraint without
being defined in a security-role
Oct 23, 2006 2:53:49 PM org.apache.catalina.core.StandardContext start
SEVERE: Error 

Re: some bug

2006-10-23 Thread Сергей Ковтун

В , Mark Thomas [EMAIL PROTECTED] писал:

There is a problem of work Tomcat under the https protocol if it is  
loaded dll (tcnative-1.dll).

Without loading given dll-s all works perfectly.
Sometimes together with loaded dll (tcnative-1.dll) works normally, if  
on the party
the client already was install the certificate from a server, but it is  
not constant.


Let me check I understand you correctly:
- Without tcnative all works correctly
- With tcnative there is a problem some of the time


As appeared with tcnative a problem was constantly.
- Chuck has explained  SSL configuration is different with APR  
(tcnative-1.dll). 

I have adjusted and now all works, for exception of one
Now I cannot obtain the data of the certificate of the client in Servlet
X509Certificate [] cr = (X509Certificate[])  
request.getAttribute(javax.servlet.request.X509Certificate);

always returns null
Since the given attribute does not exist any more in request
I do not know as to me now to obtain the data on connection :(

To me who is necessary to know has incorporated at present, and here it is  
not enough IP address, the data of the certificate are necessary for me.  
Without tcnative I could obtain these data


Best regards,
Sergey Kowtoon

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



About connections

2006-10-23 Thread Juanjo Cuadrado

Hi
   I'm trying to deploy an app and it needs to use the Oracle's drivers (
classes12.jar).

   When I try to recover a connection, I use the Tomcat's pool connections,
that it work fine too if
   I previously have put the Oracle's jar into 'common' directory. If by
some razon, I didn't recover
   a connection through the pool, the application would try to recover a
direct connection (Class.forname)

   Is in this point when I don't achieve that the app recover a connection.
I have put the jar (classes12)
   into lib directory of application, but it don't work fine for me and it
give me a error message it don't
   find the Oracle's class driver .

   Any idea?

   Sorry for me English.


Re: tcnative-1.dll version 1.1.6 getaddrinfo error

2006-10-23 Thread Mladen Turk

Ron Wheeler wrote:
The download of version 1.1.6 of the windows binary of tcnative-1.dll 
from http://tomcat.heanet.ie/native/ appears to have been built with a 
set of libraries that only work on Windows XP.
In Windows 2000, you get a message that an entry point for getaddrinfo 
can not be found when Tomcat tries to start. Replacing the 1.1.6 version 
with 1.1.4 gets Tomcat working again.




1.1.6 binary was build with IPV6 support, so
you will need IPV6 Support for Win 2000
See how to install:
http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/faq.asp

Of course, you can build an binary by yourself without IPV6.

Regards,
Mladen.

-
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: static content

2006-10-23 Thread Martin Gainty
you can't skip SSL if your browser is speaking it?
How does your browser speak SSL?
M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: Christopher Schultz [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, October 20, 2006 11:24 AM
Subject: Re: static content



Re: read file inside WEB-INF

2006-10-23 Thread Dies Koper

 But if he's using something like Axis, then there is no ServletContext
 around to use IIRC.

Actually, there is. You can get it with 
javax.xml.rpc.server.ServletEndpointContext#getServletContext().


Regards,
Dies


Christopher Schultz wrote:

Tomas,


2) Then the code will be independent of the servlet API

InputStream in =
my_class_name.class.getResourceAsStream(/my_configuration);


Not a bad idea. The use of the term web service init made me think of
a webapp initializer, in which case, he's already tied to the servlet API.

But if he's using something like Axis, then there is no ServletContext
around to use IIRC.

-chris




-
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: Apache Tomcat Connector

2006-10-23 Thread Michael Courcy

Can you send a complete request
ie http://x.com/page.jsp
that return 400 code.

Matthew Dickinson a écrit :

Hi,

I'm running into an issue of a new install of Tomcat and the Connector to
integrate with an existing apache site.

RHEL4
httpd-2.0.55-2
tomcat5-5.5.17-6jpp_2rh
Mod_jk-1.2.19 built from source

The error that I'm seeing is I get a 400 status code for any page I'm trying
to serve - looking at the mod_jk.log file, I see a no host matches server
name server.domain.fqdn. I've tried many things to try and resolve this,
but am unable to. Do anyone have any info please?

Please find attached the mod_jk.log extract

Thanks,

Matthew

___
Httpd.conf extract

LoadModule jk_module modules/mod_jk.so
JkWorkersFile /etc/httpd/conf/worker.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /*.jsp worker1
_

/etc/httpd/conf/worker.properties

# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
#worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

___
  



map_uri_to_worker::jk_uri_worker_map.c (513): Attempting to map URI 
'/~dickinsonmg/test.jsp' from 1 maps
map_uri_to_worker::jk_uri_worker_map.c (525): Attempting to map context URI 
'/*.jsp'
map_uri_to_worker::jk_uri_worker_map.c (539): Found a wildchar match worker1 - 
/*.jsp
jk_handler::mod_jk.c (1920): Into handler jakarta-servlet worker=worker1 
r-proxyreq=0
wc_get_worker_for_name::jk_worker.c (111): found a worker worker1
wc_maintain::jk_worker.c (318): Maintaining worker worker1
wc_get_name_for_type::jk_worker.c (287): Found worker type 'ajp13'
init_ws_service::mod_jk.c (568): Service protocol=HTTP/1.1 method=GET 
host=dhcp.server.fqdn addr=128.xxx.xxx.xx name=babbage.server.fqdn port=
80 auth=(null) user=(null) laddr=128.xxx.xxx.xxx raddr=128.xxx.xxx.xxx
ajp_get_endpoint::jk_ajp_common.c (2251): acquired connection pool slot=0
ajp_marshal_into_msgb::jk_ajp_common.c (547): ajp marshaling done
ajp_service::jk_ajp_common.c (1734): processing worker1 with 2 retries
jk_open_socket::jk_connect.c (334): socket TCP_NODELAY set to On
jk_open_socket::jk_connect.c (347): socket SO_KEEPALIVE set to On
jk_open_socket::jk_connect.c (397): timeout 300 set for socket=16
jk_open_socket::jk_connect.c (432): trying to connect socket 16 to 
127.0.0.1:8009
jk_open_socket::jk_connect.c (458): socket 16 connected to 127.0.0.1:8009
ajp_connect_to_endpoint::jk_ajp_common.c (846): Connected socket 16 to 
(127.0.0.1:8009)
ajp_connection_tcp_send_message::jk_ajp_common.c (892): sending to ajp13 pos=4 
len=507 max=8192
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 12 34 01 F7 02 
02 00 08 48 54 54 50 2F 31 2E 31  - .4..HTTP/1.1
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 001000 00 16 2F 7E 
64 69 63 6B 69 6E 73 6F 6E 6D 67  - .../~dickinsonmg
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00202F 74 65 73 74 
2E 6A 73 70 00 00 0E 31 32   - /test.jsp...
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 0030 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00  - x
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 0040 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00  - xxx
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 0050 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00  - babba
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 006000 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00  - ge.server.fqdn
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 007000 00 00 00 50 
00 00 0A A0 0B 00 17 62 61 62 62  - P...babb
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 008061 67 65 2E 63 
73 2E 6D 69 73 73 6F 75 72 69 2E  - age.cs.missouri.
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 009065 64 75 00 A0 
0E 00 6E 4D 6F 7A 69 6C 6C 61 2F  - edunMozilla/
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00a035 2E 30 20 28 
57 69 6E 64 6F 77 73 3B 20 55 3B  - 5.0.(Windows;.U;
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00b020 57 69 6E 64 
6F 77 73 20 4E 54 20 35 2E 31 3B  - .Windows.NT.5.1;
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00c020 65 6E 2D 55 
53 3B 20 72 76 3A 31 2E 38 2E 30  - .en-US;.rv:1.8.0
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00d02E 35 29 20 47 
65 63 6B 6F 2F 32 30 30 36 30 37  - .5).Gecko/200607
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00e032 31 20 4D 75 
6C 74 69 5A 69 6C 6C 61 2F 31 2E  - 21.MultiZilla/1.

Re: Eliminating the need for a trailing slash in accessing sub-directoryresourceson a Tomcat HTTP server

2006-10-23 Thread Martin Gainty
If I interpret this correctly 
you're saying if I go to https://www.whateveryoursiteis.com OR
  http://www.whateveryoursiteis.com:443
IE 6 browser intentionally (with no 301/302 HTTP events being sent from web 
server) 
redirects to port 80?

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
conte
- Original Message - 
From: Len Popp [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, October 21, 2006 12:21 PM
Subject: Re: Eliminating the need for a trailing slash in accessing 
sub-directoryresourceson a Tomcat HTTP server


 Note that this problem only happens with port 443. With any other
 port, IE6 correctly redirects on the same port. Port 443 is usually
 used for HTTPS - for some reason IE6 thinks it should redirect to port
 80 in this special case. So, if you're able to use a port other than
 443 the missing-/ URLs will be handled correctly.
 -- 
 Len Popp
 [EMAIL PROTECTED]
 http://www.lmp.dyndns.org/
 
 On 10/21/06, Ramez Ghazzaoui [EMAIL PROTECTED] wrote:
 So the problem's origin is my unusual port assignment.
 Thank you Chuck. Case closed :-)
 -Ramez

 Caldarale, Charles R wrote:
  From: Ramez Ghazzaoui [mailto:[EMAIL PROTECTED]
  Subject: Re: Eliminating the need for a trailing slash in
  accessing sub-directoryresourceson a Tomcat HTTP server
 
  I was definitely not experiencing a 302 or automatic
  refresh/resubmit.
 
 
  Actually, you are, regardless of browser.  Crank up Ethereal and watch
  the traffic.  The 302 comes back, but without a port number, so IE6
  switches to port 80 to reissue the GET for /mp3/.  Firefox and IE7
  appear to have enough sense to stick with the port the connection is on,
  but IE6 doesn't.
 
   - Chuck
 
 

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


Jmx-console for Tomcat

2006-10-23 Thread Mikolaj Rydzewski

Hi,

I hope you will not find it a spam ;-)

I wrote small application to work with Mbeans, and day after day it
evolved in something bigger. I'd like to present you a web enabled jmx
console. If you know what mbeans and jmx are you can give it a try.
This is alpha version, I'll appreciate your opinions.

http://www.ceti.pl/~miki/komputery/jmx/

--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


Question regarding appBase/docBase and default context.

2006-10-23 Thread Rizalino DeVilleres
Guys, 

 

We would like both appBase and docBase to be the same for the default
Context (is this possible?)

 

*Basically, all the WAR/JSPs/Servlets will all go/served by tomcat from
the public_html folder?*

 

Here is the current setup that worked and resolved the other issue but
it

created issues in serving WAR/JSP pages.

 

$CATALINA_BASE/conf/Engine/Host/ROOT.xml:

 

Context docBase=/path/to/public_html debug=0 swallowOutput=true

/Context

 

$CATALINA_BASE/conf/server.xml:

 

  Host name=Host appBase=/path/to/public_html/servlet

   unpackWARs=true autoDeploy=true

   xmlValidation=false xmlNamespaceAware=false

 

No Context path defined in it.

 

*If I set the appBase to be the same as the docBase, I errors regarding
appBase supposed to be within docBase.*

 

---

 

If we drop a Hello World JSP script in /path/to/public_html/servlet

 

(web server has a URL mapping to pass all request that matches servlet

OR .jsp extensions to Tomcat)

 

http://domain.com/helloworld.jsp -works.

http://domain.com/servlet/helloworld.jsp -doesnt work and generates a

404 error;

 

The requested resource (/servlet/helloworld.jsp) is not available.

 

This works if Tomcat is set as follows but it breaks the other setup

above.

 

server.xml:

Host name=Host appBase=/path/to/public_html

   unpackWARs=true autoDeploy=true

   xmlValidation=false xmlNamespaceAware=false

 

Context path= docBase= debug=0/

 

and remove $CATALINA_BASE/conf/Engine/Host/ROOT.xml

 

 

Thanks,

Rizalino de Villeres



Re: Tomcat Clustering SSH

2006-10-23 Thread Filip Hanik - Dev Lists

http://www.harding.motd.ca/autossh/

Filip

Massimiliano Berruti wrote:

You're perfectly right...the problem is we must do this because this
is a sample application we're developping for our university and they
asked to use ssh tunnel or something else to secure connection in the
cluster... Thanx for help!

2006/9/21, Mikolaj Rydzewski [EMAIL PROTECTED]:

Massimiliano Berruti wrote:
 We'd like to make the communications between cluster's members
 encrypted to prevent sniffing the session's messages.
Why? This would slow down operations. Put cluster's nodes in a separate
network segment.

--
Mikolaj Rydzewski [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: HttpSessionListener with session replication (cluster)

2006-10-23 Thread Filip Hanik - Dev Lists

this would be pretty easy for you to try out and find out.
there is a flag you can set notifySessionListenersOnReplication

Filip

Pascal Bleser wrote:

What happens when a HttpSession times out in a cluster, wrt
HttpSessionListeners ?

Will the HttpSessionListener be notified with a HttpSessionEvent on
_each_ node or only on the node that decides to destroy the session ?

JSR-154 (Servlet 2.4 spec) [1] says:
SRV.10.7 Distributed Containers
In distributed Web containers, HttpSession instances are scoped to the
particular JVM servicing session requests, and the ServletContext
object is scoped to the Web container’s JVM. Distributed containers
are not required to propagate either servlet context events or
HttpSession events to other JVMs. Listener class instances
are scoped to one per deployment descriptor declaration per Java
Virtual Machine.

[1] http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

Hence it is not *required* for a Servlet Container implementation to
propagate HttpSessionEvents to each cluster node on HttpSession timeout.

But what about Tomcat ? ;)
(I know, I could test it myself, which is most probably what I'm going
to do anyway, but if anyone has/had a similar issue, any feedback
would be highly appreciated)


Background: our security framework is keeping computed ACLs in a cache
in the ServletContext of each node, and we only replicate the
credentials as part of the HttpSessions (to reduce the session
replication payload as those ACL lists can be pretty big).
But we have to remove those cached ACLs when the HttpSession times
out, using a HttpSessionListener.
In a Servlet Container cluster, the ACLs would be computed and cached
on each node on the fly, but also have to be flushed out of the cache
on each node (hence, the question about HttpSessionEvents being fired
on each cluster node or not).

Thanks for any information or pointers :)

cheers
  



-
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: Replication warning with tomcat cluster FastAsyncSockerSender

2006-10-23 Thread Filip Hanik - Dev Lists
connection refused, simple the Tomcat instance is unable to open a 
connection to the other instance to send the replication data.
your systems will continue to function, but if you fail over that other 
node might not have your data.
You'll want to find out why it is failing to open a connection, maybe 
the other node is broadcasting the wrong address,
you should see the address and ports in the log as the members join the 
cluster, and you can take it from there.


Filip


Haroon Rafique wrote:

Hi all,

In a tomcat cluster deployed in production, I'm seeing the following 
in catalina.out:


2006-09-21 14:31:29,778 WARN  FastAsyncSocketSender   - Unable 
to asynchronously send session with 
id=[A1C6AD293C423C51568CCF24EFBD6064-1158863489776] - message will be 
ignored.

java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.init(Socket.java:365)
at java.net.Socket.init(Socket.java:207)
at 
org.apache.catalina.cluster.tcp.DataSender.createSocket(DataSender.java:704) 

at 
org.apache.catalina.cluster.tcp.DataSender.openSocket(DataSender.java:679) 

at 
org.apache.catalina.cluster.tcp.DataSender.pushMessage(DataSender.java:803) 

at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.pushQueuedMessages(FastAsyncSocketSender.java:476) 

at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.run(FastAsyncSocketSender.java:442) 




I'm getting these at quite an alarming pace at the moment. AFAIK, 
service is not affected since we ourselves are albe to use the 
application satisfactorily, and have not had reports of wide-spread 
failures.


This is on Redhat AS3 linux machines with tomcat 5.5.17 with java 
1.5.0_06. Following is my cluster configuration (abbreviated):


Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 
managerClassName=org.apache.catalina.cluster.session.DeltaManager

 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership

className=org.apache.catalina.cluster.mcast.McastService

mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=1000
mcastDropTime=3/

Receiver

className=org.apache.catalina.cluster.tcp.ReplicationListener

tcpListenAddress=auto
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6
compress=false/

Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter

replicationMode=fastasyncqueue
compress=false
doProcessingStats=true
queueTimeWait=true
waitForAck=false
autoConnect=false
keepAliveTimeout=36
keepAliveMaxRequestCount=-1/
[..cut for brevity..]

What should I be looking at changing? Any ideas?

Thanks in advance,
--
Haroon Rafique
[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: WAR file strangeness

2006-10-23 Thread Caldarale, Charles R
 From: syg6 [mailto:[EMAIL PROTECTED] 
 Subject: WAR file strangeness
 
  Host name=localhost appBase=/var/local/projects/vcs ...
 Context path= docBase=/var/local/projects/vcs/vcs.war ...
 
 When I start Tomcat it unpacks the WAR in as
 /var/local/projects/vcs/ROOT/WEB-INF
 
 Any idea why this is happening?

Because it's supposed to.  You've declated the context to be the default
app (path=), and the default app uses the ROOT directory.

 I know I shouldn't be putting this stuff in
 server.xml but rather in seperate context.xml
 files, but I inherited the config this way and
 my client seems to fear change ...

Educate your client about the desirability of not having to restart
Tomcat when you change the app.

 - Chuck


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

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



RE: About connections

2006-10-23 Thread Caldarale, Charles R
 From: Juanjo Cuadrado [mailto:[EMAIL PROTECTED] 
 Subject: About connections
 
 When I try to recover a connection, I use the Tomcat's 
 pool connections, that it work fine too if I previously
 have put the Oracle's jar into 'common' directory.

 I have put the jar (classes12) into lib directory of
 application

You can't do both.  If you're using DBCP, the jar must go in common/lib
- and only in common/lib.  If you're not using Tomcat's connection
pooling, the jar may go in common/lib, shared/lib, or WEB-INF/lib of
each application - but it must not appear in more than one layer of the
classloading hiearchy:

  Bootstrap
  |
   System
  |
   Common
  /  \
 Catalina   Shared
 /   \
Webapp1  Webapp2 ... 

Its presence in multiple layers will cause the kinds of errors you're
seeing.

 - Chuck


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

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



RE: Eliminating the need for a trailing slash in accessing sub-directoryresourceson a Tomcat HTTP server

2006-10-23 Thread Caldarale, Charles R
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Subject: Re: Eliminating the need for a trailing slash in 
 accessing sub-directoryresourceson a Tomcat HTTP server
 
 If I interpret this correctly 
 you're saying if I go to https://www.whateveryoursiteis.com OR
   
 http://www.whateveryoursiteis.com:443
 IE 6 browser intentionally (with no 301/302 HTTP events being 
 sent from web server) redirects to port 80?

Of course not - browsers don't redirect on their own.  Read the messages
in the thread.  The 302 is being sent by the server in all cases, and
it's only in the port 443 case that IE6 erroneously chooses to use port
80 on the redirect.  All other browsers appear to operate correctly.

 - Chuck


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

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



JSessionID Confusion

2006-10-23 Thread Ryan O'Hara
Is there anyway to create JSessionIDs per window rather than per  
browser?  I am having the problem of when you open multiple tabs  
within a browser, and enter two simultaneous queries, the results  
returned are corrupted.  Any suggestions?  Thanks for the help.


-Ryan

-
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: JSessionID Confusion

2006-10-23 Thread Caldarale, Charles R
 From: Ryan O'Hara [mailto:[EMAIL PROTECTED] 
 Subject: JSessionID Confusion
 
 I am having the problem of when you open multiple tabs  
 within a browser, and enter two simultaneous queries,
 the results returned are corrupted.

Sounds like an application bug - keeping values/references in the
session when they actually pertain to the request.

 - Chuck


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

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



Dynamically Add Vhosts?

2006-10-23 Thread Cyber Dog

Hello,
 I'm trying to set up Tomcat 5.5 so that a single instance/machine
can run several unrelated vhosts.  I'm trying to make the
implementation as dynamic as possible; ie requiring as few
restarts/reloads and core config changes as I can get away with.  I'm
having trouble determining a good implementation from the docs.  These
are a couple of the things I'm hoping to accomplish, but I don't know
if they're possible:

- Dynamically load a vhost config:  I know Tomcat monitors certain
directories and .xml files for changes and reloads them.  Is it
possible to do this with Host directives?  So say I need to add a new
vhost, can I drop new.vhost.name.xml in a directory and have Tomcat
load the new Host?

- Include external xml files:  In apache you can do a simple include
conf.d/* so you can simply create new config files and pull them in
instantly on reload.  Is there a way to do this with Tomcat?  Say I
create a new Host entry.  Rather than editing server.xml, can I tell
server.xml to include a directory and just pull Host entries out of
files there?

Thanks!

-
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: Dynamically Add Vhosts?

2006-10-23 Thread Caldarale, Charles R
 From: Cyber Dog [mailto:[EMAIL PROTECTED] 
 Subject: Dynamically Add Vhosts?
 
 - Dynamically load a vhost config:

The admin app can create hosts on the fly, but it does so
programmatically, not by reading up some .xml file.  Perhaps you could
modify it for your purposes.

 - Chuck


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

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



Re: Jmx-console for Tomcat

2006-10-23 Thread Dan Baumann

On 23.10.2006, at 10:07, Mikolaj Rydzewski wrote:

Hi,

I hope you will not find it a spam ;-)

I wrote small application to work with Mbeans, and day after day it
evolved in something bigger. I'd like to present you a web enabled jmx
console. If you know what mbeans and jmx are you can give it a try.
This is alpha version, I'll appreciate your opinions.

http://www.ceti.pl/~miki/komputery/jmx/


Interesting. How does your webapp compare to MX4J's http adapter  
(mx4j.sf.net)?


Best regards
Dan




-
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: Eliminating the need for a trailing slash in accessing sub-directoryresourceson a Tomcat HTTP server

2006-10-23 Thread Ramez Ghazzaoui

No, Martin. I believe this is not exactly true.

- There is no https involved in this discussion. We're talking http on 
port 443.


- This case involves having a directory name at the end of the path, and 
excluding the trailing slash which results in a 302 from the server.


- This problem appears to happen in IE6 only in response to a 302 from 
the server --- presumably because IE6 gets confused when we use port 443 
with http.


Putting it all together, per Charles Caldarale's and Len Popp's messages:

If I omit the trailing slash after a directory name, the server sends a 
302 request back to the browser regardless of what browser I use. 
However, when IE6 receives a 302 request to resubmit to 
http://www.sitename.com:443/dirname/ in place of 
http://www.whateveryoursiteis.com:443/dirname, it resubmits to 
http://www.whateveryoursiteis.com/dirname/ without the port number.


-Ramez

Martin Gainty wrote:
If I interpret this correctly 
you're saying if I go to https://www.whateveryoursiteis.com OR

  http://www.whateveryoursiteis.com:443
IE 6 browser intentionally (with no 301/302 HTTP events being sent from web 
server) redirects to port 80?

M-

- Original Message - 
From: Len Popp [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, October 21, 2006 12:21 PM
Subject: Re: Eliminating the need for a trailing slash in accessing 
sub-directoryresourceson a Tomcat HTTP server


  

Note that this problem only happens with port 443. With any other
port, IE6 correctly redirects on the same port. Port 443 is usually
used for HTTPS - for some reason IE6 thinks it should redirect to port
80 in this special case. So, if you're able to use a port other than
443 the missing-/ URLs will be handled correctly.
--
Len Popp
[EMAIL PROTECTED]
http://www.lmp.dyndns.org/

On 10/21/06, Ramez Ghazzaoui [EMAIL PROTECTED] wrote:


So the problem's origin is my unusual port assignment.
Thank you Chuck. Case closed :-)
-Ramez

Caldarale, Charles R wrote:
  

From: Ramez Ghazzaoui [mailto:[EMAIL PROTECTED]
Subject: Re: Eliminating the need for a trailing slash in
accessing sub-directoryresourceson a Tomcat HTTP server

I was definitely not experiencing a 302 or automatic
refresh/resubmit.

  

Actually, you are, regardless of browser.  Crank up Ethereal and watch
the traffic.  The 302 comes back, but without a port number, so IE6
switches to port 80 to reissue the GET for /mp3/.  Firefox and IE7
appear to have enough sense to stick with the port the connection is on,
but IE6 doesn't.

 - Chuck





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



Help for Apache-Tomcat - JSP error

2006-10-23 Thread Tom Dog
I am new for Tomcat. I installed jdk1.5.0_09 and Tomcat5.5.20 on Windows 
2003 Server. I would like to connect Tomcat to database. I was able to see 
the log in page. However, I got a blank page and when I tried logon. please 
see the error below from the log.


Any help would be greatly appreciated!


org.apache.catalina.authenticator.FormAuthenticator forwardToErrorPage

WARNING: Unexpected error forwarding to error page

org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:

The type Collection is not generic; it cannot be parameterized with 
arguments ? extends E


at 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrappe 
r.java:512)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil 
terChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain 
.java:173)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.jav 
a:672)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispat 
cher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher. 
java:398)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.ja 
va:301)
at 
org.apache.catalina.authenticator.FormAuthenticator.forwardToErrorPage(FormAuth 
enticator.java:336)
at 
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthentica 
tor.java:259)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.ja 
va:416)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 
7)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833 
)
at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http 
11AprProtocol.java:639)

at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
at java.lang.Thread.run(Thread.java:595)

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.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]



Re: JSessionID Confusion

2006-10-23 Thread David Smith
Short answer: no.  Tomcat doesn't have any knowlege of how many windows 
client-side are sharing the same session cookie.  As long as the same 
session cookie is returned, tomcat see's just one client.


The issue can be mitigated by storing state information in the request 
via hidden form fields or GET params on the page links.


--David

Ryan O'Hara wrote:

Is there anyway to create JSessionIDs per window rather than per  
browser?  I am having the problem of when you open multiple tabs  
within a browser, and enter two simultaneous queries, the results  
returned are corrupted.  Any suggestions?  Thanks for the help.


-Ryan

-
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: static content

2006-10-23 Thread Christopher Schultz
Martin,

I'll go ahead and turn off GPG message signing so you can read this one,
Martin. It appears that you see many of my messages as blank, probably
due to odd handling of mime types by your mail client.

 you can't skip SSL if your browser is speaking it? How does your
 browser speak SSL?

When you use HTTPS, your browser makes an SSL connection to the
appropriate port (usually 443). If the server is not expecting an SSL
connection, communication is impossible.

There is no way to downgrade a connection from SSL to non-SSL. I'm
sorry if I used the term speak somewhat colloquially: what I really
meant was that your browser is tunneling HTTP through one of the flavors
of SSL that are available to both the browser and the server.

If the browser initiates a connection using SSL, the server must either
successfully establish an encrypted connection or establish no
connection at all.

So, if this guy wants to skip the use of HTTPS for his static content
(most likely things such as images, javscript libraries, etc.), he needs
to convince the browser to make a non-SSL connection in the first place.

-chris


-
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: Help for Apache-Tomcat - JSP error

2006-10-23 Thread Martin Gainty
please display the jsp 

Martin--
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: Tom Dog [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, October 23, 2006 3:52 PM
Subject: Help for Apache-Tomcat - JSP error


I am new for Tomcat. I installed jdk1.5.0_09 and Tomcat5.5.20 on Windows 
 2003 Server. I would like to connect Tomcat to database. I was able to see 
 the log in page. However, I got a blank page and when I tried logon. please 
 see the error below from the log.
 
 Any help would be greatly appreciated!
 
 
 org.apache.catalina.authenticator.FormAuthenticator forwardToErrorPage
 
 WARNING: Unexpected error forwarding to error page
 
 org.apache.jasper.JasperException: Unable to compile class for JSP
 
 Generated servlet error:
 
 The type Collection is not generic; it cannot be parameterized with 
 arguments ? extends E
 
 at 
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrappe
  
 r.java:512)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
  
 terChain.java:252)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
  
 .java:173)
 at 
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.jav
  
 a:672)
 at 
 org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispat
  
 cher.java:463)
 at 
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.
  
 java:398)
 at 
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.ja
  
 va:301)
 at 
 org.apache.catalina.authenticator.FormAuthenticator.forwardToErrorPage(FormAuth
  
 enticator.java:336)
 at 
 org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthentica
  
 tor.java:259)
 at 
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.ja
  
 va:416)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10
  
 7)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at 
 org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833
  
 )
 at 
 org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http
  
 11AprProtocol.java:639)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
 at java.lang.Thread.run(Thread.java:595)
 
 _
 Don't just search. Find. Check out the new MSN Search! 
 http://search.msn.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]
 


serving static html with Tomcat

2006-10-23 Thread EDMOND KEMOKAI

Hi guys
I am a newbee so bear with me. I have tomcat deployed on a ubuntu machine,
everything works fine except: My app generates static html pages from jsp
and writes the html files to a sub-dir of my context path, however when I
click on the link for the file, I get a 404 error. When I restart the
application after adding the file, everthing works fine, but obviously I
can't redepoly the app everytime a new html is added. I have verified that
the links are correct, Any ideas?

--

talk trash and carry a small stick.
PAUL KRUGMAN (NYT)


Re: serving static html with Tomcat

2006-10-23 Thread Christopher Schultz
Edmond,

 My app generates static html pages from jsp and writes the html files
 to a sub-dir of my context path

Ugh... you are using JSP as a content-generation system? Why!?

 however when I click on the link for the file, I get a 404 error.

Can you give us an example of what the URL of the link is? Or are you
just trying to have Tomcat serve a static HTML document that you had
previously created?

Where (specifically) are you storing these generated HTML documents?

 When I restart the application after adding the file, everthing works
 fine, but obviously I can't redepoly the app everytime a new html is
 added. I have verified that the links are correct, Any ideas?

Can anyone comment on Tomcat's caching of path lookups on the disk? That
would seem to be a tremendous waste of memory if Tomcat actually
remembered that a file didn't exist (not to mention a pain in the neck
if you wanted to add files on the fly like this guy). Can someone
confirm that Tomcat does nothing of the sort? That's the only reason I
could think of for why he can't access his files.

-chris




signature.asc
Description: OpenPGP digital signature


RE: Using tomcat with commons-digester in commons/lib won't work

2006-10-23 Thread Allen,Eva
The short story is this worked, thanks very much for the pointer.  When
I read this I said Duh! I knew that.  I ran into further problems with
attempting to put the jar files in the lib directory, but it turns out
that was the monitoring software that we run things through didn't have
CATALINA_BASE defined.  The catalina.sh comments say that this variable
is optional and defaults to $CATALINA_HOME, but as soon as I defined it,
I stopped having problems loading the jar files I needed.

Again, thanks!

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 20, 2006 7:00 PM
To: Tomcat Users List
Subject: Re: Using tomcat with commons-digester in commons/lib won't
work

Allen,Eva wrote:
 What gives?  It looks like the version of commons-digester.jar that 
 comes with tomcat 4.1.24 isn't even compatible with it, but that can't

 be right?  I suppose the bigger question, though, is how can I get 
 Jakarta digester and tomcat 4 to play nice with each other?

Almost certainly failed because of other jars digester depends on that
you didn't move.

You should be able to leave the Tomcat jars alone and place copies of
all the jars you need in the lib directory of your webapp. There have
been some class loading issues that the latest Tomcat 4 release
(4.1.34) should have resolved.

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]


-
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: serving static html with Tomcat

2006-10-23 Thread EDMOND KEMOKAI

Hi Christopher

  My directory structure is as follows:
   context_path/customer/public

  I make a call to my jsp via something to the effect:
  URL url = URL(jsp);
  write the stream i receive to
context_path/customer/public/customer_id/index.html

   The servlet function from within which the above processing is done
should return a preview of the page to the user via
   return (new ActionForward(/customer/public/cutomer_id/index.html)); I
am using struts by the way.
   the returned actionforward results in 404 error.

   The html is also available on the main site for searching, when i click
a link that results from the search I get the same 404 error.

   When i redeploy the app I can search and the 404 error doesn't happen
when I click a result link.

   It is as if tomcat catalogs all subfolders in your context path upon
deployment and doesn't bother actually checking the disk for files???


On 10/23/06, Christopher Schultz [EMAIL PROTECTED] wrote:


Edmond,

 My app generates static html pages from jsp and writes the html files
 to a sub-dir of my context path

Ugh... you are using JSP as a content-generation system? Why!?

 however when I click on the link for the file, I get a 404 error.

Can you give us an example of what the URL of the link is? Or are you
just trying to have Tomcat serve a static HTML document that you had
previously created?

Where (specifically) are you storing these generated HTML documents?

 When I restart the application after adding the file, everthing works
 fine, but obviously I can't redepoly the app everytime a new html is
 added. I have verified that the links are correct, Any ideas?

Can anyone comment on Tomcat's caching of path lookups on the disk? That
would seem to be a tremendous waste of memory if Tomcat actually
remembered that a file didn't exist (not to mention a pain in the neck
if you wanted to add files on the fly like this guy). Can someone
confirm that Tomcat does nothing of the sort? That's the only reason I
could think of for why he can't access his files.

-chris








--

talk trash and carry a small stick.
PAUL KRUGMAN (NYT)


RE: a discrepancy in webapp behavior in two environments

2006-10-23 Thread Aronszajn, Mark
Alright, now I'm really baffled. Below, I've copied my original post
about the discrepancy that's been puzzling me. Please consult that for a
description of the web app and the TEST environment.

My web app had been working just fine in the TEST environment, PROVIDED
I included the initial session ID as a param to the URL used on the
cancel/switch-to-batch form. But starting just this morning, it was
failing again, DESPITE my using the session ID as a param to the URL on
the cancel form. It appeared that a DIFFERENT session with different
session ID was getting created when I hit cancel.

[After a request is received from the cancel form, my servlet uses
getSession(false) to get the session, so if there were no valid session
I should get null, but I don't get null..., so there must be a valid
session retrieved, yet with a different session ID!]

I don't understand how this could have been happening.

MOREOVER, cancelling my web-app in the TEST environment works fine when
IE7 is used as browser on the client side; it's only w. Firefox that I'm
getting this puzzling HttpSession object behavior. Yet both firefox and
IE7 have their cookies option set to allow-all.

The thing was working just yesterday and for days prior to that!

One thing I did this morning involving Firefox is that I ran

   firefox.exe -silent -nosplash -setDefaultBrowser 

on the Windows run command line, to have Firefox set itself back as
default browser (because when I downloaded IE7 over the weekend, it made
itself the default browser, g...).

But I'm not suggesting there's any reason to think that action was
relevant... I just don't know...

And now to add one extra piece of bizarreness to this whole thing: I
followed Jon Wingfield's suggestion of installing LiveHTTPHeaders to
Firefox, to watch what was being sent from the browser, and when I
restarted Firefox and attempted to reproduce the problem, it was working
again! I was able to cancel and switch-to-batch just as before...

Jon, I don't think you meant to suggest that the install of
LiveHTTPHeaders would fix my problem in and of itself! :)

But more seriously, since I have no idea what caused the brief
recurrence of my problem (DESPITE including session ID as param to URL)
I don't have a lot of confidence this strange HttpSession behavior won't
recur...

Does anyone have any further ideas? I'd really appreciate any help.

Mark

copy of description from first post
I have a servlet-based web app that behaves differently with its
handling of HttpSession objects in two different environments. Here are
the two environments:

DEVELOPMENT
---
Firefox client on a linux box pointing at an instance of tomcat 5.5.17
(JVM from 1.5.0_07-b03) running on the same box (run from within my IDE,
IntelliJ IDEA, for debugging).

TEST

Firefox client on Windows XP pointing at an instance of tomcat (same
version; JVM from 1.5.0_06-b05, mixed mode) running on a Sun machine
(Solaris 9).

There's a discrepancy in the webapp behavior in these two environments
that I'd like to understand better, but first before describing the
discrepancy let me describe the web app a bit...

There is a main servlet that generates refreshes till a search is
completed. The search is invoked on a separate thread with the very
first request. When the search is complete, the response page displays
all the search results. Until the search is complete, the page presented
in the browser with each refresh just shows whatever data has been
acquired so far by the search. Also with each refresh page, the user is
presented with a form that allows one to cancel the search or to switch
the search to batch-mode. When either cancel or switch-to-batch are
clicked on this form, the same servlet as the initial request is used.
Until recently, I had simply put the URL of the servlet in quotes as
value of the action element of the form. And all went well on both
DEVELOPMENT and TEST environments. But at some point recently (a month,
two months... unfortunately I can't pin it down at all), a discrepency
appeared between the two environments:

It started to happen in the TEST environment--not in the DEVELOPMENT
environment--that when I select either cancel or switch-to-batch, the
original HttpSession object would be lost (and several attributes of
that session object are necessary for proper cancelling or switching to
batch-mode). If the request comes from a refresh, however, and the user
hasn't selected cancel or switch-to-batch, the original HttpSession
object is retained and its attributes persist (I know because otherwise
the app wouldn't complete its search successfully, which it does).

I've gotten around this issue by running code in both environments that
attaches a jsessionid param value to the URL for the cancel or switch
form on the refresh pages, using the sessionId obtained from the initial
HttpSession object. With that addition, the cancel and switch form works
because the original HttpSession object is retained. 


Re: Jmx-console for Tomcat

2006-10-23 Thread Mikolaj Rydzewski

Dan Baumann wrote:
Interesting. How does your webapp compare to MX4J's http adapter 
(mx4j.sf.net)?

Hi,

I didn't try hard, but I was unable to run mx4j and its http adapter. So 
it's hard to compare with it.


http://mx4j.sourceforge.net/docs/ch05.html
It seems that this adapter runs its own, very simple, http server. One 
has to write a code to start it. Am I right?


So comparing to above, my app is much easier to run. Just deploy war 
file. It is 'just' a presentation (struts/jsp) layer over plain 
javax.management API. But sure, I could consider using mx4j to enhance it.


Regards

--
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
   PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.



smime.p7s
Description: S/MIME Cryptographic Signature


Re: serving static html with Tomcat

2006-10-23 Thread Mikolaj Rydzewski

EDMOND KEMOKAI wrote:

  I make a call to my jsp via something to the effect:
  URL url = URL(jsp);
  write the stream i receive to
context_path/customer/public/customer_id/index.html

   The servlet function from within which the above processing is done
should return a preview of the page to the user via
   return (new ActionForward(/customer/public/cutomer_id/index.html)); I
am using struts by the way.
   the returned actionforward results in 404 error.

It's crazy. You should redesign your application.

--
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
   PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.



smime.p7s
Description: S/MIME Cryptographic Signature


Re: serving static html with Tomcat

2006-10-23 Thread EDMOND KEMOKAI

what's crazy about it??, the site I am creating will contain user generated
content, however the content isn't going to be changing frequently so i
didn't want to have jsp's hold objects in memory for pages that aren't
chnaging too often. I have the user publish their info whenever they make
changes to it.

On 10/23/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote:


EDMOND KEMOKAI wrote:
   I make a call to my jsp via something to the effect:
   URL url = URL(jsp);
   write the stream i receive to
 context_path/customer/public/customer_id/index.html

The servlet function from within which the above processing is done
 should return a preview of the page to the user via
return (new ActionForward(/customer/public/cutomer_id/index.html));
I
 am using struts by the way.
the returned actionforward results in 404 error.
It's crazy. You should redesign your application.

--
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.







--

talk trash and carry a small stick.
PAUL KRUGMAN (NYT)


Re: serving static html with Tomcat

2006-10-23 Thread Mikolaj Rydzewski

EDMOND KEMOKAI wrote:
what's crazy about it??, the site I am creating will contain user 
generated

content, however the content isn't going to be changing frequently so i
didn't want to have jsp's hold objects in memory for pages that aren't
chnaging too often. I have the user publish their info whenever they make
changes to it.

I'd use a database to store user submitted data.
Or I'd use a separate directory to write files in. Separate - I mean 
outside tomcat's webapps directory.


In my projects I deploy webapps only as war files and I never write 
anything within app's directory.


--
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
   PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.



smime.p7s
Description: S/MIME Cryptographic Signature


RE: trying to change the context path in context.xml

2006-10-23 Thread Caldarale, Charles R
 From: Jason Novotny [mailto:[EMAIL PROTECTED] 
 Subject: trying to change the context path in context.xml
 
 I've configured  context.xml in my webapp 
 META-INF/context.xml and I want to change
 the path attribute, so that instead of the 
 context being identified by my web application
 name it is user configurable in the 
 context.xml. Is this possible?

It goes against the grain of the current Tomcat deployment philosophy.
All you have to do is change the name of the directory or .war file the
app is in; why do you want to make it more complicated?

 - Chuck


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

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



Re: serving static html with Tomcat

2006-10-23 Thread EDMOND KEMOKAI

I'll probably end doing that, I understand apache is better for serving
static content. However the problem isn't where user data is stored, my user
data is stored in a database. Basically my app is similar to a dating
site(it is not  a dating site) where a user's profile doesn't chnage
regularly so there is no reason to use jsp for accessing such a page,
secondly, I am using lucene which can't search jsp directly. I'll eventually
install apache and use it to access html.


On 10/23/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote:


EDMOND KEMOKAI wrote:
 what's crazy about it??, the site I am creating will contain user
 generated
 content, however the content isn't going to be changing frequently so i
 didn't want to have jsp's hold objects in memory for pages that aren't
 chnaging too often. I have the user publish their info whenever they
make
 changes to it.
I'd use a database to store user submitted data.
Or I'd use a separate directory to write files in. Separate - I mean
outside tomcat's webapps directory.

In my projects I deploy webapps only as war files and I never write
anything within app's directory.

--
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.







--

talk trash and carry a small stick.
PAUL KRUGMAN (NYT)


Re: trying to change the context path in context.xml

2006-10-23 Thread Jason Novotny


Thanks Chuck,

   It might be nice to have some info about the Tomcat deployment 
philosophy on the page 
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


since it wasn't clear how the context attribute is useful now based on 
what you say.


   Cheers, Jason

Caldarale, Charles R wrote:
From: Jason Novotny [mailto:[EMAIL PROTECTED] 
Subject: trying to change the context path in context.xml


I've configured  context.xml in my webapp 
META-INF/context.xml and I want to change
the path attribute, so that instead of the 
context being identified by my web application
name it is user configurable in the 
context.xml. Is this possible?



It goes against the grain of the current Tomcat deployment philosophy.
All you have to do is change the name of the directory or .war file the
app is in; why do you want to make it more complicated?

 - Chuck


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

-
To 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: serving static html with Tomcat

2006-10-23 Thread Mikolaj Rydzewski

EDMOND KEMOKAI wrote:

I'll probably end doing that, I understand apache is better for serving
static content. However the problem isn't where user data is stored, 
my user

data is stored in a database. Basically my app is similar to a dating
site(it is not  a dating site) where a user's profile doesn't chnage
regularly so there is no reason to use jsp for accessing such a page,
secondly, I am using lucene which can't search jsp directly. I'll 
eventually

install apache and use it to access html.
Why do you insist on generating static content? Write one generic 
'profile.jsp', fetch user's data from a database (you already has one) 
and that's it. Have you measured that accessing db _really_ slows down 
your system? If not, so don't waste your time with unneeded optimisations.


Speaking about Lucene: it's a waste of its power to index html files 
generated from a database. Index text data you insert into database, not 
the generated files.


--
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
   PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.



smime.p7s
Description: S/MIME Cryptographic Signature


RE: trying to change the context path in context.xml

2006-10-23 Thread Caldarale, Charles R
 From: Jason Novotny [mailto:[EMAIL PROTECTED] 
 Subject: Re: trying to change the context path in context.xml
 
 
 since it wasn't clear how the context attribute is useful now 
 based on what you say.

The Context element has 24 other attributes besides path; the path
attribute itself is only pertinent when the Context element is in
server.xml, which makes redeployment painful.  Note that for many apps,
no Context element is needed at all - which is a good thing, since
it's Tomcat-specific and therefore makes an app less portable across
containers.

 - Chuck


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

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



Re: serving static html with Tomcat

2006-10-23 Thread Christopher Schultz
Edmond,

Mikolaj has a point... your are using JSP for something it was not
designed to do: generate static content. JSP was designed to generate
/dynamic/ content on the fly.

 what's crazy about it??, the site I am creating will contain user
 generated content, however the content isn't going to be changing
 frequently so i didn't want to have jsp's hold objects in memory for
 pages that aren't chnaging too often.

Since you have used the JSP to generate the content, that memory is
wasted, anyway (unless you restart the application).

 I have the user publish their info whenever they make changes to it.

Regardless of your 404 errors, might I suggest that you use a process
other than JSP to generate these files? Is it possible to have that
content dynamically generated every time from the source of their
info? Or are you attempting to avoid a performance problem in the future?

Some of the more foolish implementations of software have come from
people trying to solve performance problems that do not exist in the
first place.

At any rate, Tomcat /should/ be allowing you to view your files :(

I'm not sure what is wrong.

-chris




signature.asc
Description: OpenPGP digital signature


Re: serving static html with Tomcat

2006-10-23 Thread EDMOND KEMOKAI

I know premature optimization is root of some evil, but I prefer the setup I
have at the moment, I think it will work fine. I beleive I will benefit
performance wise if I don't have to do constant queries against my db, I am
not sure how much performace gain there will be. As far as indexing with
lucene, I am using a RAM index, which is updated whenever the user elects to
republish content, the index is also stored on disk in xml form so that if
the webapp has to be rebooted (which will happen invariably) it will be
parsed and reindex into RAM.

On 10/23/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote:


EDMOND KEMOKAI wrote:
 I'll probably end doing that, I understand apache is better for serving
 static content. However the problem isn't where user data is stored,
 my user
 data is stored in a database. Basically my app is similar to a dating
 site(it is not  a dating site) where a user's profile doesn't chnage
 regularly so there is no reason to use jsp for accessing such a page,
 secondly, I am using lucene which can't search jsp directly. I'll
 eventually
 install apache and use it to access html.
Why do you insist on generating static content? Write one generic
'profile.jsp', fetch user's data from a database (you already has one)
and that's it. Have you measured that accessing db _really_ slows down
your system? If not, so don't waste your time with unneeded optimisations.

Speaking about Lucene: it's a waste of its power to index html files
generated from a database. Index text data you insert into database, not
the generated files.

--
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.







--

talk trash and carry a small stick.
PAUL KRUGMAN (NYT)


Re: serving static html with Tomcat

2006-10-23 Thread Christopher Schultz
Edmond,

 a user's profile doesn't change regularly so there is no reason to
 use jsp for accessing such a page, secondly, I am using lucene which
 can't search jsp directly.

Lucene cannot search HTML pages directly, either. Lucene requires an
index which is separate from everything else. What you ought to do is
update your Lucene index when someone updates their profile.

I would seriously recommend re-working your site so that all content is
dynamic, and comes directly from your database. For Lucene, just make
incremental changes to your index whenever a user changes something.

Trust me: this will make your life a lot easier. You won't have to
decide what to do when previously-generated HTML documents become out of
date for some strange reason, and you have to purge and re-build every
profile page on your site. It's just not worth it.

-chris



signature.asc
Description: OpenPGP digital signature


Re: a discrepancy in webapp behavior in two environments

2006-10-23 Thread Christopher Schultz
Mark,

 My web app had been working just fine in the TEST environment, PROVIDED
 I included the initial session ID as a param to the URL used on the
 cancel/switch-to-batch form. But starting just this morning, it was
 failing again, DESPITE my using the session ID as a param to the URL on
 the cancel form. It appeared that a DIFFERENT session with different
 session ID was getting created when I hit cancel.
 
 [After a request is received from the cancel form, my servlet uses
 getSession(false) to get the session, so if there were no valid session
 I should get null, but I don't get null..., so there must be a valid
 session retrieved, yet with a different session ID!]

Is it possible that you have multiple windows (or tabs) open in your
browser with competing sessions lurking in the URLs (rather than using a
cookie)?

Are you using cookies or URL-rewriting?

It might help to purge Tomcat's stored sessions while you have Tomcat
stopped, in case there are broken sessions in your test environment that
won't go away for whatever reason (maybe a really long session timeout?).

Also, you could write an HttpSessionListener that does something like
this in the sessionCreated method:

System.err.println(Creating a new session. id=
   + se.getSession().getId());
(new Throwable()).printStackTrace();

This will dump the newly created session id and stack trace into stderr,
and so you can see exactly where sessions are being created. It's
possible that you have a getSession(true) somewhere in your code, or
that you have a couple of URLs that are missing URL re-writing code
around them.

 I don't understand how this could have been happening.
 
 MOREOVER, cancelling my web-app in the TEST environment works fine when
 IE7 is used as browser on the client side; it's only w. Firefox that I'm
 getting this puzzling HttpSession object behavior. Yet both firefox and
 IE7 have their cookies option set to allow-all.

Okay, so cookies shouldn't be the problem. Hmm...

 The thing was working just yesterday and for days prior to that!

Are you doing funny things with port numbers? HTTPS-to-HTTP? Or vice
versa? Or is everything happening on port 80?

 And now to add one extra piece of bizarreness to this whole thing: I
 followed Jon Wingfield's suggestion of installing LiveHTTPHeaders to
 Firefox, to watch what was being sent from the browser, and when I
 restarted Firefox and attempted to reproduce the problem, it was working
 again! I was able to cancel and switch-to-batch just as before...

Weird. Are your cookies set to expire at the end of the browser session
or anything like that?

-chris



signature.asc
Description: OpenPGP digital signature


RE: a discrepancy in webapp behavior in two environments

2006-10-23 Thread Aronszajn, Mark
Hi chris,

I think your suggestion about multiple windows was a good guess. It
would account for all the behavior, except that I'm quite sure I wasn't
using a different window. I mean, the web app responds with a page that
refreshes itself after a set, short amount of time, presenting a
progress bar each time, but also presenting a form with
cancel/switch-to-batch-mode buttons. I really don't think I could have
started the app  refreshing in one window and then selected some other
window (from some previous session) to choose cancel. I run the app, and
as soon as I can I click cancel.

Regarding your other suggestions:

No, no HTTPS-to-HTTP stuff; all requests are going to a port dedicated
to Tomcat (8088).

And the Firefox cookies options form is set so that cookies are kept
until they expire which I believe is the default (the other options
being until I close Firefox and ask me every time).

Any further thoughts always appreciated,

-M

 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
 Sent: Monday, October 23, 2006 3:10 PM
 To: Tomcat Users List
 Subject: Re: a discrepancy in webapp behavior in two environments
 
 Mark,
 
  My web app had been working just fine in the TEST environment, 
  PROVIDED I included the initial session ID as a param to 
 the URL used 
  on the cancel/switch-to-batch form. But starting just this 
 morning, it 
  was failing again, DESPITE my using the session ID as a 
 param to the 
  URL on the cancel form. It appeared that a DIFFERENT session with 
  different session ID was getting created when I hit cancel.
  
  [After a request is received from the cancel form, my servlet uses
  getSession(false) to get the session, so if there were no valid 
  session I should get null, but I don't get null..., so 
 there must be a 
  valid session retrieved, yet with a different session ID!]
 
 Is it possible that you have multiple windows (or tabs) open 
 in your browser with competing sessions lurking in the URLs 
 (rather than using a cookie)?
 
 Are you using cookies or URL-rewriting?
 
 It might help to purge Tomcat's stored sessions while you 
 have Tomcat stopped, in case there are broken sessions in 
 your test environment that won't go away for whatever reason 
 (maybe a really long session timeout?).
 
 Also, you could write an HttpSessionListener that does 
 something like this in the sessionCreated method:
 
 System.err.println(Creating a new session. id=
+ se.getSession().getId()); (new 
 Throwable()).printStackTrace();
 
 This will dump the newly created session id and stack trace 
 into stderr, and so you can see exactly where sessions are 
 being created. It's possible that you have a getSession(true) 
 somewhere in your code, or that you have a couple of URLs 
 that are missing URL re-writing code around them.
 
  I don't understand how this could have been happening.
  
  MOREOVER, cancelling my web-app in the TEST environment works fine 
  when
  IE7 is used as browser on the client side; it's only w. 
 Firefox that 
  I'm getting this puzzling HttpSession object behavior. Yet both 
  firefox and
  IE7 have their cookies option set to allow-all.
 
 Okay, so cookies shouldn't be the problem. Hmm...
 
  The thing was working just yesterday and for days prior to that!
 
 Are you doing funny things with port numbers? HTTPS-to-HTTP? 
 Or vice versa? Or is everything happening on port 80?
 
  And now to add one extra piece of bizarreness to this whole 
 thing: I 
  followed Jon Wingfield's suggestion of installing 
 LiveHTTPHeaders to 
  Firefox, to watch what was being sent from the browser, and when I 
  restarted Firefox and attempted to reproduce the problem, it was 
  working again! I was able to cancel and switch-to-batch 
 just as before...
 
 Weird. Are your cookies set to expire at the end of the 
 browser session or anything like that?
 
 -chris
 
 

-
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: a discrepancy in webapp behavior in two environments

2006-10-23 Thread Christopher Schultz
Mark,

 I think your suggestion about multiple windows was a good guess.

[snip]

 No, no HTTPS-to-HTTP stuff; all requests are going to a port dedicated
 to Tomcat (8088).
 
 And the Firefox cookies options form is set so that cookies are kept
 until they expire which I believe is the default (the other options
 being until I close Firefox and ask me every time).

Okay. Those were just shots in the dark, anyway. You definitely have a
weird problem.

Try attaching the HttpSessionListener as described in my previous post
to see when the sessions are being created.

-chris




signature.asc
Description: OpenPGP digital signature


Re: changing the length of the jsessionid

2006-10-23 Thread Christopher Schultz
Assaf,

 Does anyone know how i can shorten the length of the jsessionid from 32
 chars to 30 ?

In Tomcat 4.1, the class org.apache.catalina.session.ManagerBase creates
sessions and assigns ids to them. The source I'm looking at right now
uses a message digest algorithm (it's not clear which one, but probably
MD5) which returns a fixed-width string.

I suppose you could modify this file directly and re-package it with
your deployment, or possibly even subclass it and somehow install it
without having to modify Tomcat's internals (I don't know how to specify
which Manager gets used by Tomcat... someone else will have to answer that).

Any particular reason you want to shorten the session id?

-chris




signature.asc
Description: OpenPGP digital signature


What would you do with field defect rate predictions?

2006-10-23 Thread Paul Luo Li

Hi

I have been examining Tomcat bugs and have been looking for ways of
predicting the field defect rate, that is, predicting at the time of release
the number of field defects in each time interval after the release. I am
brainstorming possible applications for this research. 

I was wondering what you all think Tomcat can do (or do better) if it had
field defect rate predictions. Your input would really give my research a
reality check. 

Thank you very much for your time.
Paul Li

P.S. I did some preliminary modeling for Tomcat using achieved data: 
http://www.cs.cmu.edu/~paulluo/Papers/p178-Li.pdf


Paul Luo Li,
[EMAIL PROTECTED]
www.cs.cmu.edu/~paulluo

B.S. Mathematics, University of Virginia 2001.
Ph.D Student Software Engineering, Carnegie Mellon University, 2001-



-
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: changing the length of the jsessionid

2006-10-23 Thread Bill Barker

Assaf Flatto [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hello

 Does anyone know how i can shorten the length of the jsessionid from 32 
 chars to 30 ?


Set sessionIdLength=15 on the Manager / tag for your context.


 thanks

 Assaf


 -
 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: serving static html with Tomcat

2006-10-23 Thread Bill Barker

Christopher Schultz [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

Can anyone comment on Tomcat's caching of path lookups on the disk? That
would seem to be a tremendous waste of memory if Tomcat actually
remembered that a file didn't exist (not to mention a pain in the neck
if you wanted to add files on the fly like this guy). Can someone
confirm that Tomcat does nothing of the sort? That's the only reason I
could think of for why he can't access his files.

If you don't want it, turn it off:
 Context cachingAllowed=false . /

There is also cacheMaxSize and cacheTTL to tune Tomcat's caching of files.





-
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 5.5.20 doesnot load ServletContextListener in tld?

2006-10-23 Thread Templar Cain

Hi, guys:

I was running a myfaces blank application, which runs perfectly well on
Tomcat 5.5.17, on my new tomcat 5.5.20 server and the log told me that I
need to add
listener
 listener-class
org.apache.myfaces.webapp.StartupServletContextListener/listener-class
  /listener
However, I see that this listener has been defined in one of the tld files
and it should be loaded automatically.
So I tried to put a customized ServletContextListener in a tld file packed
in a jar file and it is not loaded either.

And tomcat 5.5.20 seams not to be compatible with eclipse wtp 1.5.1 well, I
would really like they could work things out.

So does Tomcat stops supporting this feature and I should be stick to tomcat
5.5.17, or there is some other problems? It really bothers a lot lately.

Thank you for your time. :)


How to run junit test in Tomcat

2006-10-23 Thread Jia Qiang Yang
Hi buddies,

I've downloaded the tomcat source code but got question of how to run the 
testcases.

Here's my output result when running ant.

I'm wondering what's the best practice for building tomcat source code and 
running all the testcases.

Best regards.

Buildfile: 
C:\Downloads\apache-tomcat-5.5.20-src\apache-tomcat-5.5.20-src\build\build.xml
test:
 [echo] Target: Catalina - Test ...
test:
 [echo] Target: Catalina - Test ...
 [echo] 
C:\Downloads\apache-tomcat-5.5.20-src\apache-tomcat-5.5.20-src\build/../connectors
flags:
flags.display:
 [echo] --- Build environment for Catalina ---
 [echo] If ${property_name} is displayed, then the property is not 
set)
 [echo] --- Build options ---
 [echo] full.dist=${full.dist}
 [echo] build.sysclasspath=${build.sysclasspath}
 [echo] compile.debug=on
 [echo] compile.deprecation=off
 [echo] compile.optimize=off
 [echo] --- Ant Flags ---
 [echo] style task available (required)=true
 [echo] --- JDK ---
 [echo] jdk.1.2.present=true
 [echo] jdk.1.3.present=true
 [echo] jdk.1.4.present=true
 [echo] --- Source Dependencies ---
 [echo] jtc.home.present=true
 [echo] --- Required Libraries ---
 [echo] beanutils.present=true
 [echo] collections.present=true
 [echo] digester.present=true
 [echo] jaxp.present=true
 [echo] jndi.present=true
 [echo] logging.present=true
 [echo] regexp.present=${regexp.present}
 [echo] --- Optional Libraries ---
 [echo] dbcp.present=true
 [echo] fileupload.present=true
 [echo] jaas.present=true
 [echo] javamail.present=${javamail.present}
 [echo] jmx.present=true
 [echo] jsse.present=true
 [echo] jta.present=${jta.present}
 [echo] junit.present=true
 [echo] lang.present=${lang.present}
 [echo] launcher.present=true
 [echo] launcher.bootstrap.present=true
 [echo] ldap.present=true
 [echo] modeler.present=true
 [echo] pool.present=true
 [echo] --- Required JARs ---
 [echo] jndi.jar.present(except JDK 1.3+)=${jndi.jar.present}
 [echo] regexp.jar.present=${regexp.jar.present}
 [echo] servlet-api.jar.present=true
 [echo] xerces2.jars.present(except JDK 1.4+)=true
 [echo] --- Optional JARs ---
 [echo] dbcp.jar.present=true
 [echo] fileupload.jar.present=true
 [echo] jaas.jar.present=${jaas.jar.present}
 [echo] javamail.jar.present=${javamail.jar.present}
 [echo] jmx.jar.present=true
 [echo] jta.jar.present=${jta.jar.present}
 [echo] junit.jar.present=true
 [echo] modeler.jar.present=true
 [echo] pool.jar.present=true
 [echo] --- Conditional compilation flags ---
 [echo] compile.dbcp=true
 [echo] compile.jaas=true
 [echo] compile.javamail=${compile.javamail}
 [echo] compile.jmx=true
 [echo] compile.jndi=true
 [echo] compile.jsse=true
 [echo] compile.jta=${compile.jta}
 [echo] compile.junit=true
 [echo] compile.ldap=true
 [echo] compile.ssi=true
 [echo] --- Distribution flags ---
 [echo] copy.dbcp.jar=true
 [echo] copy.jmx.jar=true
 [echo] copy.launcher.jars=true
 [echo] copy.logging.jar=true
 [echo] copy.modeler.jar=true
 [echo] copy.pool.jar=true
build-prepare:
copy-fileupload.jar:
copy-launcher.jars:
copy-modeler.jar:
build-static:
build-tomcat-util:
detect:
build-prepare:
tomcat-util.jar:
 [echo] - Java-utils -
 [echo] -- puretls.present = ${puretls.present}
 [echo] -- jsse.present = true 
C:/downloads/lib/jsse-1.0.3/lib/jsse.jar
 [echo] -- commons-logging = true
 [echo] -- jmx = true C:/downloads/lib/mx4j-3.0.1/lib/mx4j.jar
 [echo] -- modeler = true 
C:/downloads/lib/commons-modeler-1.1/commons-modeler.jar
 [echo] -- skip.digester = ${skip.digester}
 [echo] -- JDK14 = true
 [echo] -- JDK15 = true
[javac] Compiling 94 source files to 
C:\Downloads\apache-tomcat-5.5.20-src\apache-tomcat-5.5.20-src\connectors\util\build\classes
[javac] 
C:\Downloads\apache-tomcat-5.5.20-src\apache-tomcat-5.5.20-src\connectors\util\java\org\apache\tomcat\util\net\AprEndpoint.java
:25: 件包 org.apache.tomcat.jni 不存在
[javac] import org.apache.tomcat.jni.OS;
[javac] ^
[javac] 
C:\Downloads\apache-tomcat-5.5.20-src\apache-tomcat-5.5.20-src\connectors\util\java\org\apache\tomcat\util\net\AprEndpoint.java
:26: 件包 org.apache.tomcat.jni 不存在
[javac] import org.apache.tomcat.jni.Address;
[javac] ^
[javac] 
C:\Downloads\apache-tomcat-5.5.20-src\apache-tomcat-5.5.20-src\connectors\util\java\org\apache\tomcat\util\net\AprEndpoint.java
:27: 件包 org.apache.tomcat.jni 不存在
[javac] import org.apache.tomcat.jni.Error;
[javac] ^
[javac] 
C:\Downloads\apache-tomcat-5.5.20-src\apache-tomcat-5.5.20-src\connectors\util\java\org\apache\tomcat\util\net\AprEndpoint.java
:28: 件包 org.apache.tomcat.jni 不存在
[javac] import org.apache.tomcat.jni.File;
[javac] ^
[javac]