error-page 503 in web.xml not working in tomcat 5.5.9

2005-10-06 Thread Archana Mathur
Hi,I am using tomcat 5.5.9. I have set up global error pages for 404 and 503 in 
web.xml file under tomcat home dir/conf folder. 
Example - 
error-page 
error-code404/error-code 
location/systemDown.html/location 
/error-page 
error-page 
error-code503/error-code 
location/systemDown.html/location 
/error-page 

Error 404 is working fine and tomcat displays my page but for 503, it displays 
its own message( HTTP Status 503 - This application is not currently 
available...)

Please help. 
Regards,
Arch



NullPointerException during error page forward

2005-09-26 Thread Scott Goldstein
I'm running Tomcat 5.0.28 and running into a problem during forward to
the error page.  Specifically, I'm seeing a NullPointerException and I'm
losing the original exception which I'd like to track.

 

When looking into the source code, in JspServlet.service(), I see the
following:

 

try {

String includeUri 

= (String)
request.getAttribute(Constants.INC_SERVLET_PATH);

String requestUri 

= (String)
request.getAttribute(Constants.INC_REQUEST_URI);



String jspUri;



// When jsp-property-group/url-matching is used, and when
the 

// jsp is not defined with servlet-name, the url

// as to be passed as it is to the JSP container (since 

// Catalina doesn't know anything about the requested JSP 



// The first scenario occurs when the jsp is not directly
under /

// example: /utf16/foo.jsp

if (requestUri != null){

String currentIncludedUri 

=
requestUri.substring(requestUri.indexOf(includeUri));  --

 

if ( !includeUri.equals(currentIncludedUri) ) {

includeUri = currentIncludedUri;

}

}



...

 

What appears to be happening, is that the requestUri is set to the URI
of the page on which the exception originally occurred and the
includeUri is null.  Therefore, when requestUri.indexOf(includeUri) is
invoked, a NullPointerException occurs.

 

The only info I've been able to find out, is that in PageContextImpl
during the handlePageException() method, forward() is invoked to forward
to the error page.  In the doForward() method, the attribute for the
include uri (Constants.INC_SERVLET_PATH) above is removed.  This leads
to it being null.  However, I don't see the other attribute ever being
removed.

 

So, the question is, what is the expected behavior of these two
attributes?  I believe that they should both be null for a forward (in
this case to the error page), correct?  Is there something that I can do
to avoid this NullPointerException?  Is it a bug which has been resolved
in future releases?

 

Thanks for the information.

 

Scott



How can i change the http 500 error page

2005-08-16 Thread Ebru KAYA
Can anyone help me how can i change the error page http1.1 500 on tomcat
?
 
 
 
Ebru KAYA
 


Re: How can i change the http 500 error page

2005-08-16 Thread Jost Richstein

error-page
 error-code503/error-code
 location/errors/503.html/location
/error-page

in web.xml

Ebru KAYA wrote:


Can anyone help me how can i change the error page http1.1 500 on tomcat
?
 
 
 
Ebru KAYA
 





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



Re: How can i change the http 500 error page

2005-08-16 Thread pacea
Just remember to add it after the /welcome-file-list tag.

 error-page
   error-code503/error-code
   location/errors/503.html/location
 /error-page
 
 in web.xml
 
 Ebru KAYA wrote:
 
  Can anyone help me how can i change the error page http1.1 500 on tomcat
  ?
   
   
   
  Ebru KAYA


 error-page
   error-code503/error-code
   location/errors/503.html/location
 /error-page
 
 in web.xml
 
 Ebru KAYA wrote:
 
  Can anyone help me how can i change the error page http1.1 500 on tomcat
  ?
   
   
   
  Ebru KAYA
   
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: error-page not working

2005-08-09 Thread Marius Hanganu
It may be because of the size of your errorpage.jsp. According to

http://www.404-error-page.com/404-error-page-too-short-problem-microsoft
-ie.shtml 

500 errors should have pages with size greater than 512 bytes.

Marius

-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 09, 2005 7:29 AM
To: tomcat-user@jakarta.apache.org
Subject: error-page not working

Hi;

 

I am using JSF - although that should not make a difference.

 

In web.xml I have:

error-page

exception-typejava.lang.Throwable/exception-type

location/errorpage.jsp/location

/error-page

 

And in my event handler I have:

throw new NullPointerException(hi there);

 

But when it happens, I get the following in IE:



The page cannot be displayed

 


There is a problem with the page you are trying to reach and it cannot
be displayed.


  _  

Please try the following:

*   Open the  http://localhost:8080 localhost:8080 home page, and
then
look for links to the information you want. 
*   Click the Refresh button, or try again later. 
*   Click  javascript:doSearch() Search to look for information on
the
Internet. 
*   You can also see a list of related sites. 

 


HTTP 500 - Internal server error
Internet Explorer 


 

Any ideas?

 

Thanks - dave

 


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



RE: error-page not working

2005-08-09 Thread David Thielen
That's not it - the file is over 2K in size.

??? - thanks - dave

David Thielen
303-499-2544
www.windwardreports.com


-Original Message-
From: Marius Hanganu [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 09, 2005 1:47 AM
To: Tomcat Users List
Subject: RE: error-page not working

It may be because of the size of your errorpage.jsp. According to

http://www.404-error-page.com/404-error-page-too-short-problem-microsoft
-ie.shtml 

500 errors should have pages with size greater than 512 bytes.

Marius

-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 09, 2005 7:29 AM
To: tomcat-user@jakarta.apache.org
Subject: error-page not working

Hi;

 

I am using JSF - although that should not make a difference.

 

In web.xml I have:

error-page

exception-typejava.lang.Throwable/exception-type

location/errorpage.jsp/location

/error-page

 

And in my event handler I have:

throw new NullPointerException(hi there);

 

But when it happens, I get the following in IE:



The page cannot be displayed

 


There is a problem with the page you are trying to reach and it cannot
be displayed.


  _  

Please try the following:

*   Open the  http://localhost:8080 localhost:8080 home page, and
then
look for links to the information you want. 
*   Click the Refresh button, or try again later. 
*   Click  javascript:doSearch() Search to look for information on
the
Internet. 
*   You can also see a list of related sites. 

 


HTTP 500 - Internal server error
Internet Explorer 


 

Any ideas?

 

Thanks - dave

 


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



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



error-page not working

2005-08-08 Thread David Thielen
Hi;

 

I am using JSF - although that should not make a difference.

 

In web.xml I have:

error-page

exception-typejava.lang.Throwable/exception-type

location/errorpage.jsp/location

/error-page

 

And in my event handler I have:

throw new NullPointerException(hi there);

 

But when it happens, I get the following in IE:



The page cannot be displayed

 


There is a problem with the page you are trying to reach and it cannot be
displayed.


  _  

Please try the following:

*   Open the  http://localhost:8080 localhost:8080 home page, and then
look for links to the information you want. 
*   Click the Refresh button, or try again later. 
*   Click  javascript:doSearch() Search to look for information on the
Internet. 
*   You can also see a list of related sites. 

 


HTTP 500 - Internal server error 
Internet Explorer 


 

Any ideas?

 

Thanks - dave

 



How do I change the error page being served while tomcat is starting up?

2005-06-06 Thread j r
When I start tomcat, it takes approximately 1 minute to complete its
startup process.  If apache is up during that period, the following
page gets served:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.
Apache Server at server name Port 80


For obvious reasons, I removed the server name and apache version.  I
do not want either of these displayed to the customer.  How can I
changed those?

I have tried to put the following in web.xml to no avail:
error-page
error-code404/error-code
location/errors/joey.html/location
/error-page
error-page
error-code500/error-code
location/errors/joey.html/location
/error-page


Any Ideas?


-jr

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



RE: How do I change the error page being served while tomcat is starting up?

2005-06-06 Thread Brian McGovern
From what it sounds like you have apache running as a proxy to tomcat.  If 
thats the case,

Add the following to your apache config file httpd.conf change

ErrorDocument 503 /your_file.html
ErrorDocument 200 /your_file.html

-B
-Original Message-
From: j r [mailto:[EMAIL PROTECTED]
Sent: Monday, June 06, 2005 5:40 PM
To: tomcat-user@jakarta.apache.org
Subject: How do I change the error page being served while tomcat is
starting up?


When I start tomcat, it takes approximately 1 minute to complete its
startup process.  If apache is up during that period, the following
page gets served:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.
Apache Server at server name Port 80


For obvious reasons, I removed the server name and apache version.  I
do not want either of these displayed to the customer.  How can I
changed those?

I have tried to put the following in web.xml to no avail:
error-page
error-code404/error-code
location/errors/joey.html/location
/error-page
error-page
error-code500/error-code
location/errors/joey.html/location
/error-page


Any Ideas?


-jr

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


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



Re: How do I change the error page being served while tomcat is starting up?

2005-06-06 Thread j r
Brian,

You are correct!  I was looking in the wrong place by trying to find
the solution in tomcat.  Changing apache works.


Thanks!
-jr

On 6/6/05, Brian McGovern [EMAIL PROTECTED] wrote:
 From what it sounds like you have apache running as a proxy to tomcat.  If
 thats the case,
 
 Add the following to your apache config file httpd.conf change
 
 ErrorDocument 503 /your_file.html
 ErrorDocument 200 /your_file.html
 
 -B
 -Original Message-
 From: j r [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 06, 2005 5:40 PM
 To: tomcat-user@jakarta.apache.org
 Subject: How do I change the error page being served while tomcat is
 starting up?
 
 
 When I start tomcat, it takes approximately 1 minute to complete its
 startup process.  If apache is up during that period, the following
 page gets served:
 
 Service Temporarily Unavailable
 
 The server is temporarily unable to service your request due to
 maintenance downtime or capacity problems. Please try again later.
 Apache Server at server name Port 80
 
 
 For obvious reasons, I removed the server name and apache version.  I
 do not want either of these displayed to the customer.  How can I
 changed those?
 
 I have tried to put the following in web.xml to no avail:
 error-page
 error-code404/error-code
 location/errors/joey.html/location
 /error-page
 error-page
 error-code500/error-code
 location/errors/joey.html/location
 /error-page
 
 
 Any Ideas?
 
 
 -jr
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



error-page not catching errors? Tomcat 4.1.31

2005-05-26 Thread David Johnson
Hi all
 I've added the following to my web.xml (thanks for the help)
 
error-page
error-code500/error-code
location/error.jsp/location
/error-page
error-page
error-code404/error-code
location/error.jsp/location
/error-page
error-page
error-codejava.lang.Exception/error-code
location/error.jsp/location
/error-page 
 
 the problem is when I cause an error (like stopping the database then 
trying to hit it or reloading a page that should cause an error 500), I'm 
not seeing my error page.

am I forgetting something? 


-- 
-Dave
[EMAIL PROTECTED]


Re: error-page not catching errors? Tomcat 4.1.31

2005-05-26 Thread Jon Wingfield
You should check tomcat's logs to see if there are any warnings. The 
last error-page def'n is invalid. It should be:


error-page
  exception-typejava.lang.Exception/exception-type
  location/error.jsp/location
/error-page

Maybe tomcat is ignoring all the error-page definitions due to the 
parsing error.


Jon

David Johnson wrote:


Hi all
 I've added the following to my web.xml (thanks for the help)
 
error-page

error-code500/error-code
location/error.jsp/location
/error-page
error-page
error-code404/error-code
location/error.jsp/location
/error-page
error-page
error-codejava.lang.Exception/error-code
location/error.jsp/location
/error-page 
 
 the problem is when I cause an error (like stopping the database then 
trying to hit it or reloading a page that should cause an error 500), I'm 
not seeing my error page.


am I forgetting something? 







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



error-page not working for error-code 503?

2005-05-19 Thread Raymond
- Original Message - 
From: Raymond [EMAIL PROTECTED]
To: Tomcat Users tomcat-user@jakarta.apache.org
Sent: Wednesday, May 18, 2005 9:54 PM
Subject: error-page not working for error-code 503?


Hi,
I have these in my tomcat server's global web.xml file:
error-page
 error-code404/error-code
 location/http404.jsp/location
/error-page
error-page
 error-code503/error-code
 location/maintenance.html/location
/error-page
It works for the 404 but not the 503 error code. What's wrong with it?
I want to redirect users to a maintenance in progress page when I stop 
any webapp with the tomcat manager. But it always gives me the default 
tomcat HTTP status page when I request a stopped webapp.

Please help. Thanks.
Raymond 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


error-page not working for error-code 503?

2005-05-19 Thread Raymond
Hi,
I have these in my tomcat server's global web.xml file:
error-page
 error-code404/error-code
 location/http404.jsp/location
/error-page
error-page
 error-code503/error-code
 location/maintenance.html/location
/error-page
It works for the 404 but not the 503 error code. What's wrong with it?
I want to redirect users to a maintenance in progress page when I stop 
any webapp with the tomcat manager. But it always gives me the default 
tomcat HTTP status page when I request a stopped webapp.

Please help. Thanks.
Raymond 

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


Re: error-page not working for error-code 503?

2005-05-19 Thread Anto Paul
On 5/19/05, Raymond [EMAIL PROTECTED] wrote:
 Hi,
 
 I have these in my tomcat server's global web.xml file:
 
 error-page
   error-code404/error-code
   location/http404.jsp/location
 /error-page
 
 error-page
   error-code503/error-code
   location/maintenance.html/location
 /error-page
 
 It works for the 404 but not the 503 error code. What's wrong with it?
 I want to redirect users to a maintenance in progress page when I stop
 any webapp with the tomcat manager. But it always gives me the default
 tomcat HTTP status page when I request a stopped webapp.
 
 Please help. Thanks.
 Raymond
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

is Tomcat is behind of Apache ?. Try renaming /maintenance.html to
/maintenance.jsp.

-- 
rgds
Anto Paul

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



error-page not working for error-code 503?

2005-05-18 Thread Raymond
Hi,
I have these in my tomcat server's global web.xml file:
error-page
 error-code404/error-code
 location/http404.jsp/location
/error-page
error-page
 error-code503/error-code
 location/maintenance.html/location
/error-page
It works for the 404 but not the 503 error code. What's wrong with it?
I want to redirect users to a maintenance in progress page when I stop 
any webapp with the tomcat manager. But it always gives me the default 
tomcat HTTP status page when I request a stopped webapp.

Please help. Thanks.
Raymond 

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


RE: error-page not working for error-code 503?

2005-05-18 Thread GDavis
You might want to take a look at

http://www.experts-exchange.com/Web/Application_Servers/Q_20654602.html 

it seems to include several ways to override error pages. A friend has done
custom error pages for his own webapps, but never tried to override every
error page.

-Original Message-
From: Raymond [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 18, 2005 9:54 AM
To: Tomcat Users
Subject: error-page not working for error-code 503?

Hi,

I have these in my tomcat server's global web.xml file:

error-page
  error-code404/error-code
  location/http404.jsp/location
/error-page

error-page
  error-code503/error-code
  location/maintenance.html/location
/error-page

It works for the 404 but not the 503 error code. What's wrong with it?
I want to redirect users to a maintenance in progress page when I stop 
any webapp with the tomcat manager. But it always gives me the default 
tomcat HTTP status page when I request a stopped webapp.

Please help. Thanks.
Raymond 

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

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



Re: Change standart error page?

2005-04-13 Thread rassylkaformazaj
Hello All.

Can someone theoretically answer on my question here? Or I choosed
wrong maillist.


run I have installed Apache 2.0.40 and Tomcat 5.0.30. They are connected
run using mod_jk2.

run I have setuped in the httpd.conf the following

 ErrorDocument 500 /500.htm

run so when somebody tries to access a web site (to the root of the site,
run eg http://somesite.com/ ) while tomcat is down, he will see beautiful
run page saying Please try again later. 

run But if he tries to go to direct link like
run http://somesite.com/somecontext/19955/5d94/
run he will see an 503 error page.

run But if I try to include in the httpd.conf the following

 ErrorDocument 503 /500.htm

run it doesn't help (user still see the standart error page).

run Why it doesn't work? What can I do in this situation?
run I searched google - no answer.
run I tried to write full inks in the ErrorDocument statement.
run I wonder why 500 error is handled in the correct way while 503 - not.

run The error page looks like this
run 
run The servlet container is temporary unavailable or being upgraded

run  Internal Server Error
 
run  The server encountered an internal error or misconfiguration and was
run  unable to complete your request. 
  
run  Please contact the server administrator, [EMAIL PROTECTED] and
run  inform them of the time the error occurred, and anything you might
run  have done that may have caused the error.  
  
run  More information about this error may be available in the server
run  error log. 
  
run  Additionally, a 500 Internal Server Error error was encountered while
run  trying to use an ErrorDocument to handle the request. 
  
run 

run I cheked the headers that i receive:
run if I try to access root directory I receive

run  (Response Status) HTTP/1.1 500 Internal Server Error
run  Accept-Ranges bytes 
run  Connection close 
run  Content-Length 1321 
run  Content-Type text/html; charset=WINDOWS-1251 
run  Date Wed, 06 Apr 2005 11:47:15 GMT
run  ETag 378ab-529-721995c0
run  Last-Modified Wed, 06 Apr 2005 10:56:31 GMT
run  Server Apache/2.0.40 (Red Hat Linux)

run if I try to somecontext  directory I receive

run  (Response Status) HTTP/1.1 503
run  Connection close 
run  Content-Type text/html; charset=WINDOWS-1251
run  Date Wed, 06 Apr 2005 11:41:43 GMT
run  Server Apache/2.0.40 (Red Hat Linux)
run  Transfer-Encoding chunked

run This somecontext directory is configurated and started by tomcat.
run There is following lines in workers2.properties

run  
run  [uri:/somecontext/*]

run  [uri:/report/*]
run  

 
run Thnx in advance.




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



Change standart error page?

2005-04-12 Thread rassylkaformazaj
Hello All.

I have installed Apache 2.0.40 and Tomcat 5.0.30. They are connected
using mod_jk2.

I have setuped in the httpd.conf the following

 ErrorDocument 500 /500.htm

so when somebody tries to access a web site (to the root of the site,
eg http://somesite.com/ ) while tomcat is down, he will see beautiful
page saying Please try again later. 

But if he tries to go to direct link like
http://somesite.com/somecontext/19955/5d94/
he will see an 503 error page.

But if I try to include in the httpd.conf the following

 ErrorDocument 503 /500.htm

it doesn't help (user still see the standart error page).

Why it doesn't work? What can I do in this situation?
I searched google - no answer.
I tried to write full inks in the ErrorDocument statement.
I wonder why 500 error is handled in the correct way while 503 - not.

The error page looks like this

The servlet container is temporary unavailable or being upgraded

 Internal Server Error
 
 The server encountered an internal error or misconfiguration and was
 unable to complete your request. 
  
 Please contact the server administrator, [EMAIL PROTECTED] and
 inform them of the time the error occurred, and anything you might
 have done that may have caused the error.  
  
 More information about this error may be available in the server
 error log. 
  
 Additionally, a 500 Internal Server Error error was encountered while
 trying to use an ErrorDocument to handle the request. 
  


I cheked the headers that i receive:
if I try to access root directory I receive

 (Response Status) HTTP/1.1 500 Internal Server Error
 Accept-Ranges bytes 
 Connection close 
 Content-Length 1321 
 Content-Type text/html; charset=WINDOWS-1251 
 Date Wed, 06 Apr 2005 11:47:15 GMT
 ETag 378ab-529-721995c0
 Last-Modified Wed, 06 Apr 2005 10:56:31 GMT
 Server Apache/2.0.40 (Red Hat Linux)

if I try to somecontext  directory I receive

 (Response Status) HTTP/1.1 503
 Connection close 
 Content-Type text/html; charset=WINDOWS-1251
 Date Wed, 06 Apr 2005 11:41:43 GMT
 Server Apache/2.0.40 (Red Hat Linux)
 Transfer-Encoding chunked

This somecontext directory is configurated and started by tomcat.
There is following lines in workers2.properties

 
 [uri:/somecontext/*]

 [uri:/report/*]
 

 
Thnx in advance.


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



RE: error-page in web.xml and cache-control

2005-04-07 Thread Pawson, David
 

-Original Message-
From: Jason Bainbridge

 Hence I'm looking for a means of trapping that error for either a 
 re-direct, or to an error page. HTTP 1.1 seems not to 
class that as an 
 error, hence I'm looking for another way to access that 
'bad' state.

I don't think you can do anything about that, I don't think 
a request even hits the server for it, install 
ieHttpHeaders (google it) and monitor the request/response 
headers to see what is going on but I'm fairly sure you 
won't see anything hitting the server from that back button press.

Aaarggh! Thanks Jason, appreciated.

Now I know I'm chasing shadows I'll address that differently.

regards DaveP.

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



error-page in web.xml and cache-control

2005-04-06 Thread Pawson, David

I'm using response.setHeader(cache-control,no-cache);

and tomcat is correctly telling me that the page has expired
when I use the browser back button.

I can't find out what error (if any) this is, to trap it
using the error-page element.

Is it possible to trap this error please?


Regards DaveP.

 snip here *

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



Re: error-page in web.xml and cache-control

2005-04-06 Thread Anto Paul
On Apr 6, 2005 1:46 PM, Pawson, David [EMAIL PROTECTED] wrote:
 
 I'm using response.setHeader(cache-control,no-cache);
 
 and tomcat is correctly telling me that the page has expired
 when I use the browser back button.
 
 I can't find out what error (if any) this is, to trap it
 using the error-page element.
 
 Is it possible to trap this error please?
 
 Regards DaveP.
 
  snip here *
 
 --
 DISCLAIMER:
 
 NOTICE: The information contained in this email and any attachments is
 confidential and may be privileged.  If you are not the intended
 recipient you should not use, disclose, distribute or copy any of the
 content of it or of any attachment; you are requested to notify the
 sender immediately of your receipt of the email and then to delete it
 and any attachments from your system.
 
 RNIB endeavours to ensure that emails and any attachments generated by
 its staff are free from viruses or other contaminants.  However, it
 cannot accept any responsibility for any  such which are transmitted.
 We therefore recommend you scan all attachments.
 
 Please note that the statements and views expressed in this email and
 any attachments are those of the author and do not necessarily represent
 those of RNIB.
 
 RNIB Registered Charity Number: 226227
 
 Website: http://www.rnib.org.uk
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

What is the exact message you get when clicking back button in browser
?. What browser you use ?. I think it is issued by browser not Tomcat.

-- 
Anto Paul
www.benchmarksoft.com

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



Re: error-page in web.xml and cache-control

2005-04-06 Thread Jon Wingfield
Sounds like the message IE gives when you hit back to a page served in 
response to a POST request.

http://theserverside.com/news/thread.tss?thread_id=28366
http://theserverside.com/news/thread.tss?thread_id=29758
Anto Paul wrote:
On Apr 6, 2005 1:46 PM, Pawson, David [EMAIL PROTECTED] wrote:
I'm using response.setHeader(cache-control,no-cache);
and tomcat is correctly telling me that the page has expired
when I use the browser back button.
I can't find out what error (if any) this is, to trap it
using the error-page element.
Is it possible to trap this error please?
Regards DaveP.


What is the exact message you get when clicking back button in browser
?. What browser you use ?. I think it is issued by browser not Tomcat.

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


RE: error-page in web.xml and cache-control

2005-04-06 Thread Pawson, David
 

-Original Message-
From: Anto Paul 
 
 I'm using response.setHeader(cache-control,no-cache);
 
 and tomcat is correctly telling me that the page has 
expired when I 
 use the browser back button.

What is the exact message you get when clicking back button 
in browser ?. What browser you use ?. I think it is issued 
by browser not Tomcat.



Warning: Page has Expired The page you requested was created using information 
you submitted in a form. This page is no longer available. As a security 
precaution, Internet Explorer does not automatically resubmit your information 
for you. 

To resubmit your information and view this Web page, click the Refresh button. 



Its ie 6.

regards DaveP

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



RE: error-page in web.xml and cache-control

2005-04-06 Thread Pawson, David
 

-Original Message-
From: Jon Wingfield

Sounds like the message IE gives when you hit back to a 
page served in response to a POST request.

http://theserverside.com/news/thread.tss?thread_id=28366
http://theserverside.com/news/thread.tss?thread_id=29758


It is Jon. As that (rather long:-) thread indicates, I'm similarly
trying to maintain state through the website, and a user hitting
back screws that up.

Hence I'm looking for a means of trapping that error for either
a re-direct, or to an error page. HTTP 1.1 seems not to class
that as an error, hence I'm looking for another way to access that
'bad' state.

regards DaveP

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



RE: error-page in web.xml and cache-control

2005-04-06 Thread Pawson, David
Bit of clarification. 
A = initial page
B = target of link
both pages have cachecontrol set to no-cache.

Follow link from A
Hit back button

then the message shows.

The only time I get *any* of my error pages to show
is when I do a refresh on A, after getting there by a back button.
Then it goes to the 

   error-page
error-code404/error-code
location/file_not_found.html/location
/error-page   

page. 

Typing in a bad address shows the standard ie6 404 page.

regards DaveP


-Original Message-
From: Jon Wingfield

Sounds like the message IE gives when you hit back to a 
page served in response to a POST request.

http://theserverside.com/news/thread.tss?thread_id=28366
http://theserverside.com/news/thread.tss?thread_id=29758


It is Jon. As that (rather long:-) thread indicates, I'm 
similarly trying to maintain state through the website, and 
a user hitting back screws that up.

Hence I'm looking for a means of trapping that error for 
either a re-direct, or to an error page. HTTP 1.1 seems not 
to class that as an error, hence I'm looking for another 
way to access that 'bad' state.

regards DaveP

--
DISCLAIMER:

NOTICE: The information contained in this email and any 
attachments is confidential and may be privileged.  If you 
are not the intended recipient you should not use, 
disclose, distribute or copy any of the content of it or of 
any attachment; you are requested to notify the sender 
immediately of your receipt of the email and then to delete 
it and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments 
generated by its staff are free from viruses or other 
contaminants.  However, it cannot accept any responsibility 
for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this 
email and any attachments are those of the author and do 
not necessarily represent those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk





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



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



Re: error-page in web.xml and cache-control

2005-04-06 Thread Anto Paul
On Apr 6, 2005 3:39 PM, Pawson, David [EMAIL PROTECTED] wrote:
 Bit of clarification.
 A = initial page
 B = target of link
 both pages have cachecontrol set to no-cache.
 
 Follow link from A
 Hit back button
 
 then the message shows.
 
 The only time I get *any* of my error pages to show
 is when I do a refresh on A, after getting there by a back button.
 Then it goes to the
 
error-page
 error-code404/error-code
 location/file_not_found.html/location
 /error-page
 
 page.
 
 Typing in a bad address shows the standard ie6 404 page.
 
 regards DaveP
 
 
 -Original Message-
 From: Jon Wingfield
 
 Sounds like the message IE gives when you hit back to a
 page served in response to a POST request.
 
 http://theserverside.com/news/thread.tss?thread_id=28366
 http://theserverside.com/news/thread.tss?thread_id=29758
 
 It is Jon. As that (rather long:-) thread indicates, I'm
 similarly trying to maintain state through the website, and
 a user hitting back screws that up.
 
 Hence I'm looking for a means of trapping that error for
 either a re-direct, or to an error page. HTTP 1.1 seems not
 to class that as an error, hence I'm looking for another
 way to access that 'bad' state.
 
 regards DaveP
 
 --
 DISCLAIMER:
 
 NOTICE: The information contained in this email and any
 attachments is confidential and may be privileged.  If you
 are not the intended recipient you should not use,
 disclose, distribute or copy any of the content of it or of
 any attachment; you are requested to notify the sender
 immediately of your receipt of the email and then to delete
 it and any attachments from your system.
 
 RNIB endeavours to ensure that emails and any attachments
 generated by its staff are free from viruses or other
 contaminants.  However, it cannot accept any responsibility
 for any  such which are transmitted.
 We therefore recommend you scan all attachments.
 
 Please note that the statements and views expressed in this
 email and any attachments are those of the author and do
 not necessarily represent those of RNIB.
 
 RNIB Registered Charity Number: 226227
 
 Website: http://www.rnib.org.uk
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

First you come to page A using HTTP POST method and browser is
complaining about that when you go back to that page.
You can check browser refresh in server side using tokens. If you
use Struts it has built in APIs for it.

-- 
Anto Paul
www.benchmarksoft.com

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



Re: error-page in web.xml and cache-control

2005-04-06 Thread Jason Bainbridge
On Apr 6, 2005 5:01 AM, Pawson, David [EMAIL PROTECTED] wrote:

 Hence I'm looking for a means of trapping that error for either
 a re-direct, or to an error page. HTTP 1.1 seems not to class
 that as an error, hence I'm looking for another way to access that
 'bad' state.

I don't think you can do anything about that, I don't think a request
even hits the server for it, install ieHttpHeaders (google it) and
monitor the request/response headers to see what is going on but I'm
fairly sure you won't see anything hitting the server from that back
button press.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



[More Info] Strange error-page behavior

2005-03-11 Thread Dustin
Ok, I've narrowed it down to the 401 error code. If
that is defined in the web.xml, all apps that
authenticate will automatically show the 401 error
page without prompting for credentials.

Is this a bug in tomcat? I tried the same on
tomcat-5.0.30 with the same results.

Please help,
  Dustin

--- Dustin [EMAIL PROTECTED] wrote:
 Hey all. Very bizzare problem here.
 
 I am running tomcat-5.0.28. I am trying to set up
 custom error pages.
 
 I originally set up a 404 error page for testing
 (the
 error-page elements are in the server web.xml, not
 in
 the app's web.xml):
 
   error-page
 error-code404/error-code
 location/errors/404-SNAPSHOT.jsp/location
   /error-page
 
 Put the jsp files in place (both in the ROOT webapp
 dir and my app's war) and everything worked great.
 However, as soon as I added additional error-page
 elements and restarted tomcat, things broke.
 
   error-page
 error-code404/error-code
 location/errors/404-SNAPSHOT.jsp/location
   /error-page
   error-page
 error-code401/error-code
 location/errors/401-SNAPSHOT.jsp/location
   /error-page
 
 Now my manager won't come up at all. A request to
 http://host:8080/manager/html/list displays a blank
 page. No authorization attempted.
 
 A request to another app that uses authorization
 (http://host:8080/auth-app/) pulls up the 401
 Unauthorized page even though I was never prompted
 for
 credentials.
 
 A request to an app that has no authentication comes
 up just fine.
 
 I remove all but one of the error-page elements and
 everything is back to normal.
 
 Any ideas?
 
 Thanks,
   Dustin
 
 
   
 __ 
 Do you Yahoo!? 
 Make Yahoo! your home page 
 http://www.yahoo.com/r/hs
 

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

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

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



Strange error-page behavior

2005-03-10 Thread Dustin
Hey all. Very bizzare problem here.

I am running tomcat-5.0.28. I am trying to set up
custom error pages.

I originally set up a 404 error page for testing (the
error-page elements are in the server web.xml, not in
the app's web.xml):

  error-page
error-code404/error-code
location/errors/404-SNAPSHOT.jsp/location
  /error-page

Put the jsp files in place (both in the ROOT webapp
dir and my app's war) and everything worked great.
However, as soon as I added additional error-page
elements and restarted tomcat, things broke.

  error-page
error-code404/error-code
location/errors/404-SNAPSHOT.jsp/location
  /error-page
  error-page
error-code401/error-code
location/errors/401-SNAPSHOT.jsp/location
  /error-page

Now my manager won't come up at all. A request to
http://host:8080/manager/html/list displays a blank
page. No authorization attempted.

A request to another app that uses authorization
(http://host:8080/auth-app/) pulls up the 401
Unauthorized page even though I was never prompted for
credentials.

A request to an app that has no authentication comes
up just fine.

I remove all but one of the error-page elements and
everything is back to normal.

Any ideas?

Thanks,
  Dustin



__ 
Do you Yahoo!? 
Make Yahoo! your home page 
http://www.yahoo.com/r/hs

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



error-page help on 5.5.7

2005-03-06 Thread Darren Govoni
Hi,
  I tried adding.

error-page
  error-code401/error-code
  location/error.jsp?type=401/location
/error-page

to my web.xml page (it was in the proper location, etc.) but my server still 
produces the default error
page. When I tried on my earlier 5.0.25 tomcat, it wouldn't even bring up my 
resources, which was weird.

Anyway, I tried various codes and locations. Nothing worked.

Any tips on this?

thank you,
Darren



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



Re: error-page help on 5.5.7

2005-03-06 Thread Chuck Williams
Darren Govoni writes (3/6/2005 7:16 AM):
Hi,
 I tried adding.
error-page
 error-code401/error-code
 location/error.jsp?type=401/location
/error-page
to my web.xml page (it was in the proper location, etc.) but my server still 
produces the default error
page. When I tried on my earlier 5.0.25 tomcat, it wouldn't even bring up my 
resources, which was weird.
Anyway, I tried various codes and locations. Nothing worked.
Any tips on this?
 

As location takes a war-path and not a url, I suspect the ?type=401 is 
your problem.  This mechanism works fine for me when just using paths in 
the war file.

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


Re: error-page help on 5.5.7

2005-03-06 Thread Darren Govoni
Thanks for the response.

I tried many variations. Nothing works for me (running linux,
jdk1.5.0_01).

I also added an error-page clause to the tomcat web.xml as well as my
webapp. It always jumps to the default page.

Here's what mine looks like. Wish it worked. :(


web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

.stuff.

error-page
error-code401/error-code
location/portal/nologin.jsp/location
/error-page
/web-app

On Sun, 2005-03-06 at 09:36 -0800, Chuck Williams wrote:

 Darren Govoni writes (3/6/2005 7:16 AM):
 
 Hi,
   I tried adding.
 
 error-page
   error-code401/error-code
   location/error.jsp?type=401/location
 /error-page
 
 to my web.xml page (it was in the proper location, etc.) but my server still 
 produces the default error
 page. When I tried on my earlier 5.0.25 tomcat, it wouldn't even bring up my 
 resources, which was weird.
 
 Anyway, I tried various codes and locations. Nothing worked.
 
 Any tips on this?
   
 
 As location takes a war-path and not a url, I suspect the ?type=401 is 
 your problem.  This mechanism works fine for me when just using paths in 
 the war file.
 
 Chuck
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


Re: error-page help on 5.5.7

2005-03-06 Thread Darren Govoni
I reverted back to 5.0.25 and it sorta works. Using Netscape on linux.
5.5.7 does not work for me.

Now, however, when I attempt to access a resource protected by BASIC
HTTP authentication. It DOES NOT prompt me for credentials, but rather
forwards to my error-page regardless. Yuck! That's not right either!

I only want it to forward to error-page on a code 401 _when the login
attempt fails_ and it should prompt the user for that, which it doesn't.

:(
Darren

On Sun, 2005-03-06 at 17:10 -0500, Darren Govoni wrote:
 Thanks for the response.
 
 I tried many variations. Nothing works for me (running linux,
 jdk1.5.0_01).
 
 I also added an error-page clause to the tomcat web.xml as well as my
 webapp. It always jumps to the default page.
 
 Here's what mine looks like. Wish it worked. :(
 
 
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4
 
 .stuff.
 
 error-page
 error-code401/error-code
 location/portal/nologin.jsp/location
 /error-page
 /web-app
 
 On Sun, 2005-03-06 at 09:36 -0800, Chuck Williams wrote:
 
  Darren Govoni writes (3/6/2005 7:16 AM):
  
  Hi,
I tried adding.
  
  error-page
error-code401/error-code
location/error.jsp?type=401/location
  /error-page
  
  to my web.xml page (it was in the proper location, etc.) but my server 
  still produces the default error
  page. When I tried on my earlier 5.0.25 tomcat, it wouldn't even bring up 
  my resources, which was weird.
  
  Anyway, I tried various codes and locations. Nothing worked.
  
  Any tips on this?

  
  As location takes a war-path and not a url, I suspect the ?type=401 is 
  your problem.  This mechanism works fine for me when just using paths in 
  the war file.
  
  Chuck
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: error-page help on 5.5.7

2005-03-06 Thread Chuck Williams
Darren Govoni writes (3/6/2005 3:27 PM):
I only want it to forward to error-page on a code 401 _when the login
attempt fails_ and it should prompt the user for that, which it doesn't.
 

Oh, this is for a login error?  I use FORM authentication which provides 
a form-error-page in the form-login-config.  This is triggered for 
authentication errors.  I use separate error-page's for related errors 
like a session-timeout while the user is on the login page (which 
generates a 408).  However, I don't believe the error-page mechanism 
works for authentication errors, which is probably  your issue with 
BASIC authentication.  How about switching to FORM authentication so you 
have more control?  Then you shouldn't have any issues (although it is 
still a war path and not a url...)..

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


Re: error-page help on 5.5.7

2005-03-06 Thread Darren Govoni
Thanks Chuck. This approach works better, although I would think
regardless of the auth form, the redirect to error
page would be independent.

Any idea how to do FORM based auth from a Java client?

I was using Basic like this:


On Sun, 2005-03-06 at 17:04 -0800, Chuck Williams wrote:

 Darren Govoni writes (3/6/2005 3:27 PM):
 
 I only want it to forward to error-page on a code 401 _when the login
 attempt fails_ and it should prompt the user for that, which it doesn't.
   
 
 Oh, this is for a login error?  I use FORM authentication which provides 
 a form-error-page in the form-login-config.  This is triggered for 
 authentication errors.  I use separate error-page's for related errors 
 like a session-timeout while the user is on the login page (which 
 generates a 408).  However, I don't believe the error-page mechanism 
 works for authentication errors, which is probably  your issue with 
 BASIC authentication.  How about switching to FORM authentication so you 
 have more control?  Then you shouldn't have any issues (although it is 
 still a war path and not a url...)..
 
 Chuck
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


Re: error-page help on 5.5.7

2005-03-06 Thread Darren Govoni
On Sun, 2005-03-06 at 20:47 -0500, Darren Govoni wrote:

 Thanks Chuck. This approach works better, although I would think
 regardless of the auth form, the redirect to error
 page would be independent.
 
 Any idea how to do FORM based auth from a Java client?
 
 I was using Basic like this:

String credentials = u+:+p;
//System.out.println(credentials);
String encoding = new sun.misc.BASE64Encoder().encode
(credentials.getBytes());

   
URLConnection uc = descURL.openConnection();
uc.setRequestProperty  (Authorization, Basic  +
encoding);  
InputStream descIS = uc.getInputStream();


 
 
 On Sun, 2005-03-06 at 17:04 -0800, Chuck Williams wrote:
 
  Darren Govoni writes (3/6/2005 3:27 PM):
  
  I only want it to forward to error-page on a code 401 _when the login
  attempt fails_ and it should prompt the user for that, which it doesn't.

  
  Oh, this is for a login error?  I use FORM authentication which provides 
  a form-error-page in the form-login-config.  This is triggered for 
  authentication errors.  I use separate error-page's for related errors 
  like a session-timeout while the user is on the login page (which 
  generates a 408).  However, I don't believe the error-page mechanism 
  works for authentication errors, which is probably  your issue with 
  BASIC authentication.  How about switching to FORM authentication so you 
  have more control?  Then you shouldn't have any issues (although it is 
  still a war path and not a url...)..
  
  Chuck
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


Re: error-page help on 5.5.7

2005-03-06 Thread Chuck Williams
Darren Govoni writes (3/6/2005 5:48 PM):
On Sun, 2005-03-06 at 20:47 -0500, Darren Govoni wrote:
 

Thanks Chuck. This approach works better, although I would think
regardless of the auth form, the redirect to error
page would be independent.
   

I would think so to, but it seems that authentication errors are handled 
outside of the normal error-page mechanism.  FORM authentication 
provides a special declaration for this (form-error-page), while BASIC 
authentication provides no means to make such a declaration.

Any idea how to do FORM based auth from a Java client?
   

I'm not using Java on the client side and so am not sure.  I'd think you 
would need to set the form-login-page to reach your client and then send 
back the same kind of request that is generated by a normal login form 
(i.e., POST a request to j_security_check passing j_username and 
j_password as parameters).  Another benefit of this approach is that you 
can configure it to use https with the right declaration if you choose to.

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


error-page directive

2005-03-01 Thread Ian van der Neut
Hello all,

I have a web.xml (attached) that works fine if I remove the error-page
directive, but gives a

Exception initializing TldLocationsCache: XML parsing error on file
/WEB-INF/web.xml: (line 72, col 11): The content of element type
web-app must match
(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*).

message when the indicated (java.lang.ClassNotFoundException) is
encountered. I checked docs and books, but I can't find anything wrong
with the web.xml. The template web.xml I used is the one from the
struts 1.2.4 package.

Could anyone please tell me what is wrong with this deployment descriptor?

Thank you very much in advance for any input,

Ian.
?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
  http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app
  display-nameKNMI Operational DataCenter/display-name
  
  !-- Standard Action Servlet Configuration (with debugging) --
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value3/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value3/param-value
/init-param
load-on-startup3/load-on-startup
  /servlet

  !-- Standard Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping

  !-- The Usual Welcome File List --
  welcome-file-list
welcome-fileindex.jsp/welcome-file
  /welcome-file-list


  !-- Struts Tag Library Descriptors --
  taglib
taglib-uri/tags/struts-bean/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib

  taglib
taglib-uri/tags/struts-html/taglib-uri
taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib

  taglib
taglib-uri/tags/struts-logic/taglib-uri
taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib

  taglib
taglib-uri/tags/struts-nested/taglib-uri
taglib-location/WEB-INF/struts-nested.tld/taglib-location
  /taglib

  taglib
taglib-uri/tags/struts-tiles/taglib-uri
taglib-location/WEB-INF/struts-tiles.tld/taglib-location
  /taglib
  
  error-page
exception-typejava.lang.ClassNotFoundException/exception-type
location/pages/apperror.jsp/location
  /error-page
  
/web-app

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

Re: error-page directive

2005-03-01 Thread Trond G. Ziarkowski
Hi,
Have you tried to move your the error-page directive to between the 
welcome-file-list and taglib directives. Seem to remember this 
happening to me some time ago as well.

Trond
 !-- The Usual Welcome File List --
 welcome-file-list
   welcome-fileindex.jsp/welcome-file
 /welcome-file-list
 

 error-page
   exception-typejava.lang.ClassNotFoundException/exception-type
   location/pages/apperror.jsp/location
 /error-page
 !-- Struts Tag Library Descriptors --
 taglib
   taglib-uri/tags/struts-bean/taglib-uri
   taglib-location/WEB-INF/struts-bean.tld/taglib-location
 /taglib
/web-app

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


Re: error-page directive

2005-03-01 Thread Ian van der Neut
On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski
[EMAIL PROTECTED] wrote:
 Hi,
 
 Have you tried to move your the error-page directive to between the
 welcome-file-list and taglib directives. Seem to remember this
 happening to me some time ago as well.

That seems to get rid of the message, but it doesn't seem to honour
the directive, because I still get tomcats default exception
stacktrace page.

Thank you so far, it's much appreciated,

Ian.

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



Re: error-page directive

2005-03-01 Thread Lionel Farbos
Perhaps, try to put error-page BEFORE taglib...

On Tue, 1 Mar 2005 10:07:49 +0100
Ian van der Neut [EMAIL PROTECTED] wrote:

 Hello all,
 
 I have a web.xml (attached) that works fine if I remove the error-page
 directive, but gives a
 
 Exception initializing TldLocationsCache: XML parsing error on file
 /WEB-INF/web.xml: (line 72, col 11): The content of element type
 web-app must match
 (icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*).
 
 message when the indicated (java.lang.ClassNotFoundException) is
 encountered. I checked docs and books, but I can't find anything wrong
 with the web.xml. The template web.xml I used is the one from the
 struts 1.2.4 package.
 
 Could anyone please tell me what is wrong with this deployment descriptor?
 
 Thank you very much in advance for any input,
 
 Ian.
 

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



Re: error-page directive

2005-03-01 Thread Ian van der Neut
On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut [EMAIL PROTECTED] wrote:
 On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski
 [EMAIL PROTECTED] wrote:
  Hi,
 
  Have you tried to move your the error-page directive to between the
  welcome-file-list and taglib directives. Seem to remember this
  happening to me some time ago as well.
 
 That seems to get rid of the message, but it doesn't seem to honour
 the directive, because I still get tomcats default exception
 stacktrace page.

The fact that it is not honoured seems to be because of a problem in
the apperror.jsp file. Moving the error-page directive before the
taglib directive solves the problem indeed.

Just curious, does order matter in web.xml? If so, where is this
documented? Or is this just a bug?

Thank you very much,

Ian.

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



Re: error-page directive

2005-03-01 Thread Trond G. Ziarkowski
Hi,
the order does matter, and the order is specified in the dtd that you 
are using for your webapp.

Trond
Ian van der Neut wrote:
On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut [EMAIL PROTECTED] wrote:
 

On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski
[EMAIL PROTECTED] wrote:
   

Hi,
Have you tried to move your the error-page directive to between the
welcome-file-list and taglib directives. Seem to remember this
happening to me some time ago as well.
 

That seems to get rid of the message, but it doesn't seem to honour
the directive, because I still get tomcats default exception
stacktrace page.
   

The fact that it is not honoured seems to be because of a problem in
the apperror.jsp file. Moving the error-page directive before the
taglib directive solves the problem indeed.
Just curious, does order matter in web.xml? If so, where is this
documented? Or is this just a bug?
Thank you very much,
Ian.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


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


Re: error-page directive

2005-03-01 Thread David Smith
The order matters.  It's a requirement that comes from validating the 
web.xml against a DTD -- not anything that Tomcat itself requires.  In 
the servlet 2.4 spec, they moved to valdating against a schema so order 
no longer matters.

--David
Ian van der Neut wrote:
On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut [EMAIL PROTECTED] wrote:
 

On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski
[EMAIL PROTECTED] wrote:
   

Hi,
Have you tried to move your the error-page directive to between the
welcome-file-list and taglib directives. Seem to remember this
happening to me some time ago as well.
 

That seems to get rid of the message, but it doesn't seem to honour
the directive, because I still get tomcats default exception
stacktrace page.
   

The fact that it is not honoured seems to be because of a problem in
the apperror.jsp file. Moving the error-page directive before the
taglib directive solves the problem indeed.
Just curious, does order matter in web.xml? If so, where is this
documented? Or is this just a bug?
Thank you very much,
Ian.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


RE: error-page directive

2005-03-01 Thread Graba, Jan
Hi, again.

I don't really think it makes any difference to this application, but I'm using 
J2SE, not J2EE. Though I am, of course, using a
web.xml file for my web application, nothing in this file need reference the 
error page. At least, that was the case with version
2.3 of the servlet API under Tomcat 4.1, since the error page worked 
faultlessly under that. Is 2.4 more restrictive? Is an
error-page tag now mandatory? Is this change documented? Since I currently have 
only servlet and servlet-mapping tags in my
web.xml, can I simply place the tag where I wish?

Sorry for the proliferation of fairly trivial questions.

Thanks in anticipation.

Cheers.
Jan

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: 01 March 2005 13:27
To: Tomcat Users List
Subject: Re: error-page directive


The order matters.  It's a requirement that comes from validating the 
web.xml against a DTD -- not anything that Tomcat itself requires.  In 
the servlet 2.4 spec, they moved to valdating against a schema so order 
no longer matters.

--David

Ian van der Neut wrote:

On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut [EMAIL PROTECTED] 
wrote:
  

On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski 
[EMAIL PROTECTED] wrote:


Hi,

Have you tried to move your the error-page directive to between the 
welcome-file-list and taglib directives. Seem to remember this 
happening to me some time ago as well.
  

That seems to get rid of the message, but it doesn't seem to honour 
the directive, because I still get tomcats default exception 
stacktrace page.



The fact that it is not honoured seems to be because of a problem in 
the apperror.jsp file. Moving the error-page directive before the 
taglib directive solves the problem indeed.

Just curious, does order matter in web.xml? If so, where is this 
documented? Or is this just a bug?

Thank you very much,

Ian.

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

  


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


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



Re: error-page directive

2005-03-01 Thread David Smith
For good docs, I've found the servlet spec an excellent place to start.  
As a foot note though, Tomcat seems switches between servlet spec 2.3 
and 2.4 depending on how the web-app node is defined in web.xml.  If you 
declare it against the 2.3 DTD, the 2.3 spec is used.  If you use the 
2.4 schema, 2.4 spec is adhered to.  See the spec for how each is 
declared in web.xml.

Servlet spec 2.3: http://www.jcp.org/en/jsr/detail?id=53
Servlet spec 2.4: http://www.jcp.org/en/jsr/detail?id=154
--David
Graba, Jan wrote:
Hi, again.
I don't really think it makes any difference to this application, but I'm using 
J2SE, not J2EE. Though I am, of course, using a
web.xml file for my web application, nothing in this file need reference the 
error page. At least, that was the case with version
2.3 of the servlet API under Tomcat 4.1, since the error page worked 
faultlessly under that. Is 2.4 more restrictive? Is an
error-page tag now mandatory? Is this change documented? Since I currently have 
only servlet and servlet-mapping tags in my
web.xml, can I simply place the tag where I wish?
Sorry for the proliferation of fairly trivial questions.
Thanks in anticipation.
Cheers.
Jan
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: 01 March 2005 13:27
To: Tomcat Users List
Subject: Re: error-page directive

The order matters.  It's a requirement that comes from validating the 
web.xml against a DTD -- not anything that Tomcat itself requires.  In 
the servlet 2.4 spec, they moved to valdating against a schema so order 
no longer matters.

--David
Ian van der Neut wrote:
 

On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut [EMAIL PROTECTED] 
wrote:

   

On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski 
[EMAIL PROTECTED] wrote:
  

 

Hi,
Have you tried to move your the error-page directive to between the 
welcome-file-list and taglib directives. Seem to remember this 
happening to me some time ago as well.


   

That seems to get rid of the message, but it doesn't seem to honour 
the directive, because I still get tomcats default exception 
stacktrace page.
  

 

The fact that it is not honoured seems to be because of a problem in 
the apperror.jsp file. Moving the error-page directive before the 
taglib directive solves the problem indeed.

Just curious, does order matter in web.xml? If so, where is this 
documented? Or is this just a bug?

Thank you very much,
Ian.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

   

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

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


Trying to understand exceptions and error-page

2005-02-25 Thread Wendy Smoak
With nothing configured for errors, I get a Tomcat error page:

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
javax.servlet.ServletException: org.xml.sax.SAXParseException: blah, blah...
...
root cause
com.example.DAOException: org.xml.sax.SAXParseException: blah, blah...
...
Caused by: org.xml.sax.SAXParseException: blah, blah...

The code that causes it looks like this:

 try {
  ...
 } catch ( Exception ex ) {
 throw new DAOException( ex );
 }

Can someone explain why, if I put this in web.xml,

  error-page
  exception-typejavax.servlet.ServletException/exception-type
  location/WEB-INF/jsp/error/exception.jsp/location
   /error-page

it does NOT display the .jsp and instead shows the same thing as above with
all the stack traces?

I also tried configuring it for java.lang.Exception, but no luck there,
either.

I _can_ get a good error page if I configure it for the 'root cause'
DAOException, I'm just confused as to why I can't trap the ServletException.

Thank you,
Wendy Smoak
http://wiki.wendysmoak.com/cgi-bin/wiki.pl?TomcatErrorPage


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



RE: Trying to understand exceptions and error-page

2005-02-25 Thread Mike Curwen
Part of the spec says if no error-page declaration containing an
exception-type fits using the class-heirarchy match, and the exception
thrown is a ServletException or subclass thereof, the container extracts the
wrapped exception...
 
So supposing for a minute that Tomcat internals ignore any error-page that
has exception-type 'ServletException', it would then proceed to unwrap the
exception to get down to your DAOException. Which you've already proved that
you *can* catch.
 
 
I've successfully caught 'all other' exceptions (which I suppose must
include ServletExceptions), by using one error-page declaration that catches
status-code500/status-code, and then multiple exception-type's to
catch more specific exception types.

This is all on TC5.0.28 (TC4.x seemed a bit flakey on exceptions and
errorpages, but that could have been PEBKAC)



 -Original Message-
 From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
 Sent: Friday, February 25, 2005 11:27 AM
 To: Tomcat Users List
 Subject: Trying to understand exceptions and error-page
 
 
 With nothing configured for errors, I get a Tomcat error page:
 
 HTTP Status 500 -
 type Exception report
 message
 description The server encountered an internal error () that 
 prevented it from fulfilling this request. exception
 javax.servlet.ServletException: 
 org.xml.sax.SAXParseException: blah, blah... ... root cause
 com.example.DAOException: org.xml.sax.SAXParseException: 
 blah, blah... ... Caused by: org.xml.sax.SAXParseException: 
 blah, blah...
 
 The code that causes it looks like this:
 
  try {
   ...
  } catch ( Exception ex ) {
  throw new DAOException( ex );
  }
 
 Can someone explain why, if I put this in web.xml,
 
   error-page
   exception-typejavax.servlet.ServletException/exception-type
   location/WEB-INF/jsp/error/exception.jsp/location
/error-page
 
 it does NOT display the .jsp and instead shows the same thing 
 as above with all the stack traces?
 
 I also tried configuring it for java.lang.Exception, but no 
 luck there, either.
 
 I _can_ get a good error page if I configure it for the 'root 
 cause' DAOException, I'm just confused as to why I can't trap 
 the ServletException.
 
 Thank you,
 Wendy Smoak http://wiki.wendysmoak.com/cgi-bin/wiki.pl?TomcatErrorPage
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Trying to understand exceptions and error-page

2005-02-25 Thread Wendy Smoak
From: Mike Curwen [EMAIL PROTECTED]
 I've successfully caught 'all other' exceptions (which I suppose must
 include ServletExceptions), by using one error-page declaration that
catches
 status-code500/status-code, and then multiple exception-type's to
 catch more specific exception types.

Thanks, that's a great idea. :) I didn't think of using both
exception-type and status-code.

Actually most of my 'regular' exceptions are configured in
struts-config.xml, but I've been unsuccessful in catching the really
horribly bad ones, and I'd rather not show stack traces if I can avoid it.

-- 
Wendy Smoak



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



Re: Programmatically call the error page for a 500 error

2005-02-19 Thread Tim Funk
Try tomcat 5.5.7 and see if you get the same result.
-Tim
Chris Hyzer wrote:
Hello,
This works in Tomcat 4, but not 5 (5.0.25)
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
RequestDispatcher dispatcher =
request.getRequestDispatcher(somePage);
dispatcher.forward(request, response);
I would like to set a 500 error code, and call
different pages in different circumstances.  Right now
it calls the default Tomcat 500 page.  If I add an
error page in the web.xml it will call that.  But I
need to programmatically decide, so I can have a 500
error go to various JSPs that communicate the problem.
Any ideas?
Thanks,
Chris
ps. I tried an error page that was just text, so the
error page is not triggering an error I believe... the
same code works fine in tomcat 4 (.1.28 I think)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: Programmatically call the error page for a 500 error

2005-02-19 Thread Rick Wong
Even if Tomcat 5 works this way, you are counting on a container 
specific implementation behavior that may be changed in future version.

Why not do it with a standard servlet approach?  You can specify an 
error handler in web.xml to handle different exception classes.

error-page
exception-typeorg.my.Exception1/exception-type
location/handler/case1.jsp/location
/error-page
error-page
exception-typeorg.my.Exception2/exception-type
location/handler/case2.jsp/location
/error-page
error-page
exception-typeorg.my.Exception3/exception-type
location/handler/case3.jsp/location
/error-page
You application would raise the corresponding exception to trigger the 
handler page you want to display.  Or you can create a single custom 
exception with embedded information to a single error handler page that 
knows how to render different error report depending on the embedded 
information in the exception.  Note that inside the error page, you can 
get back the Exception object you raised.  So you have all the 
information you need to render the page properly.

That would guarantee to work in all Servlet 2.4 web containers.
Thanks,
--
Rick
Chris Hyzer wrote:
Hello,
This works in Tomcat 4, but not 5 (5.0.25)
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
RequestDispatcher dispatcher =
request.getRequestDispatcher(somePage);
dispatcher.forward(request, response);
I would like to set a 500 error code, and call
different pages in different circumstances.  Right now
it calls the default Tomcat 500 page.  If I add an
error page in the web.xml it will call that.  But I
need to programmatically decide, so I can have a 500
error go to various JSPs that communicate the problem.
Any ideas?
Thanks,
Chris
ps. I tried an error page that was just text, so the
error page is not triggering an error I believe... the
same code works fine in tomcat 4 (.1.28 I think)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 2/14/2005
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Re: Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Re: Re: Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Re: Re: Re: Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Programmatically call the error page for a 500 error

2005-02-19 Thread webmaster
it's time to go...



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



Programmatically call the error page for a 500 error

2005-02-18 Thread Chris Hyzer
Hello,

This works in Tomcat 4, but not 5 (5.0.25)


response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

RequestDispatcher dispatcher =
request.getRequestDispatcher(somePage);

dispatcher.forward(request, response);


I would like to set a 500 error code, and call
different pages in different circumstances.  Right now
it calls the default Tomcat 500 page.  If I add an
error page in the web.xml it will call that.  But I
need to programmatically decide, so I can have a 500
error go to various JSPs that communicate the problem.

Any ideas?
Thanks,

Chris

ps. I tried an error page that was just text, so the
error page is not triggering an error I believe... the
same code works fine in tomcat 4 (.1.28 I think)

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



How to make my error page in the case of BASIC JDBC realm

2005-02-02 Thread joby.joseph1

Hi,

I am using Tomcat 5.x. I am using BASIC JDBC Realm. I want to make my
own error page as the error page in the case of HTTP Status 401 error.

This error comes when I click on Cancel button when the realm asks for
user name and password.



Any one knowing this stuff, kindly reply.

Thanks in advance.

Joby Joseph.







Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

tomcat error page

2004-12-29 Thread alis asma alias
When there is an error in our web application, Tomcat
will produce and error page that list down all the
Exception stack trace and also THe version of the
Apache Tomcat. To avoid displaying the default error
page and to customize the error page, where should we
configure it? 



__ 
Do you Yahoo!? 
Send holiday email and support a worthy cause. Do good. 
http://celebrity.mail.yahoo.com

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



Re: tomcat error page

2004-12-29 Thread Ben Souther
On Wed, 2004-12-29 at 21:33, alis asma alias wrote:
 When there is an error in our web application, Tomcat
 will produce and error page that list down all the
 Exception stack trace and also THe version of the
 Apache Tomcat. To avoid displaying the default error
 page and to customize the error page, where should we
 configure it? 
 
In your app's web.xml file, just after the welcome-file list.
Example:

  error-page
error-code404/error-code
location/404-error.jsp/location
  /error-page



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



error page and buffering - tomcat bug?

2004-12-25 Thread Denis Navitaniuk
Hi all!
My env is:
sun_jdk142_04 + JBoss323 + Tomcat 4.1.29
I have the chain of 4 included pages a1.jsp includes a2.jsp, a2.jsp 
includes a3.jsp etc...
each include looks like:
a1:
some html/scriptlet code here/
jsp:include page=a2.jsp  flush=false/
some html/scriptlet code here/

at the start of each jsp I wrote
%@ page buffer=2048kb% // much more than I need
%@ page autoFlush=false %
the last jsp at the end throws an exception - and I receive the 
following content::
a lot of html code
my error.jsp page

Tried to setup buffer size for web.xml to 2MB
for DefaultServlet
   servlet
   servlet-namedefault/servlet-name
   servlet-class
 org.apache.catalina.servlets.DefaultServlet
   /servlet-class
   init-param
   param-namedebug/param-name
   param-value0/param-value
   /init-param
   init-param
   param-nameoutput/param-name
   param-value2097152/param-value
   /init-param
   init-param
   param-namelistings/param-name
   param-valuefalse/param-value
   /init-param
   load-on-startup1/load-on-startup
   /servlet
No luck - still receiving alot of html code before error.jsp.
Any thoughts/suggestions?


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


RE: error-page not working properly

2004-12-13 Thread Shapira, Yoav

Hi,
It works fine for me.  You might be having other errors which are
clouding this problem.

By the way, error pages like this are part of the Spec, and as such
covered both by our internal tests and the Servlet/JSP TCKs which are
run independently on every Tomcat release.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Chris Cherrett [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 12, 2004 8:23 AM
To: Tomcat Users List
Subject: error-page not working properly

Hello

I have searched this topic on google to find the following to be true:

catching 500 or 404 error does not work in Tomcat 5 like this

error-page
  exception-type500/exception-type
  location/error.jsp/location
  /error-page
error-page
  exception-type404/exception-type
  location/error.jsp/location
  /error-page

Is this true?

This works for 500 but not 404.

error-page
  exception-typejava.lang.Throwable/exception-type
  location/error.jsp/location
  /error-page

Is there a way to catch all exceptions that works in Tomcat 5

Thanks
--
Chris Cherrett
Tracking Solutions International
1-877-TSIWARE
www.tsiware.com

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




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


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



RE: error-page not working properly

2004-12-13 Thread Mike Curwen
As written by you, it's true.

for HTTP error codes, you need error-code, not exception-type

error-page
error-code404/error-code
location/error/404.jsp/location
/error-page

That's a snip from our (working) web.xml in TC5.0.29


 -Original Message-
 From: Chris Cherrett [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, December 12, 2004 7:23 AM
 To: Tomcat Users List
 Subject: error-page not working properly
 
 
 Hello
 
 I have searched this topic on google to find the following to be true:
 
 catching 500 or 404 error does not work in Tomcat 5 like this
 
 error-page
   exception-type500/exception-type
   location/error.jsp/location
   /error-page
 error-page
   exception-type404/exception-type
   location/error.jsp/location
   /error-page
 
 Is this true?
 
 This works for 500 but not 404.
 
 error-page
   exception-typejava.lang.Throwable/exception-type
   location/error.jsp/location
   /error-page
 
 Is there a way to catch all exceptions that works in Tomcat 5
 
 Thanks
 -- 
 Chris Cherrett
 Tracking Solutions International
 1-877-TSIWARE
 www.tsiware.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: error-page not working properly

2004-12-13 Thread Steve Kirk


 -Original Message-
 From: Chris Cherrett [mailto:[EMAIL PROTECTED] 
 
 Is there a way to catch all exceptions that works in Tomcat 5

You can catch all Exceptions/Throwables and their subclasses by configuring
java.lang.Exception or java.lang.Throwable in the error-type tag.  However
there is no corresponding wildcard to catch more than one error-code at a
time, so you have to config each code separately.



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


Re: error-page not working properly

2004-12-13 Thread Chris Cherrett
Seems that I have preformed an ID10T error!

Thanks for the help

error-code != exception-type


Thanks for the help

On December 13, 2004 01:13 pm, Steve Kirk wrote:
  -Original Message-
  From: Chris Cherrett [mailto:[EMAIL PROTECTED]
 
  Is there a way to catch all exceptions that works in Tomcat 5

 You can catch all Exceptions/Throwables and their subclasses by configuring
 java.lang.Exception or java.lang.Throwable in the error-type tag. 
 However there is no corresponding wildcard to catch more than one
 error-code at a time, so you have to config each code separately.



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

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


error-page not working properly

2004-12-12 Thread Chris Cherrett
Hello

I have searched this topic on google to find the following to be true:

catching 500 or 404 error does not work in Tomcat 5 like this

error-page
  exception-type500/exception-type
  location/error.jsp/location
  /error-page
error-page
  exception-type404/exception-type
  location/error.jsp/location
  /error-page

Is this true?

This works for 500 but not 404.

error-page
  exception-typejava.lang.Throwable/exception-type
  location/error.jsp/location
  /error-page

Is there a way to catch all exceptions that works in Tomcat 5

Thanks
-- 
Chris Cherrett
Tracking Solutions International
1-877-TSIWARE
www.tsiware.com

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



Re: Return Custom Error Page from Realm

2004-10-30 Thread Tim Funk
Not really. The archives have a similar discussion.
-Tim
Anderson, M. Paul wrote:
I've created a derived realm that performs a custom authentication scheme.  I'd like to be return a custom error page when the user has attempted to login to the system  3 times and failed.  The user will be locked out until a sys admin allows them back in.  Since I'm obviously doing the authentication in the Realm I'd also like to return the error page from the realm.  Is there a way to do this?
 
Thanks!

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


Return Custom Error Page from Realm

2004-10-29 Thread Anderson, M. Paul
I've created a derived realm that performs a custom authentication scheme.  I'd like 
to be return a custom error page when the user has attempted to login to the system  
3 times and failed.  The user will be locked out until a sys admin allows them back 
in.  Since I'm obviously doing the authentication in the Realm I'd also like to return 
the error page from the realm.  Is there a way to do this?
 
Thanks!


Re: Customizing Tomcat error page

2004-10-16 Thread Lukas Bradley
Unfortunately, the exception-type does not catch return code.  I 
already have one exception-typejava.lang.Exception/exception-type 
which is a good umbrella for all exception an alike.  However, it does 
not catch 404, for example.  
Try this in your web.xml
error-page
error-code400/error-code
location/400.jsp/location
/error-page 
401 and 403 are trickier, but this should solve most your your needs.
Lukas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Customizing Tomcat error page

2004-10-15 Thread Shapira, Yoav

Hi,
You can use exception-type to catch a broad class of exceptions (such
as java.lang.Exception for example ;)  Or maybe
javax.servlet.ServletException).  If you use the error-code approach,
you have to list them individually, which you're right is verbose and
time-consuming.  There might be a visual web.xml editor out there that
can help you.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Rick Wong [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 8:43 PM
To: Tomcat Users List
Subject: Customizing Tomcat error page

Hi,

I am trying to replace the default Tomcat error page for my web
applications.  I understand that I can specify error-page in the
web.xml deployment descriptor, but that would require me to do that for
every single error code.  Looking at the HTTP response code, there is a
potentially long list of code that I might be interested in handling.

Is there a simple way to trap these errors and redirect to my specific
error page?

Thanks,
--
Rick

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Customizing Tomcat error page

2004-10-15 Thread Rick Wong
Unfortunately, the exception-type does not catch return code.  I 
already have one exception-typejava.lang.Exception/exception-type 
which is a good umbrella for all exception an alike.  However, it does 
not catch 404, for example.  It seems like Tomcat catches it and handles 
it separately.  Due to the modula nature of my application, I have  40 
web applications.  I really don't look forward to managing a long list 
of error-page for each error code in 40+ web.xml files.

I wonder if I can use a filter to catch the setting of a status code  
200 and does a page forward there 

--
Rick
Shapira, Yoav wrote:
Hi,
You can use exception-type to catch a broad class of exceptions (such
as java.lang.Exception for example ;)  Or maybe
javax.servlet.ServletException).  If you use the error-code approach,
you have to list them individually, which you're right is verbose and
time-consuming.  There might be a visual web.xml editor out there that
can help you.
Yoav Shapira http://www.yoavshapira.com
 

-Original Message-
From: Rick Wong [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 8:43 PM
To: Tomcat Users List
Subject: Customizing Tomcat error page
Hi,
I am trying to replace the default Tomcat error page for my web
applications.  I understand that I can specify error-page in the
web.xml deployment descriptor, but that would require me to do that for
every single error code.  Looking at the HTTP response code, there is a
potentially long list of code that I might be interested in handling.
Is there a simple way to trap these errors and redirect to my specific
error page?
Thanks,
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


RE: Customizing Tomcat error page

2004-10-15 Thread Shapira, Yoav

Hi,


Unfortunately, the exception-type does not catch return code.  I

I didn't say it does ;)  I was just offering an alternative, and it
looks like you'd already taken advantage of it, so that's a good thing.

web applications.  I really don't look forward to managing a long list
of error-page for each error code in 40+ web.xml files.

Higher maintenance is always nearly a cost associated with higher
modularity.  One might also have N build files, N war files, etc for N
modules.

I wonder if I can use a filter to catch the setting of a status code 
200 and does a page forward there 

You could, and then you can use whatever rules (regex, etc.) to decide
on the error page.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Problem with web.xml error-page not invoking servlet filter

2004-10-14 Thread Shapira, Yoav

Hi,
I think this is according to the spec.  It took us a while to sort this
out, and several consultations with the JSP Spec leads.  It's related to
those new filter mapping types defined in Spec version 2.4.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Rick Wong [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 8:14 PM
To: Tomcat Users List
Subject: Problem with web.xml error-page not invoking servlet filter

Hi,

I am using Tomcat 5.  In my application, my web.xml declares a
filter,
and a global error page

error-page
exception-typejava.lang.Exception/exception-type
location/error.jsp/location
/error-page

By examining the call stack in my error page JSP, I notice that when
this error page is invoked, my filter is not called.  However, if I
define %@ page errorPage=/error.jsp % in my JSP file, my filter
is
invoked (and as a part of the call stack).

Is this a Tomcat bug?  Or does this behavior conform with the Servlet
2.4 spec?

Thanks,
--
Rick

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Problem with web.xml error-page not invoking servlet filter

2004-10-14 Thread Rick Wong
Thank you very much.  I re-read the servlet 2.4 spec, and it works after 
I added the following to my filter:

   filter-mapping
   filter-nameChannelFilter/filter-name
   url-pattern/*/url-pattern
   dispatcherREQUEST/dispatcher
   dispatcherERROR/dispatcher
   /filter-mapping
--
Rick
Shapira, Yoav wrote:
Hi,
I think this is according to the spec.  It took us a while to sort this
out, and several consultations with the JSP Spec leads.  It's related to
those new filter mapping types defined in Spec version 2.4.
Yoav Shapira http://www.yoavshapira.com
 

-Original Message-
From: Rick Wong [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 8:14 PM
To: Tomcat Users List
Subject: Problem with web.xml error-page not invoking servlet filter
Hi,
I am using Tomcat 5.  In my application, my web.xml declares a
   

filter,
 

and a global error page
error-page
  exception-typejava.lang.Exception/exception-type
  location/error.jsp/location
/error-page
By examining the call stack in my error page JSP, I notice that when
this error page is invoked, my filter is not called.  However, if I
define %@ page errorPage=/error.jsp % in my JSP file, my filter
   

is
 

invoked (and as a part of the call stack).
Is this a Tomcat bug?  Or does this behavior conform with the Servlet
2.4 spec?
Thanks,
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


RE: Problem with web.xml error-page not invoking servlet filter

2004-10-14 Thread Shapira, Yoav

Hi,
Ahh, good.  We spent a ton of time on this issue a while ago, when 2.4
was finalized and it wasn't exactly clear how these should be
implemented.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Rick Wong [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 3:57 PM
To: Tomcat Users List
Subject: Re: Problem with web.xml error-page not invoking servlet
filter

Thank you very much.  I re-read the servlet 2.4 spec, and it works
after
I added the following to my filter:

filter-mapping
filter-nameChannelFilter/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
dispatcherERROR/dispatcher
/filter-mapping

--
Rick

Shapira, Yoav wrote:

Hi,
I think this is according to the spec.  It took us a while to sort
this
out, and several consultations with the JSP Spec leads.  It's related
to
those new filter mapping types defined in Spec version 2.4.

Yoav Shapira http://www.yoavshapira.com




-Original Message-
From: Rick Wong [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 13, 2004 8:14 PM
To: Tomcat Users List
Subject: Problem with web.xml error-page not invoking servlet
filter

Hi,

I am using Tomcat 5.  In my application, my web.xml declares a


filter,


and a global error page

error-page
   exception-typejava.lang.Exception/exception-type
   location/error.jsp/location
/error-page

By examining the call stack in my error page JSP, I notice that when
this error page is invoked, my filter is not called.  However, if I
define %@ page errorPage=/error.jsp % in my JSP file, my filter


is


invoked (and as a part of the call stack).

Is this a Tomcat bug?  Or does this behavior conform with the Servlet
2.4 spec?

Thanks,
--
Rick

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






This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended
recipient, please immediately delete this e-mail from your computer
system
and notify the sender.  Thank you.


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




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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Customizing Tomcat error page

2004-10-14 Thread Rick Wong
Hi,
I am trying to replace the default Tomcat error page for my web 
applications.  I understand that I can specify error-page in the 
web.xml deployment descriptor, but that would require me to do that for 
every single error code.  Looking at the HTTP response code, there is a 
potentially long list of code that I might be interested in handling.

Is there a simple way to trap these errors and redirect to my specific 
error page?

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


Problem with web.xml error-page not invoking servlet filter

2004-10-13 Thread Rick Wong
Hi,
I am using Tomcat 5.  In my application, my web.xml declares a filter, 
and a global error page

error-page
   exception-typejava.lang.Exception/exception-type
   location/error.jsp/location
/error-page
By examining the call stack in my error page JSP, I notice that when 
this error page is invoked, my filter is not called.  However, if I 
define %@ page errorPage=/error.jsp % in my JSP file, my filter is 
invoked (and as a part of the call stack).

Is this a Tomcat bug?  Or does this behavior conform with the Servlet 
2.4 spec?

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


Re: error-page exception-type

2004-10-12 Thread François Richard
I have a beginning of answer, the guilty could be Internet Explorer 6.0 ...
The redirection works fine with Firefox and mozilla.
Anyone no why ? Anyone have this working on IE6 ?
Streve 
1) In my case the problem is the same with the redirection error-code, 
like :
   error-page
   error-code404/error-code
   location/pagesErreur/404.jsp/location
   /error-page
2) yes, same problem ...

Steve Kirk wrote:
I've had similar problems myself (not fully answered yet).  Here's a couple
of issues that I found:
1. Check the exception messages / stack traces in your browser and logfiles
carefully to make sure that droit.jsp is not itself throwing a second
exception when trying to display the DroitsException that called it.
2. does droits.jsp contain this line?
   [EMAIL PROTECTED] isErrorPage=true%
 

-Original Message-
From: François Richard [mailto:[EMAIL PROTECTED] 
Sent: Monday 04 October 2004 13:53
To: [EMAIL PROTECTED]
Subject: error-page exception-type

Hi,
I'm blocked since this morning with an annoying problem on 
Tomcat (5.27 
and 5.28). Impossible to redirect users with the error-page 
tag on jsp 
and html files. I'm using that on the web.xml :
   error-page
   
exception-typecom.sofice.commun.securite.DroitsException/exception-typelocation/pagesError/droits.jsp/location
   /error-page

The jsp are well-compiled but the broswer display an error 
message (HTTP 
500). The start of the DroitsException (jsp, servlet ...) is 
unimportant 
the problem is the same.
Notice that the redirection works fine with servlet and 'directory 
listing' :
   error-page
   
exception-typecom.sofice.commun.securite.DroitsException/exception-typelocation/servlet/test/location
   /error-page
   error-page
exception-typecom.sofice.commun.securite.DroitsException/exception-typelocation/pagesError//location
   /error-page

Many thanks for your answer.
   

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


Re: error-page exception-type

2004-10-12 Thread Markus Schönhaber
François Richard wrote:
I have a beginning of answer, the guilty could be Internet Explorer 6.0 ...
The redirection works fine with Firefox and mozilla.
Anyone no why ? Anyone have this working on IE6 ?
Does redirection really not happen or is the error page simply not shown
by IE? IE ignores the page content sent by the server and display it's
own error page, if the HTTP status-code isn't 2xx and Internet Settings
/ Advanced / Show short HTTP error messages is selected (I'm not sure
whether the name of the option is exactly right, since I don't use an
English windows - but you'll get the point, I hope).
Streve 
1) In my case the problem is the same with the redirection error-code, 
like :
   error-page
   error-code404/error-code
   location/pagesErreur/404.jsp/location
   /error-page
2) yes, same problem ...

Steve Kirk wrote:
I've had similar problems myself (not fully answered yet).  Here's a 
couple
of issues that I found:

1. Check the exception messages / stack traces in your browser and 
logfiles
carefully to make sure that droit.jsp is not itself throwing a second
exception when trying to display the DroitsException that called it.

2. does droits.jsp contain this line?
   [EMAIL PROTECTED] isErrorPage=true%
 

-Original Message-
From: François Richard [mailto:[EMAIL PROTECTED] Sent: Monday 04 
October 2004 13:53
To: [EMAIL PROTECTED]
Subject: error-page exception-type

Hi,
I'm blocked since this morning with an annoying problem on Tomcat 
(5.27 and 5.28). Impossible to redirect users with the error-page tag 
on jsp and html files. I'm using that on the web.xml :
   error-page
   
exception-typecom.sofice.commun.securite.DroitsException/exception-type
location/pagesError/droits.jsp/location
   /error-page

The jsp are well-compiled but the broswer display an error message 
(HTTP 500). The start of the DroitsException (jsp, servlet ...) is 
unimportant the problem is the same.
Notice that the redirection works fine with servlet and 'directory 
listing' :
   error-page
   
exception-typecom.sofice.commun.securite.DroitsException/exception-type
location/servlet/test/location
   /error-page
   error-page
exception-typecom.sofice.commun.securite.DroitsException/exception-type
location/pagesError//location
   /error-page

Many thanks for your answer.
  

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


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


RE: error-page exception-type

2004-10-12 Thread Steve Kirk

That reminds me.

I remember reading a few days ago on this list that IE ignores pages that
are shorter than 512 bytes in length.

 -Original Message-
 From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 12 October 2004 15:47
 To: Tomcat Users List
 Subject: Re: error-page exception-type
 
 
 François Richard wrote:
  I have a beginning of answer,
 theguiltycouldbeInternetExplorer6.0...
  The redirection works fine with Firefox and mozilla.
  
  Anyone no why ? Anyone have this working on IE6 ?
  
 
 Does redirection really not happen or is the error page 
 simply not shown
 by IE? IE ignores the page content sent by the server and display it's
 own error page, if the HTTP status-code isn't 2xx and 
 Internet Settings
 / Advanced / Show short HTTP error messages is selected (I'm not sure
 whether the name of the option is exactly right, since I don't use an
 English windows - but you'll get the point, I hope).
 
  Streve 
  1) In my case the problem is the same with the redirection 
 error-code, 
  like :
 error-page
 error-code404/error-code
 location/pagesErreur/404.jsp/location
 /error-page
  2) yes, same problem ...
  
  Steve Kirk wrote:
  
  I've had similar problems myself (not fully answered yet). 
  Here's a 
  couple
  of issues that I found:
 
  1. Check the exception messages / stack traces in your browser and 
  logfiles
  carefully to make sure that droit.jsp is not itself 
 throwing a second
  exception when trying to display the DroitsException that 
 called it.
 
  2. does droits.jsp contain this line?
 [EMAIL PROTECTED] isErrorPage=true%
 
 
   
 
  -Original Message-
  From: François Richard [mailto:[EMAIL PROTECTED] Sent: 
 Monday 04 
  October 2004 13:53
  To: [EMAIL PROTECTED]
  Subject: error-page exception-type
 
 
  Hi,
  I'm blocked since this morning with an annoying problem on Tomcat 
  (5.27 and 5.28). Impossible to redirect users with the 
 error-page tag 
  on jsp and html files. I'm using that on the web.xml :
 error-page
 
  
 exception-typecom.sofice.commun.securite.DroitsException/ex
ception-type
  location/pagesError/droits.jsp/location
 /error-page
 
  The jsp are well-compiled but the broswer display an 
 error message 
  (HTTP 500). The start of the DroitsException (jsp, 
 servlet ...) is 
  unimportant the problem is the same.
  Notice that the redirection works fine with servlet and 
 'directory 
  listing' :
 error-page
 
  
 exception-typecom.sofice.commun.securite.DroitsException/ex
ception-type
  location/servlet/test/location
 /error-page
 error-page
  
 exception-typecom.sofice.commun.securite.DroitsException/ex
ception-type
  location/pagesError//location
 /error-page
 
  Many thanks for your answer.

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



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



Re: error-page exception-type

2004-10-12 Thread François Richard
YESS !!!
This is the answer of my problem ;-))
THX  A LOT !!!
Steve Kirk wrote:
That reminds me.
I remember reading a few days ago on this list that IE ignores pages that
are shorter than 512 bytes in length.
 

-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Sent: Tuesday 12 October 2004 15:47
To: Tomcat Users List
Subject: Re: error-page exception-type

François Richard wrote:
   

I have a beginning of answer,
 

theguiltycouldbeInternetExplorer6.0...
   

The redirection works fine with Firefox and mozilla.
Anyone no why ? Anyone have this working on IE6 ?
 

Does redirection really not happen or is the error page 
simply not shown
by IE? IE ignores the page content sent by the server and display it's
own error page, if the HTTP status-code isn't 2xx and 
Internet Settings
/ Advanced / Show short HTTP error messages is selected (I'm not sure
whether the name of the option is exactly right, since I don't use an
English windows - but you'll get the point, I hope).

   

Streve 
1) In my case the problem is the same with the redirection 
 

error-code, 
   

like :
  error-page
  error-code404/error-code
  location/pagesErreur/404.jsp/location
  /error-page
2) yes, same problem ...
Steve Kirk wrote:
 

I've had similar problems myself (not fully answered yet). 
   

Here's a 
   

couple
of issues that I found:
1. Check the exception messages / stack traces in your browser and 
logfiles
carefully to make sure that droit.jsp is not itself 
   

throwing a second
   

exception when trying to display the DroitsException that 
   

called it.
   

2. does droits.jsp contain this line?
  [EMAIL PROTECTED] isErrorPage=true%

   

-Original Message-
From: François Richard [mailto:[EMAIL PROTECTED] Sent: 
 

Monday 04 
   

October 2004 13:53
To: [EMAIL PROTECTED]
Subject: error-page exception-type
Hi,
I'm blocked since this morning with an annoying problem on Tomcat 
(5.27 and 5.28). Impossible to redirect users with the 
 

error-page tag 
   

on jsp and html files. I'm using that on the web.xml :
  error-page
  

 

exception-typecom.sofice.commun.securite.DroitsException/ex
   

ception-type
 

location/pagesError/droits.jsp/location
  /error-page
The jsp are well-compiled but the broswer display an 
 

error message 
   

(HTTP 500). The start of the DroitsException (jsp, 
 

servlet ...) is 
   

unimportant the problem is the same.
Notice that the redirection works fine with servlet and 
 

'directory 
   

listing' :
  error-page
  

 

exception-typecom.sofice.commun.securite.DroitsException/ex
   

ception-type
 

location/servlet/test/location
  /error-page
  error-page

 

exception-typecom.sofice.commun.securite.DroitsException/ex
   

ception-type
 

location/pagesError//location
  /error-page
Many thanks for your answer.
 
 

 

-
   

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

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


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

 

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


same error-page handles multiple error-codes ?

2004-10-08 Thread Steve Kirk

Does anyone know if there is a way to make a single error-page entry in
web.xml cover more than one error-code?

I have created a single error page which I would like to display whatever
the exception-type or error-code.  Catching all the exception-types in
one go is easy - I just use:

error-page
exception-typejava.lang.Throwable/exception-type
location/WEB-INF/jsp/Error.jsp/location
/error-page

However I can't see how to catch multiple error-codes.  I'm currently
listing them all separately but directing them all to the same page, but
this seems weak from the standpoint of maintenance and error avoidance:

error-page
error-code401/error-code
location/WEB-INF/jsp/Error.jsp/location
/error-page

error-page
error-code402/error-code
location/WEB-INF/jsp/Error.jsp/location
/error-page

error-page
error-code403/error-code
location/WEB-INF/jsp/Error.jsp/location
/error-page

etc.

I've searched the web, the docs I can think of, and the books that I have,
to no avail.  Any suggestions much appreciated.



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



RE: error-page exception-type

2004-10-07 Thread Steve Kirk

I've had similar problems myself (not fully answered yet).  Here's a couple
of issues that I found:

1. Check the exception messages / stack traces in your browser and logfiles
carefully to make sure that droit.jsp is not itself throwing a second
exception when trying to display the DroitsException that called it.

2. does droits.jsp contain this line?
[EMAIL PROTECTED] isErrorPage=true%


 -Original Message-
 From: François Richard [mailto:[EMAIL PROTECTED] 
 Sent: Monday 04 October 2004 13:53
 To: [EMAIL PROTECTED]
 Subject: error-page exception-type
 
 
 Hi,
 I'm blocked since this morning with an annoying problem on 
 Tomcat (5.27 
 and 5.28). Impossible to redirect users with the error-page 
 tag on jsp 
 and html files. I'm using that on the web.xml :
 error-page
 
 exception-typecom.sofice.commun.securite.DroitsException/ex
ception-type
 location/pagesError/droits.jsp/location
 /error-page
 
 The jsp are well-compiled but the broswer display an error 
 message (HTTP 
 500). The start of the DroitsException (jsp, servlet ...) is 
 unimportant 
 the problem is the same.
 Notice that the redirection works fine with servlet and 'directory 
 listing' :
 error-page
 
 exception-typecom.sofice.commun.securite.DroitsException/ex
ception-type
 location/servlet/test/location
 /error-page
 error-page
 
 exception-typecom.sofice.commun.securite.DroitsException/ex
ception-type
 location/pagesError//location
 /error-page
 
 Many thanks for your answer.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



error-page exception-type

2004-10-04 Thread François Richard
Hi,
I'm blocked since this morning with an annoying problem on Tomcat (5.27 
and 5.28). Impossible to redirect users with the error-page tag on jsp 
and html files. I'm using that on the web.xml :
   error-page
   
exception-typecom.sofice.commun.securite.DroitsException/exception-type
   location/pagesError/droits.jsp/location
   /error-page

The jsp are well-compiled but the broswer display an error message (HTTP 
500). The start of the DroitsException (jsp, servlet ...) is unimportant 
the problem is the same.
Notice that the redirection works fine with servlet and 'directory 
listing' :
   error-page
   
exception-typecom.sofice.commun.securite.DroitsException/exception-type
   location/servlet/test/location
   /error-page
   error-page
   
exception-typecom.sofice.commun.securite.DroitsException/exception-type
   location/pagesError//location
   /error-page

Many thanks for your answer.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


basic authentication and custom 401 error page

2004-09-24 Thread Angelov, Rossen
Hi,
We are running our applications on Tomcat 4 and 5. On both versions we are
having problems with the basic authentication.

The problem is that I haven't found a way to overwrite the default 401 error
page with a custom page.
If I add an error-page element in web.xml for error 401
error-page
error-code401/error-code
location/err401.html/location
/error-page
then the username/password window is completely ignored and the err401.html
page displayed.

I searched the archives and different forums but there are a lot of people
asking for help with similar problems without any responses.
I found two reported bugs related to that issue: 12194 and 22617 for tomcat
3 and 4

I didn't find any bugs for tomcat 5 but it still not working for me.

Any suggestions will be appreciated.

Thanks,
Ross


This communication is intended solely for the addressee and is
confidential and not for third party unauthorized distribution.



Re: basic authentication and custom 401 error page

2004-09-24 Thread Gaurav Vaish
Hi Ross,

  Simply adding an error page will not do. You need to have a servlet
that will set the status of the response-page as 403
(HttpServletResponse.SC_UNAUTHORIZED)

   Look at the code-implementation of Security-Filter. It's good.
   http://sf.net/projects/securityfilter


HTH

Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
-



On Fri, 24 Sep 2004 09:33:13 -0500, Angelov, Rossen
[EMAIL PROTECTED] wrote:
 Hi,
 We are running our applications on Tomcat 4 and 5. On both versions we are
 having problems with the basic authentication.
 
 The problem is that I haven't found a way to overwrite the default 401 error
 page with a custom page.
 If I add an error-page element in web.xml for error 401
error-page
error-code401/error-code
location/err401.html/location
/error-page
 then the username/password window is completely ignored and the err401.html
 page displayed.
 
 I searched the archives and different forums but there are a lot of people
 asking for help with similar problems without any responses.
 I found two reported bugs related to that issue: 12194 and 22617 for tomcat
 3 and 4
 
 I didn't find any bugs for tomcat 5 but it still not working for me.
 
 Any suggestions will be appreciated.
 
 Thanks,
 Ross
 
 This communication is intended solely for the addressee and is
 confidential and not for third party unauthorized distribution.
 


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



Re: Error page problem

2004-09-20 Thread Igor
Hello! 

 Is it possible to exclude certain servlets from error page mechanism?
 
 Thank you,
Igor

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



Re: Error page problem

2004-09-18 Thread Martin Schaefer
 May I ask you - how did you conclude that expection occurs on error page
 itself? I think, exception does not occur on error page.

It said so: Exception Processing ErrorPage[errorCode=500, 
location=/errorpage.jsp]

 But when error page is defined for context, Tomcat tries to send error page
 to client. Tomcat tries to reset the response, but it is not possible
 because Axis library tries to send response too. That is why
 IllegalStateException occurs.

Sounds like a good explanation to me.

 Sending error page (that is intended for ordinary servlets or jsp) does not
 make sense, because clients expect SOAP messages.
 Is it possible to remove certain servlets from error page mechanism? Error
 page does not make sense for web services.

Maybe separate the web services from user interface!? Different WARs...

Regards,
Martin

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



Error page problem

2004-09-17 Thread ukr.net
Hello!

Tomcat 5.0.24 is used. Context contains ordinary jsp and Axis library.

There is error page, defined in web.xml:

error-page
error-code500/error-code
location/errorpage.jsp/location
/error-page

Everething works fine, but when exception occurs in web services, the following 
records are writen to localhost_log:

2004-09-17 17:05:04 [EMAIL PROTECTED]: Exception Processing ErrorPage[errorCode=500, 
location=/errorpage.jsp]
java.lang.IllegalStateException
 at org.apache.coyote.Response.reset(Response.java:296)
 at org.apache.coyote.tomcat5.CoyoteResponse.reset(CoyoteResponse.java:631)
 at org.apache.coyote.tomcat5.CoyoteResponse.reset(CoyoteResponse.java:887)
 at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:389)
 at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:301)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:147)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
 at java.lang.Thread.run(Thread.java:534)

I do not want to see such records in log file. Is it possible to configure tomcat 
somehow in order to remove this logging?

Any help would be appreciated.

Thank you,
Igor

RE: Error page problem

2004-09-17 Thread Shapira, Yoav

Hi,
IllegalStateExceptions are serious enough that they shouldn't be ignored
by removing them from the logs.  You CAN configure tomcat's logging to
not log these, the directions are in the FAQ's section on logging, but
that's a terrible idea.  As is the general idea of removing exceptions
from your logs.

Instead, focus on finding the root cause for the exception and fixing
it.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: ukr.net [mailto:[EMAIL PROTECTED]
Sent: Friday, September 17, 2004 10:30 AM
To: [EMAIL PROTECTED]
Subject: Error page problem

Hello!

Tomcat 5.0.24 is used. Context contains ordinary jsp and Axis library.

There is error page, defined in web.xml:

error-page
error-code500/error-code
location/errorpage.jsp/location
/error-page

Everething works fine, but when exception occurs in web services, the
following records are writen to localhost_log:

2004-09-17 17:05:04 [EMAIL PROTECTED]:
Exception Processing ErrorPage[errorCode=500, location=/errorpage.jsp]
java.lang.IllegalStateException
 at org.apache.coyote.Response.reset(Response.java:296)
 at
org.apache.coyote.tomcat5.CoyoteResponse.reset(CoyoteResponse.java:631)
 at
org.apache.coyote.tomcat5.CoyoteResponse.reset(CoyoteResponse.java:887)
 at
org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.jav
a:38
9)
 at
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.jav
a:30
1)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:14
7)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
onte
xt.java:104)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:11
7)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
onte
xt.java:102)
 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:53
5)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
onte
xt.java:102)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav
a:109)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
onte
xt.java:104)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
 at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
93)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
ection(Http11Protocol.java:702)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
71)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
va:644)
 at java.lang.Thread.run(Thread.java:534)

I do not want to see such records in log file. Is it possible to
configure
tomcat somehow in order to remove this logging?

Any help would be appreciated.

Thank you,
Igor



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Error page problem

2004-09-17 Thread Martin_Schaefer

You probably focused on the rest of your application and didn't notice
that the exception occurs in the error page itself.

ukr.net [EMAIL PROTECTED] schrieb am 17.09.2004, 16:30:25:
 Hello!
 
 Tomcat 5.0.24 is used. Context contains ordinary jsp and Axis library.
 
 There is error page, defined in web.xml:
 
 
 500
 /errorpage.jsp
 
 
 Everething works fine, but when exception occurs in web services, the following 
 records are writen to localhost_log:
 
 2004-09-17 17:05:04 [EMAIL PROTECTED]: Exception Processing ErrorPage[errorCode=500, 
 location=/errorpage.jsp]
 java.lang.IllegalStateException
  at org.apache.coyote.Response.reset(Response.java:296)
  at org.apache.coyote.tomcat5.CoyoteResponse.reset(CoyoteResponse.java:631)
  at org.apache.coyote.tomcat5.CoyoteResponse.reset(CoyoteResponse.java:887)
  at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:389)
  at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:301)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:147)
  at 
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at 
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
  at 
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at 
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
  at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
  at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
  at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
  at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
  at java.lang.Thread.run(Thread.java:534)
 
 I do not want to see such records in log file. Is it possible to configure tomcat 
 somehow in order to remove this logging?
 
 Any help would be appreciated.
 
 Thank you,
 Igor
-- 
Martin Schaefer
NAXOS Software Solutions GmbH i.G.
Herrenstr. 1
69502 Hemsbach
Germany
 
Phone:+49 (0) 6201 49298-2
Mobile: +49 (0) 172 6269246
Fax: +49 (0) 6201 49298-1
Mail: [EMAIL PROTECTED]

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



Re: Error page problem

2004-09-17 Thread Igor
Hello!

 You probably focused on the rest of your application and didn't notice
 that the exception occurs in the error page itself.

Thank you for responses!

May I ask you - how did you conclude that expection occurs on error page
itself? I think, exception does not occur on error page.

I may be wrong, but I think, that the reason is the following:

To notify client of web service, that non standard situation occured, we
throw SOAPFaultException in web service. Axis library takes care of this
exception and client reseives response with 200 code status.

But when error page is defined for context, Tomcat tries to send error page
to client. Tomcat tries to reset the response, but it is not possible
because Axis library tries to send response too. That is why
IllegalStateException occurs.

Sending error page (that is intended for ordinary servlets or jsp) does not
make sense, because clients expect SOAP messages.

Is it possible to remove certain servlets from error page mechanism? Error
page does not make sense for web services.

Thank you,
Igor


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



Re: custom error page for 403

2004-09-03 Thread zhicheng wang
thanks

the config part in web.xml:
error-page
error-code404/error-code
location/errorPage.html/location
/error-page

error-page
error-code403/error-code
location/errorPage.html/location
/error-page

for 404, my errorpage.html is dispalyed
for 403, the following page is displayed.

thanks
cheng
=returned page-what is dispaled in the browser==
HTTP Status 403 - Access to the requested resource has
been denied



type Status report

message Access to the requested resource has been
denied

description Access to the specified resource (Access
to the requested resource has been denied) has been
forbidden.




Apache Tomcat/5.0.19


 --- QM [EMAIL PROTECTED] wrote: 
 On Thu, Sep 02, 2004 at 10:39:28AM +0100, zhicheng
 wang wrote:
 : can any one tell me how to config tomcat 5.0.25 to
 use
 : custom error 403 page? I can config it for 404,
 but
 : 403 apparently does not work, even though some
 : articles say that the configs are the same.
 
 apparently does not work is hardly enough detail.
 The process should be the same for all error pages.
 
 Post your web.xml and perhaps the page itself, and
 someone here may have
 some answers.
 
 -QM
 
 -- 
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
  

=
Best wishes
Z C Wang





___ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://uk.messenger.yahoo.com

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



  1   2   3   4   5   >