• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

posting to same jsp page again  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am creating a jsp page in which user need to enter some option and then result will be displayed based on that option. my problem is this that my user interface and my choose tag are both on same page i had kept the action attribute of form tag empty so my page is coming back but my page is displaying all the options even the first time page is loaded and even after my selection of choice . :cry:
 
Bartender
Posts: 3185
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to be checking the parameters submitted by your form when you reload the page. So when the form gets submitted even if its to the same page (the action would mention which page/url to invoke) the request object would have the data from the form in its parameter map. So your target location would have to fetch these values and update the UI accordingly.
But why do you want to post to the same page? You are making the page do more than one operation which at times can be not desirable. If its a totally different operation or a different action then a new JSP should be ideal.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!