cancel
Showing results for 
Search instead for 
Did you mean: 

Servlet chain on sap j2ee

Former Member
0 Kudos

Hello *,

I’m playing around with SAP J2EE and servlets.

Now I’m about to implement a Servlet Chain. As I’ve read in a tutorial, there are two ways of triggering a chain of servlets for an incoming request:

1. telling the server that certain URLs should be handled by an explicitly specified chain

2. telling the server to send all output of a particular content type through a specified servlet before it is send to the client

So the tutorial says. But I have to configure the j2ee engine and the tutorial is based on sun server.

Can anyone tell me how to:

1. switch the server chaining on

2. implement a servlet mapping, that would specify that all *.html are retrieved by serverletIN servlet and passed to the servletOUT servlet.

3. specify in a properties file that all “text/html” content is passed to servletOUT servlet (the directive should look like this: text/html = servletOUT

Maybe there is another possibility to implement (or configure) a servlet chain.

Thnx in advance.

Best regards

Pawel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pawel,

As far as I know, servlet chaining is an old concept, which is furthermore a <b>non-standard</b> technique. It has a <b>standard</b> alternative represented by

javax.servlet.Filter

(part of the Servlet 2.3 specification.)

So, you might want to have a look at programming filters. There's nothing special in using the APIs on the SAP J2EE Engine. So, you might want to have a look at this short guide about filters development coming with the J2EE Engine documentation:

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/2d/b6e4b9b0f9f04790d2f7933473706e/content.htm">Developing Filters</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/09/682791ef320444946cd6c7451d4d4d/content.htm">Initializing Filters</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/53/7be8dca2241d42a43fd4ae268f1fd8/content.htm">Filtering Requests or Responses</a>

Or search the internet for other tutorials.

Regards,

Ivo

Message was edited by: Ivaylo Ivanov

Former Member
0 Kudos

Hi Ivo,

thnx for your help.

I hope that Mr. Google will help me find some tutorials on Creating Filters.

Regards

Pawel

Answers (0)