permaculture playing cards
The moose likes JSP and the fly likes Calling a JSP from a Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Calling a JSP from a Javascript" Watch "Calling a JSP from a Javascript" New topic

Calling a JSP from a Javascript

Prashanth Nayak

Joined: Dec 19, 2011
Posts: 4
Hi All ,
I have a javascript where I have some values to be passed as hidden values . I am doing a form.submit using post method in it.
I need to pass those values to the jsp which is invoked from the javascript itself .
Now , how do I invoke the URL along with those values passed to it .
I am doing a but I am not able to pass the values to the jsp .
Any help is appreciated .
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Are you doing a or a form submit. You say that you are going both, but you can;t do both at the same time.

If you want the values to be submitted, you'll need to set them as values of form elements (such as hidden elements).

For, pass them as a query string on the URL.

That assumes you can figure out which one you want to do.

[Asking smart questions] [About Bear] [Books by Bear]
Prashanth Nayak

Joined: Dec 19, 2011
Posts: 4
Hi Code goes something like this

In the JSP I am doing this

From the resin logs I can see that I am sample.jsp is accessed but the values are not passed to it. Can you please help .
Pete Nelson
Ranch Hand

Joined: Aug 30, 2010
Posts: 147

Where is the JavaScript variable "sIP" being assigned?

Prashanth Nayak wrote:

In preparing for battle I have always found that plans are useless, but planning is indispensable. -- Dwight D. Eisenhower
I agree. Here's the link:
subject: Calling a JSP from a Javascript
It's not a secret anymore!