Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I want to use the custom request header in JSP How can I use that

843840Sep 24 2008 — edited Feb 24 2009
Hi Guys,
I have following scenerio...
1: There is one third party tool which is calling my.jsp page from the specified directory.
2: Before calling the JSP that third party tool is adding some data like <user name> and <password > in the header of that JSP.

Problem: I am not getting thos custom added header in side the JSP.

Header information is given below:

http://localhost:8100/wvsat/brand/ncr/auto.jsp

GET /<APPLICATION_NAME>/ <JSP_PAGE_NAME>.jsp HTTP/1.1
Host: localhost:8100
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: AreCookiesEnabled=195; JSESSIONID=2a30e33e48384dd13222
MyUsername: demo*
MyPassword : demo*


HTTP/1.x 200 OK
Date: Wed, 24 Sep 2008 19:42:22 GMT
Content-Type: text/html; charset=UTF-8;application/x-www-form-urlencoded
Connection: close
Server: JRun Web Server


Now within the JSp page i want the value of MyUserName and MyPassword
For gettting these value i am using the
request.getHeader(MyUserName);
But it is returning null.

Note:+*
1: I want to forward this value to another servlet which is based on Struts framework_.
2: For adding the value in the header i am using Http Live header Addons of FireFox_

Could anyone help me in the same!!!
Thanks in Advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2009
Added on Sep 24 2008
4 comments
519 views