wood burning stoves 2.0*
The moose likes Servlets and the fly likes Can we invkoke JSP on submit of a form? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Can we invkoke JSP on submit of a form?" Watch "Can we invkoke JSP on submit of a form?" New topic
Author

Can we invkoke JSP on submit of a form?

Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
Hi
if yes then can same calledjsp also invoke a bean and if yes then what should be the scope of bean
shall it be page
shall it be session
or shall it be application
actually then bean which i am trying to call has to do some work of updating a data in a XML?



[This message has been edited by Gaurav Chikara (edited February 26, 2001).]
[This message has been edited by Gaurav Chikara (edited February 26, 2001).]


SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
HI,
Sure, you can call a JSP page on Submit of a form.

You can also access beans using the tags. The scope of the beans depends on the need for that particulare app.
page : The bean is valid for only that page instantiation.
request : The bean is valid for a single client request.
session : Valid for a HTTP Session for a client.
application : Valid till the ServletEngine is running.
Hope this helps.
Ashwin.
Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
Thnkx
but my doubt is whether i shall consider updation of XML
as page scope or application scope
It can be updated by any client ?

Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
Hi,
As I said, It really depends on your application requirements. If you have only one JSP page accessing the file and processing the requests, "page" would be fine. But, if there are more than 1 JSP pages, try using "session" / "application"
Ashwin.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can we invkoke JSP on submit of a form?
 
Similar Threads
can we send the control from finally to try?
Is it possible or not?
How to store whole XML in a table of a database
JDBC using Applets
Can session variables be stored in HTML