tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: HOWTO Same web application serving UI / SOAP ?
Date Wed, 09 Oct 2013 08:12:56 GMT
N.s.Karthik wrote:
> Hi
> Do any body have any Brain storming Ideas for the Following
> With single Web Application Installation
>     Use a Web application for Web based - Browser Interface.
>     Use the same Web application for exposing the SOAP based - Client
> Interface
>        URL should be same and no changes either of Browser / Soap .
>  * 
>         Web : http://:8080/App/jsp/abcd.jsp
>         Soap : http://8080/App/services/abcd.wsdl
> *
> How to achieve the same ????
Your question is a bit confusing. You are asking for the same URL being used in both 
cases, but you list 2 different ones above.

First, a webapp can consist of a collection of different servlets.

So a HTTP request to "" and a request to 
"" could both be mapped to the webapp "App", but each to a

different servlet ("type1" or "type2") within that webapp.  That is just a matter of 
mapping the calls properly in the WEB-INF/web.xml of the webapp "App".

Second, if you want a single URL like """ to map to 2 
different servlets, depending on whether this request comes from a certain type of client

(browser or SOAP client), then I suppose that some of the HTTP request headers will be 
different in one case compared to the other.
In that case, you could add a "servlet filter" to your webapp "App", mapped to the URL 
"/xyz", which would look at the HTTP request headers and depending on whether this looks 
like a SOAP call or not, internally re-direct the request to the appropriate servlet 
"type1" or "type2".
Have a look at the URLRewriteFilter for that.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message