Re: ClassCastException in tomcat 6

2010-01-04 Thread Peter Crowther
2010/1/5 test123456 

> I put the jackrabbit.war file into the webapps.
>
> I have a new test project which will access the jackrabbit.war through the
> JNDI lookup.
>
> In server.xml i have a global jndi resource.
> and the tomcat lib directory contain all the required jar files.
>
> In the test project , i am able to get the JNDI resource and lookup()
> returns a org.apache.jackrabbit.core.jndi.BindableRepository object
>
> When i try to cat this to org.apache.jackrabbit.api.jsr283.Repository
> object
> , it throws the ClassCastException .
>
> I suspect you have the same class defined twice: once in jackrabbit.war,
once in Tomcat's lib directory.  The version loaded by JNDI will be from
lib, the version from the webapp will be the one from jackrabbit.war.
Because they are loaded by different classloaders, they are *different*
classes and are not castable even though they have the same name.

If this is the issue: to fix it, ensure no duplicate classes are defined.
This may require removing a number of jars from the war file.

- Peter


ClassCastException in tomcat 6

2010-01-04 Thread test123456


I am trying to setup content repository using the jackrabbit  and tomcat 6
server.

I put the jackrabbit.war file into the webapps.

I have a new test project which will access the jackrabbit.war through the
JNDI lookup.

In server.xml i have a global jndi resource.
and the tomcat lib directory contain all the required jar files.

In the test project , i am able to get the JNDI resource and lookup()
returns a org.apache.jackrabbit.core.jndi.BindableRepository object

When i try to cat this to org.apache.jackrabbit.api.jsr283.Repository object
, it throws the ClassCastException .

What will e thr problem.. i am not able to find out where it went wrong..



-- 
View this message in context: 
http://old.nabble.com/ClassCastException-in-tomcat-6-tp27024798p27024798.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: JSP 2.0 examples throw security exception - Need help with configuration

2010-01-04 Thread Shanmugham, Dayanand (IE10)
Hi,

I installed TC 6.0.20 in new folder, recreated Tomcat Server instance in 
Eclipse, made it point to new TC 6.0.20 installation folder and all examples 
work now.

Thanks & Regards,
Daya

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Monday, January 04, 2010 6:26 PM
To: Tomcat Users List
Subject: Re: JSP 2.0 examples throw security exception - Need help with 
configuration

2010/1/4 Shanmugham, Dayanand (IE10) :
> Hi All,
>
>
> I need help with resolving following error - staketrace is shown below.
> Following is what I did:
>
> 1.      Downloaded TC 6.0 and extracted into D:\TC60
> 2.      Downloaded "Eclipse Java EE IDE for Web Developers." (or)
> Eclipse 3.5 with J2EE Support and created instance of Tomcat Server to
> point to "D:\TC60"
> 3.      Started Tomcat instance
> 4.      All Servlets and JSP 1.2 examples work fine but when I run the
> JSP 2.0 examples, I get the following security exception messages

You missed some steps/details from your description.
When I do the same, Eclipse creates an empty Tomcat instance, without
any Examples apps deployed. Also, it does not run with SecurityManager
enabled by default.

> 5.      I removed the comments from "tomcat-users.xml" file

> staketrace is shown below.

There is nothing useful in the stacktrace. The important information
is from where the AccessController.checkPermission call was made, and
that is not available.

> The full stack trace of the root cause is available in the Apache
> Tomcat/6.0.20 logs.

By the way, the logs will be in
.metadata/.plugins/org.eclipse.wst.server.core/tmp0/logs in your
workspace.

What are the exact version of Sun JRE that you are using? I see that
Tomcat version is 6.0.20.

Are all the examples failing, or you have a specific sequence of steps
that causes the failure?

You may want to try 6.0.22 release candidate, see the thread here:
http://markmail.org/thread/df55xredhflfqnnn

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



Re: Help with security-constraint in web.xml

2010-01-04 Thread Joe Hansen
Chuck,

I just forgot to enable the HTTPS Connector! Login form is working now
over https.





Many thanks for your help. You saved my day.

Thanks,
Joe

On Mon, Jan 4, 2010 at 4:06 PM, Caldarale, Charles R
 wrote:
>> From: Joe Hansen [mailto:joe.hansen...@gmail.com]
>> Subject: Re: Help with security-constraint in web.xml
>>
>> However, when I enter the login credentials and submit the
>> form, nothing happens. Somehow changing the redirectPort
>> seems to have broken the login form.
>
> Turn on the AccessLogValve to see what's reaching Tomcat.
>
> Are you using httpd for anything useful?  If all it's doing is forwarding 
> requests to Tomcat, get rid of httpd and let Tomcat handle everything 
> directly.
>
> If you are using httpd for something else (e.g., PHP), it's possible the 
> routing is not configured properly.  That's outside my experience, so someone 
> else will need to help.  Start by posting your httpd config  and server.xml 
> in a new thread so a new set of eyes can look at it.
>
>  - 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
>
>

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



RE: Help with security-constraint in web.xml

2010-01-04 Thread Caldarale, Charles R
> From: Joe Hansen [mailto:joe.hansen...@gmail.com]
> Subject: Re: Help with security-constraint in web.xml
> 
> However, when I enter the login credentials and submit the
> form, nothing happens. Somehow changing the redirectPort
> seems to have broken the login form.

Turn on the AccessLogValve to see what's reaching Tomcat.

Are you using httpd for anything useful?  If all it's doing is forwarding 
requests to Tomcat, get rid of httpd and let Tomcat handle everything directly. 
 

If you are using httpd for something else (e.g., PHP), it's possible the 
routing is not configured properly.  That's outside my experience, so someone 
else will need to help.  Start by posting your httpd config  and server.xml in 
a new thread so a new set of eyes can look at it.

 - 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: jsessionid on EXACTLY the 2nd request?

2010-01-04 Thread Ken Bowen

Thanks Mark.  That cleared it up for me:

Re:  a) look at the html source of the responses and/or look at the  
URLs for


the links you are clicking on before you click on them.


That's the trick.  The source for that (in a JSP) looks like:

   
class="top_parent">Another Page


And when I hover over that link, the Browser footer shows that the  
request includes the attached jsessionid.


Cheers,
Ken


On Jan 4, 2010, at 5:15 PM, Mark Thomas wrote:


On 04/01/2010 21:43, Ken Bowen wrote:

I'm not sure about that.


Run through your test again, but this time:
a) look at the html source of the responses and/or look at the URLs  
for

the links you are clicking on before you click on them.


 Here's what seems to me to be the sequence of
events:

Browser sends initial request  http://myapp.com
   Tomcat creates session and generates page for this request.
   Tomcat doesn't know that Browser supports cookies, so it  
should

append jsessionid (but doesn't ??)


Nope. The URL displayed in the address bar is the one you requested.  
You

should also take a look at the links in the html source at this point.


Browser get's Tomcat response & display's page with address:
http://myapp.com


Correct.


Browser creates JSESSIONID cookie (using info supplied by Tomcat in
response):
Cookie has contents:4E4F86E5B779F43BCA7895B8A554FDCD
-
Browser makes  2nd request, for http://myapp/anotherPage.  Browser  
must

definitely by now be stating that it supports cookies.


Correct. But look at the URL for the link you click on at this point.


Tomcat prepares response, adding jsessionid (why?),


Nope. Again, the URL in the address bar is the URL you requested. It  
is

not part of the response.


the SAME
jsessionid as in the cookie: 4E4F86E5B779F43BCA7895B8A554FDCD
Browser displays response with jsessionid showing in address bar.


Correct.



More interactions,  but no more jsessionid's.


Correct.

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



Re: Help with security-constraint in web.xml

2010-01-04 Thread Joe Hansen
Changing the redirectPort to 443 on both the Connectors (HTTP/1.1 and
AP/1.3) did redirect /spring_security_login to
https://mywebsite.com/spring_security_login. However, when I enter the
login credentials and submit the form, nothing happens. Somehow
changing the redirectPort seems to have broken the login form.

I'm sure there must be a simple explanation. Chuck, please help me out!!

Thank you,
Joe

On Mon, Jan 4, 2010 at 3:25 PM, Caldarale, Charles R
 wrote:
>> From: Joe Hansen [mailto:joe.hansen...@gmail.com]
>> Subject: Re: Help with security-constraint in web.xml
>>
>> Only a couple of pages need to be served on HTTPS on our website. All
>> the remaining pages could be accessed using just HTTP.
>
> Then I'd use what you've got and not try to optimize what isn't a bottleneck.
>
>  - 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
>
>

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



RE: Help with security-constraint in web.xml

2010-01-04 Thread Caldarale, Charles R
> From: Joe Hansen [mailto:joe.hansen...@gmail.com]
> Subject: Re: Help with security-constraint in web.xml
> 
> Only a couple of pages need to be served on HTTPS on our website. All
> the remaining pages could be accessed using just HTTP.

Then I'd use what you've got and not try to optimize what isn't a bottleneck.

 - 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: Help with security-constraint in web.xml

2010-01-04 Thread Joe Hansen
Chuck,

>> No, I said you could handle the SSL encryption/decryption in httpd; the 
>> redirection still has to occur by Tomcat recognizing a reference to a 
>> confidential resource.

I did configure the SSL on the httpd end
(c:\Apache\conf\extra\httpd-ssl.conf) file.

>> As far as how to do so, you'll have to search the archives and the httpd 
>> docs.  You will likely need two AJP  elements, one for secure 
>> traffic and one for normal.  If ultimate performance is not an issue, leave 
>> what you've got alone.

Only a couple of pages need to be served on HTTPS on our website. All
the remaining pages could be accessed using just HTTP. Would you see
any performance implications with the way I have defined the Connector
elements in the conf/server.xml file?

Thanks,
Joe

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



Re: jsessionid on EXACTLY the 2nd request?

2010-01-04 Thread Mark Thomas
On 04/01/2010 21:43, Ken Bowen wrote:
> I'm not sure about that.

Run through your test again, but this time:
a) look at the html source of the responses and/or look at the URLs for
the links you are clicking on before you click on them.

>   Here's what seems to me to be the sequence of
> events:
> 
> Browser sends initial request  http://myapp.com
> Tomcat creates session and generates page for this request.
> Tomcat doesn't know that Browser supports cookies, so it should
> append jsessionid (but doesn't ??)

Nope. The URL displayed in the address bar is the one you requested. You
should also take a look at the links in the html source at this point.

> Browser get's Tomcat response & display's page with address:  
> http://myapp.com

Correct.

> Browser creates JSESSIONID cookie (using info supplied by Tomcat in
> response):
> Cookie has contents:4E4F86E5B779F43BCA7895B8A554FDCD
> -
>  Browser makes  2nd request, for http://myapp/anotherPage.  Browser must
> definitely by now be stating that it supports cookies.

Correct. But look at the URL for the link you click on at this point.

>  Tomcat prepares response, adding jsessionid (why?),

Nope. Again, the URL in the address bar is the URL you requested. It is
not part of the response.

> the SAME
> jsessionid as in the cookie: 4E4F86E5B779F43BCA7895B8A554FDCD
> Browser displays response with jsessionid showing in address bar.

Correct.

> 
> More interactions,  but no more jsessionid's.

Correct.

Mark



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



RE: Help with security-constraint in web.xml

2010-01-04 Thread Caldarale, Charles R
> From: Joe Hansen [mailto:joe.hansen...@gmail.com]
> Subject: Re: Help with security-constraint in web.xml
> 
> You were saying that I should handle the forced HTTPS redirection of
> certain pages on the httpd end, right?

No, I said you could handle the SSL encryption/decryption in httpd; the 
redirection still has to occur by Tomcat recognizing a reference to a 
confidential resource.

As far as how to do so, you'll have to search the archives and the httpd docs.  
You will likely need two AJP  elements, one for secure traffic and 
one for normal.  If ultimate performance is not an issue, leave what you've got 
alone.

 - 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: Help with security-constraint in web.xml

2010-01-04 Thread Joe Hansen
Thanks for the super quick reply, Chuck! Here's what I did. I changed
the redirectPort on the following two Connector elements. From 8443 to
443. And that did the trick.

/* Previously */



/* Currently */



You were saying that I should handle the forced HTTPS redirection of
certain pages on the httpd end, right? Can you please elaborate on how
to do it or give me pointers on how it could be done?

Thank you!!
Joe

On Mon, Jan 4, 2010 at 2:57 PM, Caldarale, Charles R
 wrote:
>> From: Joe Hansen [mailto:joe.hansen...@gmail.com]
>> Subject: Help with security-constraint in web.xml
>>
>> What do I need to do so that the user is directed to
>> https://ourwebsite.com/spring_security_login instead
>
> Fix the redirectPort attribute in your  elements in 
> conf/server.xml.
>
> BTW, since you are front-ending Tomcat with httpd, it would be more efficient 
> to have httpd handle the SSL stuff, and let Tomcat see the requests in plain 
> text - assuming you have a secure connection between httpd and Tomcat.
>
>  - 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
>
>

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



RE: Help with security-constraint in web.xml

2010-01-04 Thread Caldarale, Charles R
> From: Joe Hansen [mailto:joe.hansen...@gmail.com]
> Subject: Help with security-constraint in web.xml
> 
> What do I need to do so that the user is directed to
> https://ourwebsite.com/spring_security_login instead

Fix the redirectPort attribute in your  elements in conf/server.xml.

BTW, since you are front-ending Tomcat with httpd, it would be more efficient 
to have httpd handle the SSL stuff, and let Tomcat see the requests in plain 
text - assuming you have a secure connection between httpd and Tomcat.

 - 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



Help with security-constraint in web.xml

2010-01-04 Thread Joe Hansen
Hey all,

We are using Tomcat 6.0 / Apache 2.2. We would like the user to login
over HTTPS rather than plain HTTP.

So, I have defined the following security-constraint in the web.xml
file of our web application:


Login


Login
/spring_security_login
GET
POST



CONFIDENTIAL



When a user clicks on the login link Login, he/she is redirected to the
following URL and the browser shows an "Unable to connect" error:
https://ourwebsite.com:8443/spring_security_login

What do I need to do so that the user is directed to
https://ourwebsite.com/spring_security_login instead (which, displays
the login page correctly). i.e. I do not want a port number in the
URL.

Please advise.

Thank you!
Joe

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



Re: jsessionid on EXACTLY the 2nd request?

2010-01-04 Thread Ken Bowen
I'm not sure about that.   Here's what seems to me to be the sequence  
of events:


Browser sends initial request  http://myapp.com
Tomcat creates session and generates page for this request.
Tomcat doesn't know that Browser supports cookies, so it  
should append jsessionid (but doesn't ??)

Browser get's Tomcat response & display's page with address:   http://myapp.com
Browser creates JSESSIONID cookie (using info supplied by Tomcat in  
response):

Cookie has contents:4E4F86E5B779F43BCA7895B8A554FDCD
-
 Browser makes  2nd request, for http://myapp/anotherPage.  Browser  
must definitely by now be stating that it supports cookies.
 Tomcat prepares response, adding jsessionid (why?), the SAME  
jsessionid as in the cookie: 4E4F86E5B779F43BCA7895B8A554FDCD

Browser displays response with jsessionid showing in address bar.

More interactions,  but no more jsessionid's.


On Jan 4, 2010, at 4:11 PM, Mark Thomas wrote:


On 04/01/2010 20:52, Ken Bowen wrote:

I'm seeing what I think is odd behavior regarding jsessionid's.
[My setup(s): Tomcat 6.0.20 on a MacBook Pro using Java 1.6.0_17,
Tomcat 6.0.18 on CentOS 5 using Java 1.6.0_12 ]
I'm seeing the same behavior on both systems, and the same
behavior happens with Safari and FF.  Both browsers have cookies  
turned on.


I have cookies="true" in context.xml in the app's META_INF.

The Behavior:
I Clear Recent History in FF, which includes clearing cookies,
and request http://myapp.com/ I connect and the address bar  
shows:


   http://myapp.com/

Moreover, a JESSIONID cookie shows in FF's list of cookies.

I make a request for another page in the app and the address bar  
shows:



http://myapp.com/anotherPage;jsessionid=9612C2CAA30DE590AA7A5FDB046DA4F9


Just a guess - I haven't looked at the source code to be sure.

At the point where the page was generated, Tomcat doesn't know that  
the

client supports cookies since at that point the client hasn't sent a
request with a JSESSIONID cookie so any urls generated will have the
session ID appended.

Once a cookie is received, Tomcat knows there is no need to include  
the

session ID in the URL.

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



Re: jsessionid on EXACTLY the 2nd request?

2010-01-04 Thread Mark Thomas
On 04/01/2010 20:52, Ken Bowen wrote:
> I'm seeing what I think is odd behavior regarding jsessionid's.
> [My setup(s): Tomcat 6.0.20 on a MacBook Pro using Java 1.6.0_17,
>  Tomcat 6.0.18 on CentOS 5 using Java 1.6.0_12 ]
> I'm seeing the same behavior on both systems, and the same
> behavior happens with Safari and FF.  Both browsers have cookies turned on.
> 
> I have cookies="true" in context.xml in the app's META_INF.
> 
> The Behavior:
> I Clear Recent History in FF, which includes clearing cookies,
> and request http://myapp.com/ I connect and the address bar shows:
> 
> http://myapp.com/
> 
> Moreover, a JESSIONID cookie shows in FF's list of cookies.
> 
> I make a request for another page in the app and the address bar shows:
> 
>
> http://myapp.com/anotherPage;jsessionid=9612C2CAA30DE590AA7A5FDB046DA4F9

Just a guess - I haven't looked at the source code to be sure.

At the point where the page was generated, Tomcat doesn't know that the
client supports cookies since at that point the client hasn't sent a
request with a JSESSIONID cookie so any urls generated will have the
session ID appended.

Once a cookie is received, Tomcat knows there is no need to include the
session ID in the URL.

Mark



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



jsessionid on EXACTLY the 2nd request?

2010-01-04 Thread Ken Bowen

I'm seeing what I think is odd behavior regarding jsessionid's.
[My setup(s): Tomcat 6.0.20 on a MacBook Pro using Java 1.6.0_17,
 Tomcat 6.0.18 on CentOS 5 using Java 1.6.0_12 ]
I'm seeing the same behavior on both systems, and the same
behavior happens with Safari and FF.  Both browsers have cookies  
turned on.


I have cookies="true" in context.xml in the app's META_INF.

The Behavior:
I Clear Recent History in FF, which includes clearing cookies,
and request http://myapp.com/ I connect and the address bar shows:

http://myapp.com/

Moreover, a JESSIONID cookie shows in FF's list of cookies.

I make a request for another page in the app and the address bar shows:

http://myapp.com/anotherPage;jsessionid=9612C2CAA30DE590AA7A5FDB046DA4F9

And after that, no more jsessionid's are added no matter where in
the app I go, or how many requests I make.

My understanding was that Tomcat could be expected to add a jsessionid  
to a
request it was returning on the FIRST request, but if the browser had  
cookies on,

then AFTER the first request there would be no more jsessionid's.

Getting the jsessionid added on exactly the 2nd request confuses me.

Has anyone here run into something like this, or is my understanding  
of what

Tomcat is supposed to do erroneous?

{Separately, I'm having a problem with a Tuckey outbound filter to  
strip jsessionid's,

but that's a problem for the Tuckey list.}

Thanks in advance,
Ken


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



RE: 5.5.28 Windows Installer issues

2010-01-04 Thread Jeffrey Janner
Some further update on the download problem:
It hits just shy of 700kb (86%) downloaded when it pauses, downloads about 
another 1kb, then hangs for about 30 seconds before completing the install.  
Since the file is not where it should be, I'm guessing the installer is timing 
out on the download and going on. (This is beginning to look like a problem on 
the download server.)
Can't wait for the 5.5.29 version.

-Original Message-
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
Sent: Sunday, January 03, 2010 6:35 PM
To: Tomcat Users List
Subject: RE: 5.5.28 Windows Installer issues

Guess I'll have to back off our requirement for 5.5.28 for customer installs.  
Particularly for SSL required options.

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Sunday, January 03, 2010 5:55 PM
To: Tomcat Users List
Subject: Re: 5.5.28 Windows Installer issues

2010/1/3 Jeffrey Janner :
> I've not had a successful download of the native libraries using the
> 5.5.28 Windows installer.  Everything appears to go normally: screen
> says it's downloading, then goes on, but the file does not end up in the
> bin directory.  Is there an install log file stored anywhere?
> I've done this on various version of Windows with the same result (XP,
> 2003 Server, Vista, Window 7, 32-bit and 64-bit).
>

1.  5.5.28 installer downloads a wrong (very outdated) version of the dll,
and always the 32-bit one.

Please get the right one from the Tomcat Native download page,
http://tomcat.apache.org/download-native.cgi

I do not know, why there is no downloaded file in /bin folder.
The error message, if download fails, is printed to the Details panel
of the installer. Unfortunately, it looks like there is no way in NSIS
to save that log to a file. At least, there is no command-line option.
http://nsis.sourceforge.net/Docs/Chapter3.html#3.2.1

Starting with TC 5.5.29 a copy of native.dll will be bundled with the
installer, so the download step won't occur anymore.

2. There is also the following issue:
https://issues.apache.org/bugzilla/show_bug.cgi?id=47712


Best regards,
Konstantin Kolinko

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



***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.


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



***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.


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



Re: mod_proxy_ajp JSESSIONID and Mime Type

2010-01-04 Thread Konstantin Kolinko
2010/1/4 Darren Salomons :
>
> I'm using Tomcat 6.0.18 with apache 2.2.11.
>
> So this isn't a normal pass through of files from tomcat to apache.  I
> use a URL such as http://mydomain.com/servlet/stylesheet.css to execute
> a servlet that would dynamically create the file "stylesheet.css".
> Since my servlet excepts all types of file types I thought I would just
> leverage apache setting the content-type for me.  This only works
> because apache is smart enough to pick up the extension on the response
> url and append the correct mime type to the content-type header.  The
> problem is that when the JSESSIONID is appended onto the URL it defaults
> the mime type to text/plain regardless of the extension.   This seems
> like a bug

Be sure that it is a feature.

> but I'm not sure if this a problem with mod_proxy or
> mod_proxy_ajp.  I was looking for a flag to turn off JSESSIONID
> altogether but it doesn't exist, unfortunately.   In the mean time I may
> just try using javax.activation.MimetypesFileTypeMap class in my servlet

There is javax.servlet.ServletContext.getMimeType(String).

> to lookup the mimetypes and set the content-type myself.
>

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



Re: mod_proxy_ajp JSESSIONID and Mime Type

2010-01-04 Thread Darren Salomons

I'm using Tomcat 6.0.18 with apache 2.2.11.

So this isn't a normal pass through of files from tomcat to apache.  I 
use a URL such as http://mydomain.com/servlet/stylesheet.css to execute 
a servlet that would dynamically create the file "stylesheet.css".  
Since my servlet excepts all types of file types I thought I would just 
leverage apache setting the content-type for me.  This only works 
because apache is smart enough to pick up the extension on the response 
url and append the correct mime type to the content-type header.  The 
problem is that when the JSESSIONID is appended onto the URL it defaults 
the mime type to text/plain regardless of the extension.   This seems 
like a bug but I'm not sure if this a problem with mod_proxy or 
mod_proxy_ajp.  I was looking for a flag to turn off JSESSIONID 
altogether but it doesn't exist, unfortunately.   In the mean time I may 
just try using javax.activation.MimetypesFileTypeMap class in my servlet 
to lookup the mimetypes and set the content-type myself.



?

On Mon, 4 Jan 2010 12:22:28 +0300, "Konstantin Kolinko"
 said:
> 2010/1/4 Darren Salomons :
> > I am having an issue with Apache 2/mod_proxy_ajp and Tomcat 6.  I have
> > monitored all the headers coming back from apache for various scenarios
> > and the only scenario that I am having a problem with is when I have a
> > JSESSIONID appended to the URL.  When the JSESSIONID is appended to the
> > URL the mime type coming back from apache is text/plain.  When the
> > JSESSIONID is not there then the correct mime type is returned.  What
> > would cause this?
> >
> 
> 1. Your configuration, and exact versions of Tomcat and Apache that
> you are using =?
> 
> > When the JSESSIONID is appended to the
> > URL the mime type coming back from apache is text/plain.
> 
> Is the mime-type that you are seeing provided by Tomcat (as defined in
> $CATALINA_BASE/conf/web.xml, or in WEB-INF/web.xml files of individual
> web applications),  or provided/overwritten by Apache HTTPD?
> 
> -
> 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: Weird JAXP problem at Tomcat startup

2010-01-04 Thread Caldarale, Charles R
> From: David Haraburda [mailto:david.harabu...@dairy.com]
> Subject: Weird JAXP problem at Tomcat startup
> 
> I turned on JAXP debugging and noticed that when I had the
> problem, JAXP was finding a system property specifying that
> xerces should be used:
> 
> INFO: Starting Coyote HTTP/1.1 on http-8580
> JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
> JAXP: found system property,
> value=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
> 
> When Tomcat loads fine, it appears that system property is not
> set and it is (successfully) falling back on the default:
> 
> INFO: Initializing Coyote HTTP/1.1 on http-8580
> Jan 4, 2010 8:58:29 AM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 460 ms
> JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
> JAXP: loaded from fallback value:
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

These are actually two completely separate instances of searching for an XML 
parser.  The first comes from javax.xml.parsers.DocumentBuilderFactory, the 
second from javax.xml.parsers.SAXParserFactory; each is controlled by a 
different system property and has a different default.

When I run Tomcat (with multiple webapps), I see several occurrences of the SAX 
one, followed by a few for DocumentBuilderFactory.  You need to look at your 
logs in more detail for all of the JAXP print lines.

Since the error occurs after the "Starting Coyote" message, it's happening 
after Tomcat has finished its serial initialization of webapps, so the cause is 
most likely a timing issue with your webapp, setting the global system property 
which is impacting searches by other threads for the DocumentBuilderFactory.  
You could trap it with a SecurityManager setting that prevents writing of that 
system property.

 - 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



Weird JAXP problem at Tomcat startup

2010-01-04 Thread David Haraburda
Sometimes, when starting Tomcat I get an error when JAXP is trying to
load the DocumentBuilderFactory. Tomcat does not start completely.  This
doesn't always happen, and when it does I can restart the server and it
is fine.  I turned on JAXP debugging and noticed that when I had the
problem, JAXP was finding a system property specifying that xerces
should be used:

INFO: Starting Coyote HTTP/1.1 on http-8580
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: found system property,
value=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:24
0)
   at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
   at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFact
ory.java:129)
   at
org.apache.commons.modeler.util.DomUtil.readXml(DomUtil.java:242)
   at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(Mb
eansDescriptorsDOMSource.java:88)
   at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescri
ptors(MbeansDescriptorsDOMSource.java:78)
   at org.apache.commons.modeler.Registry.load(Registry.java:792)
   at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:901)
   at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:882)
   at
org.apache.commons.modeler.Registry.findDescriptor(Registry.java:961)
   at
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:666)
   at
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:1015)
   at
org.apache.commons.modeler.Registry.registerComponent(Registry.java:832)
   at
org.apache.catalina.connector.Connector.start(Connector.java:1077)
   at
org.apache.catalina.core.StandardService.start(StandardService.java:457)
   at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   ... 12 more

When Tomcat loads fine, it appears that system property is not set and
it is (successfully) falling back on the default:

INFO: Initializing Coyote HTTP/1.1 on http-8580
Jan 4, 2010 8:58:29 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 460 ms
JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
JAXP: loaded from fallback value:
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
JAXP: created new instance of class
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
ClassLoader: null
Jan 4, 2010 8:58:29 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 4, 2010 8:58:29 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.28

I have only one webapp in this instance of Tomcat.  It does have xerces
JARs in its WEB-INF/lib directory, but of course Tomcat doesn't look
there when it is loading.  I can't figure out how the system property is
being set.

I am using Tomcat 5.5.28, Java 1.6.0_07 64-bit on Oracle Linux (RHEL)
5.2.

Any help is appreciated.

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



RE: Tomcat 6 Log Tomcat output to file

2010-01-04 Thread Caldarale, Charles R
> From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
> Subject: Re: Tomcat 6 Log Tomcat output to file
> 
> catalina.bat run >outputfile.log 2>&1

Indeed; thanks for the correction.

 - 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: Tomcat 6 Log Tomcat output to file

2010-01-04 Thread Konstantin Kolinko
2010/1/4 Caldarale, Charles R :
>> From: n828cl [mailto:chuck.caldar...@unisys.com]
>> Subject: Re: Tomcat 6 Log Tomcat output to file
>>
>> awarnier wrote:
>> > startup.bat > outputfile
>>
>> Close, but it should be:
>>
>> catalina.bat > outputfile.log
>
> Scratch that - it's not complete; it should be:
>
> catalina.bat > outputfile.log 2>&1
>

catalina.bat run >outputfile.log 2>&1

;)

Best regards,
Konstantin Kolinko

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



Fw: JSP 2.0 examples throw security exception - Need help with configuration

2010-01-04 Thread Tobias Crefeld
Am Mon, 4 Jan 2010 17:47:23 +0530
schrieb "Shanmugham, Dayanand (IE10)" :

> 127.0.0.1 - admin [04/Jan/2010:17:45:09 +0530] "GET /manager/html
> HTTP/1.1" 500 2615

"admin" is not a valid username but a valid role in the (uncommented)
default-version of tomcat-users.xml. You should look (or insert) in the
file which usernames (and passwords) are valid.


Gruss,
 Tobias.

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



Re: Multiple UserDatabases

2010-01-04 Thread Mark Thomas
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



Re: JSP 2.0 examples throw security exception - Need help with configuration

2010-01-04 Thread Konstantin Kolinko
2010/1/4 Shanmugham, Dayanand (IE10) :
> Hi All,
>
>
> I need help with resolving following error - staketrace is shown below.
> Following is what I did:
>
> 1.      Downloaded TC 6.0 and extracted into D:\TC60
> 2.      Downloaded "Eclipse Java EE IDE for Web Developers." (or)
> Eclipse 3.5 with J2EE Support and created instance of Tomcat Server to
> point to "D:\TC60"
> 3.      Started Tomcat instance
> 4.      All Servlets and JSP 1.2 examples work fine but when I run the
> JSP 2.0 examples, I get the following security exception messages

You missed some steps/details from your description.
When I do the same, Eclipse creates an empty Tomcat instance, without
any Examples apps deployed. Also, it does not run with SecurityManager
enabled by default.

> 5.      I removed the comments from "tomcat-users.xml" file

> staketrace is shown below.

There is nothing useful in the stacktrace. The important information
is from where the AccessController.checkPermission call was made, and
that is not available.

> The full stack trace of the root cause is available in the Apache
> Tomcat/6.0.20 logs.

By the way, the logs will be in
.metadata/.plugins/org.eclipse.wst.server.core/tmp0/logs in your
workspace.

What are the exact version of Sun JRE that you are using? I see that
Tomcat version is 6.0.20.

Are all the examples failing, or you have a specific sequence of steps
that causes the failure?

You may want to try 6.0.22 release candidate, see the thread here:
http://markmail.org/thread/df55xredhflfqnnn

Best regards,
Konstantin Kolinko

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



RE: JSP 2.0 examples throw security exception - Need help with configuration

2010-01-04 Thread Shanmugham, Dayanand (IE10)
Tried both options (Tomcat restart and clearing IE 6.0 browser cache)
but still get the same error.

Following is from the "localhost_access_log.2010-01-04.log": 
~~~
127.0.0.1 - - [04/Jan/2010:17:43:52 +0530] "GET /examples/jsp/ HTTP/1.1"
200 16294
127.0.0.1 - - [04/Jan/2010:17:43:52 +0530] "GET
/examples/jsp/images/code.gif HTTP/1.1" 200 292
127.0.0.1 - - [04/Jan/2010:17:43:52 +0530] "GET
/examples/jsp/images/execute.gif HTTP/1.1" 200 1242
127.0.0.1 - - [04/Jan/2010:17:43:52 +0530] "GET
/examples/jsp/images/return.gif HTTP/1.1" 200 1231
127.0.0.1 - - [04/Jan/2010:17:43:57 +0530] "GET
/examples/jsp/num/numguess.jsp HTTP/1.1" 200 1207
127.0.0.1 - - [04/Jan/2010:17:44:00 +0530] "GET
/examples/jsp/num/numguess.jsp?guess=99 HTTP/1.1" 200 1242
127.0.0.1 - - [04/Jan/2010:17:44:11 +0530] "GET
/examples/jsp/jsp2/simpletag/hello.jsp HTTP/1.1" 500 4077
127.0.0.1 - - [04/Jan/2010:17:44:40 +0530] "GET
/examples/jsp/jsp2/jspattribute/jspattribute.jsp HTTP/1.1" 500 3992
127.0.0.1 - admin [04/Jan/2010:17:45:09 +0530] "GET /manager/html
HTTP/1.1" 500 2615
~~~

Regards,
Daya


-Original Message-
From: Tobias Crefeld [mailto:t...@cataneo.eu] 
Sent: Monday, January 04, 2010 5:35 PM
To: users@tomcat.apache.org
Subject: Re: JSP 2.0 examples throw security exception - Need help with
configuration

Am Mon, 4 Jan 2010 17:08:26 +0530
schrieb "Shanmugham, Dayanand (IE10)"
:

> 3.Started Tomcat instance 
> 4.All Servlets and JSP 1.2 examples work fine but when I run
> the JSP 2.0 examples, I get the following security exception messages
> 5.I removed the comments from "tomcat-users.xml" file

IIRC you have to restart Tomcat after changing tomcat-users.xml (+
refresh webbrowser). 


Gruss,
 Tobias.

-
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: JSP 2.0 examples throw security exception - Need help with configuration

2010-01-04 Thread Tobias Crefeld
Am Mon, 4 Jan 2010 17:08:26 +0530
schrieb "Shanmugham, Dayanand (IE10)" :

> 3.Started Tomcat instance 
> 4.All Servlets and JSP 1.2 examples work fine but when I run
> the JSP 2.0 examples, I get the following security exception messages
> 5.I removed the comments from "tomcat-users.xml" file

IIRC you have to restart Tomcat after changing tomcat-users.xml (+
refresh webbrowser). 


Gruss,
 Tobias.

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



Re: Multiple UserDatabases

2010-01-04 Thread vramanaj

Can you elobrate the second option ?


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

-- 
View this message in context: 
http://old.nabble.com/Multiple-UserDatabases-tp26977405p27011807.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



JSP 2.0 examples throw security exception - Need help with configuration

2010-01-04 Thread Shanmugham, Dayanand (IE10)
Hi All,

 

I need help with resolving following error - staketrace is shown below.
Following is what I did:

1.  Downloaded TC 6.0 and extracted into D:\TC60
2.  Downloaded "Eclipse Java EE IDE for Web Developers." (or)
Eclipse 3.5 with J2EE Support and created instance of Tomcat Server to
point to "D:\TC60"
3.  Started Tomcat instance 
4.  All Servlets and JSP 1.2 examples work fine but when I run the
JSP 2.0 examples, I get the following security exception messages
5.  I removed the comments from "tomcat-users.xml" file

 

~~~


HTTP Status 500 - 




type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

org.apache.jasper.JasperException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission accessDeclaredMembers)
 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:522)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:416)
 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)

...

root cause 

java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessDeclaredMembers)
 
java.security.AccessControlContext.checkPermission(AccessControlContext.
java:323)
 
java.security.AccessController.checkPermission(AccessController.java:546
)
 
java.lang.SecurityManager.checkPermission(SecurityManager.java:532
...
note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.20 logs.

~~~

 

 

Regards,
Daya

 



Re: Multiple UserDatabases

2010-01-04 Thread Mark Thomas
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



Re: Multiple UserDatabases

2010-01-04 Thread vramanaj



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





-- 
View this message in context: 
http://old.nabble.com/Multiple-UserDatabases-tp26977405p27011561.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: Ask about an architecture of High Availability with Tomcat and Apache

2010-01-04 Thread Wesley Schwengle

On 04.01.10 11:31 Peter Chen wrote:


Here I use the Apache HTTP Server just to work as a reverse proxy server. And I 
use this Apache HTTP Server to separate the external network and the internal 
network. So it can make sure the security of the internal devices.

And I use the Cisco CSS to work as a load balancer.

I am not sure whether this architecture is reasonable. Could you give me some 
advice, thanks.


We work with Alteon loadbalancers with an Apache/Tomcat backend. Apache serves
tomcat's content via mod_jk. When a machine goes down (apache/tomcat stops
serving content, etc) the loadbalancer will "disable" the machine which is down 
and
serve content from one of the defined backups.

 Internet  Internet
| |
| |
 AlteonAlteon
  /  \   /\
 /\_  \ /  \
Apache/Tomcat   \  \   /  Apache/Tomcat
  Apache/tomcat \ /
  Apache/tomcat (backup)

Traffic to the applications are controlled via ACL's (network), Apache (per 
vhost) and within the application itself.


Hope this helps,
Wesley



-Original Message-
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On 
Behalf Of Peter Crowther
Sent: 2009年12月17日 18:31
To: Tomcat Users List
Subject: Re: Ask about an architecture of High Availability with Tomcat and 
Apache



Why are you using httpd - what purpose is it serving other than to act as a

load-balancer to Tomcat, which you should be able to do directly from the

Cisco load balancer?



2009/12/17 Peter Chen 




Hi,















I made architecture of High Availability with Tomcat and Apache, here I



will describe it simply.















USERS







|







INTERNET







|







Firewall







  |







 CSS







/  \







  / \







  Apache  Apache







HTTP Server HTTP Server







 \/







   \  /







Firewall







/  \







  / \







  Tomcat  Tomcat







  \/







\  /







DataBase(Master)DataBase(Slave)















The CSS is a product of Cisco, and I put it in front of Apache HTTP



Server, I use it to implement the function of load balancing for Apache



HTTP Server.















There are two firewalls, and I put two Apache HTTP Servers between them



to implement load balancing and reverse proxy.















Behind these two firewalls, I put two Tomcat servers as rare-end



servers.















I want to know does this architecture widely used?







Could someone give me some instances of using this architecture? For



example, the company name, the project name?















Some people tell me that, it's better to use hardware to implement the



function of load balancing between Apache HTTP Server and Tomcat instead



of configuring Apache.







I am not sure, could someone analyze it for me?















Thanks



























Dit bericht is gecontroleerd op alle bekende virussen door Online Breedband B.V.



--
Online Broadband BV, http://www.online.nl, http://www.euronet.nl
Wesley Schwengle, System Administrator, IT Operations (Database/Application 
Management)
Muiderstraat 1, PO BOX 10241, 1001 EE Amsterdam, T: +31 20 535, F: +31 20 
5355749

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

Re: Multiple UserDatabases

2010-01-04 Thread vramanaj

http://old.nabble.com/file/p27011540/server.xml server.xml 
http://old.nabble.com/file/p27011540/app-context.xml.txt app-context.xml.txt 
-- 
View this message in context: 
http://old.nabble.com/Multiple-UserDatabases-tp26977405p27011540.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: Ask about an architecture of High Availability with Tomcat and Apache

2010-01-04 Thread Peter Chen
Hi, peter.crowther 

 

Here I use the Apache HTTP Server just to work as a reverse proxy server. And I 
use this Apache HTTP Server to separate the external network and the internal 
network. So it can make sure the security of the internal devices.

And I use the Cisco CSS to work as a load balancer.

 

I am not sure whether this architecture is reasonable. Could you give me some 
advice, thanks.

 

-Original Message-
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On 
Behalf Of Peter Crowther
Sent: 2009年12月17日 18:31
To: Tomcat Users List
Subject: Re: Ask about an architecture of High Availability with Tomcat and 
Apache

 

Why are you using httpd - what purpose is it serving other than to act as a

load-balancer to Tomcat, which you should be able to do directly from the

Cisco load balancer?

 

2009/12/17 Peter Chen 

 

> Hi,

> 

> 

> 

> I made architecture of High Availability with Tomcat and Apache, here I

> will describe it simply.

> 

> 

> 

> USERS

> 

> |

> 

> INTERNET

> 

> |

> 

> Firewall

> 

>   |

> 

>  CSS

> 

> /  \

> 

>   / \

> 

>   Apache  Apache

> 

> HTTP Server HTTP Server

> 

>  \/

> 

>\  /

> 

> Firewall

> 

> /  \

> 

>   / \

> 

>   Tomcat  Tomcat

> 

>   \/

> 

> \  /

> 

> DataBase(Master)DataBase(Slave)

> 

> 

> 

> The CSS is a product of Cisco, and I put it in front of Apache HTTP

> Server, I use it to implement the function of load balancing for Apache

> HTTP Server.

> 

> 

> 

> There are two firewalls, and I put two Apache HTTP Servers between them

> to implement load balancing and reverse proxy.

> 

> 

> 

> Behind these two firewalls, I put two Tomcat servers as rare-end

> servers.

> 

> 

> 

> I want to know does this architecture widely used?

> 

> Could someone give me some instances of using this architecture? For

> example, the company name, the project name?

> 

> 

> 

> Some people tell me that, it's better to use hardware to implement the

> function of load balancing between Apache HTTP Server and Tomcat instead

> of configuring Apache.

> 

> I am not sure, could someone analyze it for me?

> 

> 

> 

> Thanks

> 

> 

> 

> 

> 

> 



Re: Load balancing questions

2010-01-04 Thread Bob Hall


--- On Mon, 1/4/10 at 1:34 AM, Mark Thomas  wrote:

> On 03/01/2010 11:09, assan alhamoud
> wrote:
> > Happy new year to all ,
> > 
> > I am using tomcat and JBoss.
> 
> You'll need to explain that further. Why would you use
> Tomcat and JBoss
> for the same app. I would expect one or the other.
> 
> > Tomcat/5.0.26
> 
> That is very, very old and has many known bugs and a number
> of security
> vulnerabilities. I'd strongly suggest moving to 5.5.28.

JBoss 3.2.5 has Tomcat 5.0 embedded (both very old versions)

JBoss 4.0.3 has Tomcat 5.5 embedded (both old versions)

Current version of JBoss is 6.0 not sure what version of Tomcat is embedded,
http://community.jboss.org isn't responding...

- Bob

> 
> > mod_jk/1.2.26
> 
> Also worth upgrading to the latest version
> 
> 
> To get back to your original question, it looks like your
> app could
> benefit from some tuning. The hanging is likely to be
> caused by long
> running requests using up all the connections between httpd
> and Tomcat
> and/or poor mod_jk / AJP connector configuration. Since you
> haven't
> shown us this configuration it is hard to provide specific
> advice but
> generally I would suggest:
> - use JkOptions +DisableReuse (or sort out your timeouts
> but my
> experience has been disable reuse is simpler to configure
> and has
> similar performance)
> - turn on access logging for Tomcat
> - check any timeouts are consistent with your longest
> running requests
> - ensure the following are compatible
>   - httpd processes/threads
>   - Tomcat AJP connector threads
>   - mod_jk connection pooling
> 
> Mark
> 
> > 
> > Regards,
> > 
> > 2009/12/29 Mark Thomas 
> > 
> >> On 29/12/2009 16:17, assan alhamoud wrote:
> >>> Hello Mark  ,
> >>>
> >>> we are using apache  Server version:
> Apache/2.2.11 (Unix)
> >>> we use  mod_jk.so module
> >>> jboss-3.2.5
> >>> Tomcat5
> >>> and jrockit-jdk1.4.2_19
> >>>
> >>> at your disposal if you need more information
> >>
> >> Are you using Tomcat or JBoss?
> >> Tomcat version?
> >> mod_jk version?
> >>
> >> Mark
> >>
> >>>
> >>> Regards,
> >>> Ghassan
> >>>
> >>> 2009/12/29 Mark Thomas 
> >>>
>  On 29/12/2009 15:21, assan alhamoud
> wrote:
> > Hello All
> >
> >  I have some questions and I hope
> to find answers about Load balancing
> >> .
> >
> > 1- The first question , our DBA says
> that it not normal and no logic
> >>  to
> > have several instances of tomcat
> server on the same machine   with the
>  same
> >  configuration , is this correct
> ?
>  No. Your DBA is wrong.
> 
> > 2- Each tomcat instance here can serve
> about 125 user , and I have more
>  than
> > this number on the server I got alot
> of problems and usually  the
>  instance
> > hang , is there anyway to get better
> performance from tomcat.
>  That isn't a Tomcat problem, that is an
> application problem. The
>  solution is to fix/tune your application.
> 
> >    I am using now 3G memory
> for each instance and 120 for max_pool_size
>  and
> > 750 maxThread
>  It isn't clear what the 125 users refers
> to. Is it concurrent requests,
>  is it concurrent sessions, is it
> concurrent users (assuming 1 concurrent
>  user == more than 1 concurrent request).
> From these numbers the
>  application seems very resource intensive.
> It does appear that it would
>  benefit from some tuning.
> 
> > 3- The most critical issue I had 
> , when one instance hangs , apache
>  hangs
> > and then all the application hangs
> because apache keep trying to
> >> connect
>  to
> > the hanged instance , Is there any way
> to force apache to bypass the
>  hanged
> > instance.
>  Yes. But since you haven't told us the
> Tomcat version, httpd version nor
>  how you are connecting httpd to Tomcat we
> can't tell you how to fix it.
> 
> > 4- When instance of tomcat hangs , i
> forced to restart this instance (
> > tomcat server )  the problem is
> GC can not free memory anymore
> >     Is there
> anyway to solve the problem instead of restarting the
>  server.
>  Yes. Work out if you have a memory leak or
> need more memory than is
>  available. If it is a memory leak, fix it.
> If you need more memory
>  either allocate it or tune your app so it
> uses less.
> 
> > 5- at last sometimes I found that the
> same action repeated many times
>  which
> > means that apache sends the request
> more than one time to tomcat server
> > ,could I have control over this
> behavior.
>  Maybe, maybe not. If this behaviour is
> initiated by the user agent you
>  need to manage this in your app. It could
> also be caused by the
>  fail-over mechanism, in which case I refer
> you to my answer to point 3
>  above.
> 
>  Mark
> 
> 
> 
> 
> -
>  To unsubscribe, e-mail: users-uns

Re: Load balancing questions

2010-01-04 Thread Mark Thomas
On 03/01/2010 11:09, assan alhamoud wrote:
> Happy new year to all ,
> 
> I am using tomcat and JBoss.

You'll need to explain that further. Why would you use Tomcat and JBoss
for the same app. I would expect one or the other.

> Tomcat/5.0.26

That is very, very old and has many known bugs and a number of security
vulnerabilities. I'd strongly suggest moving to 5.5.28.

> mod_jk/1.2.26

Also worth upgrading to the latest version


To get back to your original question, it looks like your app could
benefit from some tuning. The hanging is likely to be caused by long
running requests using up all the connections between httpd and Tomcat
and/or poor mod_jk / AJP connector configuration. Since you haven't
shown us this configuration it is hard to provide specific advice but
generally I would suggest:
- use JkOptions +DisableReuse (or sort out your timeouts but my
experience has been disable reuse is simpler to configure and has
similar performance)
- turn on access logging for Tomcat
- check any timeouts are consistent with your longest running requests
- ensure the following are compatible
  - httpd processes/threads
  - Tomcat AJP connector threads
  - mod_jk connection pooling

Mark

> 
> Regards,
> 
> 2009/12/29 Mark Thomas 
> 
>> On 29/12/2009 16:17, assan alhamoud wrote:
>>> Hello Mark  ,
>>>
>>> we are using apache  Server version: Apache/2.2.11 (Unix)
>>> we use  mod_jk.so module
>>> jboss-3.2.5
>>> Tomcat5
>>> and jrockit-jdk1.4.2_19
>>>
>>> at your disposal if you need more information
>>
>> Are you using Tomcat or JBoss?
>> Tomcat version?
>> mod_jk version?
>>
>> Mark
>>
>>>
>>> Regards,
>>> Ghassan
>>>
>>> 2009/12/29 Mark Thomas 
>>>
 On 29/12/2009 15:21, assan alhamoud wrote:
> Hello All
>
>  I have some questions and I hope to find answers about Load balancing
>> .
>
> 1- The first question , our DBA says that it not normal and no logic
>>  to
> have several instances of tomcat server on the same machine   with the
 same
>  configuration , is this correct ?
 No. Your DBA is wrong.

> 2- Each tomcat instance here can serve about 125 user , and I have more
 than
> this number on the server I got alot of problems and usually  the
 instance
> hang , is there anyway to get better performance from tomcat.
 That isn't a Tomcat problem, that is an application problem. The
 solution is to fix/tune your application.

>I am using now 3G memory for each instance and 120 for max_pool_size
 and
> 750 maxThread
 It isn't clear what the 125 users refers to. Is it concurrent requests,
 is it concurrent sessions, is it concurrent users (assuming 1 concurrent
 user == more than 1 concurrent request). From these numbers the
 application seems very resource intensive. It does appear that it would
 benefit from some tuning.

> 3- The most critical issue I had  , when one instance hangs , apache
 hangs
> and then all the application hangs because apache keep trying to
>> connect
 to
> the hanged instance , Is there any way to force apache to bypass the
 hanged
> instance.
 Yes. But since you haven't told us the Tomcat version, httpd version nor
 how you are connecting httpd to Tomcat we can't tell you how to fix it.

> 4- When instance of tomcat hangs , i forced to restart this instance (
> tomcat server )  the problem is GC can not free memory anymore
> Is there anyway to solve the problem instead of restarting the
 server.
 Yes. Work out if you have a memory leak or need more memory than is
 available. If it is a memory leak, fix it. If you need more memory
 either allocate it or tune your app so it uses less.

> 5- at last sometimes I found that the same action repeated many times
 which
> means that apache sends the request more than one time to tomcat server
> ,could I have control over this behavior.
 Maybe, maybe not. If this behaviour is initiated by the user agent you
 need to manage this in your app. It could also be caused by the
 fail-over mechanism, in which case I refer you to my answer to point 3
 above.

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




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



Re: mod_proxy_ajp JSESSIONID and Mime Type

2010-01-04 Thread Konstantin Kolinko
2010/1/4 Darren Salomons :
> I am having an issue with Apache 2/mod_proxy_ajp and Tomcat 6.  I have
> monitored all the headers coming back from apache for various scenarios
> and the only scenario that I am having a problem with is when I have a
> JSESSIONID appended to the URL.  When the JSESSIONID is appended to the
> URL the mime type coming back from apache is text/plain.  When the
> JSESSIONID is not there then the correct mime type is returned.  What
> would cause this?
>

1. Your configuration, and exact versions of Tomcat and Apache that
you are using =?

> When the JSESSIONID is appended to the
> URL the mime type coming back from apache is text/plain.

Is the mime-type that you are seeing provided by Tomcat (as defined in
$CATALINA_BASE/conf/web.xml, or in WEB-INF/web.xml files of individual
web applications),  or provided/overwritten by Apache HTTPD?

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



Re: Tomcat 5.5 root directory

2010-01-04 Thread Mark Thomas
On 04/01/2010 06:57, File Send wrote:
> Hi users,
> 
>  I am using tomcat 5.5 and its running fine, however, I want to see specific
> jsp which I deployed in tomcat. I want to view this page by using url like
> http://localhost:8080/my.jsp. In this case, in which directory should i keep
> this file (my.jsp). I have tried keeping it in web-apps and other root
> directory but its not showing up.

Assuming you have a default server.xml,

$CATALINA_BASE/webapps/ROOT/my.jsp

Mark



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