tomcat windows serivce and jconsole - solution

2010-02-17 Thread daniel steel
hi all,
 i have seen numerous questions asked on how to connect jconsole / jmap to a 
tomcat service on windows. And most of the solutions involve,in setting up jmx 
remort port setting etc.. 
and then connecting to tomcat service using jconsole remotely.

Here is an alternate solution without enabling jmx remote port etc...

http://mysqlandsqlserver.blogspot.com/2010/02/jconsolejmap-and-tomcat-as-windows.html

thanks


  

Howto configure cold failover with Tomcat on 2 different servers?

2010-02-17 Thread Leon Kolchinsky
Hello All,

My current interest is to install "Confluence" -
http://www.atlassian.com/software/confluence/
in a "Cold Failover" mode.
I'm currently running ApacheHttpd in front of Tomcat6 using mod_jk module
and I prefer to leave Apache Httpd in front of Tomcat.

This is java application is using DB (Oracle in my case) and some kind of
local caching technique (to make things run faster I presume).
So there must be only one "Confluence" application at a time.

I would like to configure"Cold Failover" in such a way that the moment
current Tomcat instance become unresponsive, the command will run killing
tomcat+"apache httpd" and starting another
tomcat+"apache httpd" on another server (or just killing tomcat, but I'm not
sure that it's doable, since it's not a regular loadbalancer worker setup).

I know that there is a possibility to use 'Advanced worker directives' like
connect_timeout, prepost_timeout and reply_timeout but I'm not sure that
it's implementable in my case.

Any suggestion on proposed configuration?
May be there are some other ways to achieve what I want?

Any help very much appreciated.


Re: Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Kevin Mills
On 2/17/10, Mark Thomas  wrote:
> The rules on how security constraints combine are in the Servlet spec.
> It can take a bit of time to get your head around it.
>
> To require a cert for your servlet too, one option would be:
>
>   
>   
>   Everything
>   /*
>   
>   
>   X509
>   
>   
>   CONFIDENTIAL
>   
>   
>   
>   CLIENT-CERT
>   
>
> which requires it for everything.

That seems to do the trick!  Thanks very much - I really appreciate
your immediate responses!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Mark Thomas
On 18/02/2010 00:42, Kevin Mills wrote:
> On 2/17/10, Mark Thomas  wrote:
>> 
>>
>>> :-)  "Doesn't work", meaning I don't get prompted for my certificate.
>>> I see my servlet's output without any sort of authentication.
>>
>> What URL are you requesting? Only index.jsp will prompt for a cert. Your
>> servlet will just require SSL to be used.
> 
> Ohhh... my mistake!  Yes, index.jsp does prompt me for a
> certificate!  So how would I make the servlet also require one?  I was
> under the (mistaken?) impression that the "/*" url-pattern would cover
> the servlet.

The rules on how security constraints combine are in the Servlet spec.
It can take a bit of time to get your head around it.

To require a cert for your servlet too, one option would be:

  
  
  Everything
  /*
  
  
  X509
  
  
  CONFIDENTIAL
  
  
  
  CLIENT-CERT
  

which requires it for everything.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Kevin Mills
On 2/17/10, Mark Thomas  wrote:
> 
>
>> :-)  "Doesn't work", meaning I don't get prompted for my certificate.
>> I see my servlet's output without any sort of authentication.
>
> What URL are you requesting? Only index.jsp will prompt for a cert. Your
> servlet will just require SSL to be used.

Ohhh... my mistake!  Yes, index.jsp does prompt me for a
certificate!  So how would I make the servlet also require one?  I was
under the (mistaken?) impression that the "/*" url-pattern would cover
the servlet.

Thanks very much!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Mark Thomas
On 18/02/2010 00:24, Kevin Mills wrote:


>   
>   MyServlet
>   /myServlet
>   



>   
>   
>   MyApp
>   /index.jsp
>   
>   
>   X509
>   
>   
>   
>   
>   Everything
>   /*
>   
>   
>   CONFIDENTIAL
>   
>   
>   
>   CLIENT-CERT
>   



> :-)  "Doesn't work", meaning I don't get prompted for my certificate.
> I see my servlet's output without any sort of authentication.

What URL are you requesting? Only index.jsp will prompt for a cert. Your
servlet will just require SSL to be used.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Kevin Mills
On 2/17/10, Mark Thomas  wrote:
> Then you probably haven't got your config quite right. There are plenty
> of things to go wrong with this but this definitely works - I was using
> it just the other day.
>
> We'll need to see:
> - connector element from server.xml
> - web.xml
> - tomcat-users.xml (assuming that is what you are using)
> for starters.

Sure thing - here is my Connector element:



My web.xml (based on what I saw in your reply to bug 46950):

  
  http://java.sun.com/xml/ns/javaee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
 version="2.5">
  

  
  Test servlet
  My Servlet
  MyServlet
  MyServlet
  
  
  MyServlet
  /myServlet
  

  
  
  MyApp
  /index.jsp
  
  
  X509
  
  
  
  
  Everything
  /*
  
  
  CONFIDENTIAL
  
  
  
  CLIENT-CERT
  
  

And my tomcat-users.xml:

  





  

>
> Also a better description of the problem than "doesn't work" would help.
>

:-)  "Doesn't work", meaning I don't get prompted for my certificate.
I see my servlet's output without any sort of authentication.

Thank you.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Mark Thomas
On 18/02/2010 00:04, Kevin Mills wrote:
> On 2/17/10, Mark Thomas  wrote:
>> On 17/02/2010 23:48, Kevin Mills wrote:
>>> Can anyone tell me what's going on here?
>>
>> CVE-2009-3555?
>>
>> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
>> search for
>> allowUnsafeLegacyRenegotiation
> 
> Thanks for your reply - I did see that option and forgot to mention
> that I tried it to no avail.

Then you probably haven't got your config quite right. There are plenty
of things to go wrong with this but this definitely works - I was using
it just the other day.

We'll need to see:
- connector element from server.xml
- web.xml
- tomcat-users.xml (assuming that is what you are using)
for starters.

Also a better description of the problem than "doesn't work" would help.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Kevin Mills
On 2/17/10, Mark Thomas  wrote:
> On 17/02/2010 23:48, Kevin Mills wrote:
>> Can anyone tell me what's going on here?
>
> CVE-2009-3555?
>
> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> search for
> allowUnsafeLegacyRenegotiation

Thanks for your reply - I did see that option and forgot to mention
that I tried it to no avail.

Seeing as this renegotiation is a Bad Thing, what is the recommended
way to do this?  Another thread I followed talked about setting the
Connector to allow any certificates and writing an Authentication
Valve... is that the right direction?

Thanks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Mark Thomas
On 17/02/2010 23:48, Kevin Mills wrote:
> Can anyone tell me what's going on here?

CVE-2009-3555?

http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
search for
allowUnsafeLegacyRenegotiation

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Trouble with CLIENT-CERT authentication method

2010-02-17 Thread Kevin Mills
Greetings fellow Tomcat-ers:

I'm trying enable client certificate authentication on a per-webapp
basis using Tomcat 6.0.24.  According to the various sources of
documentation I've found, this should be possible by enabling the SSL
Connector (which I've done), getting client certificate authentication
working for the Connector (this works for me), then setting
clientAuth="false" on the Connector and placing the following in the
webapp's web.xml:


CLIENT-CERT


I've tried various combinations of security constraints, roles,
realms, etc. but can never get the CLIENT-CERT authentication to work
for my webapp.  As I mentioned above, all is fine if I set
clientAuth="true" but I don't want to impose client certificate
authentication across the whole site.

Searching the archives, I ran across bug 46950
(https://issues.apache.org/bugzilla/show_bug.cgi?id=46950) which looks
to describe my very problem.  However, the bug is marked "fixed" as of
6.0.21 (I'm using 6.0.24) and I am not seeing the correct behavior.
Furthermore, the issue was reported against the APR Connector and I'm
using the default flavor (which, according to the one of the answering
developers, works for him).

Can anyone tell me what's going on here?

Thank you!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Configure tomcat in my development environment, and save session across restart

2010-02-17 Thread Ashish Kulkarni
Hi
There is no SESSIONS.ser created under, but there is tldCache.ser

C:\App\apache-tomcat-5.5.25\work\Catalina\localhost\[webapp]

I have created a myapp.xml file
under C:\App\apache-tomcat-5.5.25\conf\Catalina\localhost folder, and this
xml file looks like below







On Wed, Feb 17, 2010 at 4:03 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ashish,
>
> On 2/17/2010 3:32 PM, Ashish Kulkarni wrote:
> > Is it possible to find from log files or some where, what is preventing
> from
> > tomcat not able to persist sessions
>
> I would check logs/catalina.out, logs/localhost_*.log, and anything else
> in the logs/ directory.
>
> > all the classes saved in tomcat
> > are serialized, they implement implements Serializable.
>
> Don't forget that, in order to be serializable, a class must do more
> than merely implement the Serializable interface. All fields must be
> Serializable or transient, or you have to implement the serialization
> methods yourself. Finally, the seralVersionID of the class comes into
> play if you change the structure of the class (members, methods, or
> class name).
>
> > where does tomcat save this serialized data file on PC, i want to see if
> > this is created
>
> CATALINA_BASE/work/[service]/[host]/[webapp]/SESSIONS.ser
>
> > I have switched from tomcat plugin and using tomcat directly and still
> have
> > this error, i created a JSP which simply dumps all the objects in session
> on
> > webpage, before saving any class i have 2 objects in session, as soon as
> i
> > save the class and tomcat restarts and i refresh this jsp page, there are
> no
> > objects in session class.
>
> If you're looking for a more fully-features session snooping JSP, you
> could try mine:
>
> http://www.christopherschultz.net/projects/java/
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkt8WbEACgkQ9CaO5/Lv0PB2xACfY8S19BEjct9bwyln5WbY/Mlq
> aPkAoIUw2Odj2GwaqdxSAzIn9jfRu+2H
> =QRhB
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Accessing a Tomcat webapp from a PHP webapp

2010-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

zé,

On 2/17/2010 12:02 PM, zé wrote:
> I don't use any kind of authentication

Ok.

> I believe that the directory indexes are disabled due the HTTP 404
> error returned when is tried listing.

Interesting. What is the URL you are trying to access?

> It's just a servlet being accessed by a PHP script. The servers aren't in
> the same machine instead of I told before, sorry. May be this the cause? May
> the Tomcat refusing a connection requested by a script generated by another
> web server, due a security constraint?

It's possible, but it wouldn't be this way by default: you'd have to
configure your server in a strange way to accomplish that... I'd think
you'd remember having done that :)

Can you give us more details? The URL(s) you are trying to access would
be helpful. Also, if you can enable the AccessLogValve and post the log
file generated by that. Where do you have Tomcat installed? Where is
your webapp application installed? Finally, please post your webapp's
entire web.xml file and all  entries from conf/server.xml so we
can see what mappings are being used.

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

iEYEARECAAYFAkt8WoQACgkQ9CaO5/Lv0PAMrQCgk3xsI3yKzqpEspBJI0sejX2I
+l8Anj1RFhSbEe0nJMpS2F8MgXSXexdR
=MkK2
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Configure tomcat in my development environment, and save session across restart

2010-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ashish,

On 2/17/2010 3:32 PM, Ashish Kulkarni wrote:
> Is it possible to find from log files or some where, what is preventing from
> tomcat not able to persist sessions

I would check logs/catalina.out, logs/localhost_*.log, and anything else
in the logs/ directory.

> all the classes saved in tomcat
> are serialized, they implement implements Serializable.

Don't forget that, in order to be serializable, a class must do more
than merely implement the Serializable interface. All fields must be
Serializable or transient, or you have to implement the serialization
methods yourself. Finally, the seralVersionID of the class comes into
play if you change the structure of the class (members, methods, or
class name).

> where does tomcat save this serialized data file on PC, i want to see if
> this is created

CATALINA_BASE/work/[service]/[host]/[webapp]/SESSIONS.ser

> I have switched from tomcat plugin and using tomcat directly and still have
> this error, i created a JSP which simply dumps all the objects in session on
> webpage, before saving any class i have 2 objects in session, as soon as i
> save the class and tomcat restarts and i refresh this jsp page, there are no
> objects in session class.

If you're looking for a more fully-features session snooping JSP, you
could try mine:

http://www.christopherschultz.net/projects/java/

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

iEYEARECAAYFAkt8WbEACgkQ9CaO5/Lv0PB2xACfY8S19BEjct9bwyln5WbY/Mlq
aPkAoIUw2Odj2GwaqdxSAzIn9jfRu+2H
=QRhB
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Configure tomcat in my development environment, and save session across restart

2010-02-17 Thread Ashish Kulkarni
Hi
Is it possible to find from log files or some where, what is preventing from
tomcat not able to persist sessions, all the classes saved in tomcat
are serialized, they implement implements Serializable.
where does tomcat save this serialized data file on PC, i want to see if
this is created
I have switched from tomcat plugin and using tomcat directly and still have
this error, i created a JSP which simply dumps all the objects in session on
webpage, before saving any class i have 2 objects in session, as soon as i
save the class and tomcat restarts and i refresh this jsp page, there are no
objects in session class.

Ashish

On Tue, Feb 16, 2010 at 4:44 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ashish,
>
> On 2/16/2010 4:35 PM, Ashish Kulkarni wrote:
> > I use tomcat 5.5.28 for my development in eclipse, when ever i change any
> > class it restarts my tomcat and i loose my session, so i have to go
> through
> > login process to get the session.
> > Is it possible to save this session across restarts, it would be great
> and
> > save me a lot of time in development
>
> The problem isn't that your session isn't being persisted across
> restarts: it's that your session contents are incompatible after the
> restart.
>
> What happens is this:
>
> 1. Your webapp creates an object of a class, say, MyBean v1, and stuffs
> it into the session.
>
> 2. You modify MyBean.java, recompile, and redeploy
>
> 3. Tomcat detects the updated class, saves the sessions to the disk,
>   re-deploys your webapp, and re-loads the sessions from the disk
>
> 4. During re-loading, the object from MyBean v1 tries to load into an
> environment where only MyBean v2 is available, and an exception occurs,
> so the session is not recovered
>
> Possible solutions are to (a) set the serialVersionId of your class or
> (b) write your own serialization methods (see Java serialization howtos
> for that)
>
> The other possibility is that you've got non-serializable objects in the
> session, which will prevent your session from persisting in the first
> place.
>
> Session is persistence is enabled by default, and should work. It's very
> possible that your webapp is interfering with the process.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkt7EaMACgkQ9CaO5/Lv0PALtQCgkfJuYvzGSFK35H1mpG8du0ph
> dlMAoIWeRf32GgPOFteRgEQMm6WhzUoi
> =5ciA
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: tomcat 6 on solaris losing cookies

2010-02-17 Thread George Baxter
Downloaded src code of tomcat  for debugging purposes and sure enough, our 
cookies are of type byte, so the fact that the code can parse the cookie 
'string' just fine means diddly-squat.

Next plan, build my own tomcat 6.0.24 version with lots of logging and checks 
for debugging purposes... 

-g.

On Feb 16, 2010, at 4:22 PM, George Baxter wrote:

> Well.. we parsed the header that failed, and it parsed just fine.
> 
> Note that we're parsing via the 'old deprecated' parse by string entity.  I 
> guess I'll try parsing by bytes next.
> 
> -g.
> 
> On Feb 16, 2010, at 2:47 PM, Konstantin Kolinko wrote:
> 
>> 2010/2/17 George Baxter :
>>> Hi Konstantin,
>>> 
>>> Thanks for your reply.
>>> 
>>> Yes, the getHeaders("cookie") returns what seems to be a valid set of 
>>> cookies, thus we're not losing them in any of the proxies we might have set 
>>> up.  (Currently, we're only in development mode for tomcat 6 and we're not 
>>> going through any proxies, just directly to the server.)
>>> 
>>> We get this problem in all sorts of browsers (FF, Safari, IE).
>>> 
>>> The thing that really bugs me is the inconsistency.  It's almost as if 
>>> there were a race condition going on, but the request is basically single 
>>> threaded, isn't it?  My only fear is some parser used in the tomcat code is 
>>> being used in a non-thread safe manner, but then *everybody* would be 
>>> having this problem, neh?
>>> 
>>> I'm finding out about the connectors, but we may not be using any as :
>>> 
>>> Jan 28, 2010 6:52:56 PM org.apache.catalina.core.AprLifecycleListener init
>>> INFO: The APR based Apache Tomcat Native library which allows optimal 
>>> performance in production environments was not found on the 
>>> java.library.path: /dist/sfsite/obj
>>> 
>>> Hopefully, this is just in our development environments!
>>> 
>>> Thanks,
>>> 
>>> -George
>>> 
>>> 
>>> On Feb 12, 2010, at 2:32 PM, Konstantin Kolinko wrote:
>>> 
 2010/2/13 George Baxter :
> 
> Hello,
> 
> We're running into an issue with tomcat 6.0.18 running on solaris.
> Occasionally a request will come through that has cookies in the header, 
> but
> the request.getCookies() returns no cookies.
 
 How do you observe that? You mean that it is present in
 HttpServletRequest.getHeaders("Cookie") ?
 
> This causes the user to lose
> session since even the JSESSIONID cookie is not recognized, and of course
> all our custom cookies are lost.  It seems to happen randomly, across our
> web site, and varies in frequency from every 2-3 requests to over 200
> requests before it happens again.
> 
> There's no change to the cookie values (or very little) between requests.
> 
> In addition, this only seems to be a problem on solaris.  Running on 
> MacOSx
> or Linux and we don't see the issue.  Also, we don't have the problem in
> Tomcat 5.5.
 
 Any other details on your configuration?
 
 What connectors are you using? HTTP/AJP? Nio/Bio/Apr? (usually some
 org.apache.coyote.* class is mentioned in the startup log in a
 "Starting Coyote .." message)   Do you have Apache HTTPD in front of
 Tomcat?   Do you have HTTP proxies around?  Are failing requests
 coming from some specific client? Are they coming from some specific
 browser?
 
 Best regards,
 Konstantin Kolinko
 
>> 
>> 
>> 1. What is the default character encoding for your environment?
>> 
>> 2. Cookies are parsed in
>> org.apache.tomcat.util.http.Cookies.processCookies()
>> 
>> You may
>> 1) Look in your logs for a WARN message with the text "Cookies:
>> Parsing cookie as String. Expected bytes."
>> 
>> 2) You can consider enabling FINE logging for the above mentioned
>> class. Add this to the logging.properties:
>> 
>> org.apache.tomcat.util.http.Cookies.level=FINE
>> 
>> It will log what headers it parsed.
>> Though it might be hard to match what is logged to your specific
>> request, so it might be useless.
>> 
>> 3) When an issue is encountered, log the headers.
>> Then post them here or try to parse them yourselves,
>> copying the code from Cookies.processCookieHeader() for the Tomcat
>> version that you are using.
>> 
>> 3. Have you considered trying it with a more recent Tomcat version?
>> 
>> 
>> Best regards,
>> Konstantin Kolinko
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Accessing a Tomcat webapp from a PHP webapp

2010-02-17 Thread

Hi Chris!

Thanks for response! 
I don't use any kind of authentication and, I believe that the directory
indexes are disabled due the HTTP 404 error returned when is tried listing.
It's just a servlet being accessed by a PHP script. The servers aren't in
the same machine instead of I told before, sorry. May be this the cause? May
the Tomcat refusing a connection requested by a script generated by another
web server, due a security constraint?

Thanks.


Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> zé,
> 
> On 2/17/2010 6:06 AM, zé wrote:
>> I'm trying to access a Java web application, hosted on a Tomcat 6.0.20,
>> from
>> a PHP application hosted on a Apache, located at the same machine. The
>> PHP
>> app must request a Java app with few parameters and, the Java app must
>> respond with some data encoded in a JSON response. Perhaps I got a HTTP
>> 403
>> error. How to fix this?
> 
> HTTP 403 is "Forbidden" which suggests a resource that is not available
> to the current user. Are you using any kind of authentication? Are you
> trying to access a directory (instead of a file) and do you have
> directory indexes disabled?
> 
> There are other reasons to get this error but these are the most common
> I can think of.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkt8Ba4ACgkQ9CaO5/Lv0PBNRACgockj7LFsG9A/3CiobkxDchcs
> r+sAoIZcnWvLW8h8XCFkRWcDdiwblL4u
> =aXPj
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Accessing-a-Tomcat-webapp-from-a-PHP-webapp-tp27622126p27626939.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [ANN] Apache Tomcat Native 1.1.20 released

2010-02-17 Thread Mladen Turk

On 02/17/2010 04:32 PM, Christopher Schultz wrote:


Maybe it's the mirror I've hit, but the changelog doesn't show changes
for 1.1.20.



Right, there are some problems with web server sync and symlinks.
Should be visible in 24 hrs (at least that's what infra@ told me)
In the mean time here it is:
http://tomcat.apache.org/native-doc-1.1.20/
which should be symlinked to native-doc

Regards
--
^TM

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat dies suddenly

2010-02-17 Thread Carl

Chris,

Yup, that was my plan.

Thanks,

Carl
- Original Message - 
From: "Christopher Schultz" 

To: "Tomcat Users List" 
Sent: Wednesday, February 17, 2010 10:02 AM
Subject: Re: Tomcat dies suddenly



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carl,

On 2/17/2010 8:14 AM, Carl wrote:

A quick refresher.  Server A has been rebuilt with eliminating the JRE
before Slackware is installed.  The jre from Slackware was allowed to be
installed and was then removed using the package tool.  The applications
on both servers have been upgraded to mysql-connector version 5.1.11
from 3.1.12.


Okay. We'll see after a few days if you're good to go. Downgrading the
MySQL  Connector/J driver should be as simple as replacing the JAR file
and bouncing Tomcat, so that's an easy test in and of itself.

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

iEYEARECAAYFAkt8BOsACgkQ9CaO5/Lv0PCouQCeOZ0TWGZSMnoMUHvaI6bQdR+p
RwsAnjDokDvU1csXUnyi1QIkkbJKVanb
=NNNn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [ANN] Apache Tomcat Native 1.1.20 released

2010-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mladen,

On 2/17/2010 6:26 AM, Mladen Turk wrote:
> The Apache Tomcat team announces the immediate availability of Apache
> Tomcat Native 1.1.20 stable.
> This release includes a fix for JVM crash on Tomcat shutdown.
> 
> Please refer to the change log for the list of changes:
> http://tomcat.apache.org/native-doc/miscellaneous/changelog.html

Maybe it's the mirror I've hit, but the changelog doesn't show changes
for 1.1.20.

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

iEYEARECAAYFAkt8DCYACgkQ9CaO5/Lv0PCsngCfZZMUSyZkn5JT8zmhJUZYK9N1
4wkAn2DV6zDMM+ZuHALyEzaBaDC6Wirw
=UhY8
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: performance problems with Tomcat 6 and JSF 1.2

2010-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Michael,

On 2/17/2010 3:59 AM, Michael Heinen wrote:
> I patched org.apache.jasper.compiler.Generator and removed the
> AnnotationHelper.
> The compiled jsps did not contain these calls anymore but this did
> not have any noticeable effect on performance.

Hmm.

> I did some more tests with Tomcat and Jetty:
> 1) 100 outputtags:  Tomcat: 3ms   Jetty: 3ms
> 2) 1000 outputtags:   Tomcat 72ms  Jetty 41ms
> 3) 2000 outputtags:   Tomcat 190ms  Jetty 174ms   

Interesting. Would you mind extending that testing to 3, 4, 5, and 10
thousand tags? I wonder if you're experiencing some startup cost that
Tomcat incurs by trying to aggressively optimize some special case, and
that Tomcat's performance will roughly equal Jetty's at some point.

> Both servers were started with same jdk and same vm params.

So, both Jetty and Tomcat, same versions, same environment, different
JSF revision. Can you compare the compiled .java files on Tomcat between
JSF 1.1 and JSF 1.2? I suspect you'll get roughly the same code in both
cases. If that's true, the problem is in JSF, not in Tomcat.

Or, does Tomcat supply the JSF implementation? That doesn't sound right.

> Another difference between the compiled jsps are value expressions:
> Tomcat JSF 1.2:
> _jspx_th_h_005foutputText_005f999.setValue(new 
> org.apache.jasper.el.JspValueExpression("/1000hout.jsp(1021,0) 
> '1'",_el_expressionfactory.createValueExpression("1",java.lang.Object.class)));
> _jspx_th_h_005foutputText_005f999.setStyle(new 
> org.apache.jasper.el.JspValueExpression("/1000hout.jsp(1021,0) 'z 
> index:29202;'",_el_expressionfactory.createValueExpression("z-index:29202;",java.lang.Object.class)));
>
> Jetty JSF 1.2
> _jspx_th_h_outputText_999.setValue(org.apache.jasper.runtime.PageContextImpl.getValueExpression("1",
>  (PageContext)_jspx_page_context, java.lang.Object.class, null));
> _jspx_th_h_outputText_999.setStyle(org.apache.jasper.runtime.PageContextImpl.getValueExpression("z-index:29202;",
>  (PageContext)_jspx_page_context, java.lang.Object.class, null));
> 
> Tomcat JSF 1.1 (for completeness):
> _jspx_th_h_005foutputText_005f999.setValue("1");
> _jspx_th_h_005foutputText_005f999.setStyle("z-index:29202;");

This could be the issue: when using JSF 1.1, Tomcat's compiler somehow
figures out that the values you're passing-in are constants, and doesn't
bother with the JspValueExpression. That avoids at least one object
allocation, at least 2 method calls, and probably a lot of parsing and
time wasted evaluating an expression that doesn't really need an evaluation.

It's funny that this doesn't happen all the time: it would be a great
performance optimization to scan these values for EL expressions during
compilation and avoid all this junk in the first place.

Anyhow, the only thing I can think of is that the "value" and "style"
attributes in 1.1 weren't supposed to be EL expressions (or maybe they
were, and this was a bug or something) and now, in 1.2, they /are/ EL
expressions, causing the translation from JSP -> Java source to become
more complicated because the expressions might need to be evaluated.

What does Jetty's compiled code for 1.1 look like in this area?

> I did not find any hotspots >3% in the sample with 1000 tags. I tried
> to nail down the performance problem we are seeing in our real app
> but this seems to be not so trivial.

The code is probably performing just fine... it's just that parsing and
evaluating expressions is a time-consuming business.

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

iEYEARECAAYFAkt8CMYACgkQ9CaO5/Lv0PCEcQCfVH5xmFdLXx7mSq+XiRAUvqaG
+JEAnjK4fEHbZVOzCYEDBE0pvMbx/7/u
=eaFX
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: VSphere4 and tomcat 6.0

2010-02-17 Thread Philip Wigg
On 17 February 2010 15:07, Jon Brisbin  wrote:
> We're running a dozen tcServer instances (Tomcat 6.0) on a VMware ESXi cloud 
> infrastructure. We haven't put vSphere in yet, but we're planning to. The 
> only thing I can say here is that there ARE differences between running 
> Tomcat on a VM and running it on dedicated hardware. I have problems with 
> things I know I'm doing right, but they just don't work the same on a VM. I 
> guess it has to do with the fact that the server is sometimes "swapped" out 
> if it's not in use. I think this causes issues, particularly with clustering, 
> which I have yet to make work in a way that I'm happy with.
>
> The big one that I noticed right away is that anything that uses /dev/random 
> will take forever to start. VMs have very little entropy in their pools 
> because they don't have any real hardware. This means stuff that uses 
> /dev/random for entropy (if it has security/SSL in it or is uses Random) will 
> take several minutes to start (usually 3-5 in our tests).
>
> When they run, they run great. We're seeing a great improvement in 
> performance running on VMware. It's just there seem to be a lot of little 
> issues that no one else seems to have. This means I either have no idea what 
> I'm doing (possible :) or things just run differently on VMs than they do on 
> real hardware.

VMWare did put out a white-paper about Java and VMWare:-

http://www.vmware.com/resources/techresources/1087

I can't vouch for how much use it is though I'm afraid. You might
consider switching to /dev/urandom for entropy if it's taking minutes
to generate with /dev/random.

Cheers,
Phil.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: VSphere4 and tomcat 6.0

2010-02-17 Thread Jon Brisbin
We're running a dozen tcServer instances (Tomcat 6.0) on a VMware ESXi cloud 
infrastructure. We haven't put vSphere in yet, but we're planning to. The only 
thing I can say here is that there ARE differences between running Tomcat on a 
VM and running it on dedicated hardware. I have problems with things I know I'm 
doing right, but they just don't work the same on a VM. I guess it has to do 
with the fact that the server is sometimes "swapped" out if it's not in use. I 
think this causes issues, particularly with clustering, which I have yet to 
make work in a way that I'm happy with.

The big one that I noticed right away is that anything that uses /dev/random 
will take forever to start. VMs have very little entropy in their pools because 
they don't have any real hardware. This means stuff that uses /dev/random for 
entropy (if it has security/SSL in it or is uses Random) will take several 
minutes to start (usually 3-5 in our tests).

When they run, they run great. We're seeing a great improvement in performance 
running on VMware. It's just there seem to be a lot of little issues that no 
one else seems to have. This means I either have no idea what I'm doing 
(possible :) or things just run differently on VMs than they do on real 
hardware.

Jon Brisbin
Portal Webmaster
NPC International, Inc.



On Feb 17, 2010, at 3:39 AM, Daniel Dreier wrote:

> Hello,
> 
> I want to use tomcat 6.0 on a vsphere4 based Server. Are there known issues?
> 
> best regards
> 
> Daniel Dreier
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Accessing a Tomcat webapp from a PHP webapp

2010-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

zé,

On 2/17/2010 6:06 AM, zé wrote:
> I'm trying to access a Java web application, hosted on a Tomcat 6.0.20, from
> a PHP application hosted on a Apache, located at the same machine. The PHP
> app must request a Java app with few parameters and, the Java app must
> respond with some data encoded in a JSON response. Perhaps I got a HTTP 403
> error. How to fix this?

HTTP 403 is "Forbidden" which suggests a resource that is not available
to the current user. Are you using any kind of authentication? Are you
trying to access a directory (instead of a file) and do you have
directory indexes disabled?

There are other reasons to get this error but these are the most common
I can think of.

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

iEYEARECAAYFAkt8Ba4ACgkQ9CaO5/Lv0PBNRACgockj7LFsG9A/3CiobkxDchcs
r+sAoIZcnWvLW8h8XCFkRWcDdiwblL4u
=aXPj
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat dies suddenly

2010-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carl,

On 2/17/2010 8:14 AM, Carl wrote:
> A quick refresher.  Server A has been rebuilt with eliminating the JRE
> before Slackware is installed.  The jre from Slackware was allowed to be
> installed and was then removed using the package tool.  The applications
> on both servers have been upgraded to mysql-connector version 5.1.11
> from 3.1.12.

Okay. We'll see after a few days if you're good to go. Downgrading the
MySQL  Connector/J driver should be as simple as replacing the JAR file
and bouncing Tomcat, so that's an easy test in and of itself.

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

iEYEARECAAYFAkt8BOsACgkQ9CaO5/Lv0PCouQCeOZ0TWGZSMnoMUHvaI6bQdR+p
RwsAnjDokDvU1csXUnyi1QIkkbJKVanb
=NNNn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat context startup failed

2010-02-17 Thread Caldarale, Charles R
> From: Bob Hall [mailto:rfha...@yahoo.com]
> Subject: Re: Tomcat context startup failed
> 
> The offending .jar files were not loaded and can't contribute to any
> problems.

Don't bet on it: if the app has its own ClassLoader, it may well ignore the 
finer points of the servlet spec.  Regardless, the invalid jars should be 
removed, since it's illegal to have them there.  As André said, clean up the 
obvious errors before chasing down the more difficult ones.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: VSphere4 and tomcat 6.0

2010-02-17 Thread Caldarale, Charles R
> From: Caldarale, Charles R
> Subject: RE: VSphere4 and tomcat 6.0
> 
> I've tested Tomcat on a couple of different VMware installations
> without problem, but not under a heavy load.

Forgot to mention that some of the VMware tools include an embedded Tomcat, so 
there can be port conflicts.  The ones I've used are confined to the host or 
manager system, so they don't affect the guest OS environment, but I certainly 
haven't used all the VMware optional bits and pieces.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: VSphere4 and tomcat 6.0

2010-02-17 Thread Caldarale, Charles R
> From: Daniel Dreier [mailto:ddre...@softmate.de]
> Subject: VSphere4 and tomcat 6.0
> 
> I want to use tomcat 6.0 on a vsphere4 based Server. Are there known
> issues?

I've tested Tomcat on a couple of different VMware installations without 
problem, but not under a heavy load.  Make sure you give the VM enough real 
memory to avoid page thrashing in the Java heap.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Tomcat dies suddenly

2010-02-17 Thread Peter Crowther
On 17 February 2010 13:55, André Warnier  wrote:
> We also have a couple of official buffoons.

And a plethora of unofficial ones

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Tomcat dies suddenly

2010-02-17 Thread André Warnier

Carl wrote:
... I was thinking maybe Andre could do the same for my

servers, you know, with his telepathy thingie and all.

You are confusing people.  The telepath on this list is Pid. He is 
particularly good at guessing the OS, JVM, Tomcat version etc.. of 
people who post here without specifying them.
Chuck is our resident servlet spec authority and general enforcer, with 
a special interest in memory allocation and GC issues.
Christopher is more into esoteric code-splitting stuff, with sidelines 
in alphabets, sessions and performance issues.  Then there is an 
assorted series of intermittent characters with various specialties.  We 
also have a couple of official buffoons.  And then of course there are 
Mark and Filip, the top gurus and fathers of us all, who sometimes 
condescend to offer their pearls of wisdom to us peons when we really 
stray off base. They are the ones who create the partition, we merely 
try to play the tune. As for me, I am just a spectator mostly, happiest 
when I get some not-too-technical tidbit which I think I can handle just 
with ze little grey cells, as a mythical compatriot of mine would say. 
They did not help too much in the present case though.  Apart from Mark 
and Filip, we all had rich uncles in America who left us their fortune, 
which explains why we can stick around here instead of doing any real work.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat dies suddenly

2010-02-17 Thread Carl

Just an update.

A quick refresher.  Server A has been rebuilt with eliminating the JRE 
before Slackware is installed.  The jre from Slackware was allowed to be 
installed and was then removed using the package tool.  The applications on 
both servers have been upgraded to mysql-connector version 5.1.11 from 
3.1.12.  Have been running on server A for four days witout incident (before 
I start celebrating, I remind myself that, at times, the system ran for 10 
days before failing.)  Yesterday, there was a moderate load and people were 
accessing several of the applications... I plan to force that today as that 
seemed to provoke the failure in the past.  However, as Chris pointed out, I 
won't know if it was the change in the Slackware install or the change in 
the mysql-connector.  If we go another week without failure, I plan to 
switch to server B to see if I can make it fail.  Sure would be nice to know 
that we actually cured the problem.


Andre - we don't use OpenSSL.

Chris - I am running inside of strace.  If we do get a failure, I am hping 
to get at least some information.  You noted that it may take several 
cycles, I agree.


Tony - I haven't tried brining up a separate application to see how it 
bevaed under load.  I have used JMeter to stress the server (don't remember 
which one) repeatedly hitting a small corner of the application... the 
server behaved perfectly, even with out of memory conditions.


Mark - I have not yet tried the IBM JVM because I am waiting to see the 
results of the current tests.  I am trying to go slowly enough to know that 
I have actually solved the problem not just befuddled it.  And, with a 10 
day cycle time, testing options can take a long time.


In my area (Charleston, SC) there are people, mainly ministers, that claim 
they can cure health issues by laying their hands on a person and saying a 
few words.  I was thinking maybe Andre could do the same for my servers, you 
know, with his telepathy thingie and all.


Thanks,

Carl

- Original Message - 
From: "Christopher Schultz" 

To: "Tomcat Users List" 
Sent: Tuesday, February 16, 2010 4:55 PM
Subject: Re: Tomcat dies suddenly



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 2/16/2010 4:41 PM, André Warnier wrote:

So what now ? I leave this list for 3 days to go earn my keep, and when
I come back this silly crash issue is /still/ not resolved ?


Well, we've been waiting for you to bring your expertise to bear on this
issue, André :)


still on my trip about the SegFaults caused by some native non-kosher
executable module..


I'd be surprised if this was the problem: Carl is installing Sun's JRE,
which should have everything it needs. He says he's not playing around
with any native code, so I wouldn't expect anything to be incompatible.
I'm not saying it's impossible... just that I'd be surprised if it's the
case.

I'd think you'd get something other than a SIGSEGV anyway... attempting
to load an incompatible library ought to get you some other error...
though I'm not sure which. You could probably try to force that to
happen with something like this (in Java, of course):

System.loadLibrary("my-bad-arch.so");

...and see what happens. I don't have a library of the wrong
architecture laying around right now. I tried to load some random file,
and I got an UnsatisfiedLinkError, but that's at the Java level. I have
no idea what would happen if the native X11 graphics library was being
loaded by the JVM and wasn't compatible...


Appeal to the experts : considering the lenghtily expounded symptoms,
would it be possible that one obscure corner of the SSL code or data is
being used only occasionally, and that such occasional usage could cause
the symptoms here observed ?


It's possible. If SSL is in use, consider "downgrading" to the pure Java
connectors (i.e. no APR... enjoy re-configuring Tomcat to use the
different-style SSL configuration) to see if that clears things up.

strace would indicate that this was the problem if you had multiple
runs: the openssl libraries would always be in the mix of the stack trace.

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

iEYEARECAAYFAkt7FDsACgkQ9CaO5/Lv0PC1cgCfRf9qHNkMJEs54I/CCAxuzBc8
zroAnRLGS53mv6V/T1sxur1vEekbd3Ym
=XaqE
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Multiple UserDatabases

2010-02-17 Thread vramanaj

Issue still not resolved. Is there any way to club both the Data Sources(one
is tomcat.xml & another josso data source) ?


markt-2 wrote:
> 
> On 04/01/2010 11:39, vramanaj wrote:
>> 
>> Can you elobrate the second option ?
> 
> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
> 
>> 
>> 
>> markt-2 wrote:
>>>
>>> On 04/01/2010 11:14, vramanaj wrote:
>  http://old.nabble.com/file/p27011540/server.xml server.xml 
>  http://old.nabble.com/file/p27011540/app-context.xml.txt
> app-context.xml.txt 
>

 And the content in context file using josso as below
 
 >>> type="javax.sql.DataSource"/>
 
>>>
>>> From a Tomcat perspective everything looks OK.
>>>
>>> I think the issue is that the JOSSO valve is going to apply to the
>>> context you want to use the UserDatabaseRealm for as well.
>>>
>>> I don't know JOSSO but I think you have two options:
>>> - Move the users & roles defined in tomcat-users.xml to JOSSO and use
>>> JOSSO for everything.
>>> - Use a separate virtual host for apps that shouldn't use JSSO
>>>
>>> Mark
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>>
>>>
>> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Multiple-UserDatabases-tp26977405p27623330.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: VSphere4 and tomcat 6.0

2010-02-17 Thread André Warnier

Daniel Dreier wrote:

Hello,

I want to use tomcat 6.0 on a vsphere4 based Server. Are there known issues?


Hi.
It might help if you provided some details about "vsphere4".  I don't 
think that you can assume that many people here would be familiar with 
it, or would be willing to research the details for you.

It might also help you to search this mailing list's archives first.
See http://tomcat.apache.org/lists.html


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



[ANN] Apache Tomcat Native 1.1.20 released

2010-02-17 Thread Mladen Turk

The Apache Tomcat team announces the immediate availability of Apache
Tomcat Native 1.1.20 stable.
This release includes a fix for JVM crash on Tomcat shutdown.

Please refer to the change log for the list of changes:
http://tomcat.apache.org/native-doc/miscellaneous/changelog.html

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


Thank you,
--
The Apache Tomcat Team


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Accessing a Tomcat webapp from a PHP webapp

2010-02-17 Thread

Hi!

I'm trying to access a Java web application, hosted on a Tomcat 6.0.20, from
a PHP application hosted on a Apache, located at the same machine. The PHP
app must request a Java app with few parameters and, the Java app must
respond with some data encoded in a JSON response. Perhaps I got a HTTP 403
error. How to fix this?

Thanks.
José
-- 
View this message in context: 
http://old.nabble.com/Accessing-a-Tomcat-webapp-from-a-PHP-webapp-tp27622126p27622126.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



VSphere4 and tomcat 6.0

2010-02-17 Thread Daniel Dreier
Hello,

I want to use tomcat 6.0 on a vsphere4 based Server. Are there known issues?

best regards

Daniel Dreier
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat context startup failed

2010-02-17 Thread Bob Hall
Andre,

--- On Wed, 2/17/10 at 1:06 AM, André Warnier  wrote:

> > The obvious error displayed from log is "
> java.lang.NoClassDefFoundError:
> org/apache/xerces/util/EncodingMap". First check whether the
> xerces jar containing mentioned class is in place. Try
> downloading new jar and again restart the tomcat services.
> > 

The NoClassDefFoundError can also be caused by having more than one
copy of a given class available due to its having been loaded by
separate class loaders.

The OP should check his Tomcat installation for multiple .jars that
contain the "missing" class.

> I am no great Java or Eclipse expert, but sometimes one
> wonders how explicit an error log message must be, that one
> would notice.
> 
> In the submitted logfile, these two errors happen first :
> 
> > 16-feb-2010 16.48.14
> org.apache.catalina.loader.WebappClassLoader
> validateJarFile
> > INFO: validateJarFile(C:\Program
> Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\j2ee.jar)
> - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
> Offending class: javax/servlet/Servlet.class
> > 16-feb-2010 16.48.14
> org.apache.catalina.loader.WebappClassLoader
> validateJarFile
> > INFO: validateJarFile(C:\Program
> Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\javaee.jar)
> - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
> Offending class: javax/servlet/Servlet.class
> 
> Should not the first two errors above be attended to first
> ?
> 

The offending .jar files were not loaded and can't contribute to any problems.

- Bob




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat context startup failed

2010-02-17 Thread André Warnier

Hadole, Nishant IN BOM SISL wrote:

Dear Simone,

The obvious error displayed from log is " java.lang.NoClassDefFoundError: 
org/apache/xerces/util/EncodingMap". First check whether the xerces jar containing 
mentioned class is in place. Try downloading new jar and again restart the tomcat 
services.



I am no great Java or Eclipse expert, but sometimes one wonders how 
explicit an error log message must be, that one would notice.


In the submitted logfile, these two errors happen first :

> 16-feb-2010 16.48.14 org.apache.catalina.loader.WebappClassLoader 
validateJarFile
> INFO: validateJarFile(C:\Program 
Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\j2ee.jar) - jar 
not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
javax/servlet/Servlet.class
> 16-feb-2010 16.48.14 org.apache.catalina.loader.WebappClassLoader 
validateJarFile
> INFO: validateJarFile(C:\Program 
Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\javaee.jar) - 
jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
javax/servlet/Servlet.class


In section 9.7.2 of the servlet spec, it says :

SRV.9.7.2 Web Application Class Loader

...
As described in the J2EE license agreement, servlet containers that are 
not part of a J2EE product should not allow the application to override 
J2SE platform classes, such as those in the java.*
and javax.* namespaces, that J2SE does not allow to be modified. Also, 
servlet containers that are part of a J2EE product should not allow the 
application to override J2SE or J2EE platform classes, such as those in 
java.* and javax.* namespaces, that either J2SE or J2EE do not allow to 
be modified. The container should not allow applications to override or 
access the container’s implementation...


I would tend to interpret this as :
- this web application tries to load jar files containing classes which 
would redefine classes of the JVM. The log message also indicates which 
jar's that is.
- the container (Tomcat) thus - rightly according to the spec - rejects 
the loading of these jar's.
- and then, later on, something else fails, maybe because another class 
(which may also have been in these rejected jar's) is missing.


Should not the first two errors above be attended to first ?




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Tomcat dies suddenly

2010-02-17 Thread Ognjen Blagojevic

André Warnier wrote:
Now I am very curious, because I happen to have supplied the media 
archive management software used by a very large broadcasting 
organisation, where a similar story happened to the server running ditto 
software (this was a few years ago).  Right after that incident, the 
organisation in question purchased a second server and a second copy of 
the software, and asked a partner of mine to design a failover solution.
Of course we do not want to name anyone precisely, but it would be funny 
if this was the same incident.

?


You turned adversity into advantage. Good business lesson. :)

I believe it is not the same company, mine was educational institution, 
and the incident was more than 10 years ago. Anyway, it is good to know 
that fellow developers and administrators are facing the same problems, 
around the globe.


-Ognjen

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: performance problems with Tomcat 6 and JSF 1.2

2010-02-17 Thread Michael Heinen
Thanks Mark.

Two demo apps with a single jsp are available at: 
http://www.datafilehost.com/download-eec20011.html

Just call for JSF 1.2
http://:/jsf12/faces/100hout.jsp
http://:/jsf12/faces/1000hout.jsp
http://:/jsf12/faces/2000hout.jsp

for JSF 1.1
http://:/jsf11/faces/1000hout.jsp


The compiled jsps are also available as attachment of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=48750

I patched org.apache.jasper.compiler.Generator and removed the AnnotationHelper.
The compiled jsps did not contain these calls anymore but this did not have any 
noticeable effect on performance.

I did some more tests with Tomcat and Jetty:
1) 100 outputtags:Tomcat: 3ms   Jetty: 3ms
2) 1000 outputtags:   Tomcat 72ms  Jetty 41ms
3) 2000 outputtags:   Tomcat 190ms  Jetty 174ms   

Both servers were started with same jdk and same vm params.

Another difference between the compiled jsps are value expressions:
Tomcat JSF 1.2:
_jspx_th_h_005foutputText_005f999.setValue(new 
org.apache.jasper.el.JspValueExpression("/1000hout.jsp(1021,0) 
'1'",_el_expressionfactory.createValueExpression("1",java.lang.Object.class)));
_jspx_th_h_005foutputText_005f999.setStyle(new 
org.apache.jasper.el.JspValueExpression("/1000hout.jsp(1021,0) 'z 
index:29202;'",_el_expressionfactory.createValueExpression("z-index:29202;",java.lang.Object.class)));
   
Jetty JSF 1.2
_jspx_th_h_outputText_999.setValue(org.apache.jasper.runtime.PageContextImpl.getValueExpression("1",
 (PageContext)_jspx_page_context, java.lang.Object.class, null));
_jspx_th_h_outputText_999.setStyle(org.apache.jasper.runtime.PageContextImpl.getValueExpression("z-index:29202;",
 (PageContext)_jspx_page_context, java.lang.Object.class, null));

Tomcat JSF 1.1 (for completeness):
_jspx_th_h_005foutputText_005f999.setValue("1");
_jspx_th_h_005foutputText_005f999.setStyle("z-index:29202;");

I did not find any hotspots >3% in the sample with 1000 tags.
I tried to nail down the performance problem we are seeing in our real app but 
this seems to be not so trivial.

Michael

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Dienstag, 16. Februar 2010 22:54
To: Tomcat Users List
Subject: Re: performance problems with Tomcat 6 and JSF 1.2

On 16/02/2010 21:39, Christopher Schultz wrote:
> Mark Thomas is a frequent contributor to this list and, if he's
> got time and you're willing to help, he's quite likely to help
> investigate and maybe work on a solution.

It is on my radar but I haven't had time to look at it yet. There is at
least one duplicate of 48600. Between the various bugs I think there is
a test case but it would be good to make sure. The ideal would be:
- test case that demonstrates the problem (as simple as possible, with
source, a single JSP is ideal)
- a clean patch in diff -u format against trunk that includes
documentation as appropriate

Essentially, the easier it is for a committer to understand the problem,
repeat the issue, understand the patch, apply the patch and test the
patch, the quicker fixes find their way into the codebase.

Mark





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org