How to pass a variable in a servlet to another jsp file?

The variable that I wanted to pass is in a doGet function....
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.net.*;
import java.sql.*;
import java.io.*;
import java.util.*;
public class www extends HttpServlet
     public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException     
    {try{
         String code = request.getParameter("Text");
         String current;
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
            URL yahoo = new URL("http://www.yahoo.com"+request.getParameter("Text"));<<not the actual
            URLConnection yahooConnection = yahoo.openConnection();
            DataInputStream dis = new DataInputStream( yahooConnection.getInputStream());
            String inputLine;
            String whole=null;
            int startPos,endPos,a,b,c,d,e;
            while ((inputLine=dis.readLine( ))!= null) {
            whole+=inputLine;
            dis.close();
                a=whole.indexOf("Previous Close",0);
                b=whole.indexOf("Previous Close",a+1);
                c=whole.indexOf("Previous Close",b+1);
                d=whole.indexOf("Previous Close",c+1);
                e=whole.indexOf("Previous Close",d+1);
                startPos = whole.indexOf("right>",e) + 6;
                endPos = whole.indexOf(">",startPos) -4;
                   current=(whole.substring(startPos,endPos));
                    out.println(*current*);
            catch (MalformedURLException me)
                    System.out.println("MalformedURLExc eption: " + me);
            catch (IOException ioe)
                    System.out.println("Exception: " + ioe);
}The String CURRENT is the one that I wanted to pass to another jsp file.....Or How can I call that Current in another JSP file?
An Alternative is I wanted to directly input that String CURRENT in a mysql Database using jdbc but I dont know how to do that.....THANKS!
Edited by: tr3k on Feb 22, 2008 12:40 AM

If used this but it returns
                   current=(whole.substring(startPos,endPos));
                    out.println(current);
                    HttpSession session = request.getSession();
                    session.setAttribute("current", current);
                              out.println("<form action = \"mVal_pass.jsp\" method= \"post\">");
        out.println("Update current Market Value of "+code+"?<p>");
          out.println("<input type=\"submit\" value=\"submit\">");
        out.println("</form>");This is my JSP page which supposed to be is getting the value of String CURRENT
<HTML>
<HEAD></HEAD>
<BODY>
  <% String codek = request.getParameter("current");%>
<%out.println(codek);%>
</BODY>
</HTML>I am getting the value of String Current but when I passed it, it returns NULL value...Help guys!

Similar Messages

  • How to pass a variable from one class to another class?

    Hi,
    Is it possible to pass a variable from one class to another? For e.g., I need the value of int a for calculation purpose in method doB() but I get an error <identifier> expected. What does the error mean? I know, it's a very, very simple question but once I learn this, I promise to remember it forever. Thank you.
    class A {
      int a;
      int doA() {
          a = a + 1;
          return a;
    class B {
      int b;
      A r = new A();
      r.a;  // error: <identifier> expected. What does that mean ?
      int doB() {
         int c = b/a;  // error: operator / cannot be applied to a
    }Thank you!

    elaine_g wrote:
    I am wondering why does (r.a) give an error outside the method? What's the reason it only works when used inside the (b/r.a) maths function? This is illegal syntax:
    class B {
      int b;
      A r = new A();
      r.a;  //syntax error
    }Why? Class definition restricts what you can define within a class to a few things:
    class X {
        Y y = new Y(); //defining a field -- okay
        public X() { //defining a constructor -- okay
        void f() { //defining a method -- okay
    }... and a few other things, but you can't just write "r.a" there. It also makes no sense -- that expression by itself just accesses a field and does nothing with it -- why bother?
    This is also illegal syntax:
    int doB() {
          A r = new A();
          r.a;  // error: not a statement
    }Again, all "r.a" does on its own is access a field and do nothing with it -- a "noop". Since it has no effect, writing this indicates confusion on the part of the coder, so it classified as a syntax error. There is no reason to write that.

  • ADF : How to pass a variable from one frame to another frame ?

    Hi,
    I have an html page divided into 3 frames, all inside a frameset. Each frame are linked to a specific .jsf page (src attribute). When I list a list thanks to a ADF datatable in ONE frame, each row has a "show more" button. When I click this button I succeeded to print row detail inside the same frame thanks to the processScope ADF's native variable. The problem is that I want to display the row detail in another frame, clicking from this current frame. So for this I need to reload the other frame which display the content of the processScope variable.
    For this I use the javascript code :
    => parent.frames['bottomRight'].location.reload()
    Just before refreshing, I put the variable in the processScope of course like it appears in the backing bean :
    FacesContext context = FacesContext.getCurrentInstance();
              CLPRMBuilding building = (CLPRMBuilding)
         context.getApplication().getVariableResolver().resolveVariable(context, "building");
         if (building == null)
         return "error";
         AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
         afContext.getProcessScope().put("buildingDetail", building);
    Next, when the user click on the button "show more" a binding CoreCommandButton component is done. And the accessor's code is executed :
    public void setShowMoreCommandButton(CoreCommandButton showMoreCommandButton) {
              this.showMoreCommandButton = showMoreCommandButton;
              showMoreCommandButton.setOnclick("parent.frames['bottomRight'].location.reload()");
    And so the other frame is reloaded ! But the "buildingDetail" variable seems not to be present in the processScope because in the jsf page displayed by the other frame no content is printed, like if the variable were not initialized. How to do then ? How to pass the buildingDetail variable to the other frame which I need to reload to refresh it's content ?

    elaine_g wrote:
    I am wondering why does (r.a) give an error outside the method? What's the reason it only works when used inside the (b/r.a) maths function? This is illegal syntax:
    class B {
      int b;
      A r = new A();
      r.a;  //syntax error
    }Why? Class definition restricts what you can define within a class to a few things:
    class X {
        Y y = new Y(); //defining a field -- okay
        public X() { //defining a constructor -- okay
        void f() { //defining a method -- okay
    }... and a few other things, but you can't just write "r.a" there. It also makes no sense -- that expression by itself just accesses a field and does nothing with it -- why bother?
    This is also illegal syntax:
    int doB() {
          A r = new A();
          r.a;  // error: not a statement
    }Again, all "r.a" does on its own is access a field and do nothing with it -- a "noop". Since it has no effect, writing this indicates confusion on the part of the coder, so it classified as a syntax error. There is no reason to write that.

  • How to pass a variable from one scene to another

    I'm making a call from one scene to another via a button, but I have two buttons calling the same scene, each for a different purpose, and I need to pass certain variables tied to each button to that called scene. How can I do this?

    import flash.events.MouseEvent;
    stop();
    var nam:String="test";
    testscene2.addEventListener(MouseEvent.CLICK,fn);
    function fn(e:MouseEvent){
        nam="Raja";
        gotoAndStop(1,"Scene 3");
    testscene1.addEventListener(MouseEvent.CLICK,fn1);
    function fn1(e:MouseEvent){
        nam="Emily";
        gotoAndStop(1,"Scene 2");

  • How to pass a variable from one form to another in Form 6i

    I have a user-password screen in one form. And every module has separate form. I need to pass user-name and user-level to all the form.
    I am using Form 6i and Oracle 8.
    Thanx in advance
    Vikas

    DECLARE
         PL_ID PARAMLIST;
    BEGIN
         pl_id := GET_PARAMETER_LIST(:your parameter name);
         IF ID_NULL(PL_ID) THEN
         PL_ID := CREATE_PARAMETER_LIST(:your parameter name);
         ELSE
         DESTROY_PARAMETER_LIST(PL_ID);
         PL_ID := CREATE_PARAMETER_LIST(:your parameter name);
         END IF;
         ADD_PARAMETER(PL_ID,your variable,TEXT_PARAMETER,:PARAMETER.your parameter name);
         call_form ('Your Fmx Here',HIDE,NO_REPLACE,NO_QUERY_ONLY,PL_ID);
    END;
    hope this will help...
    regrds
    Kris

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • How to pass a variable more than one values?

    How to pass a variable more than one values?

    You can't.
    During 1 session, 1 ODI variable can have only 1 value at a time.
    If you need more than 1 value, you will have to do somethink like a loop inside your package, and refresh the variable value each time.

  • How to  pass a variable value into a custom planning function via a web

    Can some one tell me
    How to  pass a variable value into a custom planning function via a web template?
    What are the different types of Planning function parameters available and what is the difference between them?
    Thanks
    babu

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

  • How to pass data from one internal session to another internal session

    hi all sap experts ,
    How to pass data from one internal session to another internal session and from oneExternal session to another external session.
    Except : Import and Export parameters and SPA/GPA parameters.
    Tell me the otherWay to pass data ..
    Plz
    Thanks in advance

    hi,
      abap memory management u will understand about this concept.
    the import /export parameter will help u that passing data between two internal sessions by using abap memory.
      for syntax
    Passing Data Between Programs
    There are two ways of passing data to a called program:
    Passing Data Using Internal Memory Areas
    There are two cross-program memory areas to which ABAP programs have access (refer to the diagram in Memory Structures of an ABAP Program) that you can use to pass data between programs.
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens (see below).
    ABAP Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse. For further information, refer to Data Clusters in ABAP Memory.
    Filling Input Fields on an Initial Screen
    Most programs that you call from other programs have their own initial screen that the user must fill with values. For an executable program, this is normally the selection screen. The SUBMIT statement has a series of additions that you can use to fill the input fields of the called program:
    Filling the Selection Screen of a Called Program
    You cannot fill the input fields of a screen using additions in the calling statement. Instead, you can use SPA/GPA parameters. For further information, refer to Filling an Initial Screen Using SPA/GPA Parameters.
    Message was edited by:
            sunil kumar
    Message was edited by:
            sunil kumar

  • How to pass data from one internal session to another

    Hi SAP Experts,
    How to pass data from one internal session to another and from One external session to another external session. I used import and export parmeter and SPA/GPA parameters. What is the other way to pass data?
    Please tel me urgently
    Thank you
    Basu

    Memory Structures of an ABAP Program
    In the Overview of the R/3 Basis System you have seen that each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
    The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session.
    Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.
    The memory area of each session contains an area called ABAP memory. ABAP memory is available to all internal sessions. ABAP programs can use the EXPORT and IMPORT statements to access it. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    All ABAP programs can also access the SAP memory. This is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters are often used to preassign values to input fields. You can set them individually for users, or globally according to the flow of an application program. SAP memory is the only connection between the different sessions within a SAPgui.
    The following diagram shows how an application program accesses the different areas within shared memory:
    In the diagram, an ABAP program is active in the second internal session of the first main session. It can access the memory of its own internal session, ABAP memory and SAP memory. The program in the first internal session has called the program which is currently active, and its own data is currently inactive on the stack. If the program currently active calls another program but will itself carry on once that program has finished running, the new program will be activated in a third internal session.
    Data Clusters in ABAP Memory
    You can store data clusters in ABAP memory. ABAP memory is a memory area within the internal session (roll area) of an ABAP program and any other program called from it using CALL TRANSACTION or SUBMIT.
    ABAP memory is independent of the ABAP program or program module from which it was generated. In other words, an object saved in ABAP memory can be read from any other ABAP program in the same call chain. ABAP memory is not the same as the cross-transaction global SAP memory. For further information, refer to Passing Data Between Programs.
    This allows you to pass data from one module to another over several levels of the program hierarchy. For example, you can pass data
    From an executable program (report) to another executable program called using SUBMIT.
    From a transaction to an executable program (report).
    Between dialog modules.
    From a program to a function module.
    and so on.
    The contents of the memory are released when you leave the transaction.
    To save data objects in ABAP memory, use the statement EXPORT TO MEMORY.
    Saving Data Objects in Memory
    To read data objects from memory, use the statement IMPORT FROM MEMORY.
    Reading Data Objects from Memory
    To delete data clusters from memory, use the statement FREE MEMORY.
    Deleting Data Clusters from Memory
    please read this which provide more idea about memory
    Message was edited by:
            sunil kumar

  • How to get result from another JSP file?

    I have to write a jsp (my.jsp) to get information from another jsp file (other.jsp).
    The other.jsp return integer value (0 / 1) so that user can tell if certain service is available or not. And in my.jsp I need to collect such result and other information from a text file to make up of a XML string.
    How can I call other.jsp to get the result? Thanks a lot.

    Hi, I think I didn't describe the problem clearly
    enough. In fact, there is a JSP file, and if our
    database is currently connected, the JSP will return
    value 1, otherwise, it will return 0. My java program
    need to get that result, and then form an XML string,
    and send the string back to the client. I'm just
    wonder how can I write such a program to read result
    from JSP file. Thanks a lot.Why is this function implemented as a JSP file? It should be implemented as a bean. It would be simple to get the information you require from that bean.

  • How to pass many variables to servlet using a URL? Ajax related.

    I have 100 text boxes in my JSP and want to pass the values stored in these text boxes to a servlet with out the need for submitting the entire page using AJAX frame work.
    I know how to peform the above in ajax if I have only 1 textbox. But how can I do that with 100 text boxes. I don't want to build a huge URL with 100 parameters.
    I am thinking may be create an array and send it to the servlet, but don't have an idea if we can do it.
    Please help me .

    You can make a POST request using an XMLHttpRequest, but you won't be "passing many variables using a URL", which seems to be one of your requirements, and which makes your question confounding(after all how do you pass many variables using a URL without putting many variables in the URL):
    req.open("POST", url, true)
    req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');     
    req.send("first=Eric&last=Kaiser");

  • How tp pass javascript variables/arrays to a servlet?

    Plz help me in passing javascript variables/arrays to a servlet

    Hi,
    I am creating table rows & columns containg text fields dynamically as follows:
    function addRowToTable()
    var tbl = document.getElementById('tblSample');
    var lastRow = tbl.rows.length;
    // if there's no header row in the table, then iteration = lastRow + 1
    var iteration = lastRow;
    var row = tbl.insertRow(lastRow);
    // right cell
    var cellRight = row.insertCell(0);
    var el = document.createElement('input');
    el.type = 'text';
    el.name = 'txtRow' + iteration;
    el.id = 'txtRow' + iteration;
    el.size = 20;
    cellRight.appendChild(el);
    Now i am calling function addRowToTable() from jsp page as + key is pressed to add rows dynamically.
    So as per rows different textfields are also getting created dynamically with different id & name.
    Now i am getting session attributes containing the values for textfields from servlet.
    but i am not able to map the values for dynamic textfields getting created?
    I want to print values in appropriate fields.
    Plz help me.

  • JSP -- how to pass a variable

    Hi,
    I am relatively new to JSP/Java and am currently trying to figure out how to pass a value gotten from running a query into another query.
    My code is below .. I am trying to pass 'tsid'. For simplicity I have hard-coded some values. I have tried 2 different methods (c:set & String) and bolded them below. I wanted to pass the tsid into the sql2 query.
    <%@ page import="java.sql.*"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%
        Connection connection = null;
        try{
            String tpid="1";
            String tdate="2005-11-11";
            String tsr01="3";
            String tsr02="54";
            String tsr03="64";
            String tsr04="90";
            String tsr05="54";
            String tsr06="17";
            String tsr07="null";
            String tsr08="null";
            String tsr09="null";
            String tsr10="null";
            String tsr11="null";
            String tsr12="null";
            String tsr13="null";
            String tsr14="null";
            String tsr15="null";
            String tz_1l1="111";
            String tz_1u1="111";
            String tz_1l2="111";
            String tz_1u2="111";
            String tz_1l3="111";
            String tz_1u3="111";
            String tz_1l4="111";
            String tz_1u4="111";
            String tz_1l5="111";
            String tz_1u5="111";
            String tz_2l1="111";
            String tz_2u1="111";
            String tz_2l2="111";
            String tz_2u2="111";
            String tz_2l3="111";
            String tz_2u3="111";
            String tz_2l4="111";
            String tz_2u4="111";
            String tz_2l5="111";
            String tz_2u5="111";
            Class.forName("org.postgresql.Driver");
            connection = DriverManager.getConnection("jdbc:postgresql:dbName","postgres","dbPassword");
            Statement stmt1 = connection.createStatement();
            Statement stmt2 = connection.createStatement();
            Statement stmt3 = connection.createStatement();
            String sql1="INSERT INTO t_test_setup_results (tsr_tpid, tsr_tester, tsr_athlete, tsr01, tsr02, tsr03, tsr04, tsr05, tsr06, tsr07, tsr08, tsr09, tsr10, tsr11, tsr12, tsr13, tsr14, tsr15, tsr_date) VALUES ('"+tpid+"' , '15', '9', "+tsr01+", "+tsr02+", "+tsr03+", "+tsr04+", "+tsr05+", "+tsr06+", "+tsr07+", "+tsr08+", "+tsr09+", "+tsr10+", "+tsr11+", "+tsr12+", "+tsr13+", "+tsr14+", "+tsr15+", '"+tdate+"' );";
         stmt1.executeUpdate(sql1);
         ResultSet rs2 = stmt2.executeQuery("SELECT tsr_id FROM t_test_setup_results WHERE tsr_date='"+tdate+"' AND tsr_tpid='"+tpid+"' AND tsr_athlete='9';");
            %>
         <c:set param="tsid2" value="${rs2.rows[0].tsr_id}" />
         <%
            String tsid="$rs2.rows[0].tsr_id}";
            String sql2="INSERT INTO t_test_zones (tz_tsrid,  tz_1l1, tz_1u1, tz_1l2, tz_1u2, tz_1l3, tz_1u3, tz_1l4, tz_1u4, tz_1l5, tz_1u5, tz_2l1, tz_2u1, tz_2l2, tz_2u2, tz_2l3, tz_2u3, tz_2l4, tz_2u4, tz_2l5, tz_2u5) VALUES ('"+tsid+"', "+tz_1l1+", "+tz_1u1+", "+tz_1l2+", "+tz_1u2+", "+tz_1l3+", "+tz_1u3+", "+tz_1l4+", "+tz_1u4+", "+tz_1l5+", "+tz_1u5+", "+tz_2l1+", "+tz_2u1+", "+tz_2l2+", "+tz_2u2+", "+tz_2l3+", "+tz_2u3+", "+tz_2l4+", "+tz_2u4+", "+tz_2l5+", "+tz_2u5+");" ;
            stmt2.executeUpdate(sql2);
    %>
         <result>success</result>
    <%
        catch (Exception e) {
            e.printStackTrace();
    %>
         <result>failure</result>
    <%
        } finally {
            try {
                connection.close();
            } catch (SQLException e) {
    %>this is the error I get with the above:
    org.apache.jasper.JasperException: /my-apps/Peak/Jsp/submitNewTestData.jsp(64,1) Attribute param invalid for tag set according to TLD
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:234)
    org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:989)
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
    org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
    org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
    org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
    org.apache.jasper.compiler.Validator.validate(Validator.java:1489)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    OK,
    here is what I currently have:
      %>
         <c:set var="tsid2" value="${rs2.rows[0].tsr_id}" />
         <%
            String tsid= tsid2;
            String sql2="INSERT INTO t_test_zones (tz_tsrid,  tz_1l1, tz_1u1, tz_1l2, tz_1u2, tz_1l3, tz_1u3, tz_1l4, tz_1u4, tz_1l5, tz_1u5, tz_2l1, tz_2u1, tz_2l2, tz_2u2, tz_2l3, tz_2u3, tz_2l4, tz_2u4, tz_2l5, tz_2u5) VALUES ('"+tsid+"', "+tz_1l1+", "+tz_1u1+", "+tz_1l2+", "+tz_1u2+", "+tz_1l3+", "+tz_1u3+", "+tz_1l4+", "+tz_1u4+", "+tz_1l5+", "+tz_1u5+", "+tz_2l1+", "+tz_2u1+", "+tz_2l2+", "+tz_2u2+", "+tz_2l3+", "+tz_2u3+", "+tz_2l4+", "+tz_2u4+", "+tz_2l5+", "+tz_2u5+");" ;
         stmt2.executeUpdate(sql2);NOW I get sucess (which is what it should be) OR that tsid2 could not be resolved. Why the back and forth errors? is it a timing thing? (ie it sometimes takes longer to query the database?? )
    If it is a timing thing, how can i fix this?

  • How to pass a Variable value into an ODI Scenario from ODI Package

    I have created an Interface that uses the variable #ENTITY_ID for retrieving entity data from the DWH; now I have generated a Scenario from the interface and placed the Scenario in an ODI Package; am not sure how to pass the #ENTITY_ID variable to the ODI Scenario?
    Any help is greately appreciated.
    Best Regards
    Bee

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

Maybe you are looking for