Problem in passing vector from an applet to servlet

Hi,
I m facing problem in reading an object in the servlet (that i send from an applet). I have used BufferedInputStream ... The servlet reads the object but it takes about 30 seconds to do this ... If i don't use BufferedInputStream, it gives an "error reading inputstream header" ... if i use it, it take 30 seconds ... i m using netscape ent. server 4.0 ...
Servlet code is as follows :
try {
InputStream in = req.getInputStream();
inputFromApplet = new ObjectInputStream(new BufferedInputStream(in));
saveVector = (Vector)inputFromApplet.readObject();
I don't understand why it takes so long ... is there any other way ? Please help on this ... you may email me on [email protected]
Thanks in advance..

When you send a Vector through a stream, it must not only pass the Vector itself, but all the objects that the Vector refers to, all the objects that those objects refer to, and so on. Combine all this data with a slow internet connection, and passing what may seem like a small Vector could take minutes or hours.
Are you sure you're passing a very small amount of data over a fast connection?

Similar Messages

  • Problem in passing data from 1 screen to another using BBP_DOC_CHANGE_BADI.

    Hi Experts,
    i am new to the SRM, i am facing problem in passing data from one screen to another.
    my requirement is that when we select one shopping cart and press the PROPOSE SOURCES OF SUPPLY button, we will fetch all the contracts that are attached to the shopping cart.
    we have implemented a BADI implementation of BBP_SOS_BADI (method BBP_SOS_CHECK) for passing some changed values to the contracts of the shopping cart into the popup screen that is displayed when we press PROPOSE SOURCES OF SUPPLY button and when we select any contract and press ASSIGN ONLY button in the popup screen the badi BBP_DOC_CHANGE_BADI is triggered.
    i have implemented another BADI implementation of BBP_DOC_CHANGE_BADI for fetching the selected contract and pass the values to another screen, but the problem is that when we select one contract and press the assign only button we are fetching the wrong contract number ( that is in the BADI method BB_SC_CHANGE parameter IT_ITEM we are fetching the wrong contract), if we again do the same procedure for the second time we are getting the correct contract.
    i am unable to understand why we are getting the wrong contract in the first time( that is we are getting contract other than the selected one).
    as per my understanding i think when we are passing data to the popup screen using BBP_DOC_CHANGE_BADI we are not updating the shopping cart with the changed data.
    can anyone tell me how we can update the SHOPPING CART with the changed contracts data, i have used BBP_PD_SC_UPDATE, BBP_PD_SC_SAVE and other shopping cart FM but nothing is happening.
    Thanks
    Tanveer

    Hello,
    What version of SRM are you on?  Have you check for OSS Notes?  I have had trouble with BBP_DOC_CHANGE_BADI but it was because of other issues.  The BADI works pretty well and it is called almost every time something happens to the shopping cart.
    I have noticed that sometimes that values are not changed til the second calling of the BADI.  I have yet understand why but I think it has to do with prompt processing. Usually, we train our requisitioners to click the 'Check'  button to flush things out.
    I don't know if I was helpful.... another thought.... could there be an error caught by BBP_DOC_CHECK_BADI that is preventing change in BBP_DOC_CHANGE_BADI?
    Regards, Dean.

  • Passing parameters from an applet to a URL

    I need to pass information from an applet to an html page or JSP page, is this possible? Thanks.

    Yes you can!
    The following code might works (with some modifications ;)):
    AppletContext context = this.getAppletContext();
    URL url = new URL("http://host:port/path?parameter=value");
    context.showDocument(url, "windowName");In addiction, consider java.net.URLEncoder.encode() method to encode properly your parameters.
    Regards
    Paolo

  • Passing value from javascript function to servlet

    Hello everybody,
    i need to pass parameter from javascript function to servlet.
    what i wrote is :
    function callPopulateServlet(t)
    var h =document.NewRequest.services;
    var y = t.selectedIndex;
    alert(h.options[y].value);
    var id=h.options[y].value;
    <%session.setAttribute("id",id);%> // am getting error at this point
    document.NewRequest.submit();
    with this id am quering values from database through servlet.
    any body knows plz help me.
    thanks,
    anil.

    this is the error am getting
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • Facing Problem with passing Values from One report to another

    Hi,
    I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
    Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
    Please, let me know whats going wrong.
    Thanks for the help.

    sorry for the late updation.
    My First Report, Summary level is a Pivot Table.
    I tried the same report with Table option, the value is passing correctly.
    Is there a way to get rid of this situation using Pivot table.
    Thanks for your help.
    below is the original request.
    Hi,
    I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
    Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
    Please, let me know whats going wrong.
    Thanks for the help.

  • Problem in passing data from one .jsp page to another .jsp page

    i have a problem here
    Actually i have 2 jsp pages. What im trying to do here is actually i want to pass data from the first jsp page to the second for updating
    The first jsp page contains data that user wants to update in the form of table.
    <td><img src = "edit.gif" alt = "edit" border="0" ><td>
    <TD><%= Name %></td>
    <TD><%= rs.getInt("Age") %></td>
    <TD><%= rs.getString("Gender") %></td>
    So this page displays the data that users wants to update plus one image button (edit button). So when user clicks this button, all the data in this page will be brought to the second .jsp page called updatePersonal for updating.
    The problem here is that it is not displaying the existing data in the second .jsp page.
    The second page basically contains forms
    <INPUT TYPE="text" NAME="FirstName" maxlength="30" value = "<%=FirstName%>">
    Can someone please help me. I really dont know what to do..How do i get the data displayed in the text field that is passed from the first .jsp page..thankx in advance

    Please modify below code to:
    td><img src = "edit.gif" alt = "edit" border="0" ><td>
    -----------------modified code
    td><a href="updatePersonal.jsp?FirstName=<%=rs.getString(FirstName")%">&LastName=<%=rs.getString("LastName")%>&Age=<%=rs.getInt("Age")%>&Gender=<%=rs.getString("Gender")%>"><img src = "edit.gif" alt = "edit" border="0" ></a><td>
    I'm sure it works</a>

  • Problem while passing parameter from report to report.

    Hi
    I'm using forms and reports 10g, hava a problem while passing the parameter from reports to report.
    i'm using srw.set_hyperlink to call report from report.
    i have created a key value in the cgicmd.dat file called
    faccre802005-2006: report=faccre80 destype=cache desformat=pdf userid=<userid/passwd@cs> server=<servername>
    Now in the format trigger i'm using this key value
    function BTN_DEBITFormatTrigger return boolean is
    temp varchar2(5000);
    IP_ADDRESS VARCHAR2(50);
    SERVER_NAME VARCHAR2(10);
    L_ACCT_CODE VARCHAR2(14);
    begin
    SELECT MAST_INT_DESC,MAST_USER_PGM_ID INTO IP_ADDRESS,SERVER_NAME FROM MAST_INT_INFO WHERE MAST_INT_ID='VISHWA';
    temp := IP_ADDRESS||'?faccre80'||:P_FIN_YEAR||'+server='||server_name;
    temp :=temp ||'+'||'P_PREVIOUS_CODE='''||:ACCT_CODE||''''||'+'||'P_COMPANY_CODE='''||:P_COMPANY_CODE||'''';
    temp :=temp ||'+'|| 'P_FROM_DATE='''||TO_CHAR(:P_FROM_DATE,'DD-MON-RRRR')||''''||'+'|| 'P_TO_DATE='''||TO_CHAR(:P_TO_DATE,'DD-MON-RRRR')||''''||'+'||'P_TRUST_CODE='''|| :P_TRUST_CODE||'''';
    temp :=temp ||'+'|| 'P_UNIT_CODE='''||:P_UNIT_CODE||''''||'+'||' P_FIN_YEAR='''||:P_FIN_YEAR||'''';
    temp :=temp ||'+'|| 'P_LEVEL='''||:P_LEVEL||''''||'+'||'P_HEADER='''||replace(:P_HEADER,' ','%20')||''''||'+'||'P_FORMAT='''||:P_FORMAT||'''';
    SRW.Set_Hyperlink(temp);
    END;
    return (TRUE);
    end;
    Report is coming but not the expected result because parmaeters are not coming from first report to second report.
    If i dont use cgicmd file userid and password are displyed in the URL.
    Pl tell me how to pass parameter from one report to another.
    thanks and regards

    Hi
    I got the solution.
    I forgot to add %* at end of the KEY value.

  • Crystal Report - problem with passing parameters from J2EE app

    i'm trying to pass a few parameters from my java application to a crystal report using the code below:
    ParameterField pfield1 = new ParameterField();
    ParameterField pfield2 = new ParameterField();
    Values vals1 = new Values();
    Values vals2 = new Values();
    ParameterFieldDiscreteValue pfieldDV1 = new ParameterFieldDiscreteValue();
    ParameterFieldDiscreteValue pfieldDV2 = new ParameterFieldDiscreteValue();
    pfieldDV1.setValue("1056");//dform.getSelectedPeriod());
    pfieldDV1.setDescription("termId");
    vals1.add(pfieldDV1);
    pfield1.setReportName("");
    pfield1.setName("@p_termId");
    pfield1.setCurrentValues(vals1);
    fields.add(pfield1);
    // check here for null condition otherwise will throw nullpointerexception
    pfieldDV2.setValue("elect");
    pfieldDV2.setDescription("allocType");
    vals2.add(pfieldDV2);
    pfield2.setReportName("");
    pfield2.setName("@p_allocType");
    pfield2.setCurrentValues(vals2);
    fields.add(pfield2);
    this report calls a stored procedure (sql server). the report displays the data but the same is not the case when i call ity from my java application. with a single parameter it works fine (even though i get a "Some parameters are missing values" ERROR on the console. But when i pass, say 2 parameters, it give me the above error first and then "JDBC Error: Parameter 2 not set or registered for output"
    Can anyone bail me out of this one?
    thanks,
    ptalkad

    I don't know about naming conventions, but could the @ signs in the variable names cause a problem?
    How have you set up the mapping in Crystal?
    Is this parameter 2 an "out" parameter returning a value?
    What version of Java are you using?
    Version of Crystal?
    What JDBC driver?

  • Problem in passing values from AS to Java

    Hi,
    I am using Remote Object(Flex 3) for passing the data
    between java and flex. I am using the BlazeDS as the bridge. I have
    to pass an array collection containing value objects to the java
    method. I have created the value object in both the client side(AS)
    and server side (java) and registered my AS value object using
    [RemoteClass(alias="class name")]. Now the problem is the
    array collection is goinhg to the back end but when i try to get
    the values in the value objects using the corresponding getters, i
    am getting null values. Can some one suggest me the solution.
    Following is my AS value object
    package ascript
    [RemoteClass(alias="com.category.dao.CatgVO")]
    public class CatgVO
    private var catg_id:String;
    private var parent_catg_id:String;
    private var catg_name:String;
    private var catg_desc:String;
    private var created_by:String;
    private var created_date:String;
    private var catg_status:String;
    private var blooper:String;
    private var catg_modifieddate:String;
    private var catg_modifieduserid:String;
    * @return the catg_id
    public function getCatg_id():String {
    return catg_id;
    * @param catg_id the catg_id to set
    public function setCatg_id(catg_id:String):void {
    this.catg_id = catg_id;
    * @return the parent_catg_id
    public function getParent_catg_id():String {
    return parent_catg_id;
    * @param parent_catg_id the parent_catg_id to set
    public function setParent_catg_id(parent_catg_id:String):void
    this.parent_catg_id = parent_catg_id;
    * @return the catg_name
    public function getCatg_name():String {
    return catg_name;
    * @param catg_name the catg_name to set
    public function setCatg_name(catg_name:String):void {
    this.catg_name = catg_name;
    * @return the catg_desc
    public function getCatg_desc():String {
    return catg_desc;
    * @param catg_desc the catg_desc to set
    public function setCatg_desc(catg_desc:String):void {
    this.catg_desc = catg_desc;
    * @return the created_by
    public function getCreated_by():String {
    return created_by;
    * @param created_by the created_by to set
    public function setCreated_by(created_by:String):void {
    this.created_by = created_by;
    * @return the created_date
    public function getCreated_date():String {
    return created_date;
    * @param created_date the created_date to set
    public function setCreated_date(created_date:String):void {
    this.created_date = created_date;
    * @return the catg_status
    public function getCatg_status():String {
    return catg_status;
    * @param catg_status the catg_status to set
    public function setCatg_status(catg_status:String):void {
    this.catg_status = catg_status;
    * @return the blooper
    public function getBlooper():String {
    return blooper;
    * @param blooper the blooper to set
    public function setBlooper(blooper:String):void {
    this.blooper = blooper;
    * @return the catg_modifieddate
    public function getCatg_modifieddate():String {
    return catg_modifieddate;
    * @param catg_modifieddate the catg_modifieddate to set
    public function
    setCatg_modifieddate(catg_modifieddate:String):void {
    this.catg_modifieddate = catg_modifieddate;
    * @return the catg_modifieduserid
    public function getCatg_modifieduserid():String{
    return catg_modifieduserid;
    * @param catg_modifieduserid the catg_modifieduserid to set
    public function
    setCatg_modifieduserid(catg_modifieduserid:String):void {
    this.catg_modifieduserid = catg_modifieduserid;
    Regards
    Kranthi

    Hi there. That's a perfectly reasonable question.
    Take a look at the section of the Flex documentation with the title "Explicitly mapping ActionScript and Java objects" in the Data Access section of the doc.
    http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_4.html
    Your BananaVO ActionScript class needs a RemoteClass metadata tag that will tell the AMF deserialization code on the server what Java class to map the object to.
    Hope that helps.
    -Alex

  • Problem with passing parameters from HTML

    Im unsure as to where to turn next with this problem. What is making it all the more infuriating is that I have had this code working previously and now cant for the life of me figure out how I did it.
    What Im trying to do is I have a HTML page with two buttons on, one called "Submit Application" and the other "Submit Resource" and when I click on one I want a JSP page to be called and a certain piece of SQL to be executed, likewise when I click on the other "Submit Application" button I want a separate bit of SQL to be executed. (I know in this example both bits of SQL are identical but that is just while I get the functionality correct).
    Whats happening is that the first bit of SQL will execute if I click the "Submit Resource" button, however when I click the "Submit Application"
    button I get a "Error 500:" displayed. Im at the end of my tether as to what to do next and as I say it makes it all the more infuriating in that I had it working before. So any help would be greatly appriciated.
    The code is as follows, I have highlighted the two IF statements :-
    <HTML>
    <FORM>
    <BODY>
    <%@ page import="java.util.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="javax.sql.*" %>
    <%@ page import="javax.naming.*" %>
    <HTML>
    <HEAD>
    <TITLE>Resource Level Report</TITLE>
    <table width="200" border="1" align="center">
    <tr>
    <th scope="row"><img src="color_teradata_logo.gif"> </th>
    <td></td>
    <td><img src="lloydslogo.gif"></td>
    </tr>
    </table>
    <br>
    </HEAD>
    <BODY leftmargin=0 topmargin=0 marginwidth="0" marginheight="0">
    <%
    String dbURL="jdbc:oracle:thin:@lloyds.unitedkingdom.ncr.com:1521:smacdev";
    String dbUSER="agents";
    String dbPW="smac_us";
    String Resrce = request.getParameter("Resrce"); String Appln = request.getParameter("app"); String Subres = request.getParameter("Submit Resource"); String Subapp = request.getParameter("Submit Application"); Connection con = null;
    if (!Subres.equals (null)) {
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection(dbURL, dbUSER, dbPW); } catch(SQLException e) { System.err.println("Failure to connect " + e.getMessage()); }
    if (!Subres.equals (null)) {
    try
    String sqlstring = "Select app.application, res.resorce, res.system, res.status, res.unitofworkname, res.unitofworkvalue, res.capturetimestamp from agents.Resorce res, agents.applicationresource app where res.resorce = app.resorce and res.system = app.system and upper(res.resorce) = upper('"+ Resrce + "') order by 3";
    //out.println(sqlstring);
    //out.println(Subapp);
    //out.println(Subres);
    //commented this out, but enable you to see SQL that is been executed !!!
    Statement stmt = con.createStatement();
    ResultSet res = stmt.executeQuery(sqlstring);
    int count =0;
    %>
    <table width ="380" border="0" align="center">
    <h1 align="center">Resource Level Reporting</h1>
    </table>
    <br>
    <table width="200" border="6" align="center" >
    <th bgcolor="#FF9933">System<th bgcolor="#FF9933">Resource<th
    bgcolor="#FF9933">Application<th bgcolor="#FF9933">Unit Of Work Name<th
    bgcolor="#FF9933">Timestamp <th bgcolor="#FF9933">Unit Of Work Value<th
    bgcolor="#FF9933">Status<tr>
    <%
    while (res.next()){
    String app= res.getString(1);
    String resorce = res.getString(2);
    String system = res.getString(3);
    String status = res.getString(4);
    String unitofworkname = res.getString(5);
    String unitofworkvalue = res.getString(6);
    String capturetimestamp = res.getString(7);
    String timestampmod = capturetimestamp.substring (0,19);
    String status1 = status.trim();%>
    <% if (status1.equals ("SYNC")) { %>
    <tr>
    <td bgcolor="#00FF33">
    <%out.print(system);%>
    <td bgcolor="#00FF33">
    <%out.print(resorce);%>
    <td bgcolor="#00FF33">
    <%out.print(app);%>
    <td bgcolor="#00FF33">
    <%out.print(unitofworkname);%>
    <td bgcolor="#00FF33">
    <%out.print(timestampmod);%>
    <td bgcolor="#00FF33">
    <%out.print(unitofworkvalue);%>
    <td bgcolor="#00FF33">
    <%out.print(status);%>
    <% }
    else if (status1.equals ("OOS")) { %>
    <tr>
    <td bgcolor="red">
    <%out.print(system);%>
    <td bgcolor="red">
    <%out.print(resorce);%>
    <td bgcolor="red">
    <%out.print(app);%>
    <td bgcolor="red">
    <%out.print(unitofworkname);%>
    <td bgcolor="red">
    <%out.print(timestampmod);%>
    <td bgcolor="red">
    <%out.print(unitofworkvalue);%>
    <td bgcolor="red">
    <%out.print(status);}%>
    <%
    res.close();
    stmt.close();%>
    <tr>
    </table>
    <%
    catch (SQLException e) {
    out.println("Sql error here " + e.getMessage());
    finally {
    con.close();
    %>
    <%
    if (!Subapp.equals (null)) {
    try
    String sqlstring = "Select app.application, res.resorce, res.system,
    res.status, res.unitofworkname, res.unitofworkvalue, res.capturetimestamp
    from agents.Resorce res, agents.applicationresource app where res.resorce =
    app.resorce and res.system = app.system and upper(res.resorce) = upper('"+
    Resrce + "') order by 3";
    //out.println(sqlstring);
    //out.println(Subapp);
    //out.println(Subres);
    //commented this out, but enable you to see SQL that is been executed !!!
    Statement stmt = con.createStatement();
    ResultSet res = stmt.executeQuery(sqlstring);
    int count =0;
    %>
    <table width ="380" border="0" align="center">
    <h1 align="center">Resource Level Reporting</h1>
    </table>
    <br>
    <table width="200" border="6" align="center" >
    <th bgcolor="#FF9933">System<th bgcolor="#FF9933">Resource<th
    bgcolor="#FF9933">Application<th bgcolor="#FF9933">Unit Of Work Name<th
    bgcolor="#FF9933">Timestamp <th bgcolor="#FF9933">Unit Of Work Value<th
    bgcolor="#FF9933">Status<tr>
    <%
    while (res.next()){
    String app= res.getString(1);
    String resorce = res.getString(2);
    String system = res.getString(3);
    String status = res.getString(4);
    String unitofworkname = res.getString(5);
    String unitofworkvalue = res.getString(6);
    String capturetimestamp = res.getString(7);
    String timestampmod = capturetimestamp.substring (0,19);
    String status1 = status.trim();%>
    <% if (status1.equals ("SYNC")) { %>
    <tr>
    <td bgcolor="#00FF33">
    <%out.print(system);%>
    <td bgcolor="#00FF33">
    <%out.print(resorce);%>
    <td bgcolor="#00FF33">
    <%out.print(app);%>
    <td bgcolor="#00FF33">
    <%out.print(unitofworkname);%>
    <td bgcolor="#00FF33">
    <%out.print(timestampmod);%>
    <td bgcolor="#00FF33">
    <%out.print(unitofworkvalue);%>
    <td bgcolor="#00FF33">
    <%out.print(status);%>
    <% }
    else if (status1.equals ("OOS")) { %>
    <tr>
    <td bgcolor="red">
    <%out.print(system);%>
    <td bgcolor="red">
    <%out.print(resorce);%>
    <td bgcolor="red">
    <%out.print(app);%>
    <td bgcolor="red">
    <%out.print(unitofworkname);%>
    <td bgcolor="red">
    <%out.print(timestampmod);%>
    <td bgcolor="red">
    <%out.print(unitofworkvalue);%>
    <td bgcolor="red">
    <%out.print(status);}%>
    <%
    res.close();
    stmt.close();%>
    <tr>
    </table>
    <%
    catch (SQLException e) {
    out.println("Sql error here " + e.getMessage());
    finally {
    con.close();
    %>
    </BODY>
    </FORM>
    </HTML>
    I think the error messages I am getting are :-
    [15/09/04 12:38:36:535 BST] 45b5f97b WebGroup I SRVE0180I: [SMAC Web Front End] [smac] [Servlet.LOG]: /JSP/Resreports.jsp: init
    [15/09/04 12:39:08:510 BST] 7abd7978 WebGroup I SRVE0180I: [SMAC Web Front End] [smac] [Servlet.LOG]: /JSP/Resreports.jsp: init
    [15/09/04 12:39:15:273 BST] 7abd7978 WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
         at org.apache.jsp._Resreports._jspService(_Resreports.java:117)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
         at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))
         at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))

    You make your comparisons like this:
    if (!Subapp.equals (null))
    Well, what happens if Subapp IS equal to null. The .equals method call will be called from a NULL and you will get a NullPointerException.
    When testing for null you do:
    if (Subapp == null) (or if (Subapp != null)
    This is okay when dealing objects even with the mantra of 'don't use == to compare objects, because what you are really testing is if the reference points anywhere, and == will compare the reference.
    Also, next time you post, make sure to use the [code] tags as described in the [Formatting Help] link. It will make it easier to read.
    Also, you should try to remove the SQL from the JSP. Move it into a Servlet which builds a List that forwards to another JSP for display, or use a bean. Using java classes like Servlets and JavaBeans makes it easier to debug, and makes your JSP code easier to manage.

  • Problem while passing parameter from standard page to custome page

    Hi,
    We are calling a custom page from standard page.
    Standard page Extended CO
    PR
    String wcHeader = pageContext.getParameter("WcHeaderId");
    pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);
    PFR
    String wcHeader=(String)pageContext.getTransactionTransientValue("WcHeaderId");
    pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);
    Till here we are able to put the Parmeter in Tranasction
    After calling the custom page from standard page while we are using the Transaction value it is returning null.
    Custom page CO
    PR
    String wcHeader=(String)pageContext.getTransactionTransientValue("WcHeaderId");
    we are getting nulll here.
    Please provide the solution for this
    Thanks,
    Narayana

    Hi Meher Irk,
    i got WcHeaderid value in Custom CO. but i want to set value Custome page to Standard page in custom page i have a total value this value i want to set to Standard page.
    Custom CO code
    /*===========================================================================+
    | Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
    | All rights reserved. |
    +===========================================================================+
    | HISTORY |
    +===========================================================================*/
    package xxbb.oracle.apps.pos.xxwc.webui;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import xxbb.oracle.apps.pos.xxwc.server.WithholdAMImpl;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.cabo.ui.validate.Formatter;
    import oracle.apps.fnd.framework.webui.OADecimalValidater;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.beans.table.OAColumnBean;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.*;
    import oracle.apps.fnd.framework.webui.*;
    import oracle.apps.fnd.framework.webui.beans.table.OATableFooterBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
    import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.server.OAViewRowImpl;
    import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
    import oracle.jbo.domain.Number;
    import java.util.Enumeration;
    import oracle.apps.pos.wc.webui.WcRespondCO;
    //import oracle.apps.pos.wc.webui.*;
    * Controller for ...
    public class WithholdCO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    String wcHeader=new String();
    Formatter formatter=new OADecimalValidater("#,##0.00;(#,##0.00)","#,##0.00;(#,##0.00)");
    OAColumnBean columnBean=(OAColumnBean)webBean.findIndexedChildRecursive("Amountcol");
    columnBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR,formatter);
    //String wcHeader=(String)pageContext.getTransactionTransientValue("WcHeaderId");
    pageContext.writeDiagnostics(this,"zzzzzz"+wcHeader,1);
    if(pageContext.getSessionValue("WcHeaderId") != null&& !pageContext.getSessionValue("WcHeaderId").equals(""))
    wcHeader=pageContext.getSessionValue("WcHeaderId").toString();
    pageContext.writeDiagnostics(this,"If get session condition "+wcHeader,1);
    /* OAMessageTextInputBean item=(OAMessageTextInputBean)webBean.findIndexedChildRecursive("item3");
    item.setValue(pageContext,"10");*/
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if("AdvancedRN".equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    am.invokeMethod("xxInsertRow");
    // am.xxInsertRow();
    if(pageContext.getParameter("Save")!=null)
    am.invokeMethod("xxSaveTransaction");
    am.invokeMethod("xxUnitotal");
    OAViewObject vo = (OAViewObject)am.findViewObject("TotalVO1");
    vo.reset();
    vo.next();
    OARow totRow = (OARow)vo.getCurrentRow();
    Number total = (Number)totRow.getAttribute("Total");
    throw new OAException("Records Saved Successfully",OAException.CONFIRMATION);
    if(pageContext.getParameter("Delete")!=null)
    am.invokeMethod("xxDeleteRow");
    am.invokeMethod("xxSaveTransaction");
    //am.xxDeleteRow();
    // am.xxSaveTransaction();
    throw new OAException("Records Deleted Successfully",OAException.CONFIRMATION);
    if(pageContext.getParameter("Close")!=null)
    pageContext.setForwardURL("OA.jsp?page=/oracle/apps/pos/wc/webui/WcRespondPG&param=FrmWithHoldPG"
    ,null
    ,OAWebBeanConstants.KEEP_MENU_CONTEXT
    ,null
    ,null
    ,true
    ,OAWebBeanConstants.ADD_BREAD_CRUMB_YES
    ,OAWebBeanConstants.IGNORE_MESSAGES);
    Thanks,
    Narayana

  • Problem in passing  HTML form values to a servlet in NetBean IDE

    hi there,
    When i click the submit button of the HTML File(with two textFields with values) the value received in the corresponding servlet is null , I used the get method to pass value so i was able to see the values in the URL but when i print the value in the Servlet it display null. I have verfied the web.xml to cheak the servlet mapping is right .Servlet mapping are perfect but i am not getting the value in the next page. Kindly give your suggestions.
    Thanks in advace

    Try this in your servlet.
    HttpSession session = request.getSession(true);     
    System.out.println(request.getParameter("xxxxx").toString());
    xxxx is the parameter name..
    Doesn't this work?

  • Passing Variables from JSP to a servlet

    Presently I have a small Web application where by users enter data onto a jsp Page , this data then gets passed onto a servlet which then updates a sql database through a call to a sql stored procedure
    While testing I determined that when there are multiple users, sometimes users records are getting crossed, some of my data, is getting written to someone elses record....
    any thoughts on the cause......

    below is the code to the servlet
    The jsp page is a typical jsp with text boxes etc,
    package cpri;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    public class viewfileinfoservlet extends HttpServlet {
      private static final String CONTENT_TYPE = "text/html";
      //Initialize global variables
      public void init() throws ServletException {
      //Process the HTTP Post request
      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType(CONTENT_TYPE);
        PrintWriter out = response.getWriter();
        Connection conn = null;
        CallableStatement stmt = null;
        String sErrorMessage = "";
        String sStatus = "PS";
        String sSin = "";
        String sPSin = "";
        String sBN = "";
        String sPBN = "";
        String sSurName = "";
        String sFirstName = "";
        String sLegalName = "";
        String sTradeName = "";
        String sAddress = "";
        String sCity = "";
        String sProv_Code = "";
        String sRTSO = "";
        String sPayment = "";
        String sGSPayment = "";
        String sCompliant = "";
        String sTX11Issued = "";
        String sFYEMM = "0";
        String sFYEDD = "0";
        String sGSTStatus = "";
        String sNotes = "";
        String sRecordID = "";
        String sFYE = "";
        String sRCode = "";
        String sPostalCode = "";
        String sRemoteUser = "";
        int intRecordID = 0;
        int intRemoteUser = 0;
        int i = 0;
        String sPayorPhone = "";
        String sPayorName = "";
        response.setHeader("Cache-Control", "no-cache");
        response.setDateHeader("Expires", 0);
        response.setBufferSize(10*1024);
        sErrorMessage = "";
        sRemoteUser = request.getRemoteUser();
        sRTSO = "0";
        if (sRemoteUser.indexOf("\\") != -1)
          intRemoteUser = sRemoteUser.indexOf("\\") + 1;
          sRemoteUser = sRemoteUser.substring(intRemoteUser);
        sGSTStatus = "";
        if ( request.getParameter("lstStatus") !=null)
          sStatus = request.getParameter("lstStatus").trim();
          if (sStatus.equals("PS"))
            sErrorMessage = sErrorMessage + "Was unable to confirm File Status." + "\n";
        else
          sErrorMessage = sErrorMessage + "Was unable to confirm File Status." + "\n";
      if ( request.getParameter("txtPayorName") !=null)
       sPayorName = request.getParameter("txtPayorName").trim();
    else
       sPayorName = "";
    if (request.getParameter("txtPayorPhone") !=null)
      sPayorPhone = request.getParameter("txtPayorPhone").trim();
    else
      sPayorPhone = "";
      if ( request.getParameter("txtSin") !=null)
        sSin = request.getParameter("txtSin").trim();
      else
        sSin = "";
      if ( request.getParameter("txtPSin") !=null)
        sPSin = request.getParameter("txtPSin").trim();
      else
        sPSin = "";
      if ( request.getParameter("txtPBN") !=null)
        sBN = request.getParameter("txtPBN").trim();
      else
        sBN = "";
      if ( request.getParameter("txtPPBN") !=null)
        sPBN = request.getParameter("txtPPBN").trim();
      else
        sPBN = "";
      if ( request.getParameter("txtSurname") !=null)
        sSurName = request.getParameter("txtSurname").trim();
      else
        sSurName = "";
      if ( request.getParameter("txtFName") !=null)
        sFirstName = request.getParameter("txtFName").trim();
      else
        sFirstName = "";
      if ( request.getParameter("txtLName") !=null)
        sLegalName = request.getParameter("txtLName").trim();
      else
        sLegalName = "";
      if ( request.getParameter("txtTName") !=null)
        sTradeName = request.getParameter("txtTName").trim();
      else
        sTradeName = "";
      if ( request.getParameter("txtAddress") !=null)
        sAddress = request.getParameter("txtAddress").trim();
      else
        sAddress = "";
      if ( request.getParameter("txtCity") !=null)
        sCity = request.getParameter("txtCity").trim();
      else
        sCity = "";
      if ( request.getParameter("txtProv_Code") !=null)
        sProv_Code = request.getParameter("txtProv_Code").trim();
      else
        sProv_Code = "";
      if ( request.getParameter("txtPostal") !=null)
        sPostalCode = request.getParameter("txtPostal").trim();
      else
        sPostalCode = "";
      if ( request.getParameter("lstRecCode") !=null)
        sRCode = request.getParameter("lstRecCode").trim();
      else
       sRCode = "";
      if ( request.getParameter("txtRTSO") !=null)
        sRTSO = request.getParameter("txtRTSO").trim();
      else
        sRTSO = "";
      if ( request.getParameter("txtsPayment") !=null)
        sPayment = request.getParameter("txtsPayment").trim();
      else
        sPayment = "0";
      if ( request.getParameter("txtGSPayment") !=null)
        sGSPayment = request.getParameter("txtGSPayment").trim();
      else
        sGSPayment = "0";
      if ( request.getParameter("lstCompliant") !=null)
        sCompliant = request.getParameter("lstCompliant").trim();
      if ( request.getParameter("lstTX11Issued") !=null)
        sTX11Issued = request.getParameter("lstTX11Issued").trim();
      sFYEMM = "";
      if ( request.getParameter("txtMM") !=null)
        sFYEMM = request.getParameter("txtMM").trim();
      sFYEDD = "";
      if ( request.getParameter("txtDD") !=null)
        sFYEDD = request.getParameter("txtDD").trim();
      if ( request.getParameter("lstGSTStatus") !=null)
        sGSTStatus = request.getParameter("lstGSTStatus").trim();
      if ( request.getParameter("Notes") !=null)
        sNotes = request.getParameter("Notes").trim();
      else
        sNotes = "";
      if ( request.getParameter("RecordID") !=null)
        sRecordID = request.getParameter("RecordID").trim();
      if (sFYEMM.equals("0") && sFYEDD != "0")
        sErrorMessage = "Was unable to confirm FYE." + "\n";
      if (sFYEDD.equals("0") && sFYEMM != "0")
        sErrorMessage = "Was unable to confirm FYE." + "\n";
      sFYE = "1999" + "-" + sFYEMM + "-" + sFYEDD;
      if (sStatus.equals("PA")||sStatus.equals("A")||sStatus.equals("PCR")||sStatus.equals("PCU"))
         // check for errors
           try
             i = Integer.parseInt(sRTSO);
           catch (NumberFormatException ex)
             sErrorMessage = sErrorMessage + "Recipient TSO must be a numeric field and is required field when file  is being closed." + "\n";
         if (sRCode.equals("0"))
           sErrorMessage = sErrorMessage + "Recipient Code is a required field when file is being Closed." + "\n";
      if (sErrorMessage.length()!=0)
              //display error page
              request.setAttribute("ERRORS", sErrorMessage);
              request.getRequestDispatcher("ViewFileInfoError.jsp").forward(request,response);
              out.flush();
              return;
      else
              try
                conn = CPRI_Connection.GetSQL_APPConnection();
                String call = "{call usp_UpdateCPRIRecord(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
                stmt = conn.prepareCall(call);
                stmt.setString(1, sRecordID);
                stmt.setString(2, sStatus);
                stmt.setString(3, sSin);
                stmt.setString(4, sPSin);
                stmt.setString(5, sBN);
                stmt.setString(6, sPBN);
                stmt.setString(7, sSurName);
                stmt.setString(8, sFirstName);
                stmt.setString(9, sLegalName);
                stmt.setString(10, sTradeName);
                stmt.setString(11, sAddress);
                stmt.setString(12, sCity);
                stmt.setString(13, sProv_Code);
                stmt.setString(14, sRTSO);
                stmt.setString(15, sPayment);
                stmt.setString(16, sGSPayment);
                stmt.setString(17, sCompliant);
                stmt.setString(18, sTX11Issued);
                stmt.setString(19, sFYE);
                stmt.setString(20, sGSTStatus);
                stmt.setString(21, sRCode);
                stmt.setString(22, sPostalCode);
                stmt.setString(23, sNotes);
                stmt.setString(24, sRemoteUser);
                stmt.setString(25, sPayorName);
                stmt.setString(26, sPayorPhone);
                stmt.registerOutParameter(27, java.sql.Types.INTEGER);
                stmt.execute();
                if (stmt.getInt(27) != 0) {
                  intRecordID = stmt.getInt(27);
                else {
                  intRecordID = 0;
                sRecordID = String.valueOf(intRecordID);
               stmt.close();
               if (conn !=null){
                 try {
                   conn.close();
                 }catch (SQLException ex1){
                   //trow new Servlet exception
             catch(SQLException ex){
               throw new ServletException(ex);
        //RequestDispatcher disp;
        //disp = getServletContext().getRequestDispatcher("EventConfirmation.jsp");
        request.setAttribute("Action",sRecordID);
        request.getRequestDispatcher("ViewFileInfo.jsp").forward(request, response);
        //out.println("sEventID:" + sEventID + "<br>");
        //disp.forward(request, response);
      //Clean up resources
      public void destroy() {
    }

  • Help with passing parameters from a servlet to an applet

    dear all
    i m working on a application which will check weather a file is present in a server (webserver) if it is present then it will take the file name and put it into a drop down list and there is a button on click of which i m taking the call to an applet and then on that i need the file name if it is there then i use it to draw a graph
    i m struck on how to take parameter from Servlet -> Applet
    thanks
    Nakul

    hi,
    I understood your question,The context "servlet" cannot communicate to
    an applet becoz applet runs at clients browswer, rather you can communicate from an applet to servlet(HTTPURLCONNECTION class).
    Well coming to the problem, this is how i have understood your problem,
    basically uou get the list of files from the server using normal servelt programing and you will display in an html LIst box and then click the button to view the graph or chart ,
    then you just want to pass the filename which is there in the listbox to an applet and applet will display some image.
    As we know all that using <PARAM NAME=XX VALUE=YY> WE CAN GET THE VALUE IN APPLET BY USING GETPARAMTER() METHOD. and Im very sure that you are not asking that question. your question is like " both the applets and
    the listboxes will be loaded at once and when he selects one of the file from the list box then without refreshing the page , how to display the graph.
    Im i right?
    If so i guess you have to use javascript to do that stuff, and i think its like gave an id for the tag shown <applet id="yes">
    then in the javascript , you can call the Java applet methods (I have never tried before but seen some demos(i dont have that links- google it for inf))
    but i can give clue like.. trying the <PARAM VALUE=""> IF POSSIBLE
    CHAING THE HTML CONTENT IS POSSIBLE IN IE which is again through javascript by calling yes.innerHTML="<PARAM><PARAM><PARAM><PARAM>..."
    Im sure that you can call Java methods from javascript but i never tried and even you can pass an arguments to it.. Let me check out like
    becoz even im interested to know abt it
    bye
    with Regars
    Lokesh T.C

  • Passing input parameters from an applet to a JSP page

    Hello all,
    Yes, its one of these questions which I have tried to find a solution from the already large number of postings but with no luck. I'm still a novice to Java/JSP so bear with me.
    Consider this scenario.
    1. An applet which has two input boxes (say First name and surname). 2. These parameters will be passed to a JSP page (so the applet will call a JSP page).
    3. The JSP will have have the necessary logic (or actually a JavaBean will) to connect to a database and add a new record with these parameters (first name and surname).
    I also need to consider editing/updating the record in the database. So a JSP page will connect to the database, retrieving the required record from the database and then display the parameters back in an applet in two input boxes (first name and surname) to be edited and saved again.
    I have been able to develop a similar application using simple HTML forms to add and update records in a database so I'm not worried about the database connectivity simply the issue of passing parameters from the applet to the JSP page and vice versa (for edit/update).
    Once i've managed to do this with input boxes, I can experiment with the other input types radios, checkboxes, select etc.
    Many thanks in advance,
    Assad

    create an URL object with u'r specified link of the java class and send the parameters..write trhis action in any buttonclick event in u'r applet.

Maybe you are looking for