It's not a secret anymore!
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

jsp onClick then forward

Harry Pattern

Joined: Nov 27, 2002
Posts: 23
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 .
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.
I agree. Here's the link:
subject: jsp onClick then forward
It's not a secret anymore!