struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnson, Nathaniel" <natjo...@indiana.edu>
Subject RE: getting the servlet context
Date Mon, 01 Oct 2001 20:07:00 GMT
I got it to work... thanks to all... the problem was that I was trying to
get the pageContext in the tags constructor and I guess in is not available
until the doStartTag() method.  I am new the this environment.

-----Original Message-----
From: Thomas Schnelle [mailto:t.schnelle@catwesel.de]
Sent: Monday, October 01, 2001 3:00 PM
To: struts-user@jakarta.apache.org
Subject: AW: getting the servlet context


Try this
ServletContext con = pageContext.getServletContext();
regards
Thomas

-----Urspr√ľngliche Nachricht-----
Von: Johnson, Nathaniel [mailto:natjohns@indiana.edu]
Gesendet: Montag, 1. Oktober 2001 21:49
An: 'struts-user@jakarta.apache.org'
Betreff: getting the servlet context


Does anyone know how to get the servletContext from within a custom tag
(public class MyTag extends SupportTag...)

Thanks!
Nate




Mime
View raw message