Passing JavaScript value to Jsp

Hi,
Any idea how to pass a value from javascript to jsp page when the page gets load on browser.
I use below code but an event is require to pass the value. Is there any code that pass automatically the value from javascript to jsp.
<html>
<head>
<title>Passing Javascript value to Jsp</title>
<script type="text/javascript" language="javascript">
var scriptVar = "Noy"
var WinNetwork = new ActiveXObject("WScript.Network")
document.write (WinNetwork.username)
document.index.hiddenTextBox.value = WinNetwork.username
</script>
</head>
<%
String jspVar = null;
if(request.getParameter("submit") != null){
     jspVar = request.getParameter("hiddenTextBox");
     out.println("Jsp Var : " + jspVar);
%>
<body>
<form name="index" onSubmit="index.jsp" method="post">
<input type="hidden" name="hiddenTextBox"><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
Thanks,
~ukbasak

JSP/Java runs at the server side, produces a HTML page, sends it to the client side and then stops running.
HTML, containing under each CSS and JS, arrives at the client side and runs at the client side only.
To invoke JSP/Java using HTML you need to fire a request to the server side. That can be either a plain vanilla <a> link, a <form> to be submitted or an asynchronous Ajaxical request.
That said, the use of ActiveX in web applications is discouraged. It's a Microsoft IE proprietaty. With other words, it isn't and won't be supported by all alternative browsers which the other half of the world is using.

Similar Messages

  • Passing JavaScript values to JSP variables

    Can any body correct the follwing code
    <Script language="JavaScript">
    function test( x )
    <%
    int num = x;
    num = num * 2;
    %>
    v.value = "<%out.print(num);%>";
    <input type="button" name="b" value="test" onClick="test(5)">
    <input type="text" name="v" value="0">
    In short, I am trying to pass JavaScript value to JSP variable. I hope that it is possible to do that. If it is possible then how can I do it. I want to assing the variable x passed to the JavaScript function called test to the JSP variable called num.
    Regards,
    Ageel

    Thank you for your reply,,,
    I think then the only way to do it is to post the
    value on the server and then use request.getParameter
    method in jsp code
    but the question now how can I post values to the
    server using JavaScript without reloading the pageyes... you can to it by create a new popup window which will submit the value to server after page was loaded... then, server return a value to the same window in html/jsp page which then using javascript to set it back to the opener and close up the window... however, this is not a good choice unless you have no other alternative...
    >
    There is other possible solution
    if I can get the text field value from the same page
    without reloading it that would work fine and will
    solve my problem, is it possible?yes... you can get the value from the textfield...
    for example :
    function showValueInTextField()
        alert(document.forms[0].elements["mytextfieldname"].value);
    >
    My final question> can jsp change things on the same
    page without reloading it. I mean can it work like
    JavaScript so that I can use it's internal functions
    instead of using java script :S
    not really know what you trying to say here...

  • Passing javascript values to jsp without refreshing the page

    Hi,
    How do u pass a value of a javascript variable to the jsp without refreshing the page ?
    For example, a file called test.jsp in which a javascript variable x contains value 254. I need to pass the value of x to a method declared in test.jsp(same page).

    Hi Mona,
    when i say refresh i do mean a blink of the browser.
    This is a small example i wrote to show you how you can pass javascript varables to JSP variables. If you don't want the refresh to be seen by the user just include this code in a hidden frame on a page and instead of refreshing the entire page, refresh the hidden frame.
    i have to say, i didn't test the code so i don't guarantee it's flawless.
    if you need an more detailed example just tell me, i'll create one, but it won't be for today :)
    <html>
    <head>
         <title>Log in to the system</title>
    </head>
    <body>
    <script>
    //we retrieve the parameter 'user' from the URL
    <%
      String username = request.getParameter("user");
    %>
    var user = "<%= username%>";
    //check if there is a username in the URL
    if(user=="null")
      //there is no username so we log the person in as a guest
      user="guest";
      //we refresh the page and set the user parameter to 'guest'
      //the parameter now contains the javascript variable 'user'.
      //The parameter can be read by the JSP (see the top op this script).
      //This way we gave the javascript variabele to the JSP variable
      location="login.jsp?user="+user;
    else if(user=="guest")
    {  alert("Welcome "+user+", I hope you like this site"); }
    else
    {  alert("Welcome "+user+", I'm glad to see you again"); }
    </script>
    </body>
    </html>

  • Passing javascript value to jsp param

    Hi all,
    I want to be able to pass the return value of function getUrl() to jsp param...Is this a correct way? it's not working.... What should I assign to the value of param?
    <HTML>
    <HEAD>
    </HEAD>
    <script language="javascript">
    function getUrl()
         var url=window.location;
         return url;
    </script>
    <BODY>
    <jsp:include page='GetFileServlet' flush="true" >
    <jsp:param name="url" value= "return getUrl()"/>
    </jsp:include>
    </BODY>
    </HTML>
    thank you for your time and assistance

    Hi all,
    I want to be able to pass the return value of
    function getUrl() to jsp param...Is this a correct
    way? it's not working.... What should I assign to
    the value of param?
    <HTML>
    <HEAD>
    </HEAD>
    <script language="javascript">
    function getUrl()
         var url=window.location;
         return url;
    </script>
    <BODY>
    <jsp:include page='GetFileServlet' flush="true" >
    <jsp:param name="url" value= "return getUrl()"/>
    </jsp:include>
    </BODY>
    </HTML>
    thank you for your time and assistanceThis can't be done, since the jsp call will be exercised on the server, before the page gets sent to the user, while the javascript gets performed on the client (well after the jsp is done its job).
    An all server-side solution would be what you needed:
    <HTML>
        <HEAD>
        </HEAD>
        <BODY>
            <jsp:include page='GetFileServlet' flush="true" >
                <jsp:param name="url" value= "<%=request.getRequestURL()%>"/>
            </jsp:include>
        </BODY>
    </HTML>

  • Passing Javascript values to JSP

    Hi,
    I have a select box and i get the selected value using the javascript. The variable that stores the value should be passed to the JSP. I need to know , how i an do the same.
    When a user clicks on a option I call a javascript function:
    function myFun()
    var text = document.myform.selectboxname.options[index].text;
    return text;
    I need to get the value returned.
    The select option is as follows.
    <select name="sel" multiple onChange=myFun()>
    How can i get the value "text".
    Kindly help.

    if yes.....my functions returns a value...how can i
    access the same.You can't, in the way you want it. You need the function to put the value where it's supposed to go.
    I'm sorry, but this question is clearly out of scope for this board. Look for a Javascript support forum. Just the fact that the HTML originated from a JSP doesn't make it a Java question.

  • How to pass JavaScript value to JSP variable

    I know this is not possible. But I need to do this :
    <script language = "Javascript">
    function findElement() {
    for(i=0; i<document.forms[0].elements.length; i++){
    if(document.forms[0].elements.type == 'text') {
    var elName = document.forms[0].elements.name;
    var elValue = document.forms[0].elements.value;
    // Display element name and value
    //alert(elName +' = '+ elValue)
    <%
    String elName = elName;
    System.setProperty(%>elName<%, %>elValue<%);
    %>
    </script>
    in JSP. I need to get the name and value of the textbox in the form to just change one property on the JSP System. Any help pls

    Thanks man, I think that would work.
    I found something else already though and it works on the same page
    <%
         Enumeration parameters = request.getParameterNames();
         String parameterValue = " ";
         String parameterName = " ";
                   while (parameters.hasMoreElements()) {
                        parameterName = (String) parameters.nextElement();
                        parameterValue = request.getParameter(parameterName);
                   out.println("NAME =========" + parameterName);
                   out.println("VALUE =========" + parameterValue);
                   //System.setProperty(parameterName, parameterValue);
         %>
    Thanks again for the help

  • How to pass javascript variable to jsp function

    i want to check which table header (that is <th> in html )is clicked and based on that a jsp funtion do a query in database and should show records in sorted way according to which column head is clicked.
    Table is created in html.
    My function is
    Vector varray = workcaseid.getWorkcaseId(Long.parseLong(MasterAccountNumber),SelectedColumn);
    <table border="1">
              <th ><label onClick="<%SelectedColumn="workcase_id";%>">Workcase Id</label></th>
              <th><label onClick="<%SelectedColumn="status_id";%>">Status</label></th>
    <tr><td>etc</td></tr>
    </table>

    im using bean for business login, following mvc model,and i think mvc is one of good design practice to use.
    <jsp:useBean id="workcaseid" scope="session"class="beanFiles.SearchWorkcaseId" />
    varray = workcaseid.getWorkcaseId(Long.parseLong(MasterAccountNumber),SelectedColumn);
    just tell me whether it is possible to pass javascript variable to jsp variable or not.i can do it by using hidden input type,using form and submit button.

  • Need a fast answer... passing javascript variable to jsp page (how to use)

    This test application has 3 frames.
    I'm assigning a value "stuff" to a variable ("testfield1") in a javascript function ("getTest") that exists inside an html frame (testpage1.html)
    Then, I click on the "test submit" hypertext link to pass the value of "testfield1" to the JSP frame (testpage2.jsp) by invoking a function ("getData") in "testpage2".
    In function ("getData"), I am passing the variable "testfield1" as a parameter to the "getData" function in "testpage2".
    In "testpage2" - in the ("getData" function) I try to assign the value of the variable "testfield1" to another variable called "testfld1".
    Then, I try to extract the value of "testfld1" into a variable called "tstfld1" in a JSP scriptlet
    ....I.E. [ String tstfld1  = request.getParameter("testfld1");  ]
    But, the value is apparently not passed successfully, as tstfield1 appears to be "null".
    Can anyone explain what I'm doing incorrectly?
    The code for this test app is below...
    ********testpage0 - the parent frame*********
    <HTML>
    <HEAD>
    <TITLE>GlobalView Reports and Trending Menubar</TITLE>
    </HEAD>
    <FRAMESET FRAMEBORDER="0" ROWS="15%,85%">
    <FRAME SRC="testpage0.html" NAME="testhtmlparent">
    <FRAMESET FRAMEBORDER="0" COLS="23%,77%">
    <FRAME SRC="testpage1.html" NAME="testhtml">
    <FRAME SRC="testpage2.jsp" NAME="testjsp">
    </FRAMESET>
    </FRAMESET>
    </HTML>
    *******testpage1.html********
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <html>
         <head><title>testpage1</title>
         <link rel="stylesheet" type="text/css" href="./standard.css">
              <script LANGUAGE="JavaScript">
              parent.frames[2].location = "blank.html";
              function getTest(reportType)
                   testfield1 = "stuff";
                   alert("testpage1.html...testfield1=" + testfield1 + ", reportType=" + reportType);
                   parent.frames[2].location = "testpage2.jsp";
                   parent.frames[2].getData(testfield1);
                   return;
              </script>
         </head>
         <body bgcolor="#FFFFFF" text="#000000">
              <form name="reportRange">
                   <center>
                        <fieldset style="padding: 0.5em" name="customer_box">
                        <table cellpadding="0" cellspacing="0" border="0">
                             <tr class="drophead">
                                  <td valign="top" height="0" ><span class="drophead">
                                       test submit
                                  </td>
                             </tr>
                        </table>
                        </fieldset>
                   </center>
              </form>
         </body>
    </html>
    *******testpage2.jsp*********
    <%@ page language="java" import="java.io.*, java.util.*" errorPage="error.jsp" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <html>
         <head>
         <title>testpage2</title>
         <script language="JavaScript">
              function getData(testfield1)
                   alert("testpage2.jsp...testfield1=" + testfield1);
                   document.pageData.testfld1.value = testfield1;
                   document.pageData.submit();
         </script>
         </head>
         <body>
              <%
                   String error;
              %>
              <div id="HiddenForm">
                   <form name="pageData" method="post" action="testpage2.jsp" target="_self">
                   <input type="hidden" name="testfld1" value="0">
              </form>
              </div>
              <%
                   String tstfld1 = request.getParameter("testfld1");
              %>
              <P> testfld1 = <%= tstfld1 %> </P>
         </body>
    </html>

    parent.frames[2].getData(testfield1); is in testpage1.html
    so in the document.pageData.testfld1.value = testfield1; document = testpage1.html( not testpage2.html)
    modifying the getData to accept the document object, and refering this object to parent.frames[2].document may help you.
    good Luck ....

  • Assign Javascript Value to JSP

    I have a dynamic link that links to a Javascript function:
    test
    The javascript function:
    function frames(testing)
    <%=testHere%> = testing
    <%
    HttpSession testSession = request.getSession(true);
    testSession.putValue("tested", testHere);
    %>
    I want to assign the javascript value, testing, into JSP value,testHere, which will be place in the session, which is :~
    .......putValue("tested", testHere).
    Does anyone know how to solve it? =)
    Thanks in advance...

    You can't. As is stated here about 3 times a day, Java, the JSP code, and servlets run on the Server, while javascript runs on the client (in the browser). By the time javascript begins to run, the JSP is compiled, run, the response generated and sent to the browser as HTML.
    The only means to do this is to send the variable back to the browser by requesting the same or another page and including the javascript value as a parameter to that page.

  • How to pass the value from JSP or HTML  to Applet

    Plz reply ....How can we pass the value from the JSP Page or from HTML page to Applet embedded in same page....

    Hi,
    <applet codebase = "."
    archive = foo.jar"
    code = "com.bar"
    name = "bar"
    id = "bar"
    width = "<%=Request["width"] %>"
    HEIGHT = "<%=Request["appHeight"] %>"
    hspace = "0"
    vspace = "0"
    align = "middle"
    alt     = "Applet is Loading..."
    >
         <param name="LANGUAGE"                value="<%=Request["lan"] %>">          
         <param name="LOGOUT_USER_URL"           value="EndSession.asp">
         <param name="DATA_READ_INTERVAL"      value="10000">
         <param name="REFRESH_INTERVAL"           value="5000">     
         <param name="DEFAULT_FONT"           value="Arial">
    </applet>
    pass values @ ur html or jsp page to Applet as parameters.
    Refer above code. By using getParameter() method of Applet, u can take values inside applet.

  • How To Pass the value from JSP to Applet

    plz reply how can we pass the value from the JSP to Applet ...the applet is embedded in JSP page....

    Hi,
    <applet codebase = "."
    archive = foo.jar"
    code = "com.bar"
    name = "bar"
    id = "bar"
    width = "<%=Request["width"] %>"
    HEIGHT = "<%=Request["appHeight"] %>"
    hspace = "0"
    vspace = "0"
    align = "middle"
    alt     = "Applet is Loading..."
    >
         <param name="LANGUAGE"                value="<%=Request["lan"] %>">          
         <param name="LOGOUT_USER_URL"           value="EndSession.asp">
         <param name="DATA_READ_INTERVAL"      value="10000">
         <param name="REFRESH_INTERVAL"           value="5000">     
         <param name="DEFAULT_FONT"           value="Arial">
    </applet>
    pass values @ ur html or jsp page to Applet as parameters.
    Refer above code. By using getParameter() method of Applet, u can take values inside applet.

  • Passing parameter values to jsp

    hi i have got a slight probelm that my jsp doesnt print out teh value that is being to it from teh wml
    my wml file is:
    <b><big> Subject:</big></b>
                             <input type ="text" name="srch" height="20" format="*X,*x"/>
                             <do type="accept" label="Search">
                             <go href="http://localhost:8080/srch2.jsp" method="post">
                             <postfield name="Subject" value="$srch"/>
    jsp:
    <?xml version="1.0" encoding="utf-8"?>
         <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
              "http://www.wapforum.org/DTD/wml13.dtd">
    <%@ page language="java" contentType="text/vnd.wap.wml"%>
    <wml>
    <card id="srch" title="Search">
         <p>
              <%
                   String Search;
                   Search=(String)request.getParameter("srch");
                   out.println("<br/>Search is"+Search);
              %>
              </p>
         </card>
    the reulst i get is Search isnull, where is the probelm?
    thank you very much

    hi thanks for replying
    my form is here:
    <?xml version="1.0" encoding="utf-8"?>
         <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
              "http://www.wapforum.org/DTD/wml13.dtd">
    <wml>
         <card id="search" title="Search">
                   <p align="left">
                        <fieldset title="subject">
                             <b><big> Subject:</big></b>
                             <input type ="text" name="srch" height="20" format="*X,*x"/>
                             <do type="accept" label="Search">
                             <go href="http://localhost:8080/srch2.jsp" method="post">
                             <postfield name="Subject" value="$srch"/>
                             </go>
                             </do>
                        </fieldset>     
                   </p>
         </card>
    </wml>
    would you be bale to tell what is worng anfd why it doesnt print?
    thank you

  • Passing Multiple values from jsp to servlet

    Dear all,
    I am trying to do a very simple thing. I need to pass names of all products that have been added to the cart.
    Below is my jsp. Basically I am trying to make something very basic using ajax, and later actually build it.
    heres my code with 2 questions... all I need to do is to pass the names of the products.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <TITLE>ShowCart.jsp</TITLE>
    </HEAD>
    <script>
    xhr = null
    var flag = false;
    var amount = 0;
    function getData(url,divid,prodName){
              var as = "added"+divid // this is the divid
              if (document.getElementById(as)!=null)
                   document.getElementById(as).innerHTML ="adding"
           if (window.XMLHttpRequest){
             xhr=new XMLHttpRequest()
           else if (window.ActiveXObject){
             xhr=new ActiveXObject("Microsoft.XMLHTTP")
           if (xhr){
              xhr.onreadystatechange=callback       
             xhr.open("GET",url,true)
             xhr.send(null)
             setDivid(as);
             updateCart(divid,prodName);
           else{
             alert("XMLHTTP not supported")
    function setDivid(as){
    if(flag){
         document.getElementById(as     ).style.backgroundColor = "RED";
            document.getElementById(as).innerHTML = "item added";
    function updateCart(divid,prodName){
    amount += divid;
    document.getElementById("amount").innerHTML = "price is "+amount;
    udpateSubmitData(prodName);
    function updateSubmitData(prodName){
    var = document.getElementById("Hidden"+prodName).value;
    //do I need to do something here to submit the data ? ------------------1
    function callback(dd){
           // when finished
           if (xhr.readyState==4){
                  //  OK
                  if (xhr.status==200){
                 // process the result.
                  flag = true;
           else{
                  alert("error")
    </script>
    <BODY>
    <P>Place content here.</P>
    The products are :
    <%
    if(request.getAttribute("Products")!= null){
    java.util.ArrayList list = new java.util.ArrayList();
    list = (java.util.ArrayList)request.getAttribute("Products");
    for(int i=0; i<list.size(); i++){
    com.deere.sc.bean.ProductBean pb1 = new com.deere.sc.bean.ProductBean();
    pb1 = (com.deere.sc.bean.ProductBean)list.get(i);;
    %>
    <table>
    <td>
    <% out.println(pb1.getProductName());
         out.println(pb1.getProductPrice());
         %> <td> <div id="added<%= i %>"> </div> </td>
    <td>     <a href = "javaScript:getData('/SC/AddToCart?name=<%= pb1.getProductName() %>',<%= i %>,<%= pb1.getProductName() %>);"> add to cart</a>  </td>
         <input type="hidden" id="Hidden<%= pb1.getProductName() %>" value ="<%= pb1.getProductName() %>">
         </td>
         <%
    }//end for
    }//end if
    %>
    </table>
    Thank you for shopping at the looters .. heh ;)
    Total amount of money in your cart is <div id ="amount"> </div>
         <a href = "/SC/CheckOut">Check out cart</a>
    <!-- OR may be just add Hidden tags here ?  ______________________2 -->
    </BODY>
    </HTML>Any help on tips for proceeding from here will be helpful.
    thanks in advance

    Dear all,
    I am trying to do a very simple thing. I need to pass names of all products that have been added to the cart.
    Below is my jsp. Basically I am trying to make something very basic using ajax, and later actually build it.
    heres my code with 2 questions... all I need to do is to pass the names of the products.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <TITLE>ShowCart.jsp</TITLE>
    </HEAD>
    <script>
    xhr = null
    var flag = false;
    var amount = 0;
    function getData(url,divid,prodName){
              var as = "added"+divid // this is the divid
              if (document.getElementById(as)!=null)
                   document.getElementById(as).innerHTML ="adding"
           if (window.XMLHttpRequest){
             xhr=new XMLHttpRequest()
           else if (window.ActiveXObject){
             xhr=new ActiveXObject("Microsoft.XMLHTTP")
           if (xhr){
              xhr.onreadystatechange=callback       
             xhr.open("GET",url,true)
             xhr.send(null)
             setDivid(as);
             updateCart(divid,prodName);
           else{
             alert("XMLHTTP not supported")
    function setDivid(as){
    if(flag){
         document.getElementById(as     ).style.backgroundColor = "RED";
            document.getElementById(as).innerHTML = "item added";
    function updateCart(divid,prodName){
    amount += divid;
    document.getElementById("amount").innerHTML = "price is "+amount;
    udpateSubmitData(prodName);
    function updateSubmitData(prodName){
    var = document.getElementById("Hidden"+prodName).value;
    //do I need to do something here to submit the data ? ------------------1
    function callback(dd){
           // when finished
           if (xhr.readyState==4){
                  //  OK
                  if (xhr.status==200){
                 // process the result.
                  flag = true;
           else{
                  alert("error")
    </script>
    <BODY>
    <P>Place content here.</P>
    The products are :
    <%
    if(request.getAttribute("Products")!= null){
    java.util.ArrayList list = new java.util.ArrayList();
    list = (java.util.ArrayList)request.getAttribute("Products");
    for(int i=0; i<list.size(); i++){
    com.deere.sc.bean.ProductBean pb1 = new com.deere.sc.bean.ProductBean();
    pb1 = (com.deere.sc.bean.ProductBean)list.get(i);;
    %>
    <table>
    <td>
    <% out.println(pb1.getProductName());
         out.println(pb1.getProductPrice());
         %> <td> <div id="added<%= i %>"> </div> </td>
    <td>     <a href = "javaScript:getData('/SC/AddToCart?name=<%= pb1.getProductName() %>',<%= i %>,<%= pb1.getProductName() %>);"> add to cart</a>  </td>
         <input type="hidden" id="Hidden<%= pb1.getProductName() %>" value ="<%= pb1.getProductName() %>">
         </td>
         <%
    }//end for
    }//end if
    %>
    </table>
    Thank you for shopping at the looters .. heh ;)
    Total amount of money in your cart is <div id ="amount"> </div>
         <a href = "/SC/CheckOut">Check out cart</a>
    <!-- OR may be just add Hidden tags here ?  ______________________2 -->
    </BODY>
    </HTML>Any help on tips for proceeding from here will be helpful.
    thanks in advance

  • Method to pass multiple values from jsp

    Hi All,
    There are multiple rows in the jsp form with each having a unique id.
    I want to update some fields in all the rows. Then pass all the data to the controller. From the controller all the data should go to the database one row at a time .How do i do this........
    Any help would be appreciated
    Thanks

    You can make use of ArrayList
    In CO
    OAApplicationModlue am = pageContext.getApplicationModule(webBean);
    ArrayList values = (ArrayList) am.invokeMethod("PassArray");In AM
    public ArrayList PassArray
    ArrayList values = new ArrayList();
    values.add("value")
    values.trimToSize();
    return values;
    }Thanks
    AJ

  • Syntax to pass parameter value to jsp using href in out.println

    Hi,
    I have the URL in the form as mentioned below:
    <a href="b2c/marketing/showDocDetail.jsp"> <%=doc_no%></a>
    I've created the hyperlink using href tag to the document number in the jsp using the below syntax.
    <% String a1 = "Document ";
           String a2 = "<a href=\"";
           String a3 = "marketing/showDocDetail.jsp\">";
           String a4 = doc_no;
           String a5 = "</a>";
    out.println(a1a2a3a4a5);
    %>
    When clicked the doc_no is passed to backend RFC and export parameter is retrieved to result.jsp where values along with doc_no are displayed.
    the value after clicked is not being passed to action.java class that does the retreival.
    Needful, backend class, bom, entry in config.xml is all maintained.
    Please help me out with the syntax to pass the parameter value into java class

    Hi Bharathi,
    try below.
    <%
           String a1 = "Document ";
           String a2 = "<a href=\"";
           String a3 = "marketing/showDocDetail.do?docNo=";
           String a4 = doc_no;
           String a5 = " \">";
           String a6 = doc_no;
           String a7 = "</a>";
    out.println(a1+a2+a3+a4+a5+a6+a7);
    %>
    I assume doc_no is java variable contains value of document number
    Now create action entry in config.xml file. Suppose "actionDoc.java" class process it.
    <action path="/marketing/showDocDetail" type="com.xyz.actions.actionDoc">
                   <forward name="success" path="/marketing/showDocDetail.jsp"/>
                   <forward name="error" path="/marketing/showDocDetail.jsp"/>
    </action>
    We are passing parameter docNo=doc_no to action class actionDoc.java in this class you can retrieve request parameter docNo from request object and then process it as you want.
    Let me know if you face any problem or error.
    eCommerce Developer
    Edited by: Ecommerce Developer on Nov 9, 2009 8:35 AM

Maybe you are looking for

  • Can't restore iPod because it doesn't appear on desktop

    I connected my ipod to my Mac, it showed up on the desktop but not in iTunes. The ipod window said Do not Disconnect. I waited a few minutes, then chose Eject iPod. I restarted the mac, reconnected iPod using a different FireWire port. The iPod no lo

  • Why won't my computers talk to each other?

    I have the following in my home: Intel iMac (10.6.4) MacBook (10.5) 2 ea Mac Minis (10.6.4) Time Capsule My iMac can see and connect to the MacBook and one of the Mac Minis. The MacBook can see and connect to the iMac and one of the Mac Minis. The Ma

  • Converting forms central form to PDF

    How do I convert my forms central registration form I created in the software itself to a PDF format.  I have called tech support for forms central and they are never able to assist me or even understand me.  Today I was told they are not trained in

  • Acrobat 8.1.2 freezes

    When you go to the Help, About Option the whole program freezes requiring a forced closure through task manager.

  • Extending P60 Power

    Hey all, Any advice on extending the DC side of the P60 camera?  How far could I extend it, what size cabling, tolerance of the P60? Thanks, Justin