• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

About Headers

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am maintaining one of the application whose Home page(jsp) is actually getting the authentication info like username , userid from the Headers(request.getHeaders()). This home page is actually navigated from some other portal site which I am not allowed to access. So there is no way to know how that portal is setting the custom header info in the request which we are getting in our Home page. Does anybody has idea how can my system get the customized header info? Infact how can one setHeader in one page and getHeader in another?
 
Charmy Madhvani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen that API.
Let me be more clear.

There is an application in a separate server(WSSO).It sets a header information called USERNAME. Its jsp has a link to my application(Tomcat4.1). When that link is clicked the request comes to my jsp. In my jsp I am getting a non null value from from request.getHeader("USERNAME").
My question in how did that jsp from another application able to setHeader in request? Can a specific server provides any API to do that. Because nothing like this can happen in JSP/Servlets API.

I hope I have made myself clear..
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My question in how did that jsp from another application able to setHeader in request?



I dont think that is actually happening here. Headers can only be set by the application generating the request. If this was my problem I would "view source" on the page that links to your jsp to see what is actually generating the request.

Bill
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Because nothing like this can happen in JSP/Servlets API.



Not entirely true.
You could write a filter that sets this header.
[ January 16, 2008: Message edited by: Ben Souther ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, if you don't have it yet, you might want to install the LiveHttpHeaders or FireBug plugin for Firefox. Both of these tools will allow you to see the request and response headers for all web requests going to and from your browser.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic