Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass from windows.location.assign a variable to another jsp page

 
John Vario
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I need to pass from search.jsp the id of the checked row of the table to delete.jsp in order to delete it , but when i am doing this with the bellow code , nothing happens , none checked row deleted from database


delete.jsp




search.jsp

 
Tapas Chand
Ranch Hand
Posts: 583
8
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java code should never be written inside JSP. JSP is for view.
You can move that code to Java file and try again.
 
John Vario
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tapas Chand wrote:Java code should never be written inside JSP. JSP is for view.
You can move that code to Java file and try again.


My exercise says it...
 
Dave Tolls
Ranch Hand
Posts: 2110
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a pity. It's not unusual, but it does seem to create some bad habits.

Anyway, this bit:

is your delete link?

If I'm right on that then it will need to supply the id as a parameter (called 'id1' in your delete.jsp) so that the delete page can pick it up.
 
John Vario
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave Tolls wrote:That's a pity. It's not unusual, but it does seem to create some bad habits.

Anyway, this bit:

is your delete link?

If I'm right on that then it will need to supply the id as a parameter (called 'id1' in your delete.jsp) so that the delete page can pick it up.



yea its my delte link
 
Dave Tolls
Ranch Hand
Posts: 2110
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So if you pass the parameter through in that link then (assuming the code in delete.jsp is correct) it should work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic