• 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

set java variable using setter method from jsp

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am taking one value form javascript and setting it to input element in jsp and i want to set this value to java variable... how can i do this..?
also suggest if its possible using doGet method since data to be sent is visible in browser address bar when request submitted..
 
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
Bit confusing i'm thinking your approach was wrong. Can you please describe what you are doing?
 
prajyot jadhav
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually i am using struts, and taking one client specific value form javascript and setting that to JSP input element (say input type="text" name="NAME")
now i want to use that value in Action.java class which extends DispatchAction that we have in struts,

i tried to get that value using request.getParamter() in this class inside a method which has following signature

public ActionForward FunctionName (ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
throws Exception {
....
JavaVariable=request.getParamter('NAME[i.e. mentioned in input tag of JSP ]')
.....
}

but request.getParamete() is returning null...
 
reply
    Bookmark Topic Watch Topic
  • New Topic