This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP markup reuse and request parameters

 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm pretty new to JSPs.
I've some JSP markup, which makes use of attributes in the HttpServletRequest, that I'd like to repeat accross multiple JSPs.
I just started looking into creating a custom tag library, but I don't see a way to get HttpServletRequest attributes from the doStartTag method. Can this be done? Or is there some other way to pass values from the JSP that uses the custom tag to the associated TagSupport methods?
[ July 11, 2003: Message edited by: Dirk Schreckmann ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Within the tag you can access the request from the pageContext object: pageContext.getRequest().
It returns a ServletRequest so you'll need to cast it to an HttpServletRequest.
hth,
bear
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was a thinkin' about lookin' harder at that pageContext thingy.
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic