Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes To pass javascript variable to a Java Bean method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "To pass javascript variable to a Java Bean method" Watch "To pass javascript variable to a Java Bean method" New topic
Author

To pass javascript variable to a Java Bean method

Kumar Navin
Ranch Hand

Joined: May 27, 2004
Posts: 51
Hi!
My problem is as such, have a java bean with some method. In my JSP page am using <jsp:useBean...> . I have to invoke a bean method which takes a String variable as a parameter which is to be fetched from the JSP page's text field. How do I do this?? What concatenation is to be used?
-Navin.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
why using javascript.
just get the parameter from request object and pass it as an argument in your bean method.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: To pass javascript variable to a Java Bean method
 
Similar Threads
Help...Static items in session beans
JSP and radio buttons passing values
JSP + useBeans + flush all my contents in my page
Will the setters be called
Using jsp:useBean for a bean with one argument constructor