[jboss-dev-forums] [JBoss Web Services Development] - Re: Custom 401 Error on Webservices (JBoss)

João Manuel do-not-reply at jboss.com
Thu May 3 13:46:18 EDT 2012


João Manuel [https://community.jboss.org/people/_marquez2012_] created the discussion

"Re: Custom 401 Error on Webservices (JBoss)"

To view the discussion, visit: https://community.jboss.org/message/733656#733656

--------------------------------------------------------------
The Webservice use the JBoss Web component to authenticate the username and password (with Basic Authentication). (Note that i'm using JBoss-ESB)

For this motive, we need to change this jar (jbossweb.jar) in \jboss-esb\server\<server-name>\deploy\jbossweb.sar.

We must edit the file "ServerInfo.properties" (in org\apache\catalina\util\) and change the property "server.info=2.1.3.GA" to "server.info=XPTO".

Alternatively, it´s also possible to re-build this jar and replace the tag @VERSION@ to XPTO (in the task Ant, i believe).

During this analysis, was also identified the possible implementation of our BasicAuthenticator. Thus it is possible to configure the error message (401) so as to make it more configurable (ultimately we can return other error).

To do this, you must change the configuration


    <property name="authenticators"> 
    <..>
    <key>BASIC</key>
    <value> MyClass </value>


in file war-deployers-jboss-beans.xml (in \jboss-esb\server\<server-name>\deployers\jbossweb.deployer\META-INF).
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/733656#733656]

Start a new discussion in JBoss Web Services Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2047]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120503/00db1670/attachment.html 


More information about the jboss-dev-forums mailing list