Question on allowLinking

2009-08-20 Thread Nachiketh G Rao
Hi,
I had a query regarding Tomcat 6.X. We are developing a web application which 
will be using soft-links for files on a the server. To do this we have set 
allowLinking property to true in the context.xml configuration. We have 
observed that, upon un-deploying the .war file by deleting it from the webapps 
directory, all the contents under the soft link get deleted as well! We do not 
want this to happen, how do we ensure that only the soft link inside the .war 
file gets deleted.
Regards,
Nachiketh


This e-mail and all material transmitted with it are for the use of the 
intended recipient(s) ONLY and contains confidential and/or privileged 
information. If you are not the intended recipient, please contact the sender 
by reply e-mail and destroy all copies and the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken pursuant to the contents of the 
present e-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Comviva Technologies Limited or its management 
or directors, are unable to exercise control or ensure the integrity over /of 
the contents of the information contained in e-mail. Any views expressed herein 
are those of the individual sender only and no binding nature of the contents 
shall be implied or assumed unless the sender does so expressly with due 
authority of Comviva Technologies Limited. E-mail and any contents transmitted 
with it are prone to viruses and related defects despite all efforts to avoid 
such by Comviva Technologies Limited.


Enabling allowLinking in tomcat 6, deleting the soft link contents while undeploying!

2009-08-20 Thread Ningappa Koneri
Hi,

By Using  allowLinking=true in context.xml of tomcat 6, I am able to access 
soft links within the application project directory.
But the problem is when I undeploy the application by deleting only project.war 
file, tomcat is deleting all the contents inside the soft link along with that 
project directory, By this behavior it's causing the serious problem by 
deleting the valuable web content inside the soft link.

Please help me in this regard.

Regards,
Ningappa



This e-mail and all material transmitted with it are for the use of the 
intended recipient(s) ONLY and contains confidential and/or privileged 
information. If you are not the intended recipient, please contact the sender 
by reply e-mail and destroy all copies and the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken pursuant to the contents of the 
present e-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Comviva Technologies Limited or its management 
or directors, are unable to exercise control or ensure the integrity over /of 
the contents of the information contained in e-mail. Any views expressed herein 
are those of the individual sender only and no binding nature of the contents 
shall be implied or assumed unless the sender does so expressly with due 
authority of Comviva Technologies Limited. E-mail and any contents transmitted 
with it are prone to viruses and related defects despite all efforts to avoid 
such by Comviva Technologies Limited.

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



Re: Question on setting of context path in Tomcat 6

2009-08-20 Thread Pid

On 19/08/2009 23:36, Roger Powers wrote:

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html


SNIP


it seems the context path will come from
either the name of the context xml file of the web app (if there is one), or
from the directory holding the web app (if there is no context xml file and
tomcat automatically created the context).  Thus setting the path in the 
context xml
file does not do anything.
Is this correct?


Yes.

p



Thanks,
RP


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



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



Re: autodeploying/unpacking ROOT.war

2009-08-20 Thread Ognjen Blagojevic

Christoph Kukulies wrote:
What again are the bits to auto-unpack/deploy a file in the webapps 
directory, e.g. ROOT.war?

I looked into server.xml and there is
unpackWars=true and autoDeploy=true and still a ROOT.war file I put 
into /usr/share/tomcat5.5/webapps remains untouched when I start 
tomcat5.5 again. (It's Debian, yes).


Is your context visible after server restart or not? Are there any 
arrors in the log files?


Please send the content of ROOT's context.xml.

-Ognjen

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



Re: Question on allowLinking

2009-08-20 Thread Pid

On 20/08/2009 07:52, Nachiketh G Rao wrote:

Hi,
I had a query regarding Tomcat 6.X. We are developing a web application which will be 
using soft-links for files on a the server. To do this we have set allowLinking property 
to true in the context.xml configuration. We have observed that, upon 
un-deploying the .war file by deleting it from the webapps directory, all the contents 
under the soft link get deleted as well! We do not want this to happen, how do we ensure 
that only the soft link inside the .war file gets deleted.


What are you linking, exactly, that needs to be inside the web 
application directory?


If it's just images and styles, (for example), you should make them 
available via a URL external to the application itself.  You could use a 
multi-level war file to make the URLs appear inside the app's URL space.


 myapp.war   /myapp/
 myapp#scripts.war   /myapp/scripts/

Tomcat *will* remove the contents of the deployed directory when you 
undeploy it, this is intentional - otherwise how could you update an 
application?


p




Regards,
Nachiketh


This e-mail and all material transmitted with it are for the use of the 
intended recipient(s) ONLY and contains confidential and/or privileged 
information. If you are not the intended recipient, please contact the sender 
by reply e-mail and destroy all copies and the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken pursuant to the contents of the 
present e-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Comviva Technologies Limited or its management 
or directors, are unable to exercise control or ensure the integrity over /of 
the contents of the information contained in e-mail. Any views expressed herein 
are those of the individual sender only and no binding nature of the contents 
shall be implied or assumed unless the sender does so expressly with due 
authority of Comviva Technologies Limited. E-mail and any contents transmitted 
with it are prone to viruses and related defects despite all efforts to avoid 
such by Comviva Technologies Limited.




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



Re: Enabling allowLinking in tomcat 6, deleting the soft link contents while undeploying!

2009-08-20 Thread Pid

On 20/08/2009 08:36, Ningappa Koneri wrote:

Hi,

By Using  allowLinking=true in context.xml of tomcat 6, I am able to access 
soft links within the application project directory.
But the problem is when I undeploy the application by deleting only project.war 
file, tomcat is deleting all the contents inside the soft link along with that 
project directory, By this behavior it's causing the serious problem by 
deleting the valuable web content inside the soft link.

Please help me in this regard.


See your colleagues thread.

p



Regards,
Ningappa



This e-mail and all material transmitted with it are for the use of the 
intended recipient(s) ONLY and contains confidential and/or privileged 
information. If you are not the intended recipient, please contact the sender 
by reply e-mail and destroy all copies and the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken pursuant to the contents of the 
present e-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Comviva Technologies Limited or its management 
or directors, are unable to exercise control or ensure the integrity over /of 
the contents of the information contained in e-mail. Any views expressed herein 
are those of the individual sender only and no binding nature of the contents 
shall be implied or assumed unless the sender does so expressly with due 
authority of Comviva Technologies Limited. E-mail and any contents transmitted 
with it are prone to viruses and related defects despite all efforts to avoid 
such by Comviva Technologies Limited.

-
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: Exception Initializing Page Context

2009-08-20 Thread Ognjen Blagojevic

Gwen Way wrote:

Hmmm...  I will check with the developers then, although the three
people on my team are theoretically the only ones with access to make
changes to the app.  Thank you again, Mark.


If you worry how come that application previously worked but now it 
doesn't, I can think of at least two reasons:


1. HttpServletResponse buffer size is determined by the server at 
runtime, and for different reasons now your server decides to use 
smaller buffer than earlier, so it gets filled and committed before you 
set a cookie.


2. You fill the buffer with dynamic data (say, from database) and that 
data is now bigger than earlier and the buffer gets filled and committed 
before you set a cookie.


IOW, the only good way is to set a cookie is before writing anything to 
the response, unless you have precise control on the HttpServletReponse 
buffer which is rarely the case.


Regards,
Ognjen

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



Re: 100% CPU by java process in Tomcat

2009-08-20 Thread Peter Crowther
Tomcat version?
OS?
JDK version?
Any errors or messages in the logs?
If you take a thread dump (the method varies depending on OS and JDK
version), what's running?

- Peter

2009/8/20 Phani Raj Kumar bphanirajku...@gmail.com

 Hi friends,

 When i tried to run tomcat server with a web application in it, it is
 taking
 100% cpu on application initialization. It seems system is allocating 100%
 of  CPU time for this java process.Could you please throw some light on
 this.

 Thanks,
 Phani.



Re: 100% CPU by java process in Tomcat

2009-08-20 Thread Phani Raj Kumar
Thanks peter,

Here is the info:
*JDK version* : j2sdk1.4.2_11
*Tomcat Version*: jakarta-tomcat-5.0.28
*OS*: SunOS burton 5.8 Generic_117350-46 sun4u sparc SUNW,Sun-Fire-V440
*CATALINA_OPTS*=-Xms64m -Xmx256m

I didn't get any error messages in the log, but even running the tomcat
alone without any applications in it taking 100% cpu.

Thanks for your prompt respone.

-Phani.



On Thu, Aug 20, 2009 at 2:31 PM, Peter Crowther peter.crowt...@melandra.com
 wrote:

 Tomcat version?
 OS?
 JDK version?
 Any errors or messages in the logs?
 If you take a thread dump (the method varies depending on OS and JDK
 version), what's running?

 - Peter

 2009/8/20 Phani Raj Kumar bphanirajku...@gmail.com

  Hi friends,
 
  When i tried to run tomcat server with a web application in it, it is
  taking
  100% cpu on application initialization. It seems system is allocating
 100%
  of  CPU time for this java process.Could you please throw some light on
  this.
 
  Thanks,
  Phani.
 



Re: Eclipse builtin browser vs system default browser problem

2009-08-20 Thread André Warnier

Tommy Pham wrote:

Hi,

I'm working a small project seem to run into a snag and can't figure out how to 
overcome it since my web app doesn't give any exception (log files are clean 
are error/exception free).  The snag is that the eclipse internal web browser 
shows the desired result while Firefox doesn't...  Here's the SS of my problem:
http://img40.imageshack.us/img40/8029/languages.jpg

Has anyone seen something like this before? I was trying to use FF's 
LiveHeaders extension to work on form's POST multipart/form-data. Below is my 
dev environment:


This doesn't look like a Tomcat problem, not even a server problem.
Your application is somehow generating dubious html.  Some browsers are 
more forgiving than others.
Save the result page as a file, and try a good html editor. It will 
probably show you that you have some data outside of a td../td, or a 
missing closing html tag, or something like it.


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



Re: 100% CPU by java process in Tomcat

2009-08-20 Thread Peter Crowther
2009/8/20 Phani Raj Kumar bphanirajku...@gmail.com
 Here is the info:
 *JDK version* : j2sdk1.4.2_11

This is old, though that probably isn't the cause of this problem.  Do
you need to run this JDK, or can you upgrade?

 *Tomcat Version*: jakarta-tomcat-5.0.28

This is no longer supported, though that probably isn't the cause of
the problem.  Do you need to run this version, or can you upgrade?

 *OS*: SunOS burton 5.8 Generic_117350-46 sun4u sparc SUNW,Sun-Fire-V440
 *CATALINA_OPTS*=-Xms64m -Xmx256m

 I didn't get any error messages in the log, but even running the tomcat
 alone without any applications in it taking 100% cpu.

OK, that's interesting.  Something odd is happening!

The next step is to take a thread dump and find out what's running.
Use ps to find the process ID of the Java process that's running
Tomcat, then send it a SIGQUIT (kill -3 pid).  The thread dump
should appear in one of the log files, probably catalina.out (from
memory) unless you've changed the logging.

There will be several threads in the thread dump - some blocked, some
running.  If you post the thread dump here, we can take a look at it.
You will need to include it in your mail message, as the mailing list
software strips out attachments.

- Peter

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



Keep having to login with container based authentaction.

2009-08-20 Thread Dean Chester
Hi,
I've written my application using j_security_check yet i keep having to log
in in the restricted area. Has anyone else experienced this? Because it
works with a small amount of JSPs and then when i implement it all in to my
application it doesn't work. Where am i most likely going wrong?
Thanks in advance
Dean


Re: 100% CPU by java process in Tomcat

2009-08-20 Thread Pid

On 20/08/2009 10:24, Peter Crowther wrote:

2009/8/20 Phani Raj Kumarbphanirajku...@gmail.com

Here is the info:
*JDK version* : j2sdk1.4.2_11


This is old, though that probably isn't the cause of this problem.  Do
you need to run this JDK, or can you upgrade?


*Tomcat Version*: jakarta-tomcat-5.0.28


This is no longer supported, though that probably isn't the cause of
the problem.  Do you need to run this version, or can you upgrade?


*OS*: SunOS burton 5.8 Generic_117350-46 sun4u sparc SUNW,Sun-Fire-V440
*CATALINA_OPTS*=-Xms64m -Xmx256m


Does your app do a lot of work whilst starting up?
What is its actual memory usage when running?

Wait until the app has started up and had time to run under 
normal/expected load conditions and then examine the heap sizes:


 jmap -heap pid

If the heap is above 64m, then try setting -Xms256m.

There's not much point in making the JVM (particularly an old one) doing 
loads of work to increase it's heap size, when you can just set the max 
you use, to start with - especially during startup.


p



I didn't get any error messages in the log, but even running the tomcat
alone without any applications in it taking 100% cpu.


OK, that's interesting.  Something odd is happening!

The next step is to take a thread dump and find out what's running.
Use ps to find the process ID of the Java process that's running
Tomcat, then send it a SIGQUIT (kill -3pid).  The thread dump
should appear in one of the log files, probably catalina.out (from
memory) unless you've changed the logging.

There will be several threads in the thread dump - some blocked, some
running.  If you post the thread dump here, we can take a look at it.
You will need to include it in your mail message, as the mailing list
software strips out attachments.

- Peter

-
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: Keep having to login with container based authentaction.

2009-08-20 Thread Pid

On 20/08/2009 10:40, Dean Chester wrote:

Hi,
I've written my application using j_security_check yet i keep having to log
in in the restricted area. Has anyone else experienced this?


Yep. I have to log in each time I want to use our app - it's a side 
effect of implementing security.


Or is your question referring to a less vague and more specific issue?



Because it works with a small amount of JSPs and then when i implement it all 
in to my
application it doesn't work.


I might need to warm up my Internet Telepathy(tm) without some more 
information...




Where am i most likely going wrong?


Not telling us your Tomcat version, JVM version, OS version...

p



Thanks in advance
Dean




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



Re: Tomcat 4 start up as (/sbin/service)

2009-08-20 Thread Pid

On 20/08/2009 10:15, sunil chandran wrote:


Hello all, As per everyone suggestion, I went ahead and installed tomcat 
4.1.40It is successful Now i want to set as /sbin/service. I know it points to 
/etc/init.d/. How can i make it as /sbin/service tomcat4 stop/start/restart .
  What changes are required? regardsSunil C


   See the Web#39;s breaking stories, chosen by people like you. Check out 
Yahoo! Buzz. http://in.buzz.yahoo.com/


That would be a question for a linux/unix list.

p

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



Re: Keep having to login with container based authentaction.

2009-08-20 Thread Dean Chester
Sorry Tomcat 6.20, Red Hat Enterprise edition 4 i think. java 1.6. And i
mean once logged in i have to login again after clicking on a link in the
restricted area.
Dean

On Thu, Aug 20, 2009 at 11:23 AM, Pid p...@pidster.com wrote:

 On 20/08/2009 10:40, Dean Chester wrote:

 Hi,
 I've written my application using j_security_check yet i keep having to
 log
 in in the restricted area. Has anyone else experienced this?


 Yep. I have to log in each time I want to use our app - it's a side effect
 of implementing security.

 Or is your question referring to a less vague and more specific issue?


  Because it works with a small amount of JSPs and then when i implement it
 all in to my
 application it doesn't work.


 I might need to warm up my Internet Telepathy(tm) without some more
 information...


  Where am i most likely going wrong?


 Not telling us your Tomcat version, JVM version, OS version...

 p


  Thanks in advance
 Dean



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




Re: autodeploying/unpacking ROOT.war

2009-08-20 Thread Christoph Kukulies

Ognjen Blagojevic schrieb:

Christoph Kukulies wrote:
What again are the bits to auto-unpack/deploy a file in the webapps 
directory, e.g. ROOT.war?

I looked into server.xml and there is
unpackWars=true and autoDeploy=true and still a ROOT.war file I 
put into /usr/share/tomcat5.5/webapps remains untouched when I start 
tomcat5.5 again. (It's Debian, yes).


Is your context visible after server restart or not? Are there any 
arrors in the log files?


Nothing got unpacked. I was used that whenever I put a fresh ROOT.war 
(which hen contained something different than the tomcat ROOT app) it 
got unpacked into a ROOT directory in webapps.

(I helped myself now in unzipping the war file).


Please send the content of ROOT's context.xml.


/usr/share/tomcat5.5-webapps# vi ROOT.xml
!--
   Context configuration file for the Tomcat Web App Root
--

Context path=/ docBase=/usr/share/tomcat5.5-webapps/ROOT
  debug=0 privileged=true allowLinking=true
/Context



-Ognjen

--
Christoph


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



Re: autodeploying/unpacking ROOT.war

2009-08-20 Thread Ognjen Blagojevic

Christoph Kukulies wrote:
Nothing got unpacked. I was used that whenever I put a fresh ROOT.war 
(which hen contained something different than the tomcat ROOT app) it 
got unpacked into a ROOT directory in webapps.

(I helped myself now in unzipping the war file).


This is typical behavior when the docBase points to ROOT.war (file) 
instead of ROOT (folder), but it seems that this is not the case with 
your configuration:


The Document Base (also known as the Context Root) directory for this 
web application, or the pathname to the web application archive file (if 
this web application is being executed directly from the WAR file). [1]


What kind of Tomcat installation do you have? ZIP file or Debian package?



Context path=/ docBase=/usr/share/tomcat5.5-webapps/ROOT
  debug=0 privileged=true allowLinking=true
/Context


The value of this field [docBase] must not be set when the Context is 
configured using a META-INF/context.xml file as it will be inferred by 
the automatic deployment process. [1]


This might be the problem. Try to remove the docBase attribute, and let 
us know what happens.



-Ognjen

[1] http://tomcat.eu.apache.org/tomcat-5.5-doc/config/context.html


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



Re: Tomcat not starting - No error messages seen

2009-08-20 Thread Ognjen Blagojevic

Anisha Parveen -X (anparvee - Infosys at Cisco) wrote:

Please find attached the catalina.out logs file and debug logs.


I don't see any attachment. Paste your logs into the message. Not the 
whole files, just last 30 lines.


You didn't try ps -ef | grep java?



In our case tomcat is started in 8005. It is in listen state.


8005? That is probably Tomcat control port, not HTTP port. You should 
check on what port is Tomcat configured to listen in conf/server.xml 
attribute port under Connector tag. Most likely, it will be 8080.


After that, you should check if that port is listed under netstat 
-nat. If not, Tomcat is not started properly.


Then, you should check the logs, and post them here.

And please, don't post to private mail, use mailing list only.

-Ognjen

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



Re: Keep having to login with container based authentaction.

2009-08-20 Thread Pid

On 20/08/2009 11:55, Dean Chester wrote:

Sorry Tomcat 6.20, Red Hat Enterprise edition 4 i think. java 1.6. And i
mean once logged in i have to login again after clicking on a link in
the restricted area.
Dean


You don't need to reply-to-all, just to the list.  I'm obviously on the 
mailing list, so I'll get the message anyway - I don't need it twice.


 /myapp/index.jsp
 /myapp/secure/index.jsp
 /myapp/secure/page2.jsp

So you're logging into the secure area, and trying to view, e.g. 
page2.jsp from a link on the e.g. index.jsp page?


Do the logs have any errors in them?
If so, what are they?

Are you encoding all of the URLs properly?

How long between clicks?

What is the session timeout in your web.xml?

How have you defined the security-constraint in web.xml?

Which Realm are you using?

Perhaps you could post a little bit more information?

p




On Thu, Aug 20, 2009 at 11:23 AM, Pid p...@pidster.com
mailto:p...@pidster.com wrote:

On 20/08/2009 10:40, Dean Chester wrote:

Hi,
I've written my application using j_security_check yet i keep
having to log
in in the restricted area. Has anyone else experienced this?


Yep. I have to log in each time I want to use our app - it's a side
effect of implementing security.

Or is your question referring to a less vague and more specific issue?



Because it works with a small amount of JSPs and then when i
implement it all in to my
application it doesn't work.


I might need to warm up my Internet Telepathy(tm) without some more
information...



Where am i most likely going wrong?


Not telling us your Tomcat version, JVM version, OS version...

p


Thanks in advance
Dean



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
mailto:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
mailto: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: Tomcat not starting - No error messages seen

2009-08-20 Thread Anisha Parveen -X (anparvee - Infosys at Cisco)
 
Tomcat does listen on 8005 only and it was in Listen state.

However when I did grep for 8009, I saw that the ports were in
CLOSE_WAIT state.\
Hence I rebooted the machine. Tomcat started properly now and things
work fine.

Thank all for your support.

Regards,
Anisha

-Original Message-
From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs] 
Sent: Thursday, August 20, 2009 4:48 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat not starting - No error messages seen

Anisha Parveen -X (anparvee - Infosys at Cisco) wrote:
 Please find attached the catalina.out logs file and debug logs.

I don't see any attachment. Paste your logs into the message. Not the
whole files, just last 30 lines.

You didn't try ps -ef | grep java?


 In our case tomcat is started in 8005. It is in listen state.

8005? That is probably Tomcat control port, not HTTP port. You should
check on what port is Tomcat configured to listen in conf/server.xml
attribute port under Connector tag. Most likely, it will be 8080.

After that, you should check if that port is listed under netstat
-nat. If not, Tomcat is not started properly.

Then, you should check the logs, and post them here.

And please, don't post to private mail, use mailing list only.

-Ognjen

-
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: Keep having to login with container based authentaction.

2009-08-20 Thread Dean Chester
Sorry about that.
Yes i have a index page in the restricted area that has links to other
restricted jsps. The Logs are not reporting anything. How do you mean encode
your urls? I haven't set a time out in the web.xml file so its using the
default. The time between clicks is usually about 1-2 seconds. Here is some
of my web.xml file:
security-constraint
web-resource-collection
web-resource-nameusers/web-resource-name
url-pattern/add/*/url-pattern
/web-resource-collection
auth-constraint
role-nameuser/role-name
role-nameadmin/role-name
/auth-constraint
/security-constraint

security-constraint
web-resource-collection
web-resource-nameadmin/web-resource-name
url-pattern/admin/*/url-pattern
/web-resource-collection
auth-constraint
role-nameadmin/role-name
/auth-constraint
/security-constraint

login-config
auth-methodFORM/auth-method
form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/login-error.jsp/form-error-page
/form-login-config
/login-config

 security-role
role-nameadmin/role-name
/security-role
security-role
role-nameuser/role-name
/security-role
I am using the default realm which i know works.
Dean

On Thu, Aug 20, 2009 at 12:19 PM, Pid p...@pidster.com wrote:

 On 20/08/2009 11:55, Dean Chester wrote:

 Sorry Tomcat 6.20, Red Hat Enterprise edition 4 i think. java 1.6. And i
 mean once logged in i have to login again after clicking on a link in
 the restricted area.
 Dean


 You don't need to reply-to-all, just to the list.  I'm obviously on the
 mailing list, so I'll get the message anyway - I don't need it twice.

  /myapp/index.jsp
  /myapp/secure/index.jsp
  /myapp/secure/page2.jsp

 So you're logging into the secure area, and trying to view, e.g. page2.jsp
 from a link on the e.g. index.jsp page?

 Do the logs have any errors in them?
 If so, what are they?

 Are you encoding all of the URLs properly?

 How long between clicks?

 What is the session timeout in your web.xml?

 How have you defined the security-constraint in web.xml?

 Which Realm are you using?

 Perhaps you could post a little bit more information?

 p



  On Thu, Aug 20, 2009 at 11:23 AM, Pid p...@pidster.com
 mailto:p...@pidster.com wrote:

On 20/08/2009 10:40, Dean Chester wrote:

Hi,
I've written my application using j_security_check yet i keep
having to log
in in the restricted area. Has anyone else experienced this?


Yep. I have to log in each time I want to use our app - it's a side
effect of implementing security.

Or is your question referring to a less vague and more specific issue?



Because it works with a small amount of JSPs and then when i
implement it all in to my
application it doesn't work.


I might need to warm up my Internet Telepathy(tm) without some more
information...



Where am i most likely going wrong?


Not telling us your Tomcat version, JVM version, OS version...

p


Thanks in advance
Dean



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
mailto:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
mailto: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: Keep having to login with container based authentaction.

2009-08-20 Thread Dean Chester
By default realm i mean the one that is set up in the server.xml and it is a
JDBC Realm.
Dean

On Thu, Aug 20, 2009 at 12:36 PM, Dean Chester 
dean.g.ches...@googlemail.com wrote:

 Sorry about that.
 Yes i have a index page in the restricted area that has links to other
 restricted jsps. The Logs are not reporting anything. How do you mean encode
 your urls? I haven't set a time out in the web.xml file so its using the
 default. The time between clicks is usually about 1-2 seconds. Here is some
 of my web.xml file:
 security-constraint
 web-resource-collection
 web-resource-nameusers/web-resource-name
 url-pattern/add/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameuser/role-name
 role-nameadmin/role-name
 /auth-constraint
 /security-constraint

 security-constraint
 web-resource-collection
 web-resource-nameadmin/web-resource-name
 url-pattern/admin/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameadmin/role-name
 /auth-constraint
 /security-constraint

 login-config
 auth-methodFORM/auth-method
 form-login-config
 form-login-page/login.jsp/form-login-page
 form-error-page/login-error.jsp/form-error-page
 /form-login-config
 /login-config

  security-role
 role-nameadmin/role-name
 /security-role
 security-role
 role-nameuser/role-name
 /security-role
 I am using the default realm which i know works.
 Dean

 On Thu, Aug 20, 2009 at 12:19 PM, Pid p...@pidster.com wrote:

 On 20/08/2009 11:55, Dean Chester wrote:

 Sorry Tomcat 6.20, Red Hat Enterprise edition 4 i think. java 1.6. And i
 mean once logged in i have to login again after clicking on a link in
 the restricted area.
 Dean


 You don't need to reply-to-all, just to the list.  I'm obviously on the
 mailing list, so I'll get the message anyway - I don't need it twice.

  /myapp/index.jsp
  /myapp/secure/index.jsp
  /myapp/secure/page2.jsp

 So you're logging into the secure area, and trying to view, e.g. page2.jsp
 from a link on the e.g. index.jsp page?

 Do the logs have any errors in them?
 If so, what are they?

 Are you encoding all of the URLs properly?

 How long between clicks?

 What is the session timeout in your web.xml?

 How have you defined the security-constraint in web.xml?

 Which Realm are you using?

 Perhaps you could post a little bit more information?

 p



  On Thu, Aug 20, 2009 at 11:23 AM, Pid p...@pidster.com
 mailto:p...@pidster.com wrote:

On 20/08/2009 10:40, Dean Chester wrote:

Hi,
I've written my application using j_security_check yet i keep
having to log
in in the restricted area. Has anyone else experienced this?


Yep. I have to log in each time I want to use our app - it's a side
effect of implementing security.

Or is your question referring to a less vague and more specific issue?



Because it works with a small amount of JSPs and then when i
implement it all in to my
application it doesn't work.


I might need to warm up my Internet Telepathy(tm) without some more
information...



Where am i most likely going wrong?


Not telling us your Tomcat version, JVM version, OS version...

p


Thanks in advance
Dean



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
mailto:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
mailto: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: Keep having to login with container based authentaction.

2009-08-20 Thread Pid

On 20/08/2009 12:36, Dean Chester wrote:

Sorry about that.
Yes i have a index page in the restricted area that has links to other
restricted jsps. The Logs are not reporting anything.



How do you mean encode your urls?


If you're being asked to log in every click, your session is probably 
not being preserved.  The session ID is set in a cookie or by encoding 
the URL to include the session id:


 /path/to/page.jsp;jsessionid=00AF00?query=paramgo=here


Most browsers have a variety of dev tools you can use to examine 
cookies, or response headers (e.g. Set-Cookie) to see if the cookie is 
being set properly.


If it's not, you'll need to encode the URL so that it contains the 
session id.  The servlet spec, (which of course you have read), has a 
handy method on the HttpServletResponse object which can do this.



Encode each URL to ensure that the session id is preserved.

a href=%= response.encodeURL(request.getContextPath() + 
'/path/to/page.jsp') % alt=a linkLinked text/a


p


P.S. There are tag libraries that exist to make this easier/less clumsy 
looking.



I haven't set a time out in the web.xml file so its using the

default. The time between clicks is usually about 1-2 seconds. Here is some
of my web.xml file:
security-constraint
 web-resource-collection
 web-resource-nameusers/web-resource-name
 url-pattern/add/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameuser/role-name
 role-nameadmin/role-name
 /auth-constraint
 /security-constraint

 security-constraint
 web-resource-collection
 web-resource-nameadmin/web-resource-name
 url-pattern/admin/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameadmin/role-name
 /auth-constraint
 /security-constraint

 login-config
 auth-methodFORM/auth-method
 form-login-config
 form-login-page/login.jsp/form-login-page
 form-error-page/login-error.jsp/form-error-page
 /form-login-config
 /login-config

  security-role
 role-nameadmin/role-name
 /security-role
 security-role
 role-nameuser/role-name
 /security-role
I am using the default realm which i know works.
Dean

On Thu, Aug 20, 2009 at 12:19 PM, Pidp...@pidster.com  wrote:


On 20/08/2009 11:55, Dean Chester wrote:


Sorry Tomcat 6.20, Red Hat Enterprise edition 4 i think. java 1.6. And i
mean once logged in i have to login again after clicking on a link in
the restricted area.
Dean



You don't need to reply-to-all, just to the list.  I'm obviously on the
mailing list, so I'll get the message anyway - I don't need it twice.

  /myapp/index.jsp
  /myapp/secure/index.jsp
  /myapp/secure/page2.jsp

So you're logging into the secure area, and trying to view, e.g. page2.jsp
from a link on the e.g. index.jsp page?

Do the logs have any errors in them?
If so, what are they?

Are you encoding all of the URLs properly?

How long between clicks?

What is the session timeout in your web.xml?

How have you defined thesecurity-constraint  in web.xml?

Which Realm are you using?

Perhaps you could post a little bit more information?

p



  On Thu, Aug 20, 2009 at 11:23 AM, Pidp...@pidster.com

mailto:p...@pidster.com  wrote:

On 20/08/2009 10:40, Dean Chester wrote:

Hi,
I've written my application using j_security_check yet i keep
having to log
in in the restricted area. Has anyone else experienced this?


Yep. I have to log in each time I want to use our app - it's a side
effect of implementing security.

Or is your question referring to a less vague and more specific issue?



Because it works with a small amount of JSPs and then when i
implement it all in to my
application it doesn't work.


I might need to warm up my Internet Telepathy(tm) without some more
information...



Where am i most likely going wrong?


Not telling us your Tomcat version, JVM version, OS version...

p


Thanks in advance
Dean



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
mailto:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
mailto: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: Keep having to login with container based authentaction.

2009-08-20 Thread Pid

On 20/08/2009 12:40, Dean Chester wrote:

By default realm i mean the one that is set up in the server.xml and it is a
JDBC Realm.


Which'll do for testing, but you should use a DataSourceRealm for 
production.


p



Dean

On Thu, Aug 20, 2009 at 12:36 PM, Dean Chester
dean.g.ches...@googlemail.com  wrote:


Sorry about that.
Yes i have a index page in the restricted area that has links to other
restricted jsps. The Logs are not reporting anything. How do you mean encode
your urls? I haven't set a time out in the web.xml file so its using the
default. The time between clicks is usually about 1-2 seconds. Here is some
of my web.xml file:
security-constraint
 web-resource-collection
 web-resource-nameusers/web-resource-name
 url-pattern/add/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameuser/role-name
 role-nameadmin/role-name
 /auth-constraint
 /security-constraint

 security-constraint
 web-resource-collection
 web-resource-nameadmin/web-resource-name
 url-pattern/admin/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameadmin/role-name
 /auth-constraint
 /security-constraint

 login-config
 auth-methodFORM/auth-method
 form-login-config
 form-login-page/login.jsp/form-login-page
 form-error-page/login-error.jsp/form-error-page
 /form-login-config
 /login-config

  security-role
 role-nameadmin/role-name
 /security-role
 security-role
 role-nameuser/role-name
 /security-role
I am using the default realm which i know works.
Dean

On Thu, Aug 20, 2009 at 12:19 PM, Pidp...@pidster.com  wrote:


On 20/08/2009 11:55, Dean Chester wrote:


Sorry Tomcat 6.20, Red Hat Enterprise edition 4 i think. java 1.6. And i
mean once logged in i have to login again after clicking on a link in
the restricted area.
Dean



You don't need to reply-to-all, just to the list.  I'm obviously on the
mailing list, so I'll get the message anyway - I don't need it twice.

  /myapp/index.jsp
  /myapp/secure/index.jsp
  /myapp/secure/page2.jsp

So you're logging into the secure area, and trying to view, e.g. page2.jsp
from a link on the e.g. index.jsp page?

Do the logs have any errors in them?
If so, what are they?

Are you encoding all of the URLs properly?

How long between clicks?

What is the session timeout in your web.xml?

How have you defined thesecurity-constraint  in web.xml?

Which Realm are you using?

Perhaps you could post a little bit more information?

p



  On Thu, Aug 20, 2009 at 11:23 AM, Pidp...@pidster.com

mailto:p...@pidster.com  wrote:

On 20/08/2009 10:40, Dean Chester wrote:

Hi,
I've written my application using j_security_check yet i keep
having to log
in in the restricted area. Has anyone else experienced this?


Yep. I have to log in each time I want to use our app - it's a side
effect of implementing security.

Or is your question referring to a less vague and more specific issue?



Because it works with a small amount of JSPs and then when i
implement it all in to my
application it doesn't work.


I might need to warm up my Internet Telepathy(tm) without some more
information...



Where am i most likely going wrong?


Not telling us your Tomcat version, JVM version, OS version...

p


Thanks in advance
Dean



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
mailto:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
mailto: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: Keep having to login with container based authentaction.

2009-08-20 Thread Pid

On 20/08/2009 13:00, Pid wrote:

On 20/08/2009 12:36, Dean Chester wrote:

Sorry about that.
Yes i have a index page in the restricted area that has links to other
restricted jsps. The Logs are not reporting anything.



How do you mean encode your urls?


If you're being asked to log in every click, your session is probably
not being preserved. The session ID is set in a cookie or by encoding
the URL to include the session id:

/path/to/page.jsp;jsessionid=00AF00?query=paramgo=here


Most browsers have a variety of dev tools you can use to examine
cookies, or response headers (e.g. Set-Cookie) to see if the cookie is
being set properly.

If it's not, you'll need to encode the URL so that it contains the
session id. The servlet spec, (which of course you have read), has a
handy method on the HttpServletResponse object which can do this.


Encode each URL to ensure that the session id is preserved.

a href=%= response.encodeURL(request.getContextPath() +
'/path/to/page.jsp') % alt=a linkLinked text/a

p


If you have a common footer, included in your JSPs you can add the 
session id to it, so you can see it on each page - it should not change 
between clicks if you've encoded URls properly.



 %= request.getSession().getId() %

Or if you're using JSP Expression Language

 ${pageContext.session.id}

p



P.S. There are tag libraries that exist to make this easier/less clumsy
looking.


I haven't set a time out in the web.xml file so its using the

default. The time between clicks is usually about 1-2 seconds. Here is
some
of my web.xml file:
security-constraint
web-resource-collection
web-resource-nameusers/web-resource-name
url-pattern/add/*/url-pattern
/web-resource-collection
auth-constraint
role-nameuser/role-name
role-nameadmin/role-name
/auth-constraint
/security-constraint

security-constraint
web-resource-collection
web-resource-nameadmin/web-resource-name
url-pattern/admin/*/url-pattern
/web-resource-collection
auth-constraint
role-nameadmin/role-name
/auth-constraint
/security-constraint

login-config
auth-methodFORM/auth-method
form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/login-error.jsp/form-error-page
/form-login-config
/login-config

security-role
role-nameadmin/role-name
/security-role
security-role
role-nameuser/role-name
/security-role
I am using the default realm which i know works.
Dean

On Thu, Aug 20, 2009 at 12:19 PM, Pidp...@pidster.com wrote:


On 20/08/2009 11:55, Dean Chester wrote:


Sorry Tomcat 6.20, Red Hat Enterprise edition 4 i think. java 1.6.
And i
mean once logged in i have to login again after clicking on a link in
the restricted area.
Dean



You don't need to reply-to-all, just to the list. I'm obviously on the
mailing list, so I'll get the message anyway - I don't need it twice.

/myapp/index.jsp
/myapp/secure/index.jsp
/myapp/secure/page2.jsp

So you're logging into the secure area, and trying to view, e.g.
page2.jsp
from a link on the e.g. index.jsp page?

Do the logs have any errors in them?
If so, what are they?

Are you encoding all of the URLs properly?

How long between clicks?

What is the session timeout in your web.xml?

How have you defined thesecurity-constraint in web.xml?

Which Realm are you using?

Perhaps you could post a little bit more information?

p



On Thu, Aug 20, 2009 at 11:23 AM, Pidp...@pidster.com

mailto:p...@pidster.com wrote:

On 20/08/2009 10:40, Dean Chester wrote:

Hi,
I've written my application using j_security_check yet i keep
having to log
in in the restricted area. Has anyone else experienced this?


Yep. I have to log in each time I want to use our app - it's a side
effect of implementing security.

Or is your question referring to a less vague and more specific issue?



Because it works with a small amount of JSPs and then when i
implement it all in to my
application it doesn't work.


I might need to warm up my Internet Telepathy(tm) without some more
information...



Where am i most likely going wrong?


Not telling us your Tomcat version, JVM version, OS version...

p


Thanks in advance
Dean



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
mailto:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
mailto: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: Keep having to login with container based authentaction.

2009-08-20 Thread Dean Chester
Ok ive discovered that they are not staying the same between clicks. I'm now
going to look at encoding urls now.
Dean
On Thu, Aug 20, 2009 at 1:06 PM, Pid p...@pidster.com wrote:

 On 20/08/2009 13:00, Pid wrote:

 On 20/08/2009 12:36, Dean Chester wrote:

 Sorry about that.
 Yes i have a index page in the restricted area that has links to other
 restricted jsps. The Logs are not reporting anything.


  How do you mean encode your urls?


 If you're being asked to log in every click, your session is probably
 not being preserved. The session ID is set in a cookie or by encoding
 the URL to include the session id:

 /path/to/page.jsp;jsessionid=00AF00?query=paramgo=here


 Most browsers have a variety of dev tools you can use to examine
 cookies, or response headers (e.g. Set-Cookie) to see if the cookie is
 being set properly.

 If it's not, you'll need to encode the URL so that it contains the
 session id. The servlet spec, (which of course you have read), has a
 handy method on the HttpServletResponse object which can do this.


 Encode each URL to ensure that the session id is preserved.

 a href=%= response.encodeURL(request.getContextPath() +
 '/path/to/page.jsp') % alt=a linkLinked text/a

 p


 If you have a common footer, included in your JSPs you can add the session
 id to it, so you can see it on each page - it should not change between
 clicks if you've encoded URls properly.


  %= request.getSession().getId() %

 Or if you're using JSP Expression Language

  ${pageContext.session.id}


 p


  P.S. There are tag libraries that exist to make this easier/less clumsy
 looking.


 I haven't set a time out in the web.xml file so its using the

 default. The time between clicks is usually about 1-2 seconds. Here is
 some
 of my web.xml file:
 security-constraint
 web-resource-collection
 web-resource-nameusers/web-resource-name
 url-pattern/add/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameuser/role-name
 role-nameadmin/role-name
 /auth-constraint
 /security-constraint

 security-constraint
 web-resource-collection
 web-resource-nameadmin/web-resource-name
 url-pattern/admin/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-nameadmin/role-name
 /auth-constraint
 /security-constraint

 login-config
 auth-methodFORM/auth-method
 form-login-config
 form-login-page/login.jsp/form-login-page
 form-error-page/login-error.jsp/form-error-page
 /form-login-config
 /login-config

 security-role
 role-nameadmin/role-name
 /security-role
 security-role
 role-nameuser/role-name
 /security-role
 I am using the default realm which i know works.
 Dean

 On Thu, Aug 20, 2009 at 12:19 PM, Pidp...@pidster.com wrote:

  On 20/08/2009 11:55, Dean Chester wrote:

  Sorry Tomcat 6.20, Red Hat Enterprise edition 4 i think. java 1.6.
 And i
 mean once logged in i have to login again after clicking on a link in
 the restricted area.
 Dean


 You don't need to reply-to-all, just to the list. I'm obviously on the
 mailing list, so I'll get the message anyway - I don't need it twice.

 /myapp/index.jsp
 /myapp/secure/index.jsp
 /myapp/secure/page2.jsp

 So you're logging into the secure area, and trying to view, e.g.
 page2.jsp
 from a link on the e.g. index.jsp page?

 Do the logs have any errors in them?
 If so, what are they?

 Are you encoding all of the URLs properly?

 How long between clicks?

 What is the session timeout in your web.xml?

 How have you defined thesecurity-constraint in web.xml?

 Which Realm are you using?

 Perhaps you could post a little bit more information?

 p



 On Thu, Aug 20, 2009 at 11:23 AM, Pidp...@pidster.com

 mailto:p...@pidster.com wrote:

 On 20/08/2009 10:40, Dean Chester wrote:

 Hi,
 I've written my application using j_security_check yet i keep
 having to log
 in in the restricted area. Has anyone else experienced this?


 Yep. I have to log in each time I want to use our app - it's a side
 effect of implementing security.

 Or is your question referring to a less vague and more specific issue?



 Because it works with a small amount of JSPs and then when i
 implement it all in to my
 application it doesn't work.


 I might need to warm up my Internet Telepathy(tm) without some more
 information...



 Where am i most likely going wrong?


 Not telling us your Tomcat version, JVM version, OS version...

 p


 Thanks in advance
 Dean



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

Custom 404 page when webapp stopped

2009-08-20 Thread llg

Hi,

  I have a webapp that needs to be down if we are doing some 
maintenance. I use the manager to make the application unavailable but 
in this case the 404 customized error-page is not displayed.


I modified the default web.xml (in conf/) to add the error-page 404,  
but it doesn't seems to be resolved when the context is stopped.


If I type an URL that doesn't exists, that doesn't map to any context, I 
get the right error page. But if it match a context path of a webapp 
that is stopped, I have the Tomcat default error page. Is there a way to 
fix this?


Thanks

Tomcat 6.0.20


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



Re: Custom 404 page when webapp stopped

2009-08-20 Thread Serge Fonville
Hi,

Likely someone has a better idea...

You could create a general error page that redirect (transparently) to
a page of the webapp when available, if not, display another
If this is the default page for all webapps, it should be solved.
You will probably need to create a valve of some sort.
Don't ask me for details I honestly don't know.

Hopefully someone else can be more helpful, it's just a suggestion

HTH

Regards,

Serge Fonville

On Thu, Aug 20, 2009 at 3:25 PM, llgl...@portaildulibre.fr wrote:
 Hi,

  I have a webapp that needs to be down if we are doing some maintenance. I
 use the manager to make the application unavailable but in this case the 404
 customized error-page is not displayed.

 I modified the default web.xml (in conf/) to add the error-page 404,  but it
 doesn't seems to be resolved when the context is stopped.

 If I type an URL that doesn't exists, that doesn't map to any context, I get
 the right error page. But if it match a context path of a webapp that is
 stopped, I have the Tomcat default error page. Is there a way to fix this?

 Thanks

 Tomcat 6.0.20


 -
 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: autodeploying/unpacking ROOT.war

2009-08-20 Thread Caldarale, Charles R
 From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs]
 Subject: Re: autodeploying/unpacking ROOT.war
 
  Context path=/ docBase=/usr/share/tomcat5.5-webapps/ROOT
debug=0 privileged=true allowLinking=true
  /Context
 
 This might be the problem. Try to remove the docBase attribute, and let
 us know what happens.

Also remove the path attribute, since it's both wrong and illegal here.

 - 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: Custom 404 page when webapp stopped

2009-08-20 Thread Pid

On 20/08/2009 14:25, llg wrote:

Hi,

I have a webapp that needs to be down if we are doing some maintenance.
I use the manager to make the application unavailable but in this case
the 404 customized error-page is not displayed.

I modified the default web.xml (in conf/) to add the error-page 404, but
it doesn't seems to be resolved when the context is stopped.


Is the error page inside a stopped webapp, or elsewhere - if so where?

How are you mapping the URL of the error page, post the fragment please?

p


If I type an URL that doesn't exists, that doesn't map to any context, I
get the right error page. But if it match a context path of a webapp
that is stopped, I have the Tomcat default error page. Is there a way to
fix this?



Thanks

Tomcat 6.0.20


-
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: Custom 404 page when webapp stopped

2009-08-20 Thread Jason Pyeron
 

 -Original Message-
 From: Serge Fonville [mailto:serge.fonvi...@gmail.com] 
 Sent: Thursday, August 20, 2009 9:35
 To: Tomcat Users List
 Subject: Re: Custom 404 page when webapp stopped
 
 Hi,
 
 Likely someone has a better idea...
 
 You could create a general error page that redirect 
 (transparently) to a page of the webapp when available, if 
 not, display another If this is the default page for all 
 webapps, it should be solved.
 You will probably need to create a valve of some sort.
 Don't ask me for details I honestly don't know.
 
 Hopefully someone else can be more helpful, it's just a suggestion
 
 HTH
 
 Regards,
 
 Serge Fonville
 
 On Thu, Aug 20, 2009 at 3:25 PM, llgl...@portaildulibre.fr wrote:
  Hi,
 
   I have a webapp that needs to be down if we are doing some 
  maintenance. I use the manager to make the application 
 unavailable but 
  in this case the 404 customized error-page is not displayed.
 
  I modified the default web.xml (in conf/) to add the 
 error-page 404,  
  but it doesn't seems to be resolved when the context is stopped.
 
  If I type an URL that doesn't exists, that doesn't map to 
 any context, 
  I get the right error page. But if it match a context path 
 of a webapp 
  that is stopped, I have the Tomcat default error page. Is 
 there a way to fix this?

We avoid all of this by replacing the webapp with a maintenance app. The app
indicates the period of downtime, who to call, etc for all urls. When we are
done, we deploy the application back. Also as prt of this all of our
applications use a common login/header facility which ckecks to see if a
maintenance event is near to 1. warn users to save and log out, 2. prevent new
logins, 3. disable the app until event is over (or replaced by maintenance app).

 
  Thanks
 
  Tomcat 6.0.20
 
 
  
 -
  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
 
 



--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.


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



RE: Problem closing datasource when used as JNDI resource

2009-08-20 Thread Mohammed Bin Mahmood
Thanks Chris,

But I still do not get my answer yet.

Does anybody have the better way to shut down the data source when started
by tomcat using JNDI resource? 
Or is there any configuration we can do so that tomcat closes it
automatically without us doing any workarounds?

Thanks,
Mohammed.
-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, August 19, 2009 7:05 PM
To: Tomcat Users List
Subject: Re: Problem closing datasource when used as JNDI resource

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mohammed,

On 8/19/2009 8:25 AM, Mohammed Bin Mahmood wrote:
 When tomcat takes care of creating maintaining datasource, then does it
not
 closes it when server is shut down?

According to Filip's comments on the first thread you mentioned, yes:
the connection pool is not explicitly closed.

 Do we have to close it on our own (the way I do) or is there any better
way
 to do it without external listener?

The best way would be to have Tomcat actually shut-down the DataSource,
since it created it in the first place.

Patches to Tomcat are always welcome :)

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

iEYEARECAAYFAkqL/4MACgkQ9CaO5/Lv0PD39QCdEWcriY2WJyRfKDYmCtZM10Gu
2GgAnRGHpsPKz4bKLCXw9ylHnTFGdvfn
=EwiF
-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: Custom 404 page when webapp stopped

2009-08-20 Thread Tim Funk

My first inclination is that this a bug or enhancement request.

From a user point of view, if I have an app (which is not the root 
webapp) and I stop it, then all requests should then go to the root 
webapp. Of course doing this might introduce bad side effects during the 
course of an application restart.


As a workaround, there is an option in Tomcat to use your own 
ErrorReportValve. This might be an option.
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html - see 
errorReportValveClass


-Tim

llg wrote:

Hi,

  I have a webapp that needs to be down if we are doing some 
maintenance. I use the manager to make the application unavailable but 
in this case the 404 customized error-page is not displayed.


I modified the default web.xml (in conf/) to add the error-page 404,  
but it doesn't seems to be resolved when the context is stopped.


If I type an URL that doesn't exists, that doesn't map to any context, I 
get the right error page. But if it match a context path of a webapp 
that is stopped, I have the Tomcat default error page. Is there a way to 
fix this?



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



RE: Custom 404 page when webapp stopped

2009-08-20 Thread Caldarale, Charles R
 From: Tim Funk [mailto:funk...@apache.org]
 Subject: Re: Custom 404 page when webapp stopped
 
  From a user point of view, if I have an app (which is not the root
 webapp) and I stop it, then all requests should then go to the root
 webapp.

Is that really true?  If the webapp is undeployed, I can understand that 
unmatched requests will be handled by ROOT, but a stopped webapp is still known 
to Tomcat, just not available.

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




RE: Problem with respecting docBase in context file in TC 6.0.20?

2009-08-20 Thread Roger Powers
 You may have already figured this out, but just in case:
 
 1) The path attribute of a Context element may only
 be used when the Context element is nested inside a
 Host element in server.xml - which is strongly
 discouraged.
 
 2) The docBase attribute of a Context element may
 only be used when a) the webapp is located outside of the
 Host appBase directory, *and* b) when the
 Context element is in
 conf/Catalina/[host]/[appName].xml or is in server.xml
 (again, the latter is strongly discouraged).
 
 Results are not predictable for any other usage of those
 attributes.

Thanks, Chuck and Mark, for your quick responses to my questions.

I imagine this comes up often.

It'd be nice if Tomcat would throw a warning when it knows these 
rules are being violated.

Thanks,
RP


  

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



FW: Accessing Properties file located in Conf Directory of Tomcat 5.XX

2009-08-20 Thread Kaverappa.Prabhakar


_
From: Prabhakar, Kaverappa
Sent: Thursday, August 20, 2009 10:20 AM
To: 'users@tomcat.apache.org'
Subject: Accessing Properties file located in Conf Directory of Tomcat 5.XX


We have to place, as per rules set by the department, the properties file in 
the Conf directory of Tomcat AS. The TOMCAT does not find the properties file 
placed in CONF directory but it does find when placed in Common or Shared 
directory of TOMCAT.

I tried placing the directory path in the java code of Jdeveloper (see below 
for variation of codes used) and created WAR file using Jdeveloper to deploy it 
on TOMCAT. But still it does not find it.

I tried placing the directory path in the java code of Jdeveloper (see below 
for variation of codes used) and created WAR file using Jdeveloper to deploy it 
on TOMCAT. But still it does not find it.

prop.load(loader.getResourceAsStream(genPricing.properties));
prop.load(loader.getResourceAsStream(/genPricing.properties));
prop.load(loader.getResourceAsStream(/conf/genPricing.properties));
prop.load(loader.getResourceAsStream(conf/genPricing.properties));
prop.load(loader.getResourceAsStream($tomcat_home\\conf\\genPricing.properties));
prop.load(loader.getResourceAsStream(${tomcat_home}/conf/genPricing.properties));

Any suggestion as to how to read the properties file located in CONF directory.

Quick response would be greatly appreciated.

Prabhakar





Re: Custom 404 page when webapp stopped

2009-08-20 Thread Tim Funk
From a high level, whats the difference between a webapp thats stopped 
and a webapp thats undeployed?


One could call stopped a special scenario. In the past - a 503 was 
returned to the user. Now its a 404. IIRC ... it changed to 404 as part 
of a bug report but maybe that is the wrong change to make. (Too lazy to 
look up the bug report)


[Personally - I'd rather stick apache in front let apache trap the 
condition during the outage window and not worry about the rest.]


-Tim

Caldarale, Charles R wrote:

From: Tim Funk [mailto:funk...@apache.org]
Subject: Re: Custom 404 page when webapp stopped

 From a user point of view, if I have an app (which is not the root
webapp) and I stop it, then all requests should then go to the root
webapp.


Is that really true?  If the webapp is undeployed, I can understand that 
unmatched requests will be handled by ROOT, but a stopped webapp is still known 
to Tomcat, just not available.



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



[OT] The perfect answer

2009-08-20 Thread André Warnier

Can't resist copying it

The original poster's message was :

On Thu, Aug 20, 2009 at 12:17 PM, Apache Adminaamit.apa...@gmail.com 
wrote:

Hi , users

How to create Payment Gateway by Apache with other Application ...


And here was Krist's answer (try it) :

http://lmgtfy.com/?q=How+to+create+Payment+Gateway+by+Apache+with+other+Application

:-)


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



Accessing Properties file located in Conf Directory of Tomcat 5.XX

2009-08-20 Thread Kaverappa.Prabhakar
We have to place, as per rules set by the department, the properties file in 
the Conf directory of Tomcat AS. The TOMCAT does not find the properties file 
placed in CONF directory but it does find when placed in Common or Shared 
directory of TOMCAT.

I tried placing the directory path in the java code of Jdeveloper (see below 
for variation of codes used) and created WAR file using Jdeveloper to deploy it 
on TOMCAT. But still it does not find it.

I tried placing the directory path in the java code of Jdeveloper (see below 
for variation of codes used) and created WAR file using Jdeveloper to deploy it 
on TOMCAT. But still it does not find it.

prop.load(loader.getResourceAsStream(genPricing.properties));
prop.load(loader.getResourceAsStream(/genPricing.properties));
prop.load(loader.getResourceAsStream(/conf/genPricing.properties));
prop.load(loader.getResourceAsStream(conf/genPricing.properties));
prop.load(loader.getResourceAsStream($tomcat_home\\conf\\genPricing.properties));
prop.load(loader.getResourceAsStream(${tomcat_home}/conf/genPricing.properties));

Any suggestion as to how to read the properties file located in CONF directory.

Quick response would be greatly appreciated.

Prabhakar






RE: Problem closing datasource when used as JNDI resource

2009-08-20 Thread Pham, Hop
I'm new to this users list.  I think that JNDI resource management (i.e., 
datasource) is JEE app server domain, and remains available while Tomcat up by 
design so that it can be shared across multiple applications. It is not 
effective to terminate datasource connections, and resume connetion pool 
establishment when a new request for datasource arrives.  Your DBAs may 
complain about the number of open connections to the databases, but they are 
shared resources, and does not take up much CPU utilization on both database 
servers and application servers to keep connections open.

thanks,
-hop

From: Mohammed Bin Mahmood [moham...@sustainlane.com]
Sent: Thursday, August 20, 2009 9:44 AM
To: 'Tomcat Users List'
Subject: RE: Problem closing datasource when used as JNDI resource

Thanks Chris,

But I still do not get my answer yet.

Does anybody have the better way to shut down the data source when started
by tomcat using JNDI resource?
Or is there any configuration we can do so that tomcat closes it
automatically without us doing any workarounds?

Thanks,
Mohammed.
-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Wednesday, August 19, 2009 7:05 PM
To: Tomcat Users List
Subject: Re: Problem closing datasource when used as JNDI resource

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mohammed,

On 8/19/2009 8:25 AM, Mohammed Bin Mahmood wrote:
 When tomcat takes care of creating maintaining datasource, then does it
not
 closes it when server is shut down?

According to Filip's comments on the first thread you mentioned, yes:
the connection pool is not explicitly closed.

 Do we have to close it on our own (the way I do) or is there any better
way
 to do it without external listener?

The best way would be to have Tomcat actually shut-down the DataSource,
since it created it in the first place.

Patches to Tomcat are always welcome :)

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

iEYEARECAAYFAkqL/4MACgkQ9CaO5/Lv0PD39QCdEWcriY2WJyRfKDYmCtZM10Gu
2GgAnRGHpsPKz4bKLCXw9ylHnTFGdvfn
=EwiF
-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
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Accessing Properties file located in Conf Directory of Tomcat 5.XX

2009-08-20 Thread Martin Gainty

there are at least 100 people on this list that can accomplish this requirement

you will need to handle this requirement by posting a statement of work 
details on how to write a statement of work referenced here
http://www.usability.gov/plan/sow.html

1 or more engineers will respond with a RFQ with a proposal and cost estimate. 
You can then select the most qualified help... 

let us know when you have posted your SOW

__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 From: kaverappa.prabha...@do.treas.gov
 To: users@tomcat.apache.org
 Date: Thu, 20 Aug 2009 10:52:30 -0400
 Subject: FW: Accessing Properties file located in Conf Directory of Tomcat 
 5.XX
 
 
 
 _
 From: Prabhakar, Kaverappa
 Sent: Thursday, August 20, 2009 10:20 AM
 To: 'users@tomcat.apache.org'
 Subject: Accessing Properties file located in Conf Directory of Tomcat 5.XX
 
 
 We have to place, as per rules set by the department, the properties file in 
 the Conf directory of Tomcat AS. The TOMCAT does not find the properties file 
 placed in CONF directory but it does find when placed in Common or Shared 
 directory of TOMCAT.
 
 I tried placing the directory path in the java code of Jdeveloper (see below 
 for variation of codes used) and created WAR file using Jdeveloper to deploy 
 it on TOMCAT. But still it does not find it.
 
 I tried placing the directory path in the java code of Jdeveloper (see below 
 for variation of codes used) and created WAR file using Jdeveloper to deploy 
 it on TOMCAT. But still it does not find it.
 
 prop.load(loader.getResourceAsStream(genPricing.properties));
 prop.load(loader.getResourceAsStream(/genPricing.properties));
 prop.load(loader.getResourceAsStream(/conf/genPricing.properties));
 prop.load(loader.getResourceAsStream(conf/genPricing.properties));
 prop.load(loader.getResourceAsStream($tomcat_home\\conf\\genPricing.properties));
 prop.load(loader.getResourceAsStream(${tomcat_home}/conf/genPricing.properties));
 
 Any suggestion as to how to read the properties file located in CONF 
 directory.
 
 Quick response would be greatly appreciated.
 
 Prabhakar
 
 
 

_
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

Re: Custom 404 page when webapp stopped

2009-08-20 Thread llg



Le 20/08/09 15:41, Pid a écrit :

On 20/08/2009 14:25, llg wrote:

Hi,

I have a webapp that needs to be down if we are doing some maintenance.
I use the manager to make the application unavailable but in this case
the 404 customized error-page is not displayed.

I modified the default web.xml (in conf/) to add the error-page 404, but
it doesn't seems to be resolved when the context is stopped.


Is the error page inside a stopped webapp, or elsewhere - if so where?
I tried twice : the error page is inside the root weapp AND the stopped 
webapp.


How are you mapping the URL of the error page, post the fragment please?

p


If I type an URL that doesn't exists, that doesn't map to any context, I
get the right error page. But if it match a context path of a webapp
that is stopped, I have the Tomcat default error page. Is there a way to
fix this?



Thanks

Tomcat 6.0.20


-
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 Properties file located in Conf Directory of Tomcat 5.XX

2009-08-20 Thread Tim Funk
I am assuming loader is an instance of a classloader. The classloader 
doesn't see the conf directory. (But as your  noticed - it does see the 
common directory)


Your easiest (but tomcat specific) solution is to do something like this:
File confDir = new File(System.properties(catalina.home), conf);
File propFile = new File(confDir , genPricing.properties);
Properties p = new Properties();
p.load(new FileInputStream(propFile));


-Tim


kaverappa.prabha...@do.treas.gov wrote:

We have to place, as per rules set by the department, the properties file in 
the Conf directory of Tomcat AS. The TOMCAT does not find the properties file 
placed in CONF directory but it does find when placed in Common or Shared 
directory of TOMCAT.

I tried placing the directory path in the java code of Jdeveloper (see below 
for variation of codes used) and created WAR file using Jdeveloper to deploy it 
on TOMCAT. But still it does not find it.

I tried placing the directory path in the java code of Jdeveloper (see below 
for variation of codes used) and created WAR file using Jdeveloper to deploy it 
on TOMCAT. But still it does not find it.

prop.load(loader.getResourceAsStream(genPricing.properties));
prop.load(loader.getResourceAsStream(/genPricing.properties));
prop.load(loader.getResourceAsStream(/conf/genPricing.properties));
prop.load(loader.getResourceAsStream(conf/genPricing.properties));
prop.load(loader.getResourceAsStream($tomcat_home\\conf\\genPricing.properties));
prop.load(loader.getResourceAsStream(${tomcat_home}/conf/genPricing.properties));

Any suggestion as to how to read the properties file located in CONF directory.

Quick response would be greatly appreciated.

Prabhakar







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



Re: 100% CPU by java process in Tomcat

2009-08-20 Thread Juha Laiho
On Thu, 20 Aug 2009, Phani Raj Kumar wrote:

 Here is the info:
 *JDK version* : j2sdk1.4.2_11
 *Tomcat Version*: jakarta-tomcat-5.0.28
 *OS*: SunOS burton 5.8 Generic_117350-46 sun4u sparc SUNW,Sun-Fire-V440
 *CATALINA_OPTS*=-Xms64m -Xmx256m
 
 I didn't get any error messages in the log, but even running the tomcat
 alone without any applications in it taking 100% cpu.

For how long did you wait for the CPU usage to drop?
Tomcat does, at startup, run for a while at almost 100% CPU usage - for
how long, depends largely on the speed of your machine.

If you haven't done so yet, you could try letting the Tomcat run for
something like five minutes; with that machine, I would expect the
CPU usage to return to near-zero in less than two minutes.

If the CPU usage is at 100% level still after the five minutes, you could
take a thread dump of the Java process (by sending a QUIT signal, with
kill -QUIT tomcat_PID), and looking at the per-thread CPU usage with
successive ps -fLp tomcat_PID commands, and then correlate the thread
ID from the thread dump with the thread you see with the ps outputs
as being the largest user of CPU time.
-- 
..Juha

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



Re: Where should we deploy/put web application patch jar in Tomcat 5.5 ?

2009-08-20 Thread Kris Schneider
On Wed, Aug 19, 2009 at 1:10 PM, Mark Thomasma...@apache.org wrote:
 Fang Zhu wrote:
 I know I can unpackage the abcPatch.jar and put under /WEB-INF/classes 
 folder, but this is not we are looking for.

 That is your only option.

 Mark

Not sure how difficult it would be to implement, but wouldn't a custom
WebappLoader and/or WebappClassLoader also be an option?

-- 
Kris Schneider

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



Problems with Tomcat when trying to get Jackrabbit installed

2009-08-20 Thread kbar

I am trying to get Jackrabbit running on Ubuntu.

I have followed these instruction

http://wiki.apache.org/jackrabbit/JackRabbitOnTomcat6  ,  but I used
jackrabbit 1.6.0 instead of 1.5.0.

So I did the following...

1) 
Install a fresh Ubuntu server with Tomcat package.

2 ) 
cd /usr/share/tomcat6/lib
wget
http://mirrors.ibiblio.org/pub/mirrors/maven2/javax/jcr/jcr/1.0/jcr-1.0.jar

3)
wget http://www.apache.org/dist/jackrabbit/1.6.0/jackrabbit-webapp-1.6.0.war
cp jackrabbit-webapp-1.6.0.war /var/lib/tomcat6/webapps/jackrabbit.war

4) 
http://localhost:8080/jackrabbit

But when I try to access it I get any one of the messages (see below) in my
webpage. I am at a complete loss as to what might be happening. If anyone
has any information on this I would be really greatful. 

I have tried both the desktop version of ubuntu and the server version.

I was told to post here by someone on the Jackrabbit forum as they think
this is actually a tomcat issue. Hope you all can help.

Thanks,
Kent.


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: org.apache.jasper.JasperException: XML
parsing error on file /WEB-INF/web.xml
   
org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:207)
org.apache.jasper.compiler.JspConfig.init(JspConfig.java:220)
   
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:273)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
   
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
   
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
   
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
   
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

root cause

org.apache.jasper.JasperException: XML parsing error on file
/WEB-INF/web.xml
   
org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:108)
   
org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:91)
org.apache.jasper.compiler.JspConfig.init(JspConfig.java:220)
   
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:273)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
   
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
   
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
   
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
   
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

root cause

org.xml.sax.SAXException: Internal Error: File
/javax/servlet/resources/web-app_2_3.dtd not found
   
org.apache.jasper.xmlparser.MyEntityResolver.resolveEntity(ParserUtils.java:203)
org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown
Source)

Re: [OT] The perfect answer

2009-08-20 Thread Pid

On 20/08/2009 15:59, André Warnier wrote:

Can't resist copying it

The original poster's message was :

On Thu, Aug 20, 2009 at 12:17 PM, Apache Adminaamit.apa...@gmail.com
wrote:

Hi , users

How to create Payment Gateway by Apache with other Application ...


And here was Krist's answer (try it) :

http://lmgtfy.com/?q=How+to+create+Payment+Gateway+by+Apache+with+other+Application


Genius.

p




:-)


-
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 Properties file located in Conf Directory of Tomcat 5.XX

2009-08-20 Thread Pid

On 20/08/2009 16:24, Martin Gainty wrote:


there are at least 100 people on this list that can accomplish this requirement


*Can* yes. *Will*, no.


you will need to handle this requirement by posting a statement of work
details on how to write a statement of work referenced here
http://www.usability.gov/plan/sow.html


What in the world are you talking about?/rhetorical


1 or more engineers will respond with a RFQ with a proposal and cost estimate.
You can then select the most qualified help...


@Kaverappa: No, they *absolutely will not*.


let us know when you have posted your SOW


No, just ignore this nonsense.

@Martin, if you're pitching for work, can you do it somewhere else please?


p



__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.





From: kaverappa.prabha...@do.treas.gov
To: users@tomcat.apache.org
Date: Thu, 20 Aug 2009 10:52:30 -0400
Subject: FW: Accessing Properties file located in Conf Directory of Tomcat 5.XX



_
From: Prabhakar, Kaverappa
Sent: Thursday, August 20, 2009 10:20 AM
To: 'users@tomcat.apache.org'
Subject: Accessing Properties file located in Conf Directory of Tomcat 5.XX


We have to place, as per rules set by the department, the properties file in 
the Conf directory of Tomcat AS. The TOMCAT does not find the properties file 
placed in CONF directory but it does find when placed in Common or Shared 
directory of TOMCAT.

I tried placing the directory path in the java code of Jdeveloper (see below 
for variation of codes used) and created WAR file using Jdeveloper to deploy it 
on TOMCAT. But still it does not find it.

I tried placing the directory path in the java code of Jdeveloper (see below 
for variation of codes used) and created WAR file using Jdeveloper to deploy it 
on TOMCAT. But still it does not find it.

prop.load(loader.getResourceAsStream(genPricing.properties));
prop.load(loader.getResourceAsStream(/genPricing.properties));
prop.load(loader.getResourceAsStream(/conf/genPricing.properties));
prop.load(loader.getResourceAsStream(conf/genPricing.properties));
prop.load(loader.getResourceAsStream($tomcat_home\\conf\\genPricing.properties));
prop.load(loader.getResourceAsStream(${tomcat_home}/conf/genPricing.properties));

Any suggestion as to how to read the properties file located in CONF directory.

Quick response would be greatly appreciated.

Prabhakar





_
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery



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



Re: Custom 404 page when webapp stopped

2009-08-20 Thread Pid

On 20/08/2009 16:04, llg wrote:



Le 20/08/09 15:41, Pid a écrit :

On 20/08/2009 14:25, llg wrote:

Hi,

I have a webapp that needs to be down if we are doing some maintenance.
I use the manager to make the application unavailable but in this case
the 404 customized error-page is not displayed.

I modified the default web.xml (in conf/) to add the error-page 404, but
it doesn't seems to be resolved when the context is stopped.


Is the error page inside a stopped webapp, or elsewhere - if so where?

I tried twice : the error page is inside the root weapp AND the stopped
webapp.


How are you mapping the URL of the error page, post the fragment please?


[cough] [ahem]

(attempts to draw attention to the second question, above)

p



p


If I type an URL that doesn't exists, that doesn't map to any context, I
get the right error page. But if it match a context path of a webapp
that is stopped, I have the Tomcat default error page. Is there a way to
fix this?



Thanks

Tomcat 6.0.20


-
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




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



Re: Custom 404 page when webapp stopped

2009-08-20 Thread Len Popp
On Thu, Aug 20, 2009 at 10:58, Tim Funkfunk...@apache.org wrote:
 From a high level, whats the difference between a webapp thats stopped and a
 webapp thats undeployed?

When a webapp is undeployed it is deleted from the webapps directory.
When it's stopped it's not deleted and can simply be re-started. In
this case it sounds like the OP is doing some maintenance outside of
the webapp (database updates, maybe) and just needs to stop the webapp
temporarily.

 One could call stopped a special scenario. In the past - a 503 was returned
 to the user. Now its a 404. IIRC ... it changed to 404 as part of a bug
 report but maybe that is the wrong change to make. (Too lazy to look up the
 bug report)

I don't know about that change, but in the past it wasn't possible to
specify a custom error-page for a stopped webapp. (I can't get to my
test server today to see if this is still the case.)

 [Personally - I'd rather stick apache in front let apache trap the condition
 during the outage window and not worry about the rest.]

How would you trap the condition? Apache httpd's ErrorDocument
directive won't work because as long as Tomcat is running you get
Tomcat's error pages.

If you stop Tomcat completely then you can use Apache's ErrorDocument
to show a site down page, but not if you just stop one webapp in
Tomcat.

-- 
Len

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



Re: Custom 404 page when webapp stopped

2009-08-20 Thread Tim Funk
Since there is manual intervention to stop the app. There can be manual 
intervention to tell apache not to forward requests to tomcat, for example:
- change the apache config and graceful restart (but it does require a 
restart)
- Use mod_rewrite to look for some marker (file existence or rewrite map 
setting) and use that as a toggle to a 404 page.


-Tim

Len Popp wrote:

How would you trap the condition? Apache httpd's ErrorDocument
directive won't work because as long as Tomcat is running you get
Tomcat's error pages.

If you stop Tomcat completely then you can use Apache's ErrorDocument
to show a site down page, but not if you just stop one webapp in
Tomcat.



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



Master Proxy/Filter in Tomcat

2009-08-20 Thread Gerardo Corro

Hi,

I have any number of webapps deployed in Tomcat, I need to create a proxy that 
filters all redirections until the end is reached and displays the final result 
to users.

I already implemented a method that follows all redirections and gets the final 
result, now, that works from the outside so to speak, I need to have this 
method running as a master filter in such a way that any requests that goes to 
any of the web apps deployed inside Tomcat pass before this filter, then the 
filter gets what it needs from the various web-apps and return the result to 
the client. 

How can I set up this Proxy in Tomcat?

Thanks a lot.



_
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx

SSL with multiple Tomcat instances

2009-08-20 Thread Don Prezioso
I have two instances of Tomcat 5.5 set up on a Red Hat box, each using separate 
IP addresses. I have obtained two certificates, one for each instance, and have 
put them in separate keystores. Both certificates are from IPSCA and both 
keystores have been set up in the same manner. Each keystore is properly 
referenced in the associated server.xml

The first instance (on eth0) is working with no problems. The second instance 
(on eth0:0), appears to work fine in IE, but when I connect using Firefox, 
Chrome, or Safari, I get the message:

The web site's certificate cannot be verified. Do you want to continue? The 
certificate cannot be verified by a trusted source.

When I view the certificate, it appears valid. If I click on 'Yes', then check 
the certificate, it says it is 'Verified by: IPS Certification Authority s.l.' 
and again, all appears fine.

Any ideas on why I am only getting the warning only on the second instance? I 
can't believe it is an issue with IPSCA since the first instance does not 
exhibit the problem.

Any help is greatly appreciated.

Thanks

Don

--
Don Prezioso
Director of Administrative I.T.
Ashland University
Ashland, Ohio



Re: Custom 404 page when webapp stopped

2009-08-20 Thread llg



Le 20/08/09 17:48, Pid a écrit :

On 20/08/2009 16:04, llg wrote:



Le 20/08/09 15:41, Pid a écrit :

On 20/08/2009 14:25, llg wrote:

Hi,

I have a webapp that needs to be down if we are doing some 
maintenance.

I use the manager to make the application unavailable but in this case
the 404 customized error-page is not displayed.

I modified the default web.xml (in conf/) to add the error-page 
404, but

it doesn't seems to be resolved when the context is stopped.


Is the error page inside a stopped webapp, or elsewhere - if so where?

I tried twice : the error page is inside the root weapp AND the stopped
webapp.


How are you mapping the URL of the error page, post the fragment 
please?


[cough] [ahem]

(attempts to draw attention to the second question, above)

I added in ${CATALINA_HOME}/conf/web.xml
error-page
error-code404/error-code
location/my404.html/location
error-code503/error-code
location/my503.html/location
/error-page

and copied the 2 html files in ${CATALINA_HOME}/webapps/ROOT


p



p

If I type an URL that doesn't exists, that doesn't map to any 
context, I

get the right error page. But if it match a context path of a webapp
that is stopped, I have the Tomcat default error page. Is there a 
way to

fix this?



Thanks

Tomcat 6.0.20


-
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




-
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: Custom 404 page when webapp stopped

2009-08-20 Thread André Warnier

llg wrote:



...

I added in ${CATALINA_HOME}/conf/web.xml
error-page
error-code404/error-code
location/my404.html/location
error-code503/error-code
location/my503.html/location
/error-page

I do not really *know* this, but based on the XML structure of other 
Tomcat config files, the above form looks fishy to me.

Should it not at least be something like
 error-page
 error-code404/error-code
 location/my404.html/location
 /error-page
 error-page
 error-code503/error-code
 location/my503.html/location
 /error-page
?

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



Re: Problems with Tomcat when trying to get Jackrabbit installed

2009-08-20 Thread André Warnier

kbar wrote:

I am trying to get Jackrabbit running on Ubuntu.

...
This far above my head (I don't even know what Jackrabbit is), but just 
based on one of the error messages you mentioned :
check the file /etc/default/tomcat6, and see if it enables the Java 
security manager. If it does, set it to NO, restart Tomcat and try again.



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



Re: Custom 404 page when webapp stopped

2009-08-20 Thread llg



Le 20/08/09 21:25, André Warnier a écrit :

llg wrote:



...

I added in ${CATALINA_HOME}/conf/web.xml
error-page
error-code404/error-code
location/my404.html/location
error-code503/error-code
location/my503.html/location
/error-page

I do not really *know* this, but based on the XML structure of other 
Tomcat config files, the above form looks fishy to me.

Should it not at least be something like

Yes, of course, you are right : just a stupid copy/paste in the mail :-[

But the result is the same

 error-page
 error-code404/error-code
 location/my404.html/location
 /error-page
 error-page
 error-code503/error-code
 location/my503.html/location
 /error-page
?

-
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: SSL with multiple Tomcat instances

2009-08-20 Thread Peter Crowther
2009/8/20 Don Prezioso dp...@ashland.edu:
 I have two instances of Tomcat 5.5 set up on a Red Hat box, each using 
 separate IP addresses. I have obtained two certificates, one for each 
 instance, and have put them in separate keystores. Both certificates are from 
 IPSCA and both keystores have been set up in the same manner. Each keystore 
 is properly referenced in the associated server.xml

 The first instance (on eth0) is working with no problems. The second instance 
 (on eth0:0), appears to work fine in IE, but when I connect using Firefox, 
 Chrome, or Safari, I get the message:

 The web site's certificate cannot be verified. Do you want to continue? The 
 certificate cannot be verified by a trusted source.

 When I view the certificate, it appears valid. If I click on 'Yes', then 
 check the certificate, it says it is 'Verified by: IPS Certification 
 Authority s.l.' and again, all appears fine.

 Any ideas on why I am only getting the warning only on the second instance? I 
 can't believe it is an issue with IPSCA since the first instance does not 
 exhibit the problem.

Hmm.  This probably won't help you, but I recently had exactly those
symptoms when I hadn't installed the intermediate certificate for a
GlobalSign cert on an IIS server.  IE didn't care; everything else got
upset.

Do IPSCA use intermediate certs?  If so, are you *sure* they're
installed correctly on both keystores? ;-)

- Peter

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



Re: Problems with Tomcat when trying to get Jackrabbit installed

2009-08-20 Thread kbar

Thanks awarnier, 

That worked perfectly. Although I will have to hunt down why I have to
disable this as disabling the security I guess is not such a great idea once
the site goes into production.

Cheers,
Kent



awarnier wrote:
 
 kbar wrote:
 I am trying to get Jackrabbit running on Ubuntu.
 ...
 This far above my head (I don't even know what Jackrabbit is), but just 
 based on one of the error messages you mentioned :
 check the file /etc/default/tomcat6, and see if it enables the Java 
 security manager. If it does, set it to NO, restart Tomcat and try
 again.
 
 
 -
 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://www.nabble.com/Problems-with-Tomcat-when-trying-to-get-Jackrabbit-installed-tp25064576p25069581.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: SSL with multiple Tomcat instances

2009-08-20 Thread Don Prezioso
Peter,

Thanks for the reply. When I first started having this problem I was actually 
using a single keystore for both certificates. Yes there is both an 
intermediate and a root certificate that get loaded in the keystore, and I'm 
sure, at least when I was using a single keystore that they were loaded 
correctly because the other instance (and certificate) were working correctly.

With the second instance using a separate keystore, I get the same results 
whether the intermediate certificate is loaded in the keystore or not. That 
makes me think that somehow the second instance of Tomcat can't access the 
intermediate certificate, but somehow the first instance doesn't have that 
trouble?

Don

--
Don Prezioso
Director of Administrative I.T.
Ashland University
Ashland, Ohio


-Original Message-
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On 
Behalf Of Peter Crowther
Sent: Thursday, August 20, 2009 4:40 PM
To: Tomcat Users List
Subject: Re: SSL with multiple Tomcat instances

2009/8/20 Don Prezioso dp...@ashland.edu:
 I have two instances of Tomcat 5.5 set up on a Red Hat box, each using 
 separate IP addresses. I have obtained two certificates, one for each 
 instance, and have put them in separate keystores. Both certificates are from 
 IPSCA and both keystores have been set up in the same manner. Each keystore 
 is properly referenced in the associated server.xml

 The first instance (on eth0) is working with no problems. The second instance 
 (on eth0:0), appears to work fine in IE, but when I connect using Firefox, 
 Chrome, or Safari, I get the message:

 The web site's certificate cannot be verified. Do you want to continue? The 
 certificate cannot be verified by a trusted source.

 When I view the certificate, it appears valid. If I click on 'Yes', then 
 check the certificate, it says it is 'Verified by: IPS Certification 
 Authority s.l.' and again, all appears fine.

 Any ideas on why I am only getting the warning only on the second instance? I 
 can't believe it is an issue with IPSCA since the first instance does not 
 exhibit the problem.

Hmm.  This probably won't help you, but I recently had exactly those
symptoms when I hadn't installed the intermediate certificate for a
GlobalSign cert on an IIS server.  IE didn't care; everything else got
upset.

Do IPSCA use intermediate certs?  If so, are you *sure* they're
installed correctly on both keystores? ;-)

- Peter

-
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: Eclipse builtin browser vs system default browser problem

2009-08-20 Thread Tommy Pham




- Original Message 
 From: Martin Gainty mgai...@hotmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Wednesday, August 19, 2009 4:09:28 PM
 Subject: RE: Eclipse builtin browser vs system default browser problem
 
 
 run FF firebug-plugin and view the DOM on both screens and note the deltas
 http://joehewitt.com/software/firebug/
 
 view the Request details for both and note the deltas
 what do the logs say for server?
 
 Martin Gainty 
 __ 
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
 sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
 oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
 dem 
 Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
 Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
 fuer den Inhalt uebernehmen.
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
 destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
 l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
 est 
 interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
 quel effet légalement obligatoire. Étant donné que les email peuvent 
 facilement 
 être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
 pour le contenu fourni.
 
 
 
 
  Date: Wed, 19 Aug 2009 15:26:08 -0700
  From: tommy...@yahoo.com
  Subject: Eclipse builtin browser vs system default browser problem
  To: users@tomcat.apache.org
  
  Hi,
  
  I'm working a small project seem to run into a snag and can't figure out 
  how 
 to overcome it since my web app doesn't give any exception (log files are 
 clean 
 are error/exception free).  The snag is that the eclipse internal web browser 
 shows the desired result while Firefox doesn't...  Here's the SS of my 
 problem:
  http://img40.imageshack.us/img40/8029/languages.jpg
  
  Has anyone seen something like this before? I was trying to use FF's 
 LiveHeaders extension to work on form's POST multipart/form-data. Below is my 
 dev environment:
  
  OS: Win2008 x64
  JDK: jdk1.6.0_14 x64
  Tomcat: 6.0.20
  Eclipse: 3.4.2 (updated)
  
  Libs for web app project:
  Hibernate3-core 3.3.2 GA (using Tomcat's context datasource)
  JSTL1.2
  Commons FileUpload 1.2.1
  Log4j 1.2.15
  DWR 3.0.0.116.rc1 (yet to be implemented - jar is in WEB-INF/lib)
  
  TIA,
  Tommy
  
  
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
  
 

Sorry folks, my mistake :)  After short break and a review line by line of my 
source code, it turned out that I wasn't handling my session correctly :)  It's 
been a very long week for me.

Thanks,
Tommy


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



Re: Problems with Tomcat when trying to get Jackrabbit installed

2009-08-20 Thread André Warnier

kbar wrote:

... as disabling the security I guess is not such a great idea once
the site goes into production.


Do not take my word for this, as I am far from the Java expert.
As far as I can understand it however, the Java security manager, in the 
case of Tomcat, is there mainly to protect you from yourself, unless you 
are allowing other people to upload webapps to your server.
When enabled, the JVM establishes kind of a sandbox around your 
classes, the basic idea being that everything that is not explicitly 
allowed, is forbidden.
When it is in force, you have to give your webapp classes explicit 
permissions to access the filesystem, the network, the system properties 
etc..
It does not have much to do with the protection of your server against 
unauthorised Internet access by miscreants.
Unless such miscreants are able to load their own webapps in your 
server, in which case I would presume they might also be smart enough to 
modify your catalina.policy files anyway, and give their classes all the 
permissions they want.


I also presume that running with the security manager enabled, has a 
cost in terms of efficiency.  So your webapps will probably run faster 
without it.




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



Re: Problems with Tomcat when trying to get Jackrabbit installed

2009-08-20 Thread Filip Hanik - Dev Lists
You would have to know all the security options to define in the policy 
file that apply to jackrabbit, in order to run it with the security 
manager turned on


On 08/20/2009 02:46 PM, kbar wrote:

Thanks awarnier,

That worked perfectly. Although I will have to hunt down why I have to
disable this as disabling the security I guess is not such a great idea once
the site goes into production.

Cheers,
Kent



awarnier wrote:
   

kbar wrote:
 

I am trying to get Jackrabbit running on Ubuntu.
   

...
This far above my head (I don't even know what Jackrabbit is), but just
based on one of the error messages you mentioned :
check the file /etc/default/tomcat6, and see if it enables the Java
security manager. If it does, set it to NO, restart Tomcat and try
again.


-
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: Custom 404 page when webapp stopped

2009-08-20 Thread Pid

On 20/08/2009 20:51, llg wrote:



Le 20/08/09 21:25, André Warnier a écrit :

llg wrote:



...

I added in ${CATALINA_HOME}/conf/web.xml
error-page
error-code404/error-code
location/my404.html/location
error-code503/error-code
location/my503.html/location
/error-page


I do not really *know* this, but based on the XML structure of other
Tomcat config files, the above form looks fishy to me.
Should it not at least be something like

Yes, of course, you are right : just a stupid copy/paste in the mail :-[


This config would try to reference a file of that URL in *each* webapp.
If Tomcat is holding onto URL namespaces when an given webapp is 
stopped, then you'll get the default error page you're seeing, because 
the app is stopped - so the file is unavailable.


Using a custom ErrorReportValve as previously suggested is the only way 
to get generate the behaviour you're aiming for, because Valves operate 
at a level below the webapp - thus a stopped webapp is no impediment.



p



But the result is the same

 error-page
 error-code404/error-code
 location/my404.html/location
 /error-page
 error-page
 error-code503/error-code
 location/my503.html/location
 /error-page
?

-
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



tomcat reading from manager

2009-08-20 Thread Angelo Chen

Hi,

always see folllowing from tomcat manager, got some question:

Free memory: 90.40 MB Total memory: 501.12 MB Max memory: 912.12 MB

Q:the free memory is the one already assigned to JVM? or any extra memory in
the OS?

Max threads: 200 Min spare threads: 4 Max spare threads: 50 Current thread
count: 4 Current thread busy: 1

Q:what above means?

Thanks,
Angelo
-- 
View this message in context: 
http://www.nabble.com/tomcat-reading-from-manager-tp25071849p25071849.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: SSL with multiple Tomcat instances

2009-08-20 Thread Crypto Sal

Hi Don,

Is this Tomcat for Windows or Tomcat for a UNIX variant?

Have you verified the keystore as correct via * keytool -v -list 
-keystore KEYSTORE_PATH/FILE* ? (Redirect that text to a file if need be!)


Did you use the *-trustcacerts* flag upon importing the certificates or 
was this omitted?



On 08/20/2009 04:49 PM, Don Prezioso wrote:

Peter,

Thanks for the reply. When I first started having this problem I was actually 
using a single keystore for both certificates. Yes there is both an 
intermediate and a root certificate that get loaded in the keystore, and I'm 
sure, at least when I was using a single keystore that they were loaded 
correctly because the other instance (and certificate) were working correctly.

With the second instance using a separate keystore, I get the same results 
whether the intermediate certificate is loaded in the keystore or not. That 
makes me think that somehow the second instance of Tomcat can't access the 
intermediate certificate, but somehow the first instance doesn't have that 
trouble?

Don

--
Don Prezioso
Director of Administrative I.T.
Ashland University
Ashland, Ohio


-Original Message-
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On 
Behalf Of Peter Crowther
Sent: Thursday, August 20, 2009 4:40 PM
To: Tomcat Users List
Subject: Re: SSL with multiple Tomcat instances

2009/8/20 Don Preziosodp...@ashland.edu:
   

I have two instances of Tomcat 5.5 set up on a Red Hat box, each using separate 
IP addresses. I have obtained two certificates, one for each instance, and have 
put them in separate keystores. Both certificates are from IPSCA and both 
keystores have been set up in the same manner. Each keystore is properly 
referenced in the associated server.xml

The first instance (on eth0) is working with no problems. The second instance 
(on eth0:0), appears to work fine in IE, but when I connect using Firefox, 
Chrome, or Safari, I get the message:

The web site's certificate cannot be verified. Do you want to continue? The 
certificate cannot be verified by a trusted source.

When I view the certificate, it appears valid. If I click on 'Yes', then check 
the certificate, it says it is 'Verified by: IPS Certification Authority s.l.' 
and again, all appears fine.

Any ideas on why I am only getting the warning only on the second instance? I 
can't believe it is an issue with IPSCA since the first instance does not 
exhibit the problem.
 

Hmm.  This probably won't help you, but I recently had exactly those
symptoms when I hadn't installed the intermediate certificate for a
GlobalSign cert on an IIS server.  IE didn't care; everything else got
upset.

Do IPSCA use intermediate certs?  If so, are you *sure* they're
installed correctly on both keystores? ;-)

- Peter

-
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: SSL with multiple Tomcat instances

2009-08-20 Thread Ben Stringer

 Any ideas on why I am only getting the warning only on the second
 instance? I can't believe it is an issue with IPSCA since the first
 instance does not exhibit the problem.


Hi Don,

Are you certain that each tomcat instance is bound to a seperate IP?
(netstat -anp | grep java is useful for confirming this).

Do you have distinct DNS entries for each IP, and were the SSL
certificates each created using these distinct DNS names?

Cheers, Ben

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