You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Bender, Christopher" <Ch...@tdsecurities.com> on 2003/12/08 21:40:15 UTC

Giving access to an html file in tomcat

Hey,

I have added the following to my web.xml of one of my web apps:

	<error-page>
		<error-code>403</error-code>
		<location>/error/error.htm</location>
	</error-page>


When I try and test this (go to a page I do not have access to that will throw a 403 error),  i get the Internet Explorer error page that says "You might not have permission to view this directory or page using the credentials you supplied" and not my page (and not even a tomcat page).

Am I missing some configuration somewhere?

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Giving access to an html file in tomcat

Posted by Cees van de Griend <cv...@pobox.com>.
On Monday 08 December 2003 21:40, Bender, Christopher wrote:
> Hey,
>
> I have added the following to my web.xml of one of my web apps:
>
> 	<error-page>
> 		<error-code>403</error-code>
> 		<location>/error/error.htm</location>
> 	</error-page>
>
>
> When I try and test this (go to a page I do not have access to that will
> throw a 403 error),  i get the Internet Explorer error page that says "You
> might not have permission to view this directory or page using the
> credentials you supplied" and not my page (and not even a tomcat page).
>
> Am I missing some configuration somewhere?

IE has some (un)helpfull option which translates error codes to a self 
generated page. If I recall correctly, it shows the correct page if the size 
of the error page is greater then some KB (8 KB?).

So, you have 2 options: disable the option in IE or generate larger error 
pages.

Regards,
Cees.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


AW: Giving access to an html file in tomcat

Posted by SH Solutions <in...@sh-solutions.de>.
AFAIK the page needs to be > 1024 byte. If they are smaller, IE replaces
them.

cu
  Steffen 


-- 
SH Solutions, Steffen Heil
Web: http://www.sh-solutions.de
eMail: info@sh-solutions.de
MSNMS: mail@steffen-heil.de
-----Ursprüngliche Nachricht-----
Von: Bender, Christopher [mailto:Christopher.Bender@tdsecurities.com] 
Gesendet: Montag, 8. Dezember 2003 21:40
An: Tomcat Users List
Betreff: Giving access to an html file in tomcat

Hey,

I have added the following to my web.xml of one of my web apps:

	<error-page>
		<error-code>403</error-code>
		<location>/error/error.htm</location>
	</error-page>


When I try and test this (go to a page I do not have access to that will
throw a 403 error),  i get the Internet Explorer error page that says "You
might not have permission to view this directory or page using the
credentials you supplied" and not my page (and not even a tomcat page).

Am I missing some configuration somewhere?

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Giving access to an html file in tomcat

Posted by Steph Richardson <st...@kvasar.com>.
IE uses some voodoo logic to decide when to show it's own error page or not. Anytime it get's something other than a HTTP 200 or
302, it looks at the HTML returned with it, and if it "seems" to be a well-formed html doc, and/or exceeds a certain length, then it
will show that HTML, else it decides to show it's own "Friendly HTTP Error page" ( which IMHO is completely useless to experienced
and novice users alike, but that's beside the point ).

You can turn off this behaviour in Tools->Internet Options->Advanced->Browsing->Show Friendly HTTP Error Messages
And this will at least show you exactly what you are returning to the browser.


Steph


> -----Original Message-----
> From: Bender, Christopher [mailto:Christopher.Bender@tdsecurities.com]
> Sent: Monday, December 08, 2003 3:40 PM
> To: Tomcat Users List
> Subject: Giving access to an html file in tomcat
>
>
> Hey,
>
> I have added the following to my web.xml of one of my web apps:
>
> 	<error-page>
> 		<error-code>403</error-code>
> 		<location>/error/error.htm</location>
> 	</error-page>
>
>
> When I try and test this (go to a page I do not have access to that will throw a 403 error),  i get the Internet Explorer
> error page that says "You might not have permission to view this directory or page using the credentials you supplied"
> and not my page (and not even a tomcat page).
>
> Am I missing some configuration somewhere?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org