Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

set java variable using setter method from jsp

 
prajyot jadhav
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..
 
Mohana Rao Sv
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic