• 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

Help regarding getParameter-How to use servlet concept in Struts2 Action

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! all, I Have a problem regarding getparameter. How to access values of textfield through request.getParameter
Please consider the code of jsp as below :



Javascript code:


Java Code:

I am new in Struts2 and don't know how to use servlet concept in Action class.however, I am able to call Action class but not able to retrieve values through getParameter.
Please Help me regarding this.Thanks in Advance
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to small example first with struts2. Where is execute method in ActionClass? Why are you calling doGet method here? How to get the request object in Struts2?
 
ishan grover
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohana Rao Sv wrote:Try to small example first with struts2. Where is execute method in ActionClass? Why are you calling doGet method here? How to get the request object in Struts2?



Actually i want to retrieve list of cities on the basis of dynamic value of textbox.I am trying to implement through ajax. The execute function id down below in action class. I have replaced doget method with execute method as follows
CityAction.java



Now I am getting values from:


The DAO class is as follows where i am fetching cities:
DAOcity.java


 
reply
    Bookmark Topic Watch Topic
  • New Topic