Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using href with jsp scriplets

 
sam barker
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to pass 3 values as request parameters

<td><a href="ControllerServelet?operation=CHECK_LIST&propertyoffset=<%= i %>&searchindex=<%= startIndex %>">whats this?</a> </td

But when i try to access it in the other jsp
i am getting null value..
eg.....
String index=(String)request.getAttribute("searchindex");
if(index==null)
System.out.println("index is null");


Could anyone tell me the correct way of doing this.
Cheers
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try
 
sam barker
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your help
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Problemo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic