Custom error page when tomcat authentication fails


 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Custom error page when tomcat authentication fails
# 1  
Old 05-06-2008
Custom error page when tomcat authentication fails

Hi people, i have this problem trying to get a custom error page when client authentication fails:

I had configured successfully my tomcat with client authentication using certificates, and now I would like to redirect the user to a custom error page when authentication fails, but I always get a 400 not found error if this happens.

I already tried to set my error page for 400 error code in web.xml but I can't get it to work.
Shouldn't be 403 (forbidden) the error when authentication fails?
Somewhere I read that the socket connection is terminated by tomcat before i can send the user anywhere, and thats why i don't get the redirection.

Here is part of my web.xml... Any idea?
(I entered some blank spaces to be able to show the xml tags)
Thanks in advance.

<login-config>
<auth-method>CLIENT-CERT</auth-method>
<realm-name>certificate</realm-name>
</login-config>

<error-page>
<error-code>400</error-code>
<location>/static/html/errorcert.html</location>
</error-page>

PH: I also tried the error-page tag in the login-config section with the same results.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Insmod custom module fails with message : disagrees about version of symbol ...

Hello : I want to make a netfilter conntrack module for myself. So I copy all the source code about netfilter conntrack from kernel source tree to my external directory. It can be insmod after compiled. Then I add some members to the struct nf_conn, and it 's compiled successfully. However, it... (1 Reply)
Discussion started by: 915086731
1 Replies

2. UNIX and Linux Applications

Tomcat 6.0 fails to read symlink(symbolic link) file

Hello all experts, Im in a situation where Tomcat simply does not want to read this file through the symlink.... I checked permissions..OK Also checked file & tomcat owner...all OK. This is what I have my /tomcat/conf/Catalina/local/appname.xml <Context> <Resource name="jdbc/black" ... (3 Replies)
Discussion started by: KingaKoopa
3 Replies

3. Solaris

Tomcat..Unable to deploy application remotely in tomcat

Hi, We have upgrade tomcat from 5.0.20 to 7.0.33 and made changes to server.xml file according to newer version.. how ever the upgrade went fine and now i am unable to deploy application remotely.. it is giving 403 access denied error.. we have seperate appbase directory mentioned in server.xml..... (0 Replies)
Discussion started by: phani4u
0 Replies

4. Ubuntu

Passwordless ssh authentication fails

Unable to set ssh passwordless authentication I am unable to ssh with passwordless authentication from Windows client onto UBuntu server. The ssh version on UBuntu is OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e , while SSH on Windows Client is OpenSSH_5.1p1, OpenSSL 0.9.8k. I turned on ssh... (5 Replies)
Discussion started by: tkota
5 Replies

5. Web Development

Tomcat - Error Logs

Hi Gurus, Our tomcat server was found hanging and responding to requests although ports 8080 & 8009(AJP) were found in listening state. The catalina.out had the below output: We have JavaMelody(Monitoring tool) packaged along with our application and it seems that monitoring through... (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies

6. Shell Programming and Scripting

[Solved] While tomcat shutting down getting error

While tomcat shutting down getting the below error. Error occurred during initialization of VM Could not reserve enough space for code cache CATALINA_OPTS="-verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=24M -Xms256M -Xmx512M -Djava.awt.headless=true -XX:-UseCompressedOops... (2 Replies)
Discussion started by: tuxslonik
2 Replies

7. Web Development

Tomcat shutdown error

not sure if this is the right forum but im having problem with tomcat restart. i have a regular user that when he login it will go directly to a menu options (a. stop tomcat, start tomcat,). if he selects start it would should show that tomcat has been restarted. if the user press X, he will... (2 Replies)
Discussion started by: lhareigh890
2 Replies

8. Solaris

Tomcat Error-HTTP Status code 500

when I typed path http://localhost:8080/MyFirst/HelloWorld in web-browser ,it came up with error HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception ... (0 Replies)
Discussion started by: srinivas2828
0 Replies

9. UNIX for Dummies Questions & Answers

Creating Custom man Page in Solaris

Hello experts, I'm creating a custom man page. I have two unix boxes - one Hp & the other Solaris On HP, I simply moved the .Z file to /usr/man/man7.Z/ and after that "man myPage" worked. I then tried to do the same on Solaris. First thing is the relevant directory seemed to be... (1 Reply)
Discussion started by: sridhar_423
1 Replies

10. UNIX for Advanced & Expert Users

Error Tomcat + Apache

Hi, I have a machine with Unixware 7.1.3 and Apache 2 and Tomcat 4.0.3 it's works, but in the archive log from mod_jk.log ajp13_process_callback - write failed : Error ajp13_process_callback - write failed : Error ajp13_process_callback - write failed : Error... (1 Reply)
Discussion started by: By_Jam
1 Replies
Login or Register to Ask a Question
sasl_server_step(3)						  SASL man pages					       sasl_server_step(3)

NAME
sasl_server_step - Perform a step in the authentication negotiation SYNOPSIS
#include <sasl/sasl.h> int sasl_server_step(sasl_conn_t *conn, const char *clientin, unsigned clientinlen, const char ** serverout, unsigned * serveroutlen); DESCRIPTION
sasl_server_step() performs a step in the authentication negotiation. It returns SASL_OK if the whole negotiation is successful and SASL_CONTINUE if this step is ok but at least one more step is needed. conn is the SASL connection context clientin is the data given by the client (decoded if the protocol encodes requests sent over the wire) clientinlen is the length of cli- entin serverout and serveroutlen are set by the library and should be sent to the client. RETURN VALUE
sasl_server_step returns an integer which corresponds to one of the SASL error codes. SASL_CONTINUE indicates success and that there are more steps needed in the authentication. SASL_OK indicates that the authentication is complete. All other return codes indicate errors and should either be handled or the authentication session should be quit. CONFORMING TO
RFC 4422 SEE ALSO
sasl(3), sasl_errors(3), sasl_server_init(3), sasl_server_new(3), sasl_server_start(3) SASL
10 July 2001 sasl_server_step(3)