Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to Intercept Http request in Websphere application Server ?

221 views
Skip to first unread message

balla...@yahoo.com

unread,
Apr 26, 2007, 3:49:41 AM4/26/07
to
My requirement is to intercept all Httprequests coming to Websphere App Server instance.. get the related information from the request, then forward the request to the webapp deployed.

I do not want to implement as a Servlet filter in a webapp. which is intrusive to the webapp.

I want this to work as an application server plugin which will intercept
all httprequests, get the required information, and then disptach to other webapps deployed in the application server.

I am thinking of this way :Option 1
a. Develop a servlet and some related classes and package as a "PluginWebApp".
b. Configure application server to map all /* http requests to come to this "PluginWebApp".. can i configure like this ?
c. In the servlet, i would retrive the information from HttpRequest object and then dispatch the request to the URL (i.e. as found in the header of the HttpRequest.

Please let me know
1. will this option 1 work ?
2. any other better options ?
3. Does WebSphere provides any API, which will allow me to write a plugin.?
The appserver would pass me the Httprequest object..and provides APIs to forward the Httprequest to the appropriate Web Application deployed in the appserver.

i do not want to parse raw Httprequests.. I would want to use HttpRequest objects provided by the appserver..

Appreciate if anybody of you can provide me any clues, tips, solutions, pointers regarding this problem.

regards
Rajesh


Ben_

unread,
Apr 26, 2007, 9:16:21 AM4/26/07
to
I find your suggestion more intrusive than a Servlet filter (add an entry in
web.xml and add your jar file -- it's all a matter of build -- developer of
the original application need not involved).

I'm not even sure your suggestion would work.

Paul Ilechko

unread,
Apr 26, 2007, 9:34:18 AM4/26/07
to
balla...@yahoo.com wrote:
> My requirement is to intercept all Httprequests coming to Websphere
> App Server instance.. get the related information from the request,
> then forward the request to the webapp deployed.
>
> I do not want to implement as a Servlet filter in a webapp. which is
> intrusive to the webapp.
>

That's ridiculous. This is exactly what filters are intended for.

Ken Hygh

unread,
Apr 26, 2007, 10:09:51 AM4/26/07
to

Rajesh,
Sounds like an interesting project. I'd suggest you read the J2EE web
container spec.

And then reinvent it all.

Ken

walker.l2

unread,
Apr 26, 2007, 12:09:42 PM4/26/07
to
Why do you want to do this? If you simply want to direct requests to
different WebApps, you can use different Virtual Hosts.

DMX

unread,
Apr 26, 2007, 12:13:18 PM4/26/07
to

1. Yes
2. Yes
3. Yes

as far as number 2 goes, why not use IHS and Websphere plugin? That's
a pretty standard nTier topology... At a very high-level, Folks
generally put webservers in front of Appsevers, webservers just
dispatches to app server... The websphere plugin also does load-
balancing for you, if clustering WAS...

Paul Ilechko

unread,
Apr 26, 2007, 3:44:38 PM4/26/07
to
Ken Hygh wrote:

> Rajesh,
> Sounds like an interesting project. I'd suggest you read the J2EE web
> container spec.
>
> And then reinvent it all.
>
> Ken

:-)

hlo...@yahoo.com

unread,
May 15, 2007, 11:10:48 AM5/15/07
to
HI

We have a problem trying tu run tivoli performace viewer on a cluster enviromment. Here I add the otuput from de command line, and the error from it

/was/WebSphere/AppServer/bin >. ./tperfviewer.sh debug host 8878 SOAP
[RAGui] Debug = true; version = WAS50
[RAGui] Using the command line parameters host:8878:SOAP
[RAGui] Connected!
java.lang.NullPointerException
at com.ibm.ws.pmi.perfServer.CollectorJMX.listNodes(CollectorJMX.java:201)
at com.ibm.ws.pmi.perfServer.DataCache.listNodes(DataCache.java:136)
at com.ibm.websphere.pmi.client.PmiClient.listNodes(PmiClient.java:619)
at com.ibm.websphere.pmi.ra.value.RAClientImpl.listChildren(RAClientImpl.java:211)
at com.ibm.websphere.pmi.ra.value.RAClientImpl.explore(RAClientImpl.java:229)
at com.ibm.websphere.pmi.ra.value.RAGroupNode.explore(RAGroupNode.java:298)
at com.ibm.websphere.pmi.ra.view.RAGui.connectToWAS(RAGui.java:588)
at com.ibm.websphere.pmi.ra.view.RAGui.main(RAGui.java:252)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
ERROR: no node in the collector
[PmiClient] ERROR: no node from listNodes()
[RAClientImpl] No child PDs for group: WebSphere Administrative Domain
[RAUtils] getProcessType(): Detected <NodeAgent> on host:8878:SOAP
[RAGui] Checking if PMI Service is enabled..
[ClientRuleDriver] setting EngineParameters from ruleLookup

Where host is the name of the Deployment manager and the port is the port of it. I have security enable, and I have correctly set the %CLIENTSOAP% and
%CLIENTSAS% properties. The thing is that I'm not able to see the nodes from the tree view. We are runnig Websphere Network Deployment and Base 5.1.0, and I have activated performance monitoring services on all the servers and nodeagents.

I would appreciate any help.

Thanks in advanced

Hernan.

hlo...@yahoo.com

unread,
May 15, 2007, 11:12:31 AM5/15/07
to

David Brauneis

unread,
May 15, 2007, 11:55:37 AM5/15/07
to hlo...@yahoo.com
I would suggest that you open a PMR with WebSphere Support.

Regards,
David Brauneis
IBM Rational Build Forge Architecture & Development

Ben_

unread,
May 15, 2007, 2:52:15 PM5/15/07
to
> We are runnig Websphere Network Deployment and Base 5.1.0
And in the meanwhile, apply the latest fixes (they will ask anyhow if you
open a PMR).

Ken Hygh

unread,
May 15, 2007, 4:01:46 PM5/15/07
to
WAG: your Performance Viewer and Deployment Manager are not at the same
version.

Ken

angelfe...@hotmail.com

unread,
May 18, 2007, 4:05:26 AM5/18/07
to
After a few days on google, having your same requiriments, i've found two possible solutions:

HttpSession sharing on websphere:

http://www.redbooks.ibm.com/abstracts/tips0215.html?Open

DistributedMap cache:

http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.wasee.doc/info/ee/ae/tdyn_distmap.html

angelfe...@hotmail.com

unread,
May 18, 2007, 4:13:48 AM5/18/07
to
Sorry,

My requirements are to share user information between two applications... Not the same as yours.

balla...@yahoo.com

unread,
May 18, 2007, 10:09:40 AM5/18/07
to
> Sorry,
>
> My requirements are to share user information between
> two applications... Not the same as yours.

Never mind, Aferrer. Still i can keep note of your solution when i require for such requirement. THanks for taking time to look at my problem.

cheers
rajesh

Corneil

unread,
May 20, 2007, 3:43:58 AM5/20/07
to
You may be able to perform this with a 'reverse proxy' of some kind.
You can also take a look at the functionality in the WebSphere Edge
servers.
0 new messages