Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get jsp:param

 
Fawad Ali
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have written something like this.


In abc.jsp, when I try to get it by


It always gives me null. Any idea what I am doing wrong.

Thanks in advance.
 
Stefan Evans
Bartender
Posts: 1755
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All looks good to me.
Here is a full example that works for me on Tomcat7.

page1.jsp


page2.jsp


Try accessing it with something like http://localhost:8080/MyWebApp/page1.jsp?fromPage1=HelloWorld

If this works, then double(triple) check your code. Maybe print out all the request parameters received with the following code snippet:

 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic