• Post Reply Bookmark Topic Watch Topic
  • New Topic

redirecting buttons

 
Rashmi Pandey
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m stuck at some point in servlet as m beginner.I have to create two button i.e add and search.When i click on add button ..it should open tht page and when i click on search page it open search page..i put tht two buttons on one servlet page and i have to redirect to other servlet page..how can i do?

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

First off, Please be sure to take the time to compose descriptive subjects for your posts. You will attract people who will can give you better and faster answers when your posts have good, descriptive subjects. For more information, please click this link ⇒ UseAMeaningfulSubjectLine.

Using a title of "servlet" in a forum completely dedicated to questions on servlets isn't going to attract the attention of those who can best help you.

I have changed the subject to one that's more suitable; please use it as an example for future posts.

Now to your question: servlets (and JSP) are merely means to create HTML dynamically on the server to send to the browser. So your question is answered by "how would you do in HTML?" because that's what's going to be sent to the browser.

Moreover, servlets should not be used to directly generate dynamic HTML -- you should be doing your work in the servlet, then forwarding the servlet to a JSP to generate the markup.

I recommend reading:
  • The Secret Life of JSPs
  • The Front Man

  •  
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!