• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet to Jsp parameter calling

 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i made html form
same i made in Servlet

now i want to call that Form made in servlet in JSP

how could i do that?

what m i doing ->


on jsp/html->



actually not getting method to do that, kindly help!!!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what you're asking. But your form has no action, so it'll be a postback. What are you trying to do?
 
Paul Okeke
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why should you be boarder ed about achiving such, knowing it is a very bad programming approach.
The current Servlets and JSPs Specification demands that Servlet should do the processing while JSP dose the presentation.
Following this approach makes it your out even more readable and easy to debud. I mean the MVC pattern.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean, you want to call the html form which you've created in a servlet? You can only forwars the request to a servlet/JSP from your JSP. But you't call the particular form from JSP.

I think, you can make a dedicated servlet for that form, and call that servlet from your JSP.
 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I basically want to save state

What i have done i just make dynamic form on servlet too which already present on client side.

When Dispatcher will forward request it will generate form on fly and i will get the parameters through JSP.

Once i get parameter i could show values of state being saved.

i am able to run it now



On Client Side i have done the following:



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic