Re: java.lang.NoClassDefFoundError

2007-08-26 Thread Martin Gainty

Dave-

Same thing happened when I tried to build php with some old rhino.jars
If the vendor is silent on what version he is supporting check the signature 
for the class


javap fubar
will show you the signatures for all the methods

HTH/
M
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Dave sailer [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, August 25, 2007 10:13 PM
Subject: Re: java.lang.NoClassDefFoundError


ah, I see now. I mucked up the path with jar uf and didn't notice cuz I 
was checking by doing jar xf instead of jar tfv.


doh!

- Original Message - 
From: Manivannan Palanichamy [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, August 25, 2007 4:33 PM
Subject: Re: java.lang.NoClassDefFoundError



just do, jar -tvf MyJar.jar and see whether it lists the class.

--
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html

On 8/25/07, Dave Sailer [EMAIL PROTECTED] wrote:


it does. And if it didn't jar uf is broken, I would think.

On Fri, 2007-08-24 at 15:20 -0600, Filip Hanik - Dev Lists wrote:
 better check your Jar to make sure it has the MyServletException.class
 file still in it.

 Filip

 Dave Sailer wrote:
  I have a webapp that is working but I wanted to update a servlet jar
so:
 
  jar uf MyJar.jar net/whohah/portal/servlet/MyServlet.class
  cp MyJar.jar $CATALINA_HOME/webapps/ROOT/WEB-INF/lib
 
  No I get the exception shown below. I have MyServlet stripped down 
  so

  the only imports are:
  import java.io.*;
 
  import javax.servlet.*;
  import javax.servlet.http.*;
 
 
  I can't see how replacing one servlet that has few dependencies is
  causing an unrelated NoClassDefFoundError.
 
 
 
 
  javax.servlet.ServletException:
  net/whohah/portal/exceptions/MyServletException
  
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)

  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
  root cause
 
  java.lang.NoClassDefFoundError:
  net/whohah/portal/exceptions/MyServletException
  java.lang.Class.getDeclaredConstructors0(Native Method)
  java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
  java.lang.Class.getConstructor0(Class.java:2671)
  java.lang.Class.newInstance0(Class.java:321)
  java.lang.Class.newInstance(Class.java:303)
  org.apache.jasper.servlet.JspServletWrapper.getServlet(
JspServletWrapper.java:142)
  org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:311)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(
JspServlet.java:315)
  
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
 
  -
  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]





--
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html




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



[mod_jk] problem serving URIs with 'special characters'

2007-08-26 Thread Guy Katz
Hi; (using: centos, apache 2.0.52, mod_jk 1.2.21, tomcat 6)

Recently, I encountered a problem with URIs that has 'non western
European' characters (for example:
http://www.somehost.com/roller/admin/entry/nofx_%D7%91%D7%93%D7%A8%D7%9A
). I noticed that apache was forwarding to tomcat a different URI than
the original which caused problems in my site.

 

Digging into the subject I found the JkOptions +ForwardURICompatUnparsed
fixed my problem. However, I then encountered a different problem then.
On the first hit, some images were not displayed in the browser (not
served to it). So I checked the forums and found out about the
JkStripSession. I figured it might help so I turned it on but nothing
happened.

 

My questions are:

1.  Should the JkStripSession help in this case? Was there a known
bug in my apache/mod_jk versions related to this (couldn't find in
bugzilla)?
2.  How should I solve this? The only thing I need is to be able to
forward URIs with 'special characters' as is to tomcat for a specific
application (context)

 

I am really out of my element here so I would appreciate your help
greatly.

Thanks in advance

 

Related forum topic I found:

http://www.nabble.com/Image-problem-tf3629476.html#a10141944

http://www.nabble.com/-mod_jk--JkStripSession-directive-tf3294527.html#a
9164432

 

 

The configuration I thought would work but had the image loading
problem:

JkMount /* ajp13
JkStripSession On

JkOptions +ForwardURICompatUnparsed



#i think the following has nothing to do with my problem but its here
anyway...
RewriteEngine On
RewriteCond %{HTTP_HOST} !^waves.co.il$ [NC] RewriteRule ^(.*)$
http://www.xwave.co.il$1 [R,L] 

 

 

 

Guy Katz
RD
Allot Communications * a mind for networks(tm)
Tel: + 972 9 761 928 8
Fax: + 972 9 744 362 6
[EMAIL PROTECTED]
www.allot.com http://www.allot.com/ 

 

 



Re: Tomcat (javac)compilation arguments

2007-08-26 Thread Brian Munroe
On 8/25/07, Manivannan Palanichamy [EMAIL PROTECTED] wrote:

 I need to pass javac (compilation) arguments to tomcat. Just as JAVA_OPTS is
 there for jvm arguments, is there any env var/ other ways to pass arguments
 to javac of tomcat?

Hum,  'javac of tomcat' - Do you mean the JSP Compiler, or do you
really mean javac, which is used when say, compiling Servlets?

I am not aware of an environment variable ala JAVA_OPTS.  However, if
you are using Ant, you can add a compilearg as a nested element
within the javac element.

For example:

javac srcdir=${src.home} 
destdir=${build.home}/WEB-INF/classes
debug=${compile.debug}
deprecation=${compile.deprecation}
optimize=${compile.optimize}
classpath refid=compile.classpath/

compilerarg value=-Xlint /

/javac

If this isn't what you were looking for, please advise.

-- brian

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



org.apache.catalina.ant.ReloadTask and JSP caching

2007-08-26 Thread Brian Munroe
I am experiencing an annoying (but not show-stopping) issue while
trying to use the Catalina ReloadTask Ant task.

I am currently using Ant 1.7, JDK 1.5 (OS X) and Tomcat 5.5.23.

Whenever I make a modification to a JSP, I usually do an 'ant reload'
to push the changes to the build/ directory and force the container to
reload the application.

However, when I refresh the JSP in the browser, the changes don't take
effect, even if I clear the browser cache, etc.  I checked the content
of the build/ directory, the modified file has been copied there.  It
is almost like the container isn't reloading the web app.

I recently moved from JDK 1.4.2, Tomcat 5.0.17 and Ant 1.6.5.  I
didn't experience the problem with that configuration.

Any ideas?  I've included my build.xml file at the bottom for reference.

thanks

-- brian


?xml version=1.0 ?
project name=Import Test default=compile basedir=.

property file=${user.home}/build.properties /

property name=app.name  value=importtest/
property name=app.path  value=/${app.name}/

property name=build.homevalue=${basedir}/build   /
property name=dist.home value=${basedir}/dist/
property name=web.home  value=${basedir}/web /
property name=src.home  value=${basedir}/src /
property name=lib.home  value=${basedir}/src/lib /

taskdef name=deploy classname=org.apache.catalina.ant.DeployTask   /
taskdef name=listclassname=org.apache.catalina.ant.ListTask /
taskdef name=reload  classname=org.apache.catalina.ant.ReloadTask   /
taskdef name=undeploy  classname=org.apache.catalina.ant.UndeployTask /

property name=compile.debug   value=true  /
property name=compile.deprecation value=false /
property name=compile.optimizevalue=true  /

path id=compile.classpath
fileset dir=${catalina.home}/common/endorsed
include name=*.jar/
/fileset

fileset dir=${catalina.home}/common/lib
include name=*.jar/
/fileset

fileset dir=${catalina.home}/shared/lib
include name=*.jar/
/fileset

fileset dir=${basedir}/src/lib
include name=*.jar/
/fileset
/path

target name=all depends=clean,compile /

target name=list
list url=${manager.url} username=${manager.username}
password=${manager.password} /
/target

target name=clean
delete dir=${build.home}/
delete dir=${dist.home}/
/target

target name=install depends=compile
deploy url=${manager.url} username=${manager.username}
password=${manager.password} path=${app.path}
localWar=file://${build.home} /
/target

target name=reload depends=prepare,compile
reload url=${manager.url} username=${manager.username}
password=${manager.password} path=${app.path}/
/target

target name=remove
undeploy url=${manager.url} username=${manager.username}
password=${manager.password} path=${app.path}/
/target

target name=dist depends=compile
mkdir dir=${dist.home}/
jar jarfile=${dist.home}/${app.name}.war basedir=${build.home}/
/target

target name=compile depends=prepare
javac srcdir=${src.home}
  destdir=${build.home}/WEB-INF/classes
debug=${compile.debug}
  deprecation=${compile.deprecation}
 optimize=${compile.optimize}
classpath refid=compile.classpath/
/javac
/target

target name=prepare

!-- Create build directories as needed --
mkdir dir=${build.home}/
mkdir dir=${build.home}/META-INF/
mkdir dir=${build.home}/WEB-INF/
mkdir dir=${build.home}/WEB-INF/lib/
mkdir dir=${build.home}/WEB-INF/classes/

!-- Copy static content of this web application --
copy todir=${build.home}
fileset dir=${web.home} /
/copy

!-- Copy precompiled jarfiles to dest --
copy todir=${build.home}/WEB-INF/lib
fileset dir=${lib.home}/
/copy

/target

/project

-
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: [mod_jk] problem serving URIs with #39;special characters#39;

2007-08-26 Thread samk
URLEncoding doesn't take care of this problem?


In Response To: 

Hi; (using: centos, apache 2.0.52, mod_jk 1.2.21, tomcat 6)

Recently, I encountered a problem with URIs that has 'non western
European' characters (for example:
http://www.somehost.com/roller/admin/entry/nofx_%D7%91%D7%93%D7%A8%D7%9A
). I noticed that apache was forwarding to tomcat a different URI than
the original which caused problems in my site.

 

Digging into the subject I found the JkOptions +ForwardURICompatUnparsed
fixed my problem. However, I then encountered a different problem then.
On the first hit, some images were not displayed in the browser (not
served to it). So I checked the forums and found out about the
JkStripSession. I figured it might help so I turned it on but nothing
happened.

 

My questions are:

1.  Should the JkStripSession help in this case? Was there a known
bug in my apache/mod_jk versions related to this (couldn't find in
bugzilla)?
2.  How should I solve this? The only thing I need is to be able to
forward URIs with 'special characters' as is to tomcat for a specific
application (context)

 

I am really out of my element here so I would appreciate your help
greatly.

Thanks in advance

 

Related forum topic I found:

http://www.nabble.com/Image-problem-tf3629476.html#a10141944

http://www.nabble.com/-mod_jk--JkStripSession-directive-tf3294527.html#a
9164432

 

 

The configuration I thought would work but had the image loading
problem:

JkMount /* ajp13
JkStripSession On

JkOptions +ForwardURICompatUnparsed



#i think the following has nothing to do with my problem but its here
anyway...
RewriteEngine On
RewriteCond %{HTTP_HOST} !^waves.co.il$ [NC] RewriteRule ^(.*)$
http://www.xwave.co.il$1 [R,L] 

 

 

 

Guy Katz
RD
Allot Communications * a mind for networks(tm)
Tel: + 972 9 761 928 8
Fax: + 972 9 744 362 6
[EMAIL PROTECTED]
www.allot.com http://www.allot.com/ 

 

 



 Sent from Techienuggets Netbeans IDE Forum: 
http://www.techienuggets.com/Detail?tx=11219

-
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: org.apache.catalina.ant.ReloadTask and JSP caching

2007-08-26 Thread Brian Munroe
On 8/26/07, Brian Munroe [EMAIL PROTECTED] wrote:

 I am experiencing an annoying (but not show-stopping) issue while
 trying to use the Catalina ReloadTask Ant task.


Ok, I think I've isolated the problem, and it has nothing to do with
the ReloadTask.  More in regards to the DeployTask, as explained
below.

It used to be while using my old environment [1], when I do an 'ant
list' it would tell me that it is running the web app from my local
build/ directory, for example
'/Users/brian/Projects/importest/build/'.

Now it appears that is actually 'deploys' the web application to the
$CATALINA_HOME/webapps directory.

So it seems that something has changed in the way localWar now
functions?  I've even tried changing from 'value' to the 'location'
attribute when setting the build.home property, just in case.

property name=app.name  value=importtest  /
property name=app.pathvalue=/${app.name}/
property name=build.homelocation=${basedir}/build   /

deploy
url=${manager.url}
username=${manager.username}
password=${manager.password}
path=${app.path}
localWar=file://${build.home}
/

Any advice?  Thanks!

-- brian

[1] - Ant 1.6.5, Tomcat 5.0, and JDK 1.4.2 (OS X)

-
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: [mod_jk] problem serving URIs with 'special characters'

2007-08-26 Thread Guy Katz
I am not sure what you are reffering to by saying URLencoding but:
the default jkoption value in the mod_jk in the version i have processes the 
URI in a way that changes its value. that is why i changed it to  
+ForwardURICompatUnparsed but than i encountered the image loading problem.
i would be happy to hear ideas but please be more specific.
thanks.



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sun 8/26/2007 10:11 PM
To: users@tomcat.apache.org
Subject: Re: [mod_jk] problem serving URIs with #39;special characters#39;



URLEncoding doesn't take care of this problem?


In Response To:

Hi; (using: centos, apache 2.0.52, mod_jk 1.2.21, tomcat 6)

Recently, I encountered a problem with URIs that has 'non western
European' characters (for example:
http://www.somehost.com/roller/admin/entry/nofx_%D7%91%D7%93%D7%A8%D7%9A
). I noticed that apache was forwarding to tomcat a different URI than
the original which caused problems in my site.



Digging into the subject I found the JkOptions +ForwardURICompatUnparsed
fixed my problem. However, I then encountered a different problem then.
On the first hit, some images were not displayed in the browser (not
served to it). So I checked the forums and found out about the
JkStripSession. I figured it might help so I turned it on but nothing
happened.



My questions are:

1.  Should the JkStripSession help in this case? Was there a known
bug in my apache/mod_jk versions related to this (couldn't find in
bugzilla)?
2.  How should I solve this? The only thing I need is to be able to
forward URIs with 'special characters' as is to tomcat for a specific
application (context)



I am really out of my element here so I would appreciate your help
greatly.

Thanks in advance



Related forum topic I found:

http://www.nabble.com/Image-problem-tf3629476.html#a10141944

http://www.nabble.com/-mod_jk--JkStripSession-directive-tf3294527.html#a
9164432





The configuration I thought would work but had the image loading
problem:

JkMount /* ajp13
JkStripSession On

JkOptions +ForwardURICompatUnparsed



#i think the following has nothing to do with my problem but its here
anyway...
RewriteEngine On
RewriteCond %{HTTP_HOST} !^waves.co.il$ [NC] RewriteRule ^(.*)$
http://www.xwave.co.il$1 [R,L]







Guy Katz
RD
Allot Communications * a mind for networks(tm)
Tel: + 972 9 761 928 8
Fax: + 972 9 744 362 6
[EMAIL PROTECTED]
www.allot.com http://www.allot.com/







 Sent from Techienuggets Netbeans IDE Forum: 
http://www.techienuggets.com/Detail?tx=11219

-
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: [mod_jk] problem serving URIs with #39;special characters#39;

2007-08-26 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=28696 Posted on behalf of 
a User

I meant do use URLEncoding when you're creating the URL with characters from 
another language. I presume that these URLs are being generated by your Server 
side application, yes...?

String send = URLEncoder.encode( toSend, UTF-8 );

Where toSend is the URL with the non-standard characters.


In Response To: 

I am not sure what you are reffering to by saying URLencoding but:
the default jkoption value in the mod_jk in the version i have processes the 
URI in a way that changes its value. that is why i changed it to  
+ForwardURICompatUnparsed but than i encountered the image loading problem.
i would be happy to hear ideas but please be more specific.
thanks.



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sun 8/26/2007 10:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [mod_jk] problem serving URIs with #39;special characters#39;



URLEncoding doesn't take care of this problem?


In Response To:

Hi; (using: centos, apache 2.0.52, mod_jk 1.2.21, tomcat 6)

Recently, I encountered a problem with URIs that has 'non western
European' characters (for example:
http://www.somehost.com/roller/admin/entry/nofx_%D7%91%D7%93%D7%A8%D7%9A
). I noticed that apache was forwarding to tomcat a different URI than
the original which caused problems in my site.



Digging into the subject I found the JkOptions +ForwardURICompatUnparsed
fixed my problem. However, I then encountered a different problem then.
On the first hit, some images were not displayed in the browser (not
served to it). So I checked the forums and found out about the
JkStripSession. I figured it might help so I turned it on but nothing
happened.



My questions are:

1.  Should the JkStripSession help in this case? Was there a known
bug in my apache/mod_jk versions related to this (couldn't find in
bugzilla)?
2.  How should I solve this? The only thing I need is to be able to
forward URIs with 'special characters' as is to tomcat for a specific
application (context)



I am really out of my element here so I would appreciate your help
greatly.

Thanks in advance



Related forum topic I found:

http://www.nabble.com/Image-problem-tf3629476.html#a10141944

http://www.nabble.com/-mod_jk--JkStripSession-directive-tf3294527.html#a
9164432





The configuration I thought would work but had the image loading
problem:

JkMount /* ajp13
JkStripSession On

JkOptions +ForwardURICompatUnparsed



#i think the following has nothing to do with my problem but its here
anyway...
RewriteEngine On
RewriteCond %{HTTP_HOST} !^waves.co.il$ [NC] RewriteRule ^(.*)$
http://www.xwave.co.il$1 [R,L]







Guy Katz
RD
Allot Communications * a mind for networks(tm)
Tel: + 972 9 761 928 8
Fax: + 972 9 744 362 6
[EMAIL PROTECTED]
www.allot.com http://www.allot.com/







 Sent from Techienuggets Netbeans IDE Forum: 
http://www.techienuggets.com/Detail?tx=11219

-




-


-
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: [mod_jk] problem serving URIs with 'special characters'

2007-08-26 Thread Rainer Jung

Guy Katz wrote:

Hi; (using: centos, apache 2.0.52, mod_jk 1.2.21, tomcat 6)

Recently, I encountered a problem with URIs that has 'non western
European' characters (for example:
http://www.somehost.com/roller/admin/entry/nofx_%D7%91%D7%93%D7%A8%D7%9A
). I noticed that apache was forwarding to tomcat a different URI than
the original which caused problems in my site.

Digging into the subject I found the JkOptions +ForwardURICompatUnparsed
fixed my problem. However, I then encountered a different problem then.
On the first hit, some images were not displayed in the browser (not
served to it). So I checked the forums and found out about the
JkStripSession. I figured it might help so I turned it on but nothing
happened.


If you absolutely need to forward the original URI, you should set

JkOptions +JkForwardURIUnparsed

This has negative side effects:

- if you rewrite the URL via mod_rewrite, and then forward via mod_jk, 
mod_jk wil still forward the original URI, not the rewritten one


- the Tomcat AJP connector expects a session id that does not come via a 
cookie but via URL encoding as ;jsessionid=... in the URI. It has to 
be a semicolon, not it's percent encoded equivalent.


The last jk 1.2.25 has a new forwarding policy. It reencodes everything 
that does not seem save, and that way tries to forward a URI that should 
fit into most cases- I would suggest you try that version without any 
JkOptions.


Also: with log level debug, it logs a line similar to:

[Sun Aug 26 01:12:03.482 2007] [27669:0] [debug]
init_ws_service::mod_jk.c (782): Service protocol=HTTP/1.1 method=GET
host=(null) addr=127.0.0.1 name=fraxinus.entenhausen.zz port=8080
auth=Basic user=jung laddr=127.0.0.1 raddr=127.0.0.1 uri=/auth.jsp

for every request. The line includes the URI exactly as it got forwarded 
to Tomcat, so you might be able to debug your problems more easily. The 
line exist also in the debug log of earlier versions, but for them does 
not include the uri.



My questions are:

1.  Should the JkStripSession help in this case? Was there a known
bug in my apache/mod_jk versions related to this (couldn't find in
bugzilla)?


JkStripSession is only important, if your static content gets served by 
Apache, but your webapp added URL encoded sessions to the links.



2.  How should I solve this? The only thing I need is to be able to
forward URIs with 'special characters' as is to tomcat for a specific
application (context)


Concerning the broken links: add an access log to Tomcat, check the 
request in the Apache access log, the Tomcat access log and the uri in 
the jk debug log to understand, what's wrong with those requests.



I am really out of my element here so I would appreciate your help
greatly.

Thanks in advance


Regards,

Rainer


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



Missing hint in Migration guide

2007-08-26 Thread Tobias Barth

Hi,

This weekend, I migrated two webapps from Tomcat 5.0 to Tomcat 6.0. I 
fought some longer time with the context configuration - I think it 
would be nice to include a hint into the migration documentation that 
the resource parameters are now attributes of the Resource tag and 
that the ResourceParams section is obsolete.


Greetings,

Tobias Barth


-
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: Graceful webapp reloading

2007-08-26 Thread thebugslayer
Jerome,
Have you tried Tomcat's manager webapp? You may also use Ant task to
controll this too.

On 8/23/07, Mark Thomas [EMAIL PROTECTED] wrote:
 Jérôme Etévé wrote:
  Is there a way to setup tomcat to do a nice graceful reload where all
  the current requests are allowed to finish and the new one putted into
  a queue until the application is fully loaded and ready to serve them
  ?

 Multiple Tomcat instances and httpd as a load balancer.

 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]




-- 
/bugslayer

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



Re: Tomcat looses POST parameters

2007-08-26 Thread thebugslayer
I would suggest a TCP sniff tool like one found from axis or grinder
to peek at your http track to be sure.

On 8/24/07, M4N - Arjan Tijms [EMAIL PROTECTED] wrote:
 Hi,

 We're hosting a fairly high traffic web application based on Tomcat.
 It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using
 Apache as a front-end with the AJP connector.

 The problem I'm encountering is that for a percentage of the POST
 requests, Tomcat seems to loose all parameters. Our application uses a
 filter that logs the (first few characters of) post parameters. This
 filter is installed as the first one in the filter chain, so nothing
 else can interfere with it. For requests originating from pages which
 logically can not produce such an empty post request, the log clearly
 shows there are no parameters.

 The problem is often fairly random, although I have been able to
 consistently reproduce it on one occasion. Using a proxy server to
 monitor what my browser was sending, I clearly saw in the raw HTTP
 headers that parameters where being send, yet they weren't received in
 Tomcat. I also enabled TCP/IP packet logging at the server for a while.
 For requests that appeared with empty parameters in Tomcat, the tcp/ip
 log showed the parameters did arrive at the server.

 Next to that I enabled debug logging in the AJP connector, and again the
 POST parameters were in the HTTP request but not present when the
 mentioned filter logged the request in Tomcat.

 I did notice though that the overwhelming majority of the empty post
 requests concerned Faces requests (we're using MyFaces 1.1.4). We store
 state on client, so typical Faces HTTP post requests are at least 22KB
 in size. Nevertheless, thousands of requests from the same pages from
 all kinds of different browsers arrive with the post parameters intact.

 I'm at a loss here how to proceed. Naturally I could change JSF to keep
 state on server, but because of the way some custom components work
 that's currently not an option. It would also not really solve the
 underlying problem of course.

 Any help would be greatly appreciated


 Kind regards,
 Arjan Tijms

 --
 It's a cult. If you've coded for any length of time, you've run across 
 someone from this warped brotherhood. Their creed: if you can write 
 complicated code, you must be good.


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




-- 
/bugslayer

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



resources to watch for reloading weapp

2007-08-26 Thread thebugslayer
Hi,
Is there way to configure/add more file to be monitored for changes
that trigger a webapp's auto reload?



-- 
/bugslayer

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



Re: Tomcat looses POST parameters

2007-08-26 Thread Martin Gainty

Fiddler lets you construct the request
http://www.fiddlertool.com/fiddler/

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: thebugslayer [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, August 26, 2007 8:06 PM
Subject: Re: Tomcat looses POST parameters



I would suggest a TCP sniff tool like one found from axis or grinder
to peek at your http track to be sure.

On 8/24/07, M4N - Arjan Tijms [EMAIL PROTECTED] wrote:

Hi,

We're hosting a fairly high traffic web application based on Tomcat.
It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using
Apache as a front-end with the AJP connector.

The problem I'm encountering is that for a percentage of the POST
requests, Tomcat seems to loose all parameters. Our application uses a
filter that logs the (first few characters of) post parameters. This
filter is installed as the first one in the filter chain, so nothing
else can interfere with it. For requests originating from pages which
logically can not produce such an empty post request, the log clearly
shows there are no parameters.

The problem is often fairly random, although I have been able to
consistently reproduce it on one occasion. Using a proxy server to
monitor what my browser was sending, I clearly saw in the raw HTTP
headers that parameters where being send, yet they weren't received in
Tomcat. I also enabled TCP/IP packet logging at the server for a while.
For requests that appeared with empty parameters in Tomcat, the tcp/ip
log showed the parameters did arrive at the server.

Next to that I enabled debug logging in the AJP connector, and again the
POST parameters were in the HTTP request but not present when the
mentioned filter logged the request in Tomcat.

I did notice though that the overwhelming majority of the empty post
requests concerned Faces requests (we're using MyFaces 1.1.4). We store
state on client, so typical Faces HTTP post requests are at least 22KB
in size. Nevertheless, thousands of requests from the same pages from
all kinds of different browsers arrive with the post parameters intact.

I'm at a loss here how to proceed. Naturally I could change JSF to keep
state on server, but because of the way some custom components work
that's currently not an option. It would also not really solve the
underlying problem of course.

Any help would be greatly appreciated


Kind regards,
Arjan Tijms

--
It's a cult. If you've coded for any length of time, you've run across 
someone from this warped brotherhood. Their creed: if you can write 
complicated code, you must be good.



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





--
/bugslayer

-
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: resources to watch for reloading weapp

2007-08-26 Thread Caldarale, Charles R
 From: thebugslayer [mailto:[EMAIL PROTECTED] 
 Subject: resources to watch for reloading weapp
 
 Is there way to configure/add more file to be monitored for changes
 that trigger a webapp's auto reload?

Yes; use the WatchedResource element nested inside a Context:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Nested%20Com
ponents

An example can be found in Tomcat's default conf/context.xml file.

 - 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: Missing hint in Migration guide

2007-08-26 Thread Caldarale, Charles R
 From: Tobias Barth [mailto:[EMAIL PROTECTED] 
 Subject: Missing hint in Migration guide
 
 This weekend, I migrated two webapps from Tomcat 5.0 to Tomcat 6.0. I 
 fought some longer time with the context configuration - I think it 
 would be nice to include a hint into the migration documentation that 
 the resource parameters are now attributes of the Resource tag and

 that the ResourceParams section is obsolete.

Actually, that was a change between 5.0 and 5.5, and the migration guide
was first published with 6.0, so it covers only 5.5 - 6.0 at the
moment.  Regardless, your point is still valid.  If only doc writing was
as much fun as generating code...

 - 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: Refresh JSP in Tomcat 5.5

2007-08-26 Thread hezjing
Hi!

Setting reloading=true does not solve the problem :-(

Here are the steps I performed,

1) Reinstalled Tomcat 5.5.23 on Windows XP
2) Added the following parameters to JspServlet in Tomcat 5.5\conf\web.xml
development=false
reloading=true
checkInterval=3
3) Started Tomcat service
4) Deployed myapp for first time
5) Accessed myapp from IE
6) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
7) Accessed myapp from IE after 3 seconds and it is still showing the old title!

The Tomcat 5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java
is still showing the old title.

BTW, the reloading parameter is not listed as one of the supporting
parameters in the comment of web.xml (?).

Do you have any other idea of what could be the problem?


On 8/24/07, Christopher Schultz [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hezjing,

 hezjing wrote:
  In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
  and that the context's reloadable=true.

 Maybe try 'reloading=true' instead?

 http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html

 - -chris

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

 iD8DBQFGztUh9CaO5/Lv0PARAlA2AKCc1wDd4K8YJlDU8RKImvPhZYX5KwCeI+Hb
 6WyJhi9YQsTVkcR+MqFnp2A=
 =017s
 -END PGP SIGNATURE-

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




-- 

Hez

-
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: Refresh JSP in Tomcat 5.5

2007-08-26 Thread hezjing
Hi!

If I understood the comment in web.xml correctly, by default, the
JspServlet is initialized with the following parameters

development=true
modificationTestInterval=4

Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated?



On 8/27/07, hezjing [EMAIL PROTECTED] wrote:
 Hi!

 Setting reloading=true does not solve the problem :-(

 Here are the steps I performed,

 1) Reinstalled Tomcat 5.5.23 on Windows XP
 2) Added the following parameters to JspServlet in Tomcat 5.5\conf\web.xml
 development=false
 reloading=true
 checkInterval=3
 3) Started Tomcat service
 4) Deployed myapp for first time
 5) Accessed myapp from IE
 6) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
 7) Accessed myapp from IE after 3 seconds and it is still showing the old 
 title!

 The Tomcat 5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java
 is still showing the old title.

 BTW, the reloading parameter is not listed as one of the supporting
 parameters in the comment of web.xml (?).

 Do you have any other idea of what could be the problem?


 On 8/24/07, Christopher Schultz [EMAIL PROTECTED] wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Hezjing,
 
  hezjing wrote:
   In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
   and that the context's reloadable=true.
 
  Maybe try 'reloading=true' instead?
 
  http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
 
  - -chris
 
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.7 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
  iD8DBQFGztUh9CaO5/Lv0PARAlA2AKCc1wDd4K8YJlDU8RKImvPhZYX5KwCeI+Hb
  6WyJhi9YQsTVkcR+MqFnp2A=
  =017s
  -END PGP SIGNATURE-
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --

 Hez



-- 

Hez

-
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: Refresh JSP in Tomcat 5.5

2007-08-26 Thread hezjing
Hi Tim

I do not have Firefox on my computer.

Yes, I did do a hard-refreshing and this is what I tried,

1) Closed IE6.
2) From IE6, deleted all offline content and cookies.
3) Accessed myapp from IE6 and it is still showing the old title!

..


On 8/27/07, Tim Lee [EMAIL PROTECTED] wrote:
 I might be completely off course, but...

 Does the title stay the same (as in your IE case) when you use Firefox as 
 well?
 If it changes in Firefox, it might be a problem of IE browser caching problem.
 Have you tried hard-refreshing, or closing the browser and opening again?


 Timothy Wonil Lee

 Java Developer
 Koorong Books (http://www.koorong.com/)

 http://www.google.com/reader/shared/16849249410805339619
 http://timundergod.blogspot.com

 -Original Message-
 From: hezjing [mailto:[EMAIL PROTECTED]
 Sent: Monday, 27 August 2007 1:59 PM
 To: Tomcat Users List
 Subject: Re: Refresh JSP in Tomcat 5.5

 Hi!

 Setting reloading=true does not solve the problem :-(

 Here are the steps I performed,

 1) Reinstalled Tomcat 5.5.23 on Windows XP
 2) Added the following parameters to JspServlet in Tomcat 5.5\conf\web.xml
 development=false
 reloading=true
 checkInterval=3
 3) Started Tomcat service
 4) Deployed myapp for first time
 5) Accessed myapp from IE
 6) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
 7) Accessed myapp from IE after 3 seconds and it is still showing the old 
 title!

 The Tomcat 5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java
 is still showing the old title.

 BTW, the reloading parameter is not listed as one of the supporting
 parameters in the comment of web.xml (?).

 Do you have any other idea of what could be the problem?


 On 8/24/07, Christopher Schultz [EMAIL PROTECTED] wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Hezjing,
 
  hezjing wrote:
   In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
   and that the context's reloadable=true.
 
  Maybe try 'reloading=true' instead?
 
  http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
 
  - -chris
 
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.7 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
  iD8DBQFGztUh9CaO5/Lv0PARAlA2AKCc1wDd4K8YJlDU8RKImvPhZYX5KwCeI+Hb
  6WyJhi9YQsTVkcR+MqFnp2A=
  =017s
  -END PGP SIGNATURE-
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --

 Hez

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


 !DSPAM:46d24c4c35371427112096!


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




-- 

Hez

-
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: Refresh JSP in Tomcat 5.5

2007-08-26 Thread Brian Munroe
On 8/26/07, hezjing [EMAIL PROTECTED] wrote:
 Hi!

 If I understood the comment in web.xml correctly, by default, the
 JspServlet is initialized with the following parameters

 development=true
 modificationTestInterval=4

 Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated?

That is the way I read the comments too.  What if you change
modificationTestInterval back to 0?

I have the following configuration (in the JSP Servlet element) and
changes to my JSPs are picked up immediately:

init-param
param-namedevelopment/param-name
param-valuetrue/param-value
/init-param
init-param
param-namemodificationTestInterval/param-name
param-value1/param-value
/init-param
init-param
param-namecheckInterval/param-name
param-value1/param-value
/init-param

Also, you are restarting the container after each web.xml modification, right :)

-- brian

-
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: Refresh JSP in Tomcat 5.5

2007-08-26 Thread Brian Munroe
BTW, with the configuration I showed below, the JSP does not get
translated to a *.java file until I first access the page.

On 8/26/07, Brian Munroe [EMAIL PROTECTED] wrote:
 On 8/26/07, hezjing [EMAIL PROTECTED] wrote:
  Hi!
 
  If I understood the comment in web.xml correctly, by default, the
  JspServlet is initialized with the following parameters
 
  development=true
  modificationTestInterval=4
 
  Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated?

 That is the way I read the comments too.  What if you change
 modificationTestInterval back to 0?

 I have the following configuration (in the JSP Servlet element) and
 changes to my JSPs are picked up immediately:

 init-param
 param-namedevelopment/param-name
 param-valuetrue/param-value
 /init-param
 init-param
 param-namemodificationTestInterval/param-name
 param-value1/param-value
 /init-param
 init-param
 param-namecheckInterval/param-name
 param-value1/param-value
 /init-param

 Also, you are restarting the container after each web.xml modification, right 
 :)

 -- brian


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