unable to get value returned from javascript variable in page

Ads
 

unable to get value returned from javascript variable in page

Hi, I have 3 pages....i wrote a js function to get the value of radio button from one jsp page..what i want is to store the value returned from the js function and store it in a variable so that i can use it in my servlet to validate an if else condition.

FirstPG:

TEST:
PRODUCTION:
ACCEPTANCE:

2nd page is a normal jsp page...and then from that page i am redirecting to my servlet :

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub

    //System.out.println(request.getAttribute("name"));
    String uname=request.getParameter("uname");
    String pass=request.getParameter("pass");

    //Stringconnect=request.getSession().setAttribute("radiovalue",request.getParameter("env"));
    String connect=request.getParameter("env");
    System.out.println(connect);
    if(uname.equals("admin")&& pass.equals("admin"))
    {
        response.sendRedirect("SuccessAdmin.jsp");

    }
    if(uname.equals("sauro")&& pass.equals("sauro")){
        response.sendRedirect("Success.jsp");
    }
}

I want the value of the radio button from fisrt page to be stored in a variable so that i can use it throughout all the servlets.

please help

View Answers

Ads









Related Tutorials/Questions & Answers:
unable to get value returned from javascript variable in page
unable to get value returned from javascript variable in page  Hi, I... jsp page..what i want is to store the value returned from the js function... the value of the radio button from fisrt page to be stored in a variable so
how to assign javascript variable value to a jsp variable
how to assign javascript variable value to a jsp variable  how to assign javascript variable value to a jsp variable
Advertisements
get textfield value in javascript
get textfield value in javascript  How to get and the set value of text field in JavaScript?   Get the text field value in JavaScript <html> <head> <script type="text/javascript"> <
unable to get datas from oracle database
unable to get datas from oracle database  Dear Sir, I am again struck in my project.. i want to display data from oracle database but i get... know what i am wrong!! kindly help me in this. out.jsp <%@ page
passing value from javascript popup
passing value from javascript popup  How to take user input and pass that input value using popup in Javascript
Getting environment variable value from java
Getting environment variable value from java  Getting environment variable value from java
Getting Json data from servlet to javascript variable
Getting Json data from servlet to javascript variable  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
passing textbox value from one page to another page using html n javascript
passing textbox value from one page to another page using html n javascript  on button onclick event pass text box value and i want to pass value of variable at onclick event of button and also want to print it in textbox
Assign value from a <bean:write> tag to a variable
Assign value from a tag to a variable  I am calling a stored procedure from JSP page which needs an input parameter. This input parameter needs to get the value from bean write tag . How can i do that ?   Please go
how to get time picker value in javascript of struts2
how to get time picker value in javascript of struts2  I am not able to get value of time picker in java script . my code is jsp java script var totime=dojo.widget.byId("totime").getValue(); how to get value please help me
JSP Value to JavaScript
to pass the value from JSP to JavaScript. The JavaScript create a function that accepts the value from the jsp page.  Understand with Example In this section... a function addition() which takes the value from the jsp page. When a user click
how to get HTTP GET request value using javascript
how to get HTTP GET request value using javascript  how to get HTTP GET request value using javascript   how is how you can get HTTP GET request value using javascript: var parameter = window.location.search.replace
How to save and get value from JSP
How to save and get value from JSP  Employee Name Time... 324 2012-12-12 save i want to save dis value jsp to action ...how can i get all value ..and store..how can its values goes
How I get a variable from java script to use it in the scriptlet of jsp.
How I get a variable from java script to use it in the scriptlet of jsp.  Hi i want to get the tinyUrl value in the scriptlet of jsp...").value = tinyUrl; } BitlyClient.shorten(url, 'BitlyCB.shortenResponse
get value from multiple textbox in jsp
get value from multiple textbox in jsp  how to get multiple textbox value in another jsp? If i using the following code <%for(int i=0;i<3;i++) {%> <td>name<input type="text" class="name" id="name">
how to get the value of a label field of option tag in javascript?
how to get the value of a label field of option tag in javascript?  example <select> <option label="2" value="A">A<...;/select> can i get the label value in javascript
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
how to call the array variable in scriptlet from javascript function
how to call the array variable in scriptlet from javascript function  This is the scriptlet code:- <% String[] abc={"saab","volvo","bmw","Benz","Porsche","Jaguar"}; %> Actually i want the array variable one by one
session value not get in many jsp page.
session value not get in many jsp page.  I am using servlet to set...,response); and get session value on jsp page by follwing:- String user=(String... page its give null value
Java swing: get selected value from combobox
Java swing: get selected value from combobox In this tutorial, you will learn how to get selected value from combobox. The combobox provides the list... imposed an actionlistener on the combobox in order to get the selected value from
Get form value in same page - JSP-Servlet
Get form value in same page  Hello friends, Can we get a form field value in the same to be processed in java coding. For example
How to get more than one value from ajax
How to get more than one value from ajax  I have multiple select list box in php. i filled the value using ajax. how to get different value to fill the same list box Ex. option value as id option name as some string
Get JTextField value from another class
Get JTextField value from another class   ... value from other class. For this, we have created two classes ClassA.java and ClassB.java. In ClassA, we have defined a textbox 'text1' that will get the value from
Get radio button value after submiting page
Get radio button value after submiting page  Radio buttons are dynamically generated.After selecting radio button & submitting the page , the value of the selected radio button get displayed in that jsp page. <
Get current page URL from backing bean
Get current page URL from backing bean  How to get current page URL from backing bean
JSP Variable in Javascript
JSP Variable in Javascript          JSP Variable in Javascript helps you to pass jsp variable to javascript. The JavaScript include a function
how to load value in dropdown list after selecting value from first dropdown list using javascript
how to load value in dropdown list after selecting value from first dropdown list using javascript  how to load value in dropdown list after selecting value from first dropdown list using javascript
JavaScript display variable in alert
JavaScript display variable in alert  How to display variable in alert box? I am using javascript.   <html> <head> <script... variable is declared by using var keyword.This variable can hold any type of value
Pass value from JSP to JavaScript
Pass value from JSP to JavaScript       We can also pass the value from a JSP page to the java... a function hello() which takes value from the jsp page on click of some button

Ads