GeeCON Prague 2014*
The moose likes JSP and the fly likes jsp onClick then forward Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "jsp onClick then forward" Watch "jsp onClick then forward" New topic
Author

jsp onClick then forward

Harry Pattern
Greenhorn

Joined: Nov 27, 2002
Posts: 23
HI,
Can you help me on this. I do have a button in html/jsp . How can I use <jsp:forward> and forward it to a servlet whenever I click a button .
Thanks
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
jsp and the forward command are serverside, they get used to send the HTML to the user. what happens after that is all done client side
to do client side processing you use javascript. if you just want a button to click to take you somewhere just use a simple <form action='gosomewhere.jsp'><input type='submit' value='clicky clicky' /></form> otherwise you create a button and just use the javascript onClick functions to tell the browser where to go


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
 
Consider Paul's rocket mass heater.
 
subject: jsp onClick then forward