• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP form submission with drop-down menu in Struts 1.3

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've created 2-drop-down menu (source and destination) in my JSP page and are working properly
but on submission of form nothing seems to happen.
Where I'm going wrong in my JSP.

And also I'm new to JSP and Struts, so please suggest should I use bean and struts-action to get data from database in drop-down menu. Or my way is fine(see the JSP code). If yes,then how?

search.jsp:




SearchBean:



SearchAction:

some code then

 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Priyanshu,

you are firing query from JSP which is not good, but if you are doing it for trial then it is OK. but still you can do this in separate java class.

for submitting form on drop down change you can use java script, on change event of the select tag you can call the JS function & you can submit form from that function.

you can get a lot of help from internet on this.


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic