tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Longman <>
Subject getting current page name from jsp tag
Date Thu, 12 Sep 2002 04:54:20 GMT

i'm delving into the depths of tag writing, and the first thing i need
to do was write a tag that could figure out what the name of the current
page being processed is.  the only way i could see to do this was to use
the PageContext.getRequest().getRequestURL/I() methods.  all of this is
in tomcat 4.1.10.

two questions:

1) is there another way?  i couldn't see anything in the PageContext or
Page objects that might help, any better suggestions for what the actual
page is would be appreciated.  the request uri will be satisfactory for
where i need them to be for now, but i'd rather figure out the real way
of getting the name of the file that is actually being processed.  in
fact, i guess the parent file, in case its being included in some other

2) the PageContext.getRequest().getRequestURL/I() returns some strange
stuff.  it looks like a bug, but i'm having so much other trouble
getting things going i would like a second opinion before i track it
down/submit it.  here's what i get (the 'unable to proces URL' is the
text i log this error with):

2002-09-11 22:48:32 unable to process URL: 

2002-09-12 00:51:22 URL:

pretty strange.  (note the second one is logged differently because it
doesn't produce an erorr, although it is missing the required / on the
end, it is still parseable.  i guess the stops at the first

confirmations or suggestions?


    Be Developer ID: 5852

View raw message