Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • 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

Set Request Header in a web application

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I followed the below link to add a new field in my HTTP request header.
http://vangjee.wordpress.com/2009/02/25/how-to-modify-request-headers-in-a-j2ee-web-application/

Basically, I created a class that extends "HttpServletRequestWrapper" and a filter class to filter all request. I can see the value in the JSP page. But, when I use a tool "ieHTTpHeader" , which reads the requet parameters in the browser, I'm not finding the values there.

What I'm trying to do is, I need to send the loggedin username in the request header so that, another appliaction running in an iframe can use this value for singlesignon.

Please help !!
Thanks,
Sheelu
 
Sheriff
Posts: 67641
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So it's working except that a tool isn't showing your faked header? Is that a real problem? The tool is probably just showing you the request as it was originally sent before you wrapped it. Wrapping it doesn't change the request, it just fakes the ability to change it in code.
reply
    Bookmark Topic Watch Topic
  • New Topic