Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Checking for specific page

 
Joseph Smithern
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create a condition to check if I am on a specific web page .




Please advise how I can do that because this will be located in the top of a template page in my JSP pages. If the user goes to the specific page called page.jsp then I want the above condtion to kick in.
[ April 17, 2006: Message edited by: Joseph Smithern ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checking for the specific page URL would be a poor way to do something like this. It's too subject to change based upon server and changes to the projects.

Rather, I'd set a page-scoped variable that would trigger the behavior.

Using JSTL syntax, on the page:



and in the "template":



If you're not using the JSTL, you should be. If you're still not using the JSTL, scriplet equivalents of the code are easy to figure out.
[ April 17, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic