aspose file tools*
The moose likes Servlets and the fly likes Servlet to Jsp parameter calling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet to Jsp parameter calling" Watch "Servlet to Jsp parameter calling" New topic
Author

Servlet to Jsp parameter calling

Azrael Noor
Ranch Hand

Joined: Jul 29, 2010
Posts: 382
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!!!


Regards
Azrael Noor
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: May 16, 2009
Posts: 58
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.

OCJP 1.6
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

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.


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Azrael Noor
Ranch Hand

Joined: Jul 29, 2010
Posts: 382
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:



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet to Jsp parameter calling