Jsp form + servet =nullpointer

Hi everyone,
I'm trying to make a form using a servlet to insert the data from the jsp form into my database. What im using was from an example i found online.
All i'm trying to do right now is declare a string with the req.getParameter("textdemo"); But everytime i submit my form, i get a null pointer.
here is my java code.
package com.stardeveloper.servlets.db;
import java.sql.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class InsertServlet extends HttpServlet {
     public void doGet(HttpServletRequest req, HttpServletResponse res)
          throws ServletException, IOException {
          res.setContentType("text/html");
          PrintWriter out = res.getWriter();
          StringWriter tempEntry = new StringWriter();
          String test =  req.getParameter("textdemo");
          out.print("<html><body>");
          out.print("<form action=\"");
          out.print( req.getRequestURI() );
          out.print("\" method=\"post\">");
          out.print("First Name :<br>");
          out.print("<input type=\"text\" name=\"first\"><br>");
          out.print("Last Name :<br>");
          out.print("<input type=\"text\" name=\"last\">");
          out.print("<br><br><input type=\"submit\" value=\" + test + \">");
          out.print("     Insert Record");
          out.print("      <input type=\"submit\" value=\" \">");
          out.print("     Display Records</form>");
          out.print("</body></html>");
          out.close();
     public void doPost(HttpServletRequest req, HttpServletResponse res)
          throws ServletException, IOException {
          res.setContentType("text/html");
          PrintWriter out = res.getWriter();
          out.print("<html><body>");
          out.print("<code><pre>");
          out.println("ID\tFirst Name\tLast Name\n");
          // receiving parameters
          String first = req.getParameter("first").trim();
          String last = req.getParameter("last").trim();
          boolean proceed = false;
          if(first != null && last != null)
               if(first.length() > 0 && last.length() > 0)
                    proceed = true;
          // connecting to database
          Connection con = null;
          Statement stmt = null;
          ResultSet rs = null;
          PreparedStatement ps = null;
          try {
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          con=DriverManager.getConnection("jdbc:odbc:odbc_exmp");
               String sql;
          sql = "INSERT INTO Names(first_name, last_name) VALUES (?,?)";
               ps = con.prepareStatement(sql);
               stmt = con.createStatement();
               // inserting records
               if(proceed) {
                    ps.setString(1, first);
                    ps.setString(2, last);
                    ps.executeUpdate();
               // displaying records
               rs = stmt.executeQuery("SELECT * FROM Names");
               while(rs.next()) {
                    out.print(rs.getObject(1).toString());
                    out.print("\t");
                    out.print(rs.getObject(2).toString());
                    out.print("\t\t");
                    out.print(rs.getObject(3).toString());
                    out.print("\n");
          } catch (SQLException e) {
               throw new ServletException(e);
          } catch (ClassNotFoundException e) {
               throw new ServletException(e);
          } finally {
               try {
                    if(rs != null)
                         rs.close();
                    if(stmt != null)
                         stmt.close();
                    if(ps != null)
                         ps.close();
                    if(con != null)
                         con.close();
               } catch (SQLException e) {}
          out.print("</body></html>");
          out.close();
}and here is the JSP code.
<a href="servlet/InsertServlet">sdfsdf</a>
<form action="servlet/InsertServlet" method="post">
textdemo
  <input type="text" name="textdemo" />
submit
  <input type="submit" name="Submit" value="Submit" />
</form>Does anyone know why the servlet is throwing an nullpointer?
thanks

now to make the things very clear, try this example
the servlet
* s1.java
* Created on March 28, 2006, 3:41 PM
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
* @author AJ Deschanel, [email protected]
public class s1 extends HttpServlet
     public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
          res.setContentType("text/html");
          PrintWriter out = res.getWriter();
          StringWriter tempEntry = new StringWriter();
          String test =  req.getParameter("getVar");
          out.print("getVar=" + test);
                out.close();
     public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
          res.setContentType("text/html");
          PrintWriter out = res.getWriter();
          String text = req.getParameter("postVar").trim();
                out.println("postVar = " + text);
          out.close();
}and the jsp page
<a href="/web3/s1?getVar=g10">Servlet</a>
<form action="/web3/s1" method="post">
textdemo
<input type="text" name="postVar" value="p20"/>
  <input type="submit" name="Submit" value="Submit" />
</form>try both
1) hit the submit button, (for POST)
2) click the Servlet hyperlink (for GET)
PS
my application has teh name web3, so you change my code accordingly to your settings

Similar Messages

  • From database to jsp form drop downlist

    is there a way to put database values from certain fields in the database,into the dropdown list in my jsp form?
    if there is a way what do they call that method?

    hi,
    First you retrive the fields from database and store those values in a List or any collection.
    after that write the code in jsp as like this..
    <select name="list" >
    <%                    
         for(int i=0;i<dblist.size();i++)
              String listitem = dblist.get(i);
    %>
          <option value="<%=listitem%>">
          <%=listitem%>
    <%             
    %>
    </select>Here dblist is a collection which contains the fields which you retrived from the database
    regards,
    sekhar.alla

  • How to add MenuBar and MenuItems in JSP Form

    Help Me,
    Dear Forum,
    I am user of jDeveloper 10g working on JSP (Web Module).So How to add MenuBar and Menu Item, in Our jsp Form.What this type control exist?
    regards
    javed khan

    You should do this instead:
    iframe.setJMenuBar(i_menuBar);

  • Multiple submit buttons in a jsp form?

    I've been doing some research and found out that multiple buttons in a JSP form are possible by two ways:
    - We can obtain the value of the submit button to know which one was clicked in the parameters of the request using the name of the buttons (which should be the same for all the submit buttons).
    - We can change the submit destination using Javascript (Horrible solution since I want my web site to be safe to be used even if Javascript isn't active in clients browsers. I will use it of course since we can do amazing things with it but I want my website to be able to work without it also)
    WHAT annoys me is the fact that the value of a submit button is also his text, so if I change the text of the submit button, I will always have to check the servlet to do the corresponding change.
    Is there a third choice to be able to use multiple buttons?
    Olivier Voutat

    It seem rather convoluted at first but it's really good. I've not worked with JSF so I've no idea how that compares but from what I know, Craig McClanahan, who came up with Struts, worked on JSF also, so I guess it could only improve on Struts.
    EDIT: Here's a search result on Google'ing his name: http://www.theserverside.com/news/thread.tss?thread_id=29068
    But like I said, you don't have to use Struts ( which only uses standard JSP/ Servlets stuff anyway ), you simply use one of the ideas from it.
    For example; you have a properties file, say "/WEB-INF/properties/myProps.properties" with these entries:
    #USERS MODULE
    users.button.save=Save User
    users.button.search=Search User By Name
    users.button.delete=Delete UserThis would be a key: users.button.save to the value Save User
    Now, in your JSP, you use JSTL <fmt> tags:
    <fmt:setBundle basename="properties.myProps"/>
    //set the resource bundle you want to use
    //and create buttons with the proper values
    <input name="myButton" type="submit"><fmt:message key="users.button.save"/></input>
    <input name="myButton" type="submit"><fmt:message key="users.button.search"/></input>This would create buttons with text "Save User" and "Search User By Name" respectively
    Now, finally, in your servlet:
    //create a map of the properties,
    //possibly on app startup using a ServletContextListener
    //and put it in the servlet context for access everywhere
    HashMap myProps = (HashMap)getServletContext.getAttribute("myPropertiesMap");
    String buttonClicked = request.getParameter("myButton");
    if ( buttonClicked.equals((String)myProps.get("users.button.save")) )
    //perform save action
    else if ( buttonClicked.equals((String)myProps.get("users.button.search")) )
    //perform search action
    //etcYou'll obviously want to optimize this. Perhaps make a method that handles the comparison so you can have neater if conditions. But you get the idea, right?
    Edited by: nogoodatcoding on Oct 4, 2007 8:12 PM

  • How to capture the data from a JSP form

    Hi
    I have a JSP form, My task is to capture the data from a JSP and submit to Data Base. for example I have the field like
    Enter Table name to be created in data base: The table name is to be captured by a servlet and by that table name, table should be created in the data base.
    Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????
    Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????

    Get the entered value from the jsp into servlet using request.getParameter("enteredTableName"). it will return the String,pass this table name to execute query using JDBC connection and statement objects.
    -cheers Ram

  • How to "encapsulate" a data from a text field in a JSP form

    Hi. I'm trying to make a user's registration jsp page and I'm not sure how I could get the data from a JSP form from the user and store that into some variable that I could later pass to a query to modify the database. I've been using a JavaBean, but I get null values for all the fields of the jsp page. That's logical, since I cannot find a method that will read the user's input and store that into some variable. In my JavaBean, I have get and set methods that will return a String for each of the form fields such as first name and email. The set method will have in a String as a parameter to set that field value (whichever field it is) to the value of the input parameter, but I don't know if there is a method or a way to read and store the values entered by the user into the jsp form. This is a code snippet of the jsp form:
    <TR><TD>First Name: </TD>
    <TD><INPUT TYPE="TEXT" NAME="fname"
                   VALUE="<%= newUser.getFirstName() %>"></TD></TR>
    Here, the getFirstName() method simply returns the value of a String value related to the user's first name, which is initialized as null in the JavaBean. newUser is the name of the JavaBean that I'm using.
    Any suggestions? Thanks.

    haha...nevermind this question also guys...I found out that I could use the request.getParameter("some_String") method with my JavaBean to read and store data entered by the user in a text field.

  • How to find out last_query from jsp form in oracle applications

    Hi
    At present i am working on Quality Module.
    in India Localization.
    In Quality module -> Results -> Inquiries -> Skip Lot Inquiry
    If i enter our organization name
    Then its openning one form.
    I am unable to find out the table names from the jsp form.
    User also unable to comment on it.
    So, please help me on this issue.
    Regards,
    Pradeep.

    Hi
    Once you open the jsp form, at below leftside corner you can see link : About This Page. If you click on the link : About this Page this again open another window, there you can see multiple tabs at header level, if you click on page tab, there you can all the VO objects used to build this page. If you click on VO object hyperlink you can see the query.

  • Migrating PCR frontend-JSP forms to Adobe interactive forms-WD Abap Comp

    Hi All,
    We are currently on Netweaver 7.0 & ECC 6.0 and ESS - MSS Business Package 50.4. We are using JSP Forms on portal front for Personnel Change Requests (PCR's ) where in all the scenarios in the backend are heavily customized with good amount of usage of Javascripts. For certain scenarios, where in a huge amount of information is fetched from ECC 6.0 backend system, JSP are performing really bad and the total time taken to display the form is actually causing a lot of irritation to the end user.
    We are planning to propose an upgrade to SAP adobe interactive forms. The prerequisite is that the business wants to reuse all the customized scenarios without any changes and just want to move towards better front end forms.
    My questions are:
    1. Please list benefits of SAP Adobe interactive forms - ABAP component over JSP forms (performance wise)
    2. Issues with SAP Adobe Interactive forms?
    3. Since Javascripts do not work in Webdynpro ABAP. How can we implement those front end checks and validations.
    3. Any other options available for UI that can be suggested?
    All suggestions are welcome. Quick response is appreciated.
    Thanks a lot for your time and help.
    Best Regards,
    Anupama

    Is your performance issue with the Javascript with JSP pages?  or the Java script you are using within the Adobe form in your WDJ custom application using Adobe form? I have worked on PCR's using ISR framework old school it used to call as PCR and now HCM Processes and form, Developed PCR's using WDJ also integrated workflow with the WDJ PCR for approval(we never had any performance issue) infact ISR frame work was kind of slow compare to custom WDJ solution and less flexible for a developer to develop.
    I have also worked created WDA custom application for PCR's , WDA is definitely better when you compare it with WDJ but I have not seen much performance issue with WDJ atleast on custom PCR solutions.
    I don't have any case study to share with you, can you please tell what kind of PCR's your client is using and what kind of performance issue you are experiencing and where and why you guys are using Javascript.

  • Calculations in Jsp form - Urgent Please

    Hi,
    I have 3 fields in my table, Quantity,Price and Total. Quantity * Price gives Total. Price is the Column of another table and I display the values of Price using <jbo:InputSelectLOV>. So,my requirement is when I input the value for Quantity and select the values from list in the Edit.jsp form I need the value of Quantity * Price to be displayed in the Total field on Browse form. Could someone please help me. I am new to JSP and any help is appreciated.
    Thank You

    It's not related to JDeveloper this is a generic thing for HTML pages - if you want to do client side (menaing no traffic to the server) actions you use Javascript.
    You just need to stick the Javascript into the JSP page you have inside JDeveloper.

  • Jsp form help

    Hello everyone out there'
    I am a computer science teacher in a private high school in Nigeria and have some experience in java programming language and also new to the JSP tech .I want to introduce the school into using web applications in managing their infomation like registration,staff info,accounts e.t.c .They have asked me to make a presentation in two days time on web appllications ,i have decided to use JSP tech to demonstrate a web application .I have also downloaded the TOMCAT server install and configured it ,set the enviroment varible and is working well when itried invoking a html form.I have even install the j2sdk 1.5.
    The problem now is on my JSP form i want to link to an Access database the code is provided below:
    <%@page contentType="text/html" import="java.sql.*" %>
    <%@page pageEncoding="UTF-8"%>
    <html>
    <head><title>JSP Page</title></head>
    <body bgcolor='palegoldenrod'>
    <img src ='Apps/Japp/logo.jpg ' height="100" width="100"/><hr/>
    <center ><form method="POST" action="/Apps/Japp/TEST.jsp" >
    <table bgcolor='navyblue'>
    <tr><td><font Color="yellow" size="5"><b>Student Number :</b> </font></td>
    <td><input Type ="text" name= "number" size="30"/></td></tr>
    <tr><td><font Color="yellow" size="5"><b>First Name :</b> </font></td>
    <td><input Type ="text" name= "fname" size="30"/></td></tr>
    <tr><td><font Color="yellow" size="5"><b>Middle Name :</b> </font></td>
    <td><input Type ="text" name= "mname" size="30"/></td></tr>
    <tr><td><font Color="yellow" size="5"><b>Last Name :</b> </font></td>
    <td><input Type ="text" name= "lname" size="30"/></td></tr>
    <tr><td><font Color="yellow" size="5"><b>Subject :</b> </font></td>
    <td><input Type ="text" name= "sub" size="30"/></td></tr>
    <tr><td><font Color="yellow" size="5"><b>Grade :</b> </font></td>
    <td><input Type ="text" name= "grade" size="30"/></td></tr>
    <tr><td><font Color="yellow" size="5"><b>Exam Type :</b> </font></td>
    <td><input Type ="text" name= "etype" size="30"/></td></tr>
    <tr><td><font Color="yellow" size="5"><b>Number In Group:</b> </font></td>
    <td><input Type ="text" name= "ngroup" size="30"/></td></tr>
    </table>
    <font Color="yellow" size="5"><b>Teachers Comments </b> </font>
    <textarea name= "comment" rows="8" cols=50/></textarea>>
    <input type="submit" value="Submit your Entries" />
    <input type="reset" value="Clear Entries" /></form>
    </center >
    <hr/>
    <%
    Connection conn;
    Statement stat;
    String studentNumber = request.getParameter( "num");
    String firstName= request.getParameter(" fname");
    String middleName= request.getParameter("mname" );
    String lastName = request.getParameter( "lname") ;
    String subject= request.getParameter( "sub") ;
    String grade= request.getParameter("grade") ;
    String numInGroup= request.getParameter("ngroup") ;
    String coment = request.getParameter("comment" ) ;
    String examType= request.getParameter("etype" ) ;
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    conn = DriverManager.getConnection("jdbc:odbc:Tester","bart","college");
    stat = conn.createStatement();
    stat.executeUpdate( "INSERT INTO REPORT " +
    "VALUES (studentNumber,firstName , middleName,lastName ," +
    "subject,grade,numInGroup,coment,examType" );
    stat.close();
    conn.close();
    catch (Exception e)
    e.printStackTrace();
    %>
    </body>
    </html>
    i am recieving the error message below when I sumit my entry from the form.Can anyone tell me what to do tosolve this problem and do ineed to configure an xml file i n the web module for this iam using NETBEANS IDE
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /Japp/TEST.jsp(6,1) Illegal value of scope attribute: PAGE (must be one of "page", "request", "session", or "application")
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186)
         org.apache.jasper.compiler.JspUtil.checkScope(JspUtil.java:252)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:536)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1133)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2230)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2236)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:485)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
         org.apache.jasper.compiler.Validator.validate(Validator.java:1518)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305)
    note The full stack trace of the root cause is available in the Tomcat logs.
    Apache Tomcat/5.0.19

    org.apache.jasper.JasperException: /Japp/TEST.jsp(6,1)
        "Illegal value of scope attribute": "PAGE" (must be one of "page", "request", "session", or "application")The error says it all. In your TEST.jsp you have a JSP tag that uses the scope attribute. You have it written as: scope="PAGE".
    Keep in mind that JSP is Java, and Java is case sensitive. Re-read the error message and see if you can't locate and fix the problem.
    PS: This occurs because you are writing code without following any sort of coding standards. It makes for errors in JSPs, but also real hard to read HTML. Create a set of rules for yourself and follow them. It will make it a lot easier to manage later on. Some example rules:
    1) Name all pages with capital letters to start the name, and to deliminate words. Use lower case letters the rest of the time. Example:
    "Test.jsp" "StudentMailAddressForm.html" ...
    2) Use only lower case letters for tags except when required not to:
    <td ...> <body ...> <jsp:useBean...>
    3) All tag attribute names should be lower case except when required not to:
    < ... color="..." > <... name="... >
    4) Put all tag attributes in double quotes.
    <... name="address" ...> < ... size="15" ... > <... src="images/ThePic.jpg" ...>
    5) Allattribute values should be lower case except:
    a. To distinquish words <... name="hamSandwich" ...>
    b. The value will be displayed to the user <... value="Submit Form" ...>
    c. The value is a proper noun <... user="Steve Luke" ... >
    d. When required to be case sensitive like looking up info in a DB...
    These are just examples, but if you think about the rules when you make them you will be writing good XHTML code in no-time, and the transition to JSP, with its case-sensitivity will be easy.

  • How to upload files through a servlet/jsp form?

    anyone know basically how to do this?
    i need to write a simple jsp form the can browse for a file on my machine, then upload it to a server in the usual html form manner.
    is this done with an i/o stream?
    thanks for any help!
    robSmyth
    [email protected]

    jspSmart has a free upload component you can use for HTTP file uploading. (http://www.jspsmart.com )
    Also, O'Reilly has an open source package you can use. (http://www.oreilly.com or http://www.servlets.com )
    Another option is dotJ, which has an upload tag in its tag library. Benefit of this library is that it has a much more compehensive set of JSP tags. (http://www.dotjonline.com )

  • Working with multiple buttons on a jsp form....!

    Hi guys...!
    I have a jsp form, which has 3 buttons (submit, update, cancel), and I also have a java Servlet that processes that form.
    In my java Servlet, i have a method called submitData(). I also want to have a method called updateData(), which will be called when the user clicks on the update button.
    These are the codes in my jsp form:
    <SCRIPT language="JavaScript" type="text/javascript">
                   function submitFunction (i) {
                        if (i==1) {
                             document.theForm.action="/MyWebApp/FormServlet";
                        if (i==2) {
                             document.theForm.action="/MyBugWebApp/FormServlet";
                        if (i==3) {
                             document.theForm.action="/MyWebApp/DisplayForm.jsp";
                        document.theForm.submit()
              </SCRIPT>
    <form name="theForm">
    <input type="button" value="Submit" onClick="submitFunction(1)"></input>
    <input type="reset" value="Reset"></input>
    <input type="button" value="Cancel" onClick="submitFunction(3)"></input>
    <input type="button" value="Update" onClick="sumbitFunction(2)"></input>
    </form>
    As u can see, both the submit and the update button use the same java servlet file. But inside that java servlet file, I want to have methods that will be called inside my doPost() method when the user clicks on update or submit.
    I've tried to pass a value through the httpRequest but it doesn't work... This is what I did.
    In my javaScript, I added this value in the action attribute:
    document.theForm.action="/MyWebApp/FormServlet?id=submit";
    document.theForm.action="/MyWebApp/FormServlet?id=update";
    I did that because I wanted to be able to retrieve the value of the "id" in my servlet and check which type of action was sent and then call the appropriate function in my servlet.
    But, it doesn't work. It returns "null" as the value for "id"
    Does anyone know how to do this task??...or what am I doing wrong in my code???
    Thanks...

    So there are really two solutions to this:
    1) Use <input type="submit" instead of buttons. Give all three buttons the same name but different values. Then the button used to submit will be added to the list of parameters.
    2) Add a hidden input to the form, and when the form determines which button was pushed, set a different value for the hidden input field. For example of both, take a look at this code:
    <html>
      <head>
        <script type="text/javascript">
          function formSubmit(i)
            var toSubmit = document.getElementById("myForm")
            if (i == 1) toSubmit.doThis.value="one"
            if (i == 2) toSubmit.doThis.value="two"
            if (i == 3) toSubmit.doThis.value="three"
            toSubmit.submit()
        </script>
      </head>
      <body>
        <form id="myForm" action="" method="get">
          <input type="hidden" name="doThis" /><br />
          <input type="submit" name="whatToDo" onclick="formSubmit(1)" value="Submit" />
          <input type="submit" name="whatToDo" onclick="formSubmit(2)" value="Cancel" />
          <input type="submit" name="whatToDo" onclick="formSubmit(3)" value="Update" />
        </form>
      </body>
    </html>For method one, if the servlet did:
    String whatToDo = request.getParameter("whatToDo");
    if ("Submit".equals(whatToDo)) {
      //doSubmit();
    } else if ("Update".equals(whatToDo)) {
      //doUpdate();
    } else if ("Cancel".equals(whatToDo)) {
      //doCancel();
    } else if ("Reset".equals(whatToDo)) {
      /doReset();
    } else {
      //error situation
    }Or you could instead look at the hidden value:
    String doThis = request.getParameter("doThis");
    if ("1".equals(doThis)) { ... }I personally like the submit button with the same names and different values, since the second method breaks if the user has javascript disabled.

  • Registering JSP forms in oracle apps

    Hi,
    Can anyone suggest me how to register JSP forms in oracle apps 11i (11.5.9 version), on Windows NT
    Regards

    Hi,
    My question is, how do I run the form in the Oracle Apps? After registering it.You already have the steps in your post, just add the form to the menu and attach it to the responsibility.
    My question is, how do I know if a form has a function that needs to be registered?Sorry, I cannot be of much help here, but you may check the Developer Guide and see if it helps.
    Oracle Applications Developer's Guide
    http://download.oracle.com/docs/cd/B25284_01/current/acrobat/115devg.pdf
    Regards,
    Hussein

  • How to save data from a JSP Form to a xml file

    Hi All,
    I want to save JSP Form Fields (like name, contact etc) to a xml.
    When i chick on submit button of form all the entered fields should be saved into a xml file.
    Can any one send me a sample code, as I am new to JSP and XML.
    Thanks you All.

    You could
    - send the form input as request parameters (e.g. site.jsp?name=value&name=value) (done in html)
    - get the parameters with request.getParameter("name")
    - use [Java's xml lib|http://developerlife.com/tutorials/?p=25] to create the xml file [(jDom.org|http://jdom.org/] is another nice and simple xml lib)

  • Including jsp form in multiple jsps

    Hi
    I have a requirement to include a common jsp form in several other jsps that live in different web applications. For e.g. there is test_form.jsp taht I can access via http://www.test.com/common/test_form.jsp. There are several other jsps /app1/call_test1.jsp , /app2/call_test1.jsp taht need to include the /common/test_form.jsp. These jsps just provide different look with specific images etc.. We also need the pages to be accessed via those specific urls.
    The form is showing fine. But when I submit the included form, I am submitting to the wrapper jsp(say /app1/call_test1.jsp which I am passing as aparam to teh include), if any validation errors its supposed to show on /app1/call_test1.jsp. But its not showing them. If I call the include jsp separately in the browser, its working fine. How can I get the form errors dispalyed on the wrppaer.jsp??
    Any help is appreciated
    Thanks

    <select size="8" name="fruit" multiple>
    <option value="apple">apple</option>
    <option value="orange">orange</option>
    <option value="mango">mango</option>
    <option value="cherry">cherry</option>
    <option value="pineapple">pineapple</option>
    <option value="grapes">grapes</option>
    </select>
    if i select apple, orange,mango and cherry and submit it to the database field 'fruit', only 'apple' gets inserted. none others.
    this is the the line where it is processing the value.
    String fruit=request.getParameter("fruit");
    by the way I have only one database table
    I hope this example helps

Maybe you are looking for

  • HT1947 Remote app in iOS7 won't display in landscape mode

    Title says it all - since I updated to iOS7 (which I really like), the Remote app stays in portrait mode no matter how I turn the iPad.  Is it me or is this something other folks have run into?

  • Change the value of column from select and insert different

    Hi All, I have written a procedure where i am selecting values from some table and inserting in a new table. The code is below If you see the line 54 in code, you will find the combined_bu_code is is coming from one procedure and the value of BU is s

  • How to use FNDLOAD to add program to request group?

    Is there a way to use FNDLOAD to add a program to System administrators > security > responsilibity > request. I have try to use the following command to downlod this information to load it to other place but no record saved in ldt file: FNDLOAD apps

  • FTP setup with Actiontec MI424WR router

    I've been banging my head against the wall for a few hours now. I have a FTP server/device on my network (which I can access just fine internally).  However, I'm not able to access it from outside my network. I've forwarded ports 20 & 21 (TCP/UDP) to

  • Why can't I create Road Runner account?

    Set up the trial .mac mail account okay. Have a hawaii.rr email on old PC and trying to set up on laptop. Sometimes the pop-server creates but the smtp-server doesn't and sometimes neither one creates. Called RR twice...they keep saying it's a Apple