[Advanced-java] addHeader/setHeader Problem in JSP and Servlets.

Ethan Hunt prabhatr7 at hotmail.com
Fri Nov 25 00:52:37 PST 2005


Hi All,

lemme elaborate the requirement a bit.

My site is deployed on iplanet app server 6.5. Now through the site users 
can access some content which is to be accessed through a different web 
server.

Now the client can directly hit the web server with the full path of the 
content and can access it. I have to basically restrict them.

i thought if I can add the user id or name in the header information in 
response, then i can validate this on the servlet on the web server.

Pls lemme know if there is some other solution for this issue.

Thnx and regards
Prabhat Rana


>From: Panos Konstantinidis <girionis at yahoo.com>
>To: Ethan Hunt <prabhatr7 at hotmail.com>, 
>advanced-java at lists.xcf.berkeley.edu
>Subject: Re: [Advanced-java] addHeader/setHeader Problem in JSP and 
>Servlets.
>Date: Fri, 25 Nov 2005 00:22:07 -0800 (PST)
>
>It would be a lot easier to add your data in the session.
>
>--- Ethan Hunt <prabhatr7 at hotmail.com> wrote:
>
> > HI All,
> >
> > I am trying to send some headers from my JSP file to the servlet. I 
>tried
> > using this code.
> >
> > response.addHeader("sample", "Sample Value");
> > response.setHeader("sample", "Sample Value");
> >
> > In the servlet i tried retrieving them, but with no success.
> >
> > I read somewhere that neither a JSP nor a servlet has the right to 
>modify
> > the request or response. So the suggestion was to use Filters. I have 
>tried
> > using filters the code is pasted hereunder. but this thing also doesnt 
>seem
> > to work.
> >
>
>
>
>
>__________________________________
>Yahoo! Music Unlimited
>Access over 1 million songs. Try it free.
>http://music.yahoo.com/unlimited/

_________________________________________________________________
Find your dream machine. Click here Now 
http://www.sulekha.com/classifieds/cllist.aspx?catid=280&nma=IN&c=Autos&ref=msn&ref2=atx9



More information about the Advanced-java mailing list