• 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

Not able to pass value through <SELECT><OPTION> tag as argument to POJO class to return value JSP

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

I am trying to pass a value to a POJO class method through <SELECT><OPTION> and returning value on the JSP page. but not able to do that please help

//POJO code


//JSP code


model.png
[Thumbnail for model.png]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you have not shown is the servlet to which the form is submitted. That's what holds the responsibility to marshall the request parameters and delegate those values to any POJOs or other areas of the app.
 
Brandon Amyout
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:What you have not shown is the servlet to which the form is submitted. That's what holds the responsibility to marshall the request parameters and delegate those values to any POJOs or other areas of the app.



Will you be a little explanatory, i am not able to understand what exactly you want to say...
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the code for the servlet that the form submits to?
 
Brandon Amyout
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Where is the code for the servlet that the form submits to?



First block from the top but that's not a servlet that's a POJO class which is returning some value.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't submit a form to just any old class. Are you using a framework? If so, you need to map the actions accordingly. If not, then you need a servlet to respond to the request.
 
Brandon Amyout
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:You can't submit a form to just any old class. Are you using a framework? If so, you need to map the actions accordingly. If not, then you need a servlet to respond to the request.



Okay, Now i have one more problem if i cant submit a form like this. And also if i pass request to servlet through the form and how do we get the response in a <div> section. Any idea??
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brandon Amyout wrote:And also if i pass request to servlet through the form and how do we get the response in a <div> section. Any idea?


Ajax
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic