Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we invkoke JSP on submit of a form?

 
Gaurav Chikara
Ranch Hand
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Ashwin Desai
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic