Tomcat mapping of URLs - servlets

2008-12-03 Thread André Warnier

Hi.

This is a beginner-like question.
I have tried to download and find this in the Servlet 2.5 Specification, 
but I seem to get a series of html pages describing the API, without 
telling me much about the general principles.


So just in case this is not nicely explained in English in the spec :

How does a servlet container like Tomcat map a request URI to any 
particular webapp ?


I mean, suppose we have 3 webapps with each a servlet-mapping section, 
in which each time there are several url-pattern tags.


I am not talking here about the strict interpretation of these 
url-pattern tags (although there is a question about why the servlet 
spec designers in their wisdom thought that they needed to invent yet 
another wildcard scheme).
But rather, about how Tomcat takes all these servlet-mapping sections 
of all the servlets, and then decides, when a request comes in, to which 
of the servlets it attributes the request.


Does it work as follows ?

When the various webapps are loaded (started ?), Tomcat collects all the 
url-pattern's of all the webapps.
It then sorts them by length (longest first), independently of the 
webapp from whence they come.
When a request comes in, Tomcat compares the request URI with the first 
URL-pattern. If it matches, Tomcat delegates the request to the 
corresponding webapp.

If not, it checks the next pattern in the table, etc..
If the request URI does not match any url-pattern, Tomcat delegates the 
request to the default webapp.


As a corollary to the above : whenever a webapp is stopped (unloaded?) 
or a new webapp is started (loaded ?), Tomcat for a while stops 
processing new requests and rebuilds this entire sorted url-pattern 
matching table.


As another corollary : the webapp called ROOT always has a url-pattern 
of /, which because it is the shortest is always at the end of the 
table, and thus matches anything that does not match something else ?


Then, assuming the above is generaly correct, there is a remaining 
question about the interpretation of length in terms of a url-pattern.
Such as, how is the length compared between patterns like /myservlet* 
and *.myservlet ?


Thanks for some light in the matter.




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



can mod_jk detect web service unavailable

2008-12-03 Thread Zeke
Hi:
I have a JBOSS cluster which use Apache with mod_jk as HTTP load balancer. 
In my cluster, some nodes are deployed web service, but not all. For example, 
node 1 contains web servicebook_service, I can call the web service using URL 
http://www.node1.com/book_service;, but node 2 does not contain it. I hope 
mod_jk can help me to detect whether the requested web service exists. That is 
to say, if I call the web service using 
http://www.loadbalancer.com/book_service;, mod_jk can know only node 1 
contains the web service and node 2 not, then the request will always be 
dispatched to node 1. But with my current configuration on mod_jk and Apache, I 
fount that the request can be dispatched to node 2. Then surely exception will 
be thrown, since the web service not exists on node 2. 
Can mod_jk support it? Do I need some specific configuration?
Any suggestion from you will be very appreciated!

Thanks!
Zeke

 

Re: Tomcat mapping of URLs - servlets

2008-12-03 Thread Markus Schönhaber
André Warnier:

 I have tried to download and find this in the Servlet 2.5 Specification, 
 but I seem to get a series of html pages describing the API, without 
 telling me much about the general principles.

Yep, for some reason unknown to me it's unnecessarily difficult to find
the PDF with the 2.5 spec. Go here
http://jcp.org/en/jsr/detail?id=154
and select the topmost Download page, i. e. the one for Maintenance
release 2 and you're just a few clicks away from downloading the PDF.

Starting on p. 87 the section Mapping Requests to Servlets will
probably answer your questions.

Regards
  mks

-
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 6.0 problem with weblogic.jar

2008-12-03 Thread pharish2

Hi 
I am using weblogic.jar and api.jar in my project and when i try to run it
from the tomcat 6.0.14, I am getting this error in console 
ile
INFO:
validateJarFile(C:\apache-tomcat-6.0.14\webapps\DinahGui\WEB-INF\lib\api.j
ar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
java
x/servlet/Servlet.class
Dec 3, 2008 4:20:59 PM org.apache.catalina.loader.WebappClassLoader
validateJarF
ile
INFO:
validateJarFile(C:\apache-tomcat-6.0.14\webapps\DinahGui\WEB-INF\lib\weblo
gic.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending
class:
 javax/servlet/Servlet.class


I tried running my project - i got class not found exception(weblogic.jar)
is not loaded

can any one has faced similar problem. can you please suggest me

Thanks
harish
-- 
View this message in context: 
http://www.nabble.com/tomcat-6.0-problem-with-weblogic.jar-tp20810683p20810683.html
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]



Re: Tomcat mapping of URLs - servlets

2008-12-03 Thread André Warnier

Markus Schönhaber wrote:

André Warnier:

I have tried to download and find this in the Servlet 2.5 Specification, 
but I seem to get a series of html pages describing the API, without 
telling me much about the general principles.


Yep, for some reason unknown to me it's unnecessarily difficult to find
the PDF with the 2.5 spec. Go here
http://jcp.org/en/jsr/detail?id=154
and select the topmost Download page, i. e. the one for Maintenance
release 2 and you're just a few clicks away from downloading the PDF.

Thanks, that works.
Even when you get there though, it is still difficult to download this 
thing. The proposed filename is not a valid path and must be changed..




Starting on p. 87 the section Mapping Requests to Servlets will
probably answer your questions.


Kind of.
It appears anyway that my previous attempted logic was quite wrong.
But I still find the spec quite confusing.  There is some kind of 
mixture between servlet and web application that is not very clear, 
at least to me.


As I understand it now, there are 2 steps :
1) the appropriate webapp (not servlet) is located using the path, not 
the url-pattern
2) the appropriate servlet *within* the webapp is selected based on the 
url-pattern

and
3) .. each webapp has a default servlet, to which things get mapped 
when no other url-pattern of this webapp matches

4) the ROOT webapp matches the path /, not the url-pattern /

Is the above correct ?

The confusing part for me may also be due to my misunderstanding.
I view this as follows :
- a web application is the whole thing that one finds below 
(tomcat_dir)/webapps/xyz for example (including its static pages, 
WEB-INF/web.xml, its servlets etc..)
- this webapp can consist of one or more servlets, each with its set of 
url-pattern's that it handles


Not so ?

And if so, then I find the examples in table SRV.11.2.2 Example Mapping 
Set quite confusing, since paths like

/foo
/bar
/catalog
would tend to imply different webapps, rather than different servlets 
inside of one webapp, no ?



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



mixed html and jsp site using ProxyPass

2008-12-03 Thread David Goodenough
I have a site which is a mixture of html (and a bunch of images and 
flash and other such stuff which came in from the web designer) and
a couple of JSPs.  I have implemented this with Apache 2.2 and Tomcat
5.5, using ProxyPass statements with ajp in the Location tag.

My location block looks like:

Location / # it is the root application
  ProxyPass ajp://127.0.0.1:8009/jsp
  ProxyPassReverse http://...domain...
  SetOutputFilter proxy-html
  ProxyHTMLURLMap http://127.0.0.1:8180 http://...domain...
  ProxyHTMLURLMAP / http://...domain...
  /Location

So the base stuff is at the root, and the jsp stuff is all under the
jsp path element, so index.jsp is at jsp/index.jsp when referenced
in a URL.

There are some bits of the the Apache managed stuff (css files etc) that
I need to reference in the JSP, so those are referenced as /style.css rather
than style.css in the jsp pages.

It would however be easier if I have the jsp code at the same level (from
a URL path point of view) as the html etc files.  

Is there a way to divert just the .jsp files? I tried Location /*.jsp but 
that did not seem to work - maybe I got something else wrong.

I have tried looking around with Google, but obviously I asked the wrong
question as I did not find a useful answer.  Any help gratefullly received.

David

-
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: mixed html and jsp site using ProxyPass

2008-12-03 Thread Peter Crowther
 From: David Goodenough [mailto:[EMAIL PROTECTED]
 I have a site which is a mixture of html (and a bunch of images and
 flash and other such stuff which came in from the web designer) and
 a couple of JSPs.  I have implemented this with Apache 2.2 and Tomcat
 5.5, using ProxyPass statements with ajp in the Location tag.

Is there any reason for such a complex setup?  Tomcat will quite happily serve 
the static content itself.  You could:

1) Put all the content in the same directory for Tomcat to serve, keep Apache 
httpd, but all your content goes through Tomcat-httpd-user;

2) Put all the content in the same directory for Tomcat to serve, remove Apache 
httpd, serve the content directly through a http Connector in Tomcat.

- Peter

-
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: mixed html and jsp site using ProxyPass

2008-12-03 Thread Chris Wareham

David Goodenough wrote:
I have a site which is a mixture of html (and a bunch of images and 
flash and other such stuff which came in from the web designer) and

a couple of JSPs.  I have implemented this with Apache 2.2 and Tomcat
5.5, using ProxyPass statements with ajp in the Location tag.

My location block looks like:

Location / # it is the root application
  ProxyPass ajp://127.0.0.1:8009/jsp
  ProxyPassReverse http://...domain...
  SetOutputFilter proxy-html
  ProxyHTMLURLMap http://127.0.0.1:8180 http://...domain...
  ProxyHTMLURLMAP / http://...domain...
  /Location

So the base stuff is at the root, and the jsp stuff is all under the
jsp path element, so index.jsp is at jsp/index.jsp when referenced
in a URL.

There are some bits of the the Apache managed stuff (css files etc) that
I need to reference in the JSP, so those are referenced as /style.css rather
than style.css in the jsp pages.

It would however be easier if I have the jsp code at the same level (from
a URL path point of view) as the html etc files.  

Is there a way to divert just the .jsp files? I tried Location /*.jsp but 
that did not seem to work - maybe I got something else wrong.


I have tried looking around with Google, but obviously I asked the wrong
question as I did not find a useful answer.  Any help gratefullly received.

David



As another poster suggested, if the static content (CSS, images, Flash,
etc) rarely changes, then make it part of your web application. You
could then dispense with Apache HTTPD and AJP entirely, and have Tomcat
handle the requests directly. On a Unix system, you can still run Tomcat
as an unprivileged user by having it listen on ports 8080 and 8443 for
example, and using firewall rules to forward incoming requests from
ports 80 and 443 respectively.

Chris
--

Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR

Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753


www.visitlondon.com





  
  
'Visit London Limited' is registered in England under No.761149;

Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.


Visit London is the official visitor organisation for London. Visit London is 
partly funded by Partnership, the Mayor's London Development Agency and London 
Councils.
The information contained in this e-mail is confidential and intended for the 
named recipient(s) only.  If you have received it in error, please notify the 
sender immediately and then delete the message.  If you are not the intended 
recipient, you must not use, disclose, copy or distribute this email. The views 
expressed in this e-mail are those of the individual and not of Visit London. 
We reserve the right to read and monitor any email or attachment entering or 
leaving our systems without prior notice.

 Please don't print this e-mail unless you really need to.

-
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: can mod_jk detect web service unavailable

2008-12-03 Thread Mark Thomas
Zeke wrote:
 Hi:
 I have a JBOSS cluster which use Apache with mod_jk as HTTP load 
 balancer. In my cluster, some nodes are deployed web service, but not all. 
 For example, node 1 contains web servicebook_service, I can call the web 
 service using URL http://www.node1.com/book_service;, but node 2 does not 
 contain it. I hope mod_jk can help me to detect whether the requested web 
 service exists. That is to say, if I call the web service using 
 http://www.loadbalancer.com/book_service;, mod_jk can know only node 1 
 contains the web service and node 2 not, then the request will always be 
 dispatched to node 1. But with my current configuration on mod_jk and Apache, 
 I fount that the request can be dispatched to node 2. Then surely exception 
 will be thrown, since the web service not exists on node 2. 
 Can mod_jk support it? Do I need some specific configuration?
 Any suggestion from you will be very appreciated!

Only map the web service url to the nodes where it exists.

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]



Re: tomcat 6.0 problem with weblogic.jar

2008-12-03 Thread Mark Thomas
pharish2 wrote:
 Hi 
 I am using weblogic.jar and api.jar in my project and when i try to run it
 from the tomcat 6.0.14, I am getting this error in console 
 ile
 INFO:
 validateJarFile(C:\apache-tomcat-6.0.14\webapps\DinahGui\WEB-INF\lib\api.j
 ar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
 java
 x/servlet/Servlet.class
 Dec 3, 2008 4:20:59 PM org.apache.catalina.loader.WebappClassLoader
 validateJarF
 ile
 INFO:
 validateJarFile(C:\apache-tomcat-6.0.14\webapps\DinahGui\WEB-INF\lib\weblo
 gic.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending
 class:
  javax/servlet/Servlet.class
 
 
 I tried running my project - i got class not found exception(weblogic.jar)
 is not loaded
 
 can any one has faced similar problem. can you please suggest me

Web applications are not permitted to include API classes in their lib
directory. Without the JAR, exactly what error message do you see?

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]



Re: tomcat 6.0 problem with weblogic.jar

2008-12-03 Thread pharish2

java.lang.NoClassDefFoundError: weblogic/wsee/jaxrpc/ServiceImpl
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

I am getting this exception in tomcat

Harish

-- 
View this message in context: 
http://www.nabble.com/tomcat-6.0-problem-with-weblogic.jar-tp20810683p20812001.html
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]



Re: tomcat 6.0 problem with weblogic.jar

2008-12-03 Thread Mark Thomas
pharish2 wrote:
 java.lang.NoClassDefFoundError: weblogic/wsee/jaxrpc/ServiceImpl
   java.lang.ClassLoader.defineClass1(Native Method)
   java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 
 I am getting this exception in tomcat

Then you need to find a jar that provides that class but does not include
any of the servlet or jsp API classes.

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]



Re: mixed html and jsp site using ProxyPass

2008-12-03 Thread David Goodenough
The reason was that Tomcat did not serve the Flash correctly, never did
manage to get to the bottom of why but the browser did not complain - it
just left big blank spaces.  With this setup at least that bit works.

David

On Wednesday 03 December 2008, Peter Crowther wrote:
  From: David Goodenough [mailto:[EMAIL PROTECTED]
  I have a site which is a mixture of html (and a bunch of images and
  flash and other such stuff which came in from the web designer) and
  a couple of JSPs.  I have implemented this with Apache 2.2 and Tomcat
  5.5, using ProxyPass statements with ajp in the Location tag.

 Is there any reason for such a complex setup?  Tomcat will quite happily
 serve the static content itself.  You could:

 1) Put all the content in the same directory for Tomcat to serve, keep
 Apache httpd, but all your content goes through Tomcat-httpd-user;

 2) Put all the content in the same directory for Tomcat to serve, remove
 Apache httpd, serve the content directly through a http Connector in
 Tomcat.

 - Peter

 -
 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: mixed html and jsp site using ProxyPass

2008-12-03 Thread Chris Wareham

David Goodenough wrote:

The reason was that Tomcat did not serve the Flash correctly, never did
manage to get to the bottom of why but the browser did not complain - it
just left big blank spaces.  With this setup at least that bit works.

David



My gut response is that the MIME type is wrong, so the browser doesn't
know that the file is a Flash movie. How were you serving the Flash
files when you tried it from Tomcat? You will probably need a servlet
which sets the MIME type correctly, (trying to do it from a JSP will
work, but will also fill your logs with warnings as a JSP is not
supposed to serve binary files).

Chris


On Wednesday 03 December 2008, Peter Crowther wrote:

From: David Goodenough [mailto:[EMAIL PROTECTED]
I have a site which is a mixture of html (and a bunch of images and
flash and other such stuff which came in from the web designer) and
a couple of JSPs.  I have implemented this with Apache 2.2 and Tomcat
5.5, using ProxyPass statements with ajp in the Location tag.

Is there any reason for such a complex setup?  Tomcat will quite happily
serve the static content itself.  You could:

1) Put all the content in the same directory for Tomcat to serve, keep
Apache httpd, but all your content goes through Tomcat-httpd-user;

2) Put all the content in the same directory for Tomcat to serve, remove
Apache httpd, serve the content directly through a http Connector in
Tomcat.

- Peter

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




--

Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR

Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753


www.visitlondon.com





  
  
'Visit London Limited' is registered in England under No.761149;

Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.


Visit London is the official visitor organisation for London. Visit London is 
partly funded by Partnership, the Mayor's London Development Agency and London 
Councils.
The information contained in this e-mail is confidential and intended for the 
named recipient(s) only.  If you have received it in error, please notify the 
sender immediately and then delete the message.  If you are not the intended 
recipient, you must not use, disclose, copy or distribute this email. The views 
expressed in this e-mail are those of the individual and not of Visit London. 
We reserve the right to read and monitor any email or attachment entering or 
leaving our systems without prior notice.

 Please don't print this e-mail unless you really need to.

-
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: mixed html and jsp site using ProxyPass

2008-12-03 Thread André Warnier

David Goodenough wrote:
[...]


Is there a way to divert just the .jsp files? I tried Location /*.jsp but 
that did not seem to work - maybe I got something else wrong.


You may have more luck on the Apache users list ([EMAIL PROTECTED]) 
for this.
But, assuming all your other content is to be served by Apache, and only 
the *.jsp urls to be forwarded to Tomcat, you could try this :

LocationMatch \.jsp$
  ... same as before ...
/LocationMatch


-
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: mixed html and jsp site using ProxyPass

2008-12-03 Thread André Warnier

Chris Wareham wrote:

David Goodenough wrote:

The reason was that Tomcat did not serve the Flash correctly, never did
manage to get to the bottom of why but the browser did not complain - it
just left big blank spaces.  With this setup at least that bit works.

David



My gut response is that the MIME type is wrong, so the browser doesn't
know that the file is a Flash movie. How were you serving the Flash
files when you tried it from Tomcat? You will probably need a servlet
which sets the MIME type correctly, (trying to do it from a JSP will
work, but will also fill your logs with warnings as a JSP is not
supposed to serve binary files).

How about just adding the appropriate mime-mapping section to 
(tomcat_dir)/conf/web.xml ?



-
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: mixed html and jsp site using ProxyPass

2008-12-03 Thread Chris Wareham

André Warnier wrote:

Chris Wareham wrote:

David Goodenough wrote:

The reason was that Tomcat did not serve the Flash correctly, never did
manage to get to the bottom of why but the browser did not complain - it
just left big blank spaces.  With this setup at least that bit works.

David



My gut response is that the MIME type is wrong, so the browser doesn't
know that the file is a Flash movie. How were you serving the Flash
files when you tried it from Tomcat? You will probably need a servlet
which sets the MIME type correctly, (trying to do it from a JSP will
work, but will also fill your logs with warnings as a JSP is not
supposed to serve binary files).

How about just adding the appropriate mime-mapping section to 
(tomcat_dir)/conf/web.xml ?




I was pretty sure there was a reason why my gut response missed the
obvious. I'll get some more coffee!

Chris
--

Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR

Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753


www.visitlondon.com





  
  
'Visit London Limited' is registered in England under No.761149;

Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.


Visit London is the official visitor organisation for London. Visit London is 
partly funded by Partnership, the Mayor's London Development Agency and London 
Councils.
The information contained in this e-mail is confidential and intended for the 
named recipient(s) only.  If you have received it in error, please notify the 
sender immediately and then delete the message.  If you are not the intended 
recipient, you must not use, disclose, copy or distribute this email. The views 
expressed in this e-mail are those of the individual and not of Visit London. 
We reserve the right to read and monitor any email or attachment entering or 
leaving our systems without prior notice.

 Please don't print this e-mail unless you really need to.

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



JK Connector problem

2008-12-03 Thread nitingupta183

Hi all,

I am trying to integrate Apache server with Tomcat using mod_jk. I am
folllowing the basic tutorials on this but still cant start the Apache
server when I configure httpd.conf to load the mod_jk module. It says The
requested operation has faiked!. I am not able to log the problem either
and so I am clue less as what can be the problem.

Platform Windows
Tomcat 5.5.25
Apache Server 2.2.10
mod_jk connector 1.2.27

Any help would  be highly appreciated.

Thanks.

Nitin
-- 
View this message in context: 
http://www.nabble.com/JK-Connector-problem-tp20813241p20813241.html
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]



Re: Tomcat mapping of URLs - servlets

2008-12-03 Thread Markus Schönhaber
André Warnier:

 It appears anyway that my previous attempted logic was quite wrong.
 But I still find the spec quite confusing.  There is some kind of 
 mixture between servlet and web application that is not very clear, 
 at least to me.
 
 As I understand it now, there are 2 steps :
 1) the appropriate webapp (not servlet) is located using the path, not 
 the url-pattern
 2) the appropriate servlet *within* the webapp is selected based on the 
 url-pattern

Yes.
Example: given the URL http://servername/foo/bar/baz/, the Container
looks at /foo/bar/baz/ to find out which webapp should handle the request.
- If there's a webapp with the context path /foo/bar/baz, that's the one
to handle the request and the path for the servlet mapping is /.
- If there's a webapp with the context path /foo/bar, that's the one to
handle the request and the path for the servlet mapping is /baz/.
- If there's a webapp with the context path /foo, that's the one to
handle the request and the path for the servlet mapping is /bar/baz/.
- If neither of the above is true, the webapp with the context path 
(the default webapp, ROOT in Tomcat) is the one to handle the request
and the path for the servlet mapping is /foo/bar/baz/.

 and
 3) .. each webapp has a default servlet, to which things get mapped 
 when no other url-pattern of this webapp matches

Essentially, yes. You could comment the Default Servlet and it's mapping
in ${catalina.base}/conf/web.xml, though.

 4) the ROOT webapp matches the path /, not the url-pattern /

The default webapp (named ROOT in Tomcat) matches the path . Apart
from that, what you said in 1) is true for all webapps, including the
default one.

 Is the above correct ?
 
 The confusing part for me may also be due to my misunderstanding.
 I view this as follows :
 - a web application is the whole thing that one finds below 
 (tomcat_dir)/webapps/xyz for example (including its static pages, 
 WEB-INF/web.xml, its servlets etc..)
 - this webapp can consist of one or more servlets, each with its set of 
 url-pattern's that it handles
 
 Not so ?

No, correct.

 And if so, then I find the examples in table SRV.11.2.2 Example Mapping 
 Set quite confusing, since paths like
 /foo
 /bar
 /catalog
 would tend to imply different webapps, rather than different servlets 
 inside of one webapp, no ?

No. These examples talk about the mappings *inside* a webapp, i. e. what
can be used as a value for url-mapping.
In other words: the part of the request URL which is used to determine
the webapp to handle the request is already removed.

Take this trivial JSP and deploy it to different contexts/webapps. Maybe
the output will make things clearer:

html
body
table
trtdRequestURL/tdtd%= request.getRequestURL() %/td/tr
trtdRequestURI/tdtd%= request.getRequestURI() %/td/tr
trtdContextPath/tdtd%= request.getContextPath() %/td/tr
trtdServletPath/tdtd%= request.getServletPath() %/td/tr
/table
/body
/html

Regards
  mks

-
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 mapping of URLs - servlets

2008-12-03 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat mapping of URLs - servlets

 Even when you get there though, it is still difficult to download this
 thing. The proposed filename is not a valid path and must be changed..

What browser and platform are you using?  (I'm asking because I have no 
problems with viewing the PDF and saving it.)  Note that the 
servlet-2_5-mrel2-spec.pdf button cannot be right-clicked and processed with 
Save As; you must use a left-click, let Adobe Reader open, and save from 
there.

The only problem with the file name is that the document is really MR6, not MR2.

 - 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: jvm cowardly refuses to print a thread dump

2008-12-03 Thread Martin Gainty

if its a bean make sure you 
declare your attributes as having either private or protected access
in the case of attribute called size contained in class FuBar
class FuBar
{
  public FuBar() { ; } //default no-arg constructor
  private int Size;
//declare accessor getSize
  public getSize()
 {
   return Size;
  }
//declare mutator setSize
  public setSize(int Size)
  {
   this.Size = Size;
  }
} //end class definition

HTH
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Date: Tue, 2 Dec 2008 08:47:05 -0600
 Subject: RE: jvm cowardly refuses to print a thread dump
 
  From: news [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Schoett
  Subject: Re: jvm cowardly refuses to print a thread dump
 
  Very likely you have unsynchronized accesses to the ArrayList
 
 That's irrelevant for the size() method, where the entire code consists of 
 this:
 
 public int size() {
 return size;
 }
 
 Not much chance for a loop there...
 
  - 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]
 

_
You live life online. So we put Windows on the web. 
http://clk.atdmt.com/MRT/go/127032869/direct/01/

RE: Tomcat mapping of URLs - servlets

2008-12-03 Thread Caldarale, Charles R
 From: Caldarale, Charles R
 Subject: RE: Tomcat mapping of URLs - servlets

 Note that the servlet-2_5-mrel2-spec.pdf button cannot be
 right-clicked and processed with Save As

I was mistaken; you can do a right-click and Save As, without any problems.  
Were you on the correct page when you tried it?  The proper one is has the file 
name with a down arrow next to it, and a Download Selected with Sun Download 
Manager button below that.  All three methods (left click on the file name, 
right click on the file name, and the Download Manager) worked properly for me, 
with no invalid paths to edit.

Still a mystery why JCP keeps it so well hidden.

 - 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: Tomcat mapping of URLs - servlets

2008-12-03 Thread André Warnier

Markus Schönhaber wrote:

André Warnier:


It appears anyway that my previous attempted logic was quite wrong.
But I still find the spec quite confusing.  There is some kind of 
mixture between servlet and web application that is not very clear, 
at least to me.


As I understand it now, there are 2 steps :
1) the appropriate webapp (not servlet) is located using the path, not 
the url-pattern
2) the appropriate servlet *within* the webapp is selected based on the 
url-pattern


Yes.
Example: given the URL http://servername/foo/bar/baz/, the Container
looks at /foo/bar/baz/ to find out which webapp should handle the request.
- If there's a webapp with the context path /foo/bar/baz, that's the one
to handle the request and the path for the servlet mapping is /.
- If there's a webapp with the context path /foo/bar, that's the one to
handle the request and the path for the servlet mapping is /baz/.
- If there's a webapp with the context path /foo, that's the one to
handle the request and the path for the servlet mapping is /bar/baz/.
- If neither of the above is true, the webapp with the context path 
(the default webapp, ROOT in Tomcat) is the one to handle the request
and the path for the servlet mapping is /foo/bar/baz/.


and
3) .. each webapp has a default servlet, to which things get mapped 
when no other url-pattern of this webapp matches


Essentially, yes. You could comment the Default Servlet and it's mapping
in ${catalina.base}/conf/web.xml, though.


4) the ROOT webapp matches the path /, not the url-pattern /


The default webapp (named ROOT in Tomcat) matches the path . Apart
from that, what you said in 1) is true for all webapps, including the
default one.


Is the above correct ?

The confusing part for me may also be due to my misunderstanding.
I view this as follows :
- a web application is the whole thing that one finds below 
(tomcat_dir)/webapps/xyz for example (including its static pages, 
WEB-INF/web.xml, its servlets etc..)
- this webapp can consist of one or more servlets, each with its set of 
url-pattern's that it handles


Not so ?


No, correct.

And if so, then I find the examples in table SRV.11.2.2 Example Mapping 
Set quite confusing, since paths like

/foo
/bar
/catalog
would tend to imply different webapps, rather than different servlets 
inside of one webapp, no ?


No. These examples talk about the mappings *inside* a webapp, i. e. what
can be used as a value for url-mapping.
In other words: the part of the request URL which is used to determine
the webapp to handle the request is already removed.

Take this trivial JSP and deploy it to different contexts/webapps. Maybe
the output will make things clearer:

html
body
table
trtdRequestURL/tdtd%= request.getRequestURL() %/td/tr
trtdRequestURI/tdtd%= request.getRequestURI() %/td/tr
trtdContextPath/tdtd%= request.getContextPath() %/td/tr
trtdServletPath/tdtd%= request.getServletPath() %/td/tr
/table
/body
/html


Thanks.

Now still one more question, based upon what you wrote above :
 - If there's a webapp with the context path /foo/bar/baz, that's the one
 to handle the request and the path for the servlet mapping is /.

Not that I would necessarily do this, but assuming that I create the 
following file structure :


(tomcat_dir)/webapps
   /foo
  various.jsp
  WEB-INF
 web.xml
  /bar
 various.jsp
 WEB-INF
web.xml
 /baz
various.jsp

and I start Tomcat.

Then I guess I have (at least) 2 webapps : a /foo webapp, and a 
/foo/bar webapp.


Now a request comes in with the url /foo/bar/baz/various.jsp

How does Tomcat determine that /foo/bar/baz is not itself a webapp, but 
merely a sub-dir of webapp /foo/bar ?

Or does it complain somewhere along the way ?

That may not be the right way to ask the question, so to put this 
another way : when Tomcat starts, does it recurse into each webapp dir 
to see if there is (for instance) another WEB-INF subdir hidden deeper 
there ?  Or does this information come from somewhere else ?






-
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 mapping of URLs - servlets

2008-12-03 Thread Mark Thomas
André Warnier wrote:
 Then I guess I have (at least) 2 webapps : a /foo webapp, and a
 /foo/bar webapp.
 
 Now a request comes in with the url /foo/bar/baz/various.jsp
 
 How does Tomcat determine that /foo/bar/baz is not itself a webapp, but
 merely a sub-dir of webapp /foo/bar ?

The longest context path always wins. So in this case any request to
/foo/bar/... will always be handled by the /foo/bar webapp.

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]



Re: jvm cowardly refuses to print a thread dump

2008-12-03 Thread Chris Wareham

Martin Gainty wrote:
if its a bean make sure you 
declare your attributes as having either private or protected access

in the case of attribute called size contained in class FuBar
class FuBar
{
  public FuBar() { ; } //default no-arg constructor
  private int Size;
//declare accessor getSize
  public getSize()
 {
   return Size;
  }
//declare mutator setSize
  public setSize(int Size)
  {
   this.Size = Size;
  }
} //end class definition

HTH
Martin 


You probably also want to declare Size as volatile if it's going to be
accessed by multiple threads and isn't enclosed in a synchronized
method or block. You may also want to declare the argument to the setter
as final, your variable naming convention conflicts with the Sun one,
and the default constructor is redundant. I'll remove my pedant hat now.

Chris

__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 






From: [EMAIL PROTECTED]
To: users@tomcat.apache.org
Date: Tue, 2 Dec 2008 08:47:05 -0600
Subject: RE: jvm cowardly refuses to print a thread dump


From: news [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Schoett
Subject: Re: jvm cowardly refuses to print a thread dump

Very likely you have unsynchronized accesses to the ArrayList

That's irrelevant for the size() method, where the entire code consists of this:

public int size() {
return size;
}

Not much chance for a loop there...

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



_
You live life online. So we put Windows on the web. 
http://clk.atdmt.com/MRT/go/127032869/direct/01/



--

Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR

Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753


www.visitlondon.com





  
  
'Visit London Limited' is registered in England under No.761149;

Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.


Visit London is the official visitor organisation for London. Visit London is 
partly funded by Partnership, the Mayor's London Development Agency and London 
Councils.
The information contained in this e-mail is confidential and intended for the 
named recipient(s) only.  If you have received it in error, please notify the 
sender immediately and then delete the message.  If you are not the intended 
recipient, you must not use, disclose, copy or distribute this email. The views 
expressed in this e-mail are those of the individual and not of Visit London. 
We reserve the right to read and monitor any email or attachment entering or 
leaving our systems without prior notice.

 Please don't print this e-mail unless you really need to.

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



[ANN] Apache Tomcat 4.1.39 stable is released

2008-12-03 Thread Mark Thomas
The Apache Tomcat team is proud to announce the immediate availability of
Tomcat 4.1.39 stable. This build contains a small number of bug fixes and
two important, one moderate and one low severity security fixes.

Apache Tomcat is an implementation of the Java Server Pages 1.2 and Java
Servlet 2.3 specifications.

Please refer to the release notes for a complete list of changes.

Downloads:
http://tomcat.apache.org/download-41.cgi

Security information:
http://tomcat.apache.org/security-4.html

The Apache Tomcat Team


-
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 mapping of URLs - servlets

2008-12-03 Thread André Warnier

Caldarale, Charles R wrote:

From: Caldarale, Charles R
Subject: RE: Tomcat mapping of URLs - servlets

Note that the servlet-2_5-mrel2-spec.pdf button cannot be
right-clicked and processed with Save As


I was mistaken; you can do a right-click and Save As, without any problems.  Were you 
on the correct page when you tried it?  The proper one is has the file name with a down arrow next 
to it, and a Download Selected with Sun Download Manager button below that.  All three 
methods (left click on the file name, right click on the file name, and the Download Manager) 
worked properly for me, with no invalid paths to edit.

Still a mystery why JCP keeps it so well hidden.


Just remember this, you gurus here, when you tell an OP to just go look 
at the specs..





I was using Firefox 2.0.0.15, on a Windows XP station.
I just clicked on the download link, let the document open in the 
browser's PDF plugin, then clicked on the save a copy diskette icon of 
the plugin.
It came up with the standard file dialog, on which I just clicked on the 
Save button.

That's when it popped up with an invalid path dialog.
The filename indeed in the file..save dialog was very very long, which I 
guess it didn't like.


In fact I just re-did this, with the same result.
The filename as shown in the file..save box is :

http___cds-esd.sun.com_ESD34_JSCDL_servlet_2.5-mrel2_servlet-2_5-mrel2-spec.pdf_AuthParam=1228317193_d403854b71d795ea3a31917ee8f68382TicketId=nodzAVkWRHd5l%2BIvkk6ZUZmZdA%3D%3DGroupName=CDSFilePath=_ESD34_JSCDL_servlet_2.5-mrel2_servlet-2_5-mrel2-spec.pdfFile=servlet-2_5-mrel2-spec.pdf

and that is what it does not like.


-
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 mapping of URLs - servlets

2008-12-03 Thread André Warnier

Caldarale, Charles R wrote:
[...]

Forgot to add :
mine is an Official Firefox, running on an Official Windows XP.
;-)


-
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 mapping of URLs - servlets

2008-12-03 Thread André Warnier

Mark Thomas wrote:

André Warnier wrote:

Then I guess I have (at least) 2 webapps : a /foo webapp, and a
/foo/bar webapp.

Now a request comes in with the url /foo/bar/baz/various.jsp

How does Tomcat determine that /foo/bar/baz is not itself a webapp, but
merely a sub-dir of webapp /foo/bar ?


The longest context path always wins. So in this case any request to
/foo/bar/... will always be handled by the /foo/bar webapp.


I guess I wasn't clear enough in my question.

What I meant to ask was : considering the apparent path of the URL is 
/foo/bar/baz/, how/why does Tomcat give up on the /foo/bar/baz 
(potential) webapp path, and attribute this to the /foo/bar webapp.


Of course, you and me know that there is no webapp in /foo/bar/baz, 
but we're smart humans who can just see this at a glance.

But how Tomcat know ?
Because there is no WEB-INF there, right now when it checks ? or because 
of something we did/did not tell him earlier ?




-
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 mapping of URLs - servlets

2008-12-03 Thread Mark Thomas
André Warnier wrote:
 Mark Thomas wrote:
 André Warnier wrote:
 Then I guess I have (at least) 2 webapps : a /foo webapp, and a
 /foo/bar webapp.

 Now a request comes in with the url /foo/bar/baz/various.jsp

 How does Tomcat determine that /foo/bar/baz is not itself a webapp, but
 merely a sub-dir of webapp /foo/bar ?

 The longest context path always wins. So in this case any request to
 /foo/bar/... will always be handled by the /foo/bar webapp.

 I guess I wasn't clear enough in my question.
 
 What I meant to ask was : considering the apparent path of the URL is
 /foo/bar/baz/, how/why does Tomcat give up on the /foo/bar/baz
 (potential) webapp path, and attribute this to the /foo/bar webapp.
 
 Of course, you and me know that there is no webapp in /foo/bar/baz,
 but we're smart humans who can just see this at a glance.
 But how Tomcat know ?
 Because there is no WEB-INF there, right now when it checks ? or because
 of something we did/did not tell him earlier ?

It maintains an internal list of deployed contexts (web apps) and their
associated paths so it knows there is no /foo/bar/baz webapp.

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]



RE: Tomcat mapping of URLs - servlets

2008-12-03 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat mapping of URLs - servlets

 I was using Firefox 2.0.0.15, on a Windows XP station.

Hmmm... I haven't used Firefox 2 in a very long time - not since Firefox 3 was 
in beta.

 http___cds-esd.sun.com_ESD34_JSCDL_servlet_2.5-mrel2_servlet-2
 _5-mrel2-spec.pdf_AuthParam=1228317193_d403854b71d795ea3a31917
 ee8f68382TicketId=nodzAVkWRHd5l%2BIvkk6ZUZmZdA%3D%3DGroupNam
 e=CDSFilePath=_ESD34_JSCDL_servlet_2.5-mrel2_servlet-2_5-mrel
 2-spec.pdfFile=servlet-2_5-mrel2-spec.pdf

 and that is what it does not like.

I wouldn't either.  Again, using current versions of Firefox and Adobe Reader, 
the problem doesn't seem to exist.

 - 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: can mod_jk detect web service unavailable

2008-12-03 Thread Zeke
Mark Thomas [EMAIL PROTECTED] wrote:
Zeke wrote:
 Hi:
 I have a JBOSS cluster which use Apache with mod_jk as HTTP load
balancer. In my cluster, some nodes are deployed web service, but not all.
For example, node 1 contains web servicebook_service, I can call the web
service using URL http://www.node1.com/book_service;, but node 2 does not
contain it. I hope mod_jk can help me to detect whether the requested web
service exists. That is to say, if I call the web service using 
http://www.loadbalancer.com/book_service;, mod_jk can know only node 1
contains the web service and node 2 not, then the request will always be
dispatched to node 1. But with my current configuration on mod_jk and
Apache, I fount that the request can be dispatched to node 2. Then surely
exception will be thrown, since the web service not exists on node 2.
 Can mod_jk support it? Do I need some specific configuration?
 Any suggestion from you will be very appreciated!

Only map the web service url to the nodes where it exists.

Mark


Thanks for the reply, Mark!
But I need a more dynamic way. For example, node 1 has deployed the web
service war, but it is down for some reason and can not work any more. Then
the web service URL will be unavailable while the JBOSS are still running.
Mapping the web service url seems can not handle it, the load balancer will
still dispatch the request to node 1. I hope mod_jk can detect if the
requested web service is available at runtime.

Thanks!
Zeke


Re: [ANN] Apache Tomcat 4.1.39 stable is released

2008-12-03 Thread André Warnier

Mark Thomas wrote:

The Apache Tomcat team is proud to announce the immediate availability of
Tomcat 4.1.39 stable. 


Remembering numerous exhortations on this list to upgrade, I must say 
this announcement is somewhat surprising to me.  So there are older 
versions which are still maintained/enhanced ?




-
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: JspC processFile java.lang.NullPointerException

2008-12-03 Thread Marco Machmer


marco wrote:
 
 hi,
 
 we have the same error message.
 the problem seems to be that we have  bundled our standard tag files in an
 jar library file
 and call these tagfile tags from inside another tagfile tag that is
 located in WEB-INF/tags.
 only the first tagfile tag of the jsp will be compiled from jasper.
 if we start the jasper once again the next tagfile tag will be compiled
 and so on.
 
 marco
 

Josh Joy-2 wrote:
 
 Am receiving the following when trying to precompile my jsp. Server starts
 up and pages run fine without precompiling.
 
 Using apache-tomcat-6.0.18
 
 
 property name=webapp.path value=./WebContent /
 
 import file=${tomcat.home}/bin/catalina-tasks.xml/
 
 
 target name=jspc
 delete quiet=true
 fileset dir=${webapp.path}/WEB-INF/classes/org/apache/jsp/
 /delete
 
 
 jasper validateXml=false
  uriroot=${webapp.path}
  webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml
  addWebXmlMappings=true
  outputDir=${webapp.path}/WEB-INF/classes
  compilerSourceVM=1.6 compilerTargetVM=1.6
  /
 
 /target
 
 
 
 
 
[jasper] Nov 4, 2008 8:46:43 PM org.apache.jasper.JspC processFile
[jasper] SEVERE: ERROR-the file '/WEB-INF/views/upload/page.jsp'
 generated the following general exception:
[jasper] java.lang.NullPointerException
[jasper] at sun.misc.URLClassPath$3.run(URLClassPath.java:323)
[jasper] at java.security.AccessController.doPrivileged(Native
 Method)
[jasper] at sun.misc.URLClassPath.getLoader(URLClassPath.java:320)
[jasper] at sun.misc.URLClassPath.getLoader(URLClassPath.java:297)
[jasper] at
 sun.misc.URLClassPath.getResource(URLClassPath.java:167)
[jasper] at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
[jasper] at java.security.AccessController.doPrivileged(Native
 Method)
[jasper] at
 java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[jasper] at
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
[jasper] at
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
[jasper] at
 ...
 

-- 
View this message in context: 
http://www.nabble.com/JspC-processFile-java.lang.NullPointerException-tp20335450p20815489.html
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]



Re: [ANN] Apache Tomcat 4.1.39 stable is released

2008-12-03 Thread Len Popp
On Wed, Dec 3, 2008 at 10:30, André Warnier [EMAIL PROTECTED] wrote:
 Remembering numerous exhortations on this list to upgrade, I must say this
 announcement is somewhat surprising to me.  So there are older versions
 which are still maintained/enhanced ?

Yes. See http://tomcat.apache.org/#Apache%20Tomcat%20Versions
-- 
Len


RE: What exactly happens when I configure a different host

2008-12-03 Thread Caldarale, Charles R
 From: Anand HS [mailto:[EMAIL PROTECTED]
 Subject: Re: What exactly happens when I configure a different host

 I changed the Host Name and Engine defaultHost back to
 localhost and the error vanishes.
 However, it re appears when I give a different name than localhost.

Finally had time to go chase this a bit more.  The error doesn't really 
vanish when the Host name is localhost, but it is not sent to the console 
window Tomcat is using, nor to the catalina.*.log file; you can find it in the 
localhost.*.log file.

When you change the Host name to something else, the error is displayed in 
the console window and in the catalina.*.log file, but not in localhost.*.log.

The reason behind this apparently inconsistent behavior is the settings in 
conf/logging.properties:  log entries for localhost are routed to specific 
handlers, which do not include the console window.  When you changed the Host 
name but did not update logging.properties, the default log handler kicked in, 
which dumped the error message to the console.

 - 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: [OT] Tomcat mapping of URLs - servlets

2008-12-03 Thread André Warnier

Caldarale, Charles R wrote:

From: André Warnier [mailto:[EMAIL PROTECTED]
Subject: Re: Tomcat mapping of URLs - servlets

I was using Firefox 2.0.0.15, on a Windows XP station.


Hmmm... I haven't used Firefox 2 in a very long time - not since Firefox 3 was 
in beta.


http___cds-esd.sun.com_ESD34_JSCDL_servlet_2.5-mrel2_servlet-2
_5-mrel2-spec.pdf_AuthParam=1228317193_d403854b71d795ea3a31917
ee8f68382TicketId=nodzAVkWRHd5l%2BIvkk6ZUZmZdA%3D%3DGroupNam
e=CDSFilePath=_ESD34_JSCDL_servlet_2.5-mrel2_servlet-2_5-mrel
2-spec.pdfFile=servlet-2_5-mrel2-spec.pdf

and that is what it does not like.


I wouldn't either.  Again, using current versions of Firefox and Adobe Reader, 
the problem doesn't seem to exist.



Using the Firefox LiveHttpHeaders add-on, it is quite interesting to see 
what really happens when opening this document in the PDF plugin.
At any rate, there is no Content-disposition: header with a filename 
coming from the server.
So the filename above and its usage in the file..save dialog must be a 
function of the plugin, not the browser.
Maybe a more recent PDF plugin splits the above string at the File= 
portion.




http://cds-esd.sun.com/ESD34/JSCDL/servlet/2.5-mrel2/servlet-2_5-mrel2-spec.pdf?AuthParam=1228318870_1110e1ea2590969b0c44bee9625ff3aaTicketId=B%2Fw6nRqGSlxISRRFOlFflw7mGroupName=CDSFilePath=/ESD34/JSCDL/servlet/2.5-mrel2/servlet-2_5-mrel2-spec.pdfFile=servlet-2_5-mrel2-spec.pdf

GET 
/ESD34/JSCDL/servlet/2.5-mrel2/servlet-2_5-mrel2-spec.pdf?AuthParam=1228318870_1110e1ea2590969b0c44bee9625ff3aaTicketId=B%2Fw6nRqGSlxISRRFOlFflw7mGroupName=CDSFilePath=/ESD34/JSCDL/servlet/2.5-mrel2/servlet-2_5-mrel2-spec.pdfFile=servlet-2_5-mrel2-spec.pdf 
HTTP/1.1

Host: cds-esd.sun.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.15) 
Gecko/20080623 Firefox/2.0.0.15
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-gb,en;q=0.7,de-de;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: s_vi=[CS]v1|491096734D51-A02085E2721[CE]; s_cc=true; 
s_sq=%5B%5BB%5D%5D


HTTP/1.x 200 OK
Server: Apache
Etag: 57587018e35c367a072891456a862416:1189475510
Last-Modified: Mon, 10 Sep 2007 23:49:29 GMT
Accept-Ranges: bytes
Content-Length: 2248516
Content-Type: application/pdf
Expires: Wed, 03 Dec 2008 15:39:11 GMT
Cache-Control: max-age=0, no-cache
Pragma: no-cache
Date: Wed, 03 Dec 2008 15:39:11 GMT
Connection: keep-alive


.. and after that a lot of partial-content byterange answers.
But also without filename.

-
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 mapping of URLs - servlets

2008-12-03 Thread André Warnier

Mark Thomas wrote:

André Warnier wrote:

Mark Thomas wrote:

André Warnier wrote:

Then I guess I have (at least) 2 webapps : a /foo webapp, and a
/foo/bar webapp.

Now a request comes in with the url /foo/bar/baz/various.jsp

How does Tomcat determine that /foo/bar/baz is not itself a webapp, but
merely a sub-dir of webapp /foo/bar ?

The longest context path always wins. So in this case any request to
/foo/bar/... will always be handled by the /foo/bar webapp.


I guess I wasn't clear enough in my question.

What I meant to ask was : considering the apparent path of the URL is
/foo/bar/baz/, how/why does Tomcat give up on the /foo/bar/baz
(potential) webapp path, and attribute this to the /foo/bar webapp.

Of course, you and me know that there is no webapp in /foo/bar/baz,
but we're smart humans who can just see this at a glance.
But how Tomcat know ?
Because there is no WEB-INF there, right now when it checks ? or because
of something we did/did not tell him earlier ?


It maintains an internal list of deployed contexts (web apps) and their
associated paths so it knows there is no /foo/bar/baz webapp.

At the risk of heavily insisting, but it seems we've now moved the issue 
back to the webapp deployment time, but not really solved it.
At deployment time thus (in my hypothetical case above when Tomcat 
starts and finds a such webapps top dir), does it recursively go through 
the webapp dirs and subdirs, to determine what is a webapp and what is not ?


-
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: can mod_jk detect web service unavailable

2008-12-03 Thread David Knox

Hi Zeke,
You didn't say which version of JBOSS you're using, I'm assuming its  
a recent 4.x version that includes buddy-clustering.  You're JBOSS  
cluster will need to be reconfigured to do what you want. The JBOSS  
community lists and wiki (www.jboss.org) is the best place for your  
question. The JBOSS community wiki has several articles on cluster  
configurations.


cheers,
--knoxy


David Knox
Information System Architect
+1 303-748-8906
http://pragmaticis.blogspot.com




On Dec 3, 2008, at 8:33 AM, Zeke wrote:


Mark Thomas [EMAIL PROTECTED] wrote:
Zeke wrote:

Hi:
I have a JBOSS cluster which use Apache with mod_jk as HTTP load
balancer. In my cluster, some nodes are deployed web service, but  
not all.
For example, node 1 contains web servicebook_service, I can call  
the web
service using URL http://www.node1.com/book_service;, but node 2  
does not
contain it. I hope mod_jk can help me to detect whether the  
requested web

service exists. That is to say, if I call the web service using 
http://www.loadbalancer.com/book_service;, mod_jk can know only node 1
contains the web service and node 2 not, then the request will  
always be

dispatched to node 1. But with my current configuration on mod_jk and
Apache, I fount that the request can be dispatched to node 2. Then  
surely

exception will be thrown, since the web service not exists on node 2.

Can mod_jk support it? Do I need some specific configuration?
Any suggestion from you will be very appreciated!


Only map the web service url to the nodes where it exists.

Mark



Thanks for the reply, Mark!
But I need a more dynamic way. For example, node 1 has deployed  
the web
service war, but it is down for some reason and can not work any  
more. Then
the web service URL will be unavailable while the JBOSS are still  
running.
Mapping the web service url seems can not handle it, the load  
balancer will

still dispatch the request to node 1. I hope mod_jk can detect if the
requested web service is available at runtime.

Thanks!
Zeke



-
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 mapping of URLs - servlets

2008-12-03 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat mapping of URLs - servlets

 At deployment time thus (in my hypothetical case above when
 Tomcat starts and finds a such webapps top dir), does it
 recursively go through the webapp dirs and subdirs, to
 determine what is a webapp and what is not ?

No, that's not necessary; only .war files and directories immediately under a 
Host's appBase along with any Context elements with non-redundant docBase 
attributes are webapps.

 - 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: Tomcat mapping of URLs - servlets

2008-12-03 Thread André Warnier

Caldarale, Charles R wrote:

From: André Warnier [mailto:[EMAIL PROTECTED]
Subject: Re: Tomcat mapping of URLs - servlets

At deployment time thus (in my hypothetical case above when
Tomcat starts and finds a such webapps top dir), does it
recursively go through the webapp dirs and subdirs, to
determine what is a webapp and what is not ?


No, that's not necessary; only .war files and directories immediately under a 
Host's appBase along with any Context elements with non-redundant docBase 
attributes are webapps.


Ok, thanks.
So, in my admittedly forced earlier example, only /foo would be 
recognised as a webapp, and even /foo/bar would not be.
Except if there was, for /foo/bar, an appropriate Context element, 
inside a foo#bar.xml file, itself located under 
(tomcat_base)/conf/Catalina/(hostname)/


Have I finally got it right ?
(Not quite sure about the foo#bar thing, but I think  remember reading 
that on this list)


You know, I think I am beginning to understand the problem with the 
documentation.  While the API is fairly hierarchical and lends itself to 
that kind of documentation structure, the configuration of Tomcat itself 
doesn't.  Each element seems to require as a pre-requisite the knowledge 
of many others, which makes it really hard to explain something in a 
simple and progressive fashion.
Maybe someone who has been involved for years with Tomcat, or who is 
involved in the design itself of Tomcat, sees this in a different way. 
But for a beginner it is really hard to get a grip.


-
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 mapping of URLs - servlets

2008-12-03 Thread Mark Thomas
André Warnier wrote:
 Caldarale, Charles R wrote:
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat mapping of URLs - servlets

 At deployment time thus (in my hypothetical case above when
 Tomcat starts and finds a such webapps top dir), does it
 recursively go through the webapp dirs and subdirs, to
 determine what is a webapp and what is not ?

 No, that's not necessary; only .war files and directories immediately
 under a Host's appBase along with any Context elements with
 non-redundant docBase attributes are webapps.

 Ok, thanks.
 So, in my admittedly forced earlier example, only /foo would be
 recognised as a webapp, and even /foo/bar would not be.
 Except if there was, for /foo/bar, an appropriate Context element,
 inside a foo#bar.xml file, itself located under
 (tomcat_base)/conf/Catalina/(hostname)/
 
 Have I finally got it right ?

Almost ;)

As of 6.0.18 you can have foo#bar.war or a foo#bar directory in your host's
appBase and they will also be recognised as having a context path of /foo/bar

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]



RE: Tomcat mapping of URLs - servlets

2008-12-03 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat mapping of URLs - servlets

 Except if there was, for /foo/bar, an appropriate Context element,
 inside a foo#bar.xml file, itself located under
 (tomcat_base)/conf/Catalina/(hostname)/

Or an [appBase]/foo#bar directory, or an [appBase]/foo#bar.war file (current 
Tomcat levels only).

 But for a beginner it is really hard to get a grip.

As with many things, you sometimes have to know 90% of the answer before you 
can ask the question.

 - 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: tomcat 6.0 problem with weblogic.jar

2008-12-03 Thread Juha Laiho
Mark Thomas wrote:
 pharish2 wrote:
 java.lang.NoClassDefFoundError: weblogic/wsee/jaxrpc/ServiceImpl
  java.lang.ClassLoader.defineClass1(Native Method)
  java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

 I am getting this exception in tomcat
 
 Then you need to find a jar that provides that class but does not include
 any of the servlet or jsp API classes.

There's also the potential legal issue of using weblogic.jar without
using the rest of WebLogic, i.e. using weblogic.jar without buying the
server license from Oracle. IANAL, but I would be very wary of using
a setup like this. Corporate licensing spats are not something to be
involved in.
-- 
..Juha

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



Session timeout related fixes between Tomcat 5.0 and Tomcat 5.5.x?

2008-12-03 Thread andre John Mas

Hi,

We are currently experiencing session issues with our customer's Tomcat 
server, in a production environment. Basically what is happening is that, 
despite the idle time-out being set for 20 minutes we are seeing sessions 
that have been idle (have not been accessed) for over 3 hours. The net 
result is that the Tomcat server needs to get restarted.


We are currently investigating the reason why, but are currently in the dark 
on how we should continue our analysis. If anyone has any ideas they would 
be much appreciated.


One parallel line of analysis is to find out if there were any fixes between 
5.0.x and 5.5.x, that are related to sessions not timing out. The customer 
is resisting an upgrade, but if we can show that there have been session 
related fixes, then this could help our case. If there have been none, then 
we will simply have to focus purely on the web application.


Any help would be appreciated.

André-John



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



RE: Session timeout related fixes between Tomcat 5.0 and Tomcat 5.5.x?

2008-12-03 Thread andre John Mas

From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: Session timeout related fixes between Tomcat 5.0 and Tomcat 
5.5.x?


 From: andre John Mas [mailto:[EMAIL PROTECTED]
 Subject: Session timeout related fixes between Tomcat 5.0 and
 Tomcat 5.5.x?

 Basically what is happening is that, despite the idle
 time-out being set for 20 minutes we are seeing sessions
 that have been idle (have not been accessed) for over
 3 hours.

Do you have keep alives enabled?  Look at the maxKeepAliveRequests 
attribute:

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html#Standard%20Implementation

Is your webapp caching sessions for any reason?  Can you implement a 
SessionListener to see if expiration events are occurring?


 The net result is that the Tomcat server needs to get restarted.

Why?  Are you running out of heap space?  Do you have a memory leak 
elsewhere as well?


 One parallel line of analysis is to find out if there were
 any fixes between 5.0.x and 5.5.x, that are related to
 sessions not timing out.

The changelog is here for your perusal:
http://tomcat.apache.org/tomcat-5.5-doc/changelog.html



I have implemented a session listener and also activated access logs. The 
session listener adds a list with sessionCreated() and removes them with 
sessionDestroyed(). I then have a JSP that displays the list, along with 
when the session was created, using getCreationTime(), and when the session 
was last accessed, using getLastAccessedTime(). If a session has already 
been invalidated by the container I will get a IllegalStateException when I 
call  getCreationTime() on the session I am getting the information from. An 
example output of my tool is:


sessioninfo count=581 maxLife=657.410  maxIdle=636.710 
   session id=54D57E020A2791CDDDE6307E7565C328 life=657.410 
idle=632.789 /
   session id=6EE000B43250CC6CEDCD3B2D95A5A79B life=657.039 
idle=616.064 /
   session id=8CE0C68E1098C291D69F70FEB4EFC631 life=641.774 
idle=636.710 /
   session id=10C182293F0CBA68291AF2C439E6058A life=104.579 
idle=65.900 /
   session id=F62A60B0037D09D44B7F27E549A4D6B1 life=104.336 
idle=74.971 /
   session id=CAC0CA3066737D8316CBABB7E960EDBC life=104.195 
idle=98.052 /
   session id=FD8CCFF63428DE1C50A668DF27C2865D life=103.911 
idle=64.812 /
   session id=874032F034F3E12C911C9152632C5D7D life=101.407 
idle=99.031 /

/sessioninfo

- life is current time - creation time.
- idle is current time - last accessed time.

When I speak to our operations team they tell me that the server crashes 
because it is unable to create any more sessions, so it is possible we are 
out of heap space. The logs show me that at least half of the sessions are 
idle for more than 30min. I could probably add more information to the tool 
to display memory usage.


The other issue is that we are having trouble reproducing this in a 
development environment, so it is making our life just a bit harder.


The changelog that you pointed me to only seems to cover changes from 5.5 
onwards. There is nothing there covering 5.x previous to that. Are there any 
older logs available anywhere?


Andre



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



RE: Session timeout related fixes between Tomcat 5.0 and Tomcat 5.5.x?

2008-12-03 Thread Caldarale, Charles R
 From: andre John Mas [mailto:[EMAIL PROTECTED]
 Subject: RE: Session timeout related fixes between Tomcat 5.0
 and Tomcat 5.5.x?

 When I speak to our operations team they tell me that
 the server crashes because it is unable to create any
 more sessions

They're fudging, so you really do need to find out what the exact problem is.

 I then have a JSP that displays the list

You should also capture the timeout value for each session via 
getMaxInactiveInterval() to see if your webapp is changing the setting from the 
default.

 The other issue is that we are having trouble reproducing
 this in a development environment

I presume that means sessions are behaving themselves and going away after 30 
minutes.

 The changelog that you pointed me to only seems to cover
 changes from 5.5 onwards.

Which is what you asked for; 5.5.0 was cut from whatever the 5.0 version was at 
the time.  (There were no 5.1 - 5.4 legs.)  All code that went into 5.5 is 
described there, although possibly not as comprehensively as we'd like.

 - Chuck


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

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



Re: can mod_jk detect web service unavailable

2008-12-03 Thread Rainer Jung
Zeke schrieb:
 Hi: I have a JBOSS cluster which use Apache with mod_jk as HTTP load
 balancer. In my cluster, some nodes are deployed web service, but not
 all. For example, node 1 contains web servicebook_service, I can call
 the web service using URL http://www.node1.com/book_service;, but
 node 2 does not contain it. I hope mod_jk can help me to detect
 whether the requested web service exists. That is to say, if I call
 the web service using http://www.loadbalancer.com/book_service;,
 mod_jk can know only node 1 contains the web service and node 2 not,
 then the request will always be dispatched to node 1. But with my
 current configuration on mod_jk and Apache, I fount that the request
 can be dispatched to node 2. Then surely exception will be thrown,
 since the web service not exists on node 2. Can mod_jk support it? Do
 I need some specific configuration? Any suggestion from you will be
 very appreciated!

If that would be an error situation and you want mod_jk to detect that,
then look at fail_on_status in the documentation at:

http://tomcat.apache.org/connectors-doc/reference/workers.html

(and use negative codes).

If this is how you regularly deploy your apps, you should thin twice, if
the idea is good.

You can:

- use several load balancers, each with a different (maybe overlapping)
set of balanced workers (e.g. one for book_service etc.). To get the
stickyness right, you would then need to set the route attribute of
the balancer embers.

- use one load balancer and use mapping extensions to configure some
nodes stopped for individual mounts. See

http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html#Rule%20extensions

Regards,

Rainer

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



Re: Forward all subfolders/files to the root

2008-12-03 Thread Hassan Schroeder
On Tue, Dec 2, 2008 at 7:41 PM, tuckker [EMAIL PROTECTED] wrote:

 How do I redirect all subfolders/files to the root of the link domain.com?

If it's all one context, add something like this to your web.xml:

servlet
servlet-namewhatever/servlet-name
jsp-file/index.jsp/jsp-file
/servlet
servlet-mapping
servlet-namewhatever/servlet-name
url-pattern/*/url-pattern
/servlet-mapping

:: and of course, make sure there aren't other mappings that would
override that with higher specificity :-)

HTH!
-- 
Hassan Schroeder  [EMAIL PROTECTED]

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



PostMethod call fails in Tomcat

2008-12-03 Thread kpalania

I am trying to access a REST service from within an application deployed in
Tomcat but, however, this call seems to fail:

PostMethod method = new PostMethod(http://...;);

I am able to call the same service using PostMethod from a junit test. Any
thoughts?
-- 
View this message in context: 
http://www.nabble.com/PostMethod-call-fails-in-Tomcat-tp20822909p20822909.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: JK Connector problem

2008-12-03 Thread Rainer Jung
nitingupta183 schrieb:
 Hi all,
 
 I am trying to integrate Apache server with Tomcat using mod_jk. I am
 folllowing the basic tutorials on this but still cant start the Apache
 server when I configure httpd.conf to load the mod_jk module. It says The
 requested operation has faiked!. I am not able to log the problem either
 and so I am clue less as what can be the problem.
 
 Platform Windows
 Tomcat 5.5.25
 Apache Server 2.2.10
 mod_jk connector 1.2.27
 
 Any help would  be highly appreciated.

Where did you get the module from? Are you using the right module (e.g.
the one for httpd 2.2.x and with the right word size (32Bit/64Bit))?

Which Windows is it?

In case you can start httpd, but the forwarding to Tomcat doesn't work:

You need to provide

- your httpd configuration (httpd.conf and every file included into it)
- your JkWorkersFile (e.g. workers.properties) and if you use it the
contents of any JkMountFile (e.g. uriworkermap.properties).
- The URL you used to test your setup
- the result you got when calling this URL, and the result you would
have expected to get
- the contents of the httpd error_log, access_log and mod_jk.log.

Regards,

Rainer

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



Re: PostMethod call fails in Tomcat

2008-12-03 Thread Leon Rosenberg
On Wed, Dec 3, 2008 at 11:17 PM, kpalania [EMAIL PROTECTED] wrote:

 I am trying to access a REST service from within an application deployed in
 Tomcat but, however, this call seems to fail:

 PostMethod method = new PostMethod(http://...;);

 I am able to call the same service using PostMethod from a junit test. Any
 thoughts?

Yes.
Read this first:
http://www.catb.org/~esr/faqs/smart-questions.html

regards
Leon

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



Unable to connect to DB using DataSource

2008-12-03 Thread Stefan Deitmer

Hello list.

I am trying to use a JDBC DataSource to connect to a PostgreSQL server 
from within an Axis WebService running in Tomcat.
What confuses me is that I managed to get this to work on one server, 
but now am failing miserably to do so on a second server.


The first server is a Debian Lenny with Tomcat 5.5 and Axis 1.4.1, 
running in a Xen DomU on a 64 bit AMD machine.
The second server is also running Lenny with the same Tomcat and Axis 
versions, but in a VirtualBox VM on a 32 bit Intel machine.


I have compared the whole directory tree of /var/lib/tomcat5.5, also 
/usr/share/java, /etc/default/tomcat5.5 and the startup scripts in 
/etc/init.d/tomcat5.5.
Everything is identical between the two servers, and still, #1 works, #2 
doesn't.


The error message tells me that it can't find the postgres JDBC driver. 
However, there is a symbolic link in /var/lib/tomcat5.5/share/lib
pointing to the driver in /usr/share/java. Also, I tried to open a 
connection directly, that is, using DriverManager.getConnection(),

it works, so it seems to be able to find the driver.

This is the configuration of the DataSource (in 
/var/lib/tomcat5.5/conf/server.xml):


Context path=/axis2 reloadable=true cachingAllowed=false
   Resource name=jdbc/pigaiadb auth=Container 
type=javax.sql.DataSource
 maxActive=100 maxIdle=10 maxWait=1000 
removeAbandoned=true  removeAbandonedTimeout=60
 username=user password=password 
driverClassName=org.postgresql.Driver

 validationQuery=select 1
 url=jdbc:postgresql://localhost/database /
/Context

This is how I access the DataSource in the Axis WebService's LifeCycle 
object startup routine:


   public void startUp(ConfigurationContext configctx, AxisService 
service) {

   Context initCtx = null;
   Context envCtx = null;
   DataSource ds = null;

   try {
   initCtx = new InitialContext();
   } catch (NamingException e) {
   LOG.error(InitContext Exception :  + e.getMessage());
   }

   try {
   envCtx = (Context) initCtx.lookup(java:comp/env);
   } catch (NamingException e) {
   LOG.error(envContext Exception :  + e.getMessage());
   }
  
   try {

   ds = (DataSource) envCtx.lookup(jdbc/pigaiadb);
   } catch (NamingException e) {
   LOG.error(DataSource Exception :  + e.getMessage());
   }
  
   try {

   service.addParameter(new Parameter(Constants.DATASOURCE, ds));
   } catch (AxisFault e) {
   LOG.error(Failed to add datasource parameter to context:  
+ e.getMessage());

   }
   }

And this is how I try to get the connection from the DataSource:

   try {
   conn = ((DataSource) 
serviceContext.getAxisService().getParameterValue(Constants.DATASOURCE)).getConnection();

   } catch (SQLException e) {
   LOG.error(SQLException while trying to get connection : 
   + e.getMessage());
   }

... which results in the following error message:

   SQLException while trying to get connection : Cannot load JDBC 
driver class 'org.postgresql.Driver'


and this stack trace:

java.lang.ClassNotFoundException: org.postgresql.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

...

Replacing above code with the following works without errors:

   try
   {
   Class.forName(org.postgresql.Driver);
   conn = 
DriverManager.getConnection(jdbc:postgresql://localhost/database, 
user, password);

   }catch (Exception e) {
   LOG.error(SQLException while trying to get connection: 
   + e.getMessage());
   }

This is my first project with Tomcat, Axis, JDBC and PostgreSQL, and 
also the first time I'm seriously using Java in a very long time,
so please have some patience with me if I'm missing something essential 
here. I would greatly appreciate some pointers as to how I
could nail down this problem. How comes Class.forName works when I call 
it directly, but not when the DataSource class calls it internally?


Thanks a lot in advance
Stefan

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



Unable to stop SimpleTcpReplicationManager

2008-12-03 Thread Pieter Temmerman
Hi all,

I'm having two Tomcats which are placed in a cluster.
If I stop and start a context (instead of completely stopping/restarting 
Tomcat), then I see the following error in catalina.out:

ERROR: Unable to stop SimpleTcpReplicationManager

No other information is specified.
I have been Googling, but haven't found any explanation.
I took a look at the source code of the SimpleTcpReplicationManager, but I 
can't derive from it what could have gone wrong.

When I try to restart the context, then I see the following error:

ERROR: Starting... no cluster associated with this
context:/dist/preproduction/wasuzi

I'm guessing the latter error is related to the first one.
Unfortunately, right now I don't have access to the server.xml to post the 
configuration info.
In a couple of hours I will, but I thought I'd give a heads up, just in case 
anybody has seen this error before.

Before I forget, when I stop/start Tomcat completely, I don't see this error, 
it's only happening when reloading a context.

Thanks. 


RE: PostMethod call fails in Tomcat

2008-12-03 Thread Martin Gainty

this is AXIS REST code .. structure your client code as

String epr=http://MySiteIsGreatestSiteOnEarth.com;;
ServiceClient client = new ServiceClient();
Options options = new Options();
client.setOptions(options);
options.setTo(new EndpointReference(epr));

please post to [EMAIL PROTECTED]

Martin Gainty 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




 Date: Wed, 3 Dec 2008 14:17:58 -0800
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: PostMethod call fails in Tomcat
 
 
 I am trying to access a REST service from within an application deployed in
 Tomcat but, however, this call seems to fail:
 
 PostMethod method = new PostMethod(http://...;);
 
 I am able to call the same service using PostMethod from a junit test. Any
 thoughts?
 -- 
 View this message in context: 
 http://www.nabble.com/PostMethod-call-fails-in-Tomcat-tp20822909p20822909.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Suspicious message? There’s an alert for that. 
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad2_122008

Re: Unable to connect to DB using DataSource

2008-12-03 Thread André Warnier

Stefan Deitmer wrote:

Hi.
You can totally disregard this, because I am really not competent.
But just because I saw this in your post :

at java.security.AccessController.doPrivileged(Native Method)

did you compare the line
TOMCAT_SECURITY=...
in /etc/default/tomcat5.5
between your systems ?
and maybe the files in /etc/tomcat5.5/policy.d ?




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



Re: What exactly happens when I configure a different host

2008-12-03 Thread Anand HS
Whew.. that was a problem alright..
Does that mean when we change the Host, we have to have a handler added in
logging.properties as well. ?
I see there are already defined for applications packaged with tomcat like
manager and host-manager.

Thanks,
Anand


On Wed, Dec 3, 2008 at 7:54 AM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: Anand HS [mailto:[EMAIL PROTECTED]
  Subject: Re: What exactly happens when I configure a different host
 
  I changed the Host Name and Engine defaultHost back to
  localhost and the error vanishes.
  However, it re appears when I give a different name than localhost.

 Finally had time to go chase this a bit more.  The error doesn't really
 vanish when the Host name is localhost, but it is not sent to the
 console window Tomcat is using, nor to the catalina.*.log file; you can find
 it in the localhost.*.log file.

 When you change the Host name to something else, the error is displayed
 in the console window and in the catalina.*.log file, but not in
 localhost.*.log.

 The reason behind this apparently inconsistent behavior is the settings in
 conf/logging.properties:  log entries for localhost are routed to specific
 handlers, which do not include the console window.  When you changed the
 Host name but did not update logging.properties, the default log handler
 kicked in, which dumped the error message to the console.

  - 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: What exactly happens when I configure a different host

2008-12-03 Thread Caldarale, Charles R
 From: Anand HS [mailto:[EMAIL PROTECTED]
 Subject: Re: What exactly happens when I configure a different host

 Does that mean when we change the Host, we have to have a
 handler added in logging.properties as well. ?

Have to - no; should - probably.  If you don't define one, the logging info 
ends up in the default handler.

 - Chuck


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

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



Tomcat 6.0.18 Servlet Loading/Reloading

2008-12-03 Thread Justin Randall

Hello,

I have a very strange issue with Tomcat 6.0.18 and I'm not sure what 
information to provide to help debug further.

I have an installation of Tomcat 6.0.18 which fails to properly initialize 
servlets upon restart. If I deploy a new application.war file while Tomcat is 
running (even if it is the same war file with different modify timestamp) 
everything loads up just fine.  Below are the system details:

  - Tomcat: Tomcat version 6.0.18 with APR 1.1.14
  - Java: JDK 1.6u10
  - RedHat Enteprise Linux 5

It seems that Servlet X, for example, does load to a point, because it returns 
a value, however the log4j subsystem is not initialized at all (providing me 
with no debug info at all) and catalina.out/err show no signs of trouble.  
Below is a snippet of restarting Tomcat.

=
Dec 3, 2008 7:08:36 PM org.apache.coyote.http11.Http11AprProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-80
Dec 3, 2008 7:08:37 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Dec 3, 2008 7:08:37 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Dec 3, 2008 7:08:37 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Dec 3, 2008 7:08:37 PM org.apache.coyote.http11.Http11AprProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-80
Dec 3, 2008 7:08:43 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
Dec 3, 2008 7:08:43 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
random [true].
Dec 3, 2008 7:08:43 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Dec 3, 2008 7:08:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 562 ms
Dec 3, 2008 7:08:43 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 3, 2008 7:08:43 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Dec 3, 2008 7:08:44 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 3, 2008 7:08:44 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 3, 2008 7:08:44 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Dec 3, 2008 7:08:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1432 ms
AbandonedObjectPool is used ([EMAIL PROTECTED])
   LogAbandoned: false
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 60
=

Then once I move a new .war file into the webapps directory:

=
Dec 3, 2008 7:20:25 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/thewebapplication]
Dec 3, 2008 7:20:25 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive thewebapplication.war
=

Has anyone else ever experienced this before and can provide some help?

Kind regards,

Justin

_



RE: Tomcat 6.0.18 Servlet Loading/Reloading

2008-12-03 Thread Justin Randall

I've been doing some more testing and added a bunch of System.out.println 
statements to the init, init(ServletConfig), and doPost/doGet methods so 
that I could see what my application was doing without log4j initialized.

Basically when I restart Tomcat, it doesn't call any of the init methods of 
the Servlet, however it does load it partially.  When I actually browse to the 
URL of the Servlet, I can see my System.out.println statements being output 
to catalina.out, however all of the initialization which was to be performed by 
the init methods was never done.

When I copy the existing war file from the webapps directory to another 
location, update the modify timestamp and then move it back into the webapps 
directory, the init methods are then called and the application works 
properly.


 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Tomcat 6.0.18 Servlet Loading/Reloading
 Date: Wed, 3 Dec 2008 19:22:15 -0500
 
 
 Hello,
 
 I have a very strange issue with Tomcat 6.0.18 and I'm not sure what 
 information to provide to help debug further.
 
 I have an installation of Tomcat 6.0.18 which fails to properly initialize 
 servlets upon restart. If I deploy a new application.war file while Tomcat is 
 running (even if it is the same war file with different modify timestamp) 
 everything loads up just fine.  Below are the system details:
 
   - Tomcat: Tomcat version 6.0.18 with APR 1.1.14
   - Java: JDK 1.6u10
   - RedHat Enteprise Linux 5
 
 It seems that Servlet X, for example, does load to a point, because it 
 returns a value, however the log4j subsystem is not initialized at all 
 (providing me with no debug info at all) and catalina.out/err show no signs 
 of trouble.  Below is a snippet of restarting Tomcat.
 
 =
 Dec 3, 2008 7:08:36 PM org.apache.coyote.http11.Http11AprProtocol pause
 INFO: Pausing Coyote HTTP/1.1 on http-80
 Dec 3, 2008 7:08:37 PM org.apache.catalina.core.StandardService stop
 INFO: Stopping service Catalina
 Dec 3, 2008 7:08:37 PM org.apache.catalina.core.ApplicationContext log
 INFO: SessionListener: contextDestroyed()
 Dec 3, 2008 7:08:37 PM org.apache.catalina.core.ApplicationContext log
 INFO: ContextListener: contextDestroyed()
 Dec 3, 2008 7:08:37 PM org.apache.coyote.http11.Http11AprProtocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-80
 Dec 3, 2008 7:08:43 PM org.apache.catalina.core.AprLifecycleListener init
 INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
 Dec 3, 2008 7:08:43 PM org.apache.catalina.core.AprLifecycleListener init
 INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
 random [true].
 Dec 3, 2008 7:08:43 PM org.apache.coyote.http11.Http11AprProtocol init
 INFO: Initializing Coyote HTTP/1.1 on http-80
 Dec 3, 2008 7:08:43 PM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 562 ms
 Dec 3, 2008 7:08:43 PM org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 Dec 3, 2008 7:08:43 PM org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
 Dec 3, 2008 7:08:44 PM org.apache.catalina.core.ApplicationContext log
 INFO: ContextListener: contextInitialized()
 Dec 3, 2008 7:08:44 PM org.apache.catalina.core.ApplicationContext log
 INFO: SessionListener: contextInitialized()
 Dec 3, 2008 7:08:44 PM org.apache.coyote.http11.Http11AprProtocol start
 INFO: Starting Coyote HTTP/1.1 on http-80
 Dec 3, 2008 7:08:44 PM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 1432 ms
 AbandonedObjectPool is used ([EMAIL PROTECTED])
LogAbandoned: false
RemoveAbandoned: true
RemoveAbandonedTimeout: 60
 =
 
 Then once I move a new .war file into the webapps directory:
 
 =
 Dec 3, 2008 7:20:25 PM org.apache.catalina.startup.HostConfig checkResources
 INFO: Undeploying context [/thewebapplication]
 Dec 3, 2008 7:20:25 PM org.apache.catalina.startup.HostConfig deployWAR
 INFO: Deploying web application archive thewebapplication.war
 =
 
 Has anyone else ever experienced this before and can provide some help?
 
 Kind regards,
 
 Justin
 
 _
 

_



RE: Tomcat 6.0.18 Servlet Loading/Reloading

2008-12-03 Thread Caldarale, Charles R
 From: Justin Randall [mailto:[EMAIL PROTECTED]
 Subject: RE: Tomcat 6.0.18 Servlet Loading/Reloading

 Basically when I restart Tomcat, it doesn't call any of the
 init methods of the Servlet

Unless you have load-on-startup set for the servlet in your webapp's 
WEB-INF/web.xml, that is correct behavior for a Tomcat restart.  The init() 
method (there can only be one per servlet) should be called upon first 
reference to a URL that matches a url-pattern element inside one of your 
servlet-mapping elements.  If load-on-startup is set, the init() method 
will be called at Tomcat restart for each such servlet.

 however all of the initialization which was to be
 performed by the init methods was never done.

You keep using the word methods when there is only one init() method for a 
given servlet; why is that?

 When I copy the existing war file from the webapps directory
 to another location, update the modify timestamp and then
 move it back into the webapps directory, the init methods
 are then called and the application works properly.

This is also correct behavior for initial or re-deployment.  Although the spec 
doesn't require it, Tomcat calls the init() methods to verify webapp viability 
at these times.

 - Chuck


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

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



Need help : Tomcat Stuck up

2008-12-03 Thread Kranti™ K K Parisa
We are facing very serious issues of tomcat getting stuck after using it for
some time.

I am getting scared that allocating 1.5GB of RAM for java in tomcat is
causing any problem??

There is no exception/error in log files.

I am using the following on windows 2003 std edition.

Tomcat 5.5.25
PostgreSQL 8.3.5
JVM version : 1.5.0_16-b02

TOTAL RAM : 4GB

please suggest me something.

Thanks a ton in advance.


RE: Need help : Tomcat Stuck up

2008-12-03 Thread Caldarale, Charles R
 From: Kranti(tm) K K Parisa [mailto:[EMAIL PROTECTED]
 Subject: Need help : Tomcat Stuck up

 We are facing very serious issues of tomcat getting stuck
 after using it for some time.

What does a thread dump show?  What does running with -verbose:gc show?

Try connecting to the stuck JVM with JConsole and see what it shows about 
memory and threads.  (Better yet, connect before it gets stuck so you can 
observe what normal operation looks like, and then compare that with what's 
shown when it does hang.)

 - Chuck


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

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



Re: Need help : Tomcat Stuck up

2008-12-03 Thread Kranti™ K K Parisa
Hi,

Thanks for the quick reply.
Could you please help me with the commands that i need to run to watch the
thread dump. and when i run java -verbose:gc its asking for options, what
can i select along with that ?

Sorry to ask you this, but all these are new things for me. So please
suggest

On Thu, Dec 4, 2008 at 9:55 AM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: Kranti(tm) K K Parisa [mailto:[EMAIL PROTECTED]
  Subject: Need help : Tomcat Stuck up
 
  We are facing very serious issues of tomcat getting stuck
  after using it for some time.

 What does a thread dump show?  What does running with -verbose:gc show?

 Try connecting to the stuck JVM with JConsole and see what it shows about
 memory and threads.  (Better yet, connect before it gets stuck so you can
 observe what normal operation looks like, and then compare that with what's
 shown when it does hang.)

  - Chuck


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

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




Re: JK Connector problem

2008-12-03 Thread nitingupta183

Hi,

I solved the problem. Actually it was a silly mistake in the configuration.
I was using a folder name with spaces and without putting it inside a double
quote.

Now it is working fine.

Regards,
Nitin

Rainer Jung-3 wrote:
 
 nitingupta183 schrieb:
 Hi all,
 
 I am trying to integrate Apache server with Tomcat using mod_jk. I am
 folllowing the basic tutorials on this but still cant start the Apache
 server when I configure httpd.conf to load the mod_jk module. It says
 The
 requested operation has faiked!. I am not able to log the problem either
 and so I am clue less as what can be the problem.
 
 Platform Windows
 Tomcat 5.5.25
 Apache Server 2.2.10
 mod_jk connector 1.2.27
 
 Any help would  be highly appreciated.
 
 Where did you get the module from? Are you using the right module (e.g.
 the one for httpd 2.2.x and with the right word size (32Bit/64Bit))?
 
 Which Windows is it?
 
 In case you can start httpd, but the forwarding to Tomcat doesn't work:
 
 You need to provide
 
 - your httpd configuration (httpd.conf and every file included into it)
 - your JkWorkersFile (e.g. workers.properties) and if you use it the
 contents of any JkMountFile (e.g. uriworkermap.properties).
 - The URL you used to test your setup
 - the result you got when calling this URL, and the result you would
 have expected to get
 - the contents of the httpd error_log, access_log and mod_jk.log.
 
 Regards,
 
 Rainer
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/JK-Connector-problem-tp20813241p20827356.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Pointing domain to a context in tomcat

2008-12-03 Thread nitingupta183

Hi all,

I have recently started using Apache web server with Tomcat. I need to have
something like this:

www.mydomain.com maps to something like www.mydomain.com:8080/mycontext

With the help of mod_jk i am now able to achieve www.mydomain.com/mycontext.
I want to be able to have www.mydomain.com i.e. user should not even specify
the context and the apache server should map to my context.

I searched the net and was told that mod_rewrite can be used with PL flag.
But since I am new to configuration, I could not figure out how to use that
for my purpose. Also, If I user mod_rewrite then /mycontext will be visible
in the address bar. I am more in the favor of a solution in which /mycontext
is not at all visible.

Any help will be much appreciated.

regards,
nitin
-- 
View this message in context: 
http://www.nabble.com/Pointing-domain-to-a-context-in-tomcat-tp20828588p20828588.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Unable to connect to DB using DataSource

2008-12-03 Thread Stefan Deitmer

André Warnier schrieb:

Stefan Deitmer wrote:

Hi.
You can totally disregard this, because I am really not competent.
But just because I saw this in your post :

at java.security.AccessController.doPrivileged(Native Method)

did you compare the line
TOMCAT_SECURITY=...
in /etc/default/tomcat5.5
between your systems ?
and maybe the files in /etc/tomcat5.5/policy.d ?


TOMCAT_SECURITY is NO on both systems, and the contents of
/etc/tomcat5.5/policy.d are identical.
The line you cited from the stack trace made me think the same thing,
but as the security manager is off on both systems, I guess it can't be
the cause of my problems.

Thank you though!

Regards
Stefan

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



RE: Unable to connect to DB using DataSource

2008-12-03 Thread BEN HMIDA aymen
Hi,
There's something confusing in your post but i think you 've forgotten to 
specify the port number userd by postgres

-Message d'origine-
De : Stefan Deitmer [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi 4 décembre 2008 08:35
À : Tomcat Users List
Objet : Re: Unable to connect to DB using DataSource

André Warnier schrieb:
 Stefan Deitmer wrote:

 Hi.
 You can totally disregard this, because I am really not competent.
 But just because I saw this in your post :

 at java.security.AccessController.doPrivileged(Native Method)

 did you compare the line
 TOMCAT_SECURITY=...
 in /etc/default/tomcat5.5
 between your systems ?
 and maybe the files in /etc/tomcat5.5/policy.d ?

TOMCAT_SECURITY is NO on both systems, and the contents of
/etc/tomcat5.5/policy.d are identical.
The line you cited from the stack trace made me think the same thing,
but as the security manager is off on both systems, I guess it can't be
the cause of my problems.

Thank you though!

Regards
Stefan

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






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