• 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:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

set java variable using setter method from jsp

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!