I use the following which I call from a tag library included on every page.
pageContext.getServletConfig().getServletName() You'd have to get it from the action mapping/forward classes if you are using Tiles. > -----Original Message----- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] > Sent: Wednesday, March 10, 2004 2:10 PM > To: [EMAIL PROTECTED] > Subject: RE: [OT] Getting the current page's file name > > request.getRequestURI() or request.getRequestURL() will return what > location.href does: the current URI/URL. > > If you're interested in the specific jsp (as opposed to "bar.do"), you can > get that from the mapping instance within the action class. > > -----Original Message----- > From: bort [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 10, 2004 3:03 PM > To: [EMAIL PROTECTED] > Subject: [OT] Getting the current page's file name > > > Hi all > > I want to be able to record in our database, which page is getting hit on > our web site. So, when someone comes to the specials.jsp page on our > site, > I want to be able to pick that value up, and record it in our database. > > I have the method that records to the database, but I don't know how to > pick > up the file name. I was thinking of using JavaScript's location.href, but > I > don't know how to access that value from java. > > Anyone have any ideas for a solution? > > tia > bort > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]