Generating XML on Submit of JSP Page

Dear all,
We need to code JSP pages which will generate the XML Request document dynamically after user submits the form.
Can anybody tell, how to go about doing this?
Thanks & Regards
Seema

the general idea is to get the data after the submit and call a java class, that you have to code, wich will generate an xml doc with the submitted data.
for more details about how to code an xml java class take a glance at this
http://forum.java.sun.com/thread.jsp?forum=34&thread=416365
hope this will help!

Similar Messages

  • Writing XML file from a jsp page

    how can i write a xml file from my jsp and store the values and after sometime, for example when the user clicks on the submit button, i check the values from xml file and compare those values from the data base.
    it means both writing and reading xml file from a jsp page...
    urgent help needed......thanks

    You need some API like XSL or JDOM to read data from/to XML file
    you can get a best tutorial from
    http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom.html
    and
    http://www.javaworld.com/javaworld/jw-07-2000/jw-0728-jdom2.html
    after reading both articals you will be able to do both the tasks

  • Submitting a XML Publisher Report from JSP page

    Hello,
    We have need to submit a XML Publisher report from Quoting/iStore module in Oracle Ebusiness. The out put should be viewable in PDF format and user should be able to print. can anyone pls help on how this can be achieved.
    TIA

    Really appreciate your response. Can you pls give little more details.
    1] Are there any standard API's which I can use to submit XML publisher report from the JSP pages
    2]Is there any sample code snippet for any of the options that I can refer to..or pls let me know the API's, I will check on them
    Appreciate any help

  • How to show an xml content in a Jsp page?

    I use <jsp:include page=".....xml" /> tag in a jsp file to include an xml file. When this jsp page is open, only the text content in the xml file shows up with plain text. I want this xml file shows up like in IE (with xml format). Does anyone know how to do it? Thanks.
    northcloud

    Thank you, BalusC & evnafets. Someone told me to use <c:import> to load the XML file into a scoped variable, and then use <c:out> to display it. The <c:out> will automatically convert the markup to HTML entities. I tried it, it works. It shows the content in the xml file as plain text (a long string). Any one give me some suggestion to make it looking better, for example, show each element in seperated lines. Thanks.

  • How to create a xml file from the jsp page?

    I'm a beginner of the develop xml,my question like this,
    there has a jsp page,some parameters in it,I wanna get the parameters and create a xml file,so,what parser method should I use?
    And how to create a new xml file,when the file haven't exist at first?
    pls give some code,thanks.

    a ggod link for u http://www.theserverside.com/resources/article.jsp?l=JSP-XML2

  • CHART BUILDER ERROR WHEN TRYING TO GENERATE DYNAMIC CHARTS ON A JSP PAGE

    I'm working with J Develop 9.03 on Windows 2000 Professional Edition.
    I'm using the JSP demo files provided with Oracle Chart Builder to generate
    dynamic charts. The user specifies the query parameters, including the date
    range and the query results are returned by means of a line chart (with date on
    the x axis and values on the y axis).
    When trying to compile the project I get the following error messages:
    Error(165,2): class FileOutputStream not found in class _graph
    Error(170,5): class File not found in class _graph
    Error(176,4): exception java.io.IOException is never thrown in the
    corresponding try block
    I checked to see that the chartbuilder library (chartbuilder.jar) files are
    loaded into the project library. It's unusual that the class is not being
    found. I don't understand why. I developed my project using the following steps:
    1. Unzipped Chart Builder installation files into c:\Oraclechartbuilder
    2. Loaded chartbuilder class library
    c:\Oraclechartbuilder\chartbuilder\lib\chartbuilder.jar into J Developer class
    path (by selecting <Project Settings> <Paths> and browsing to the
    chartbuilder.jar file).
    3. Created a new JSP page in J Developer (graph.jsp)
    4. Copied JSP code syntax from the Word Pad demo file and pasted into graph.jsp
    5. Changed the DB connection parameters and static directory location on the
    JSP page.
    6. Compiled the project and received the above errors.
    I would like to know why the classes are not being found and how to fix the problem. Thanks, Jaafar

    Hi mshah101,
    This can happen if the applet is compiled using an higher version of java and the browser is pointing to an older version (even if minor version number is higher)

  • Submit the jsp page containing the textarea

    Hi,
    I have a jsp page containing the textarea and a submit button. This page is submitted using POST. In the next page the content of the textarea is obtained and displayed. Can anyone let me know if there is any maximum limit on the characters in the textarea?
    I am using JRUN3.1.
    If the characters in the textarea is increasing 2000 characters, in the next page if i try to get the content of the textarea i am getting as null???
    please help me out.

    Hi,
    There is a limit as to how much data that can be passed using the GET method. Dont remember it at the top of my head now.
    It would be better to use the POST method.
    Sandesh

  • Using an XML document in several JSP Pages

    I am using a certain XML document in several different JSP pages (I have several JSP pages in which I need to get data from and save data to the document)
    I'd thought about using it as a bean so that I don't have to reopen it in every page, but I can't since the "Docuemnt" object is actually an interface.
    This is the code I'm using to open the document:
    final String fileName= "./doc/config.xml";
    int listLength, listLengthAuthors;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    File xmlFile = new File(fileName);
    xmlDoc = builder.parse(xmlFile);
    Any ideas?

    I'd thought about using it as a bean so that I don't have to reopen it in every page, but I can't since the "Docuemnt" object is actually an interface.Use it as a bean. The Document "class" is an interface, but the object you get from DocumentBuilder is an object just like any other object, and there are no restrictions on how you can use it. Try it.

  • XML view of the JSP Page

    Hi,
    i've got a little problem.
    When i put a control in a jsp page, and remove it, or anything else, the "source tab" always show me the same XML code, althought i'm saving all my documents via ctr+shift+s
    What's wrong ?? is there a way to "regenerate" a clean xml file ?
    Thanks.

    Hi,
    Adding a control and then deleting it is working for me. The source tab is in sync with the design view and it does not show the code for the removed component.
    Could you please tell us how you removed the control?
    To remove a control you can go to the application outline window, right click on the component to be removed and choose delete. This should work fine.
    Cheers
    Giri :-)
    Creator Team

  • Parse XML and Output to JSP page

    I have a number of XML documents which are all formatted in the same way, just with different information in the fields.
    I wish to parse the XML documents using DOM and output them to an XML page.
    How would i go about doing this?
    If you could write a small example or any websites that you think might help.
    Thanks.

    I have the parsing working but i cant seem to figure out how to get information out of the parsed document and into variables.
    This is a sample of my XML file
    <?xml version="1.0"?>
    <product code="QB-1226-AB">
         <productName>Professional Floodlights</productName>
         <description>PIR floodlights that are designed for professional installation. A faulty light requiring a return visit will cost far more than a quality light does in the first place. 3 year guarantee.</description>
         <price>120</price>
         <manufacturer>Black and Decker</manufacturer>
    </product>I can get the productCode value out without any problems using
    String name = attrs.getValue("code");
    But if i try the same for any of the others i get null. I can accomplish this using DOM easily but i cant find anything at all about getting values out of it using SAX.
    Any help would be greatly appreciated.

  • XML syntax error in a JSP page.

    Hi,
    i was trying to include xml syntax in a jsp page in stead of core jsp syntax. it didn't work.But the jsp document with the core jsp syntax works. I'm wondering what's the problem.any help would be really helpful. I'm using Tomcat 3.2.1.
    Thanx in adv,
    Ganesh
    JSP file - NOT WORKING
    <jsp:directive.page import="java.util.Date"/>
    <jsp:declaration>
    private static String loadTime = new Date().toString();
    private static String getLoadTime() { return loadTime; }
    private static String getCurrentTime() { return new Date().toString(); }
    </jsp:declaration>
    <HTML>
    <HEAD><TITLE>XML and JSP</TITLE></HEAD>
    <BODY>
    JSP page is created using XML syntax...<BR>
    This page was loaded into memory at <%= getLoadTime() %>.<BR>
    The current time is <%= getCurrentTime() %>
    </BODY>
    </HTML>
    ERROR :
    Error: 500
    Location: /test/declarations.jsp
    Internal Servlet Error:
    org.apache.jasper.JasperException: Unable to compile class for JSPC:\tomcat321\tomcat\work\localhost_8080%2Ftest\_0002fdeclarations_0002ejspdeclarations_jsp_6.java:59: Method getLoadTime() not found in class _0002fdeclarations_0002ejspdeclarations_jsp_6.
    out.print( getLoadTime() );
    ^
    C:\tomcat321\tomcat\work\localhost_8080%2Ftest\_0002fdeclarations_0002ejspdeclarations_jsp_6.java:65: Method getCurrentTime() not found in class _0002fdeclarations_0002ejspdeclarations_jsp_6.
    out.print( getCurrentTime() );
    ^
    2 errors

    Hi,
    any help on this question would be really appreciated..
    Thanx in adv,
    Ganesh

  • How to display XML file(as markup) in jsp page..?

    Hi All,
    * I have to display the XML file(as markup) in jsp page (Tree Format)....
    * My XML file is an java.io.file object , and how to view this XML file on my JSP page...........
    Thanks in Advance,
    JavaImran

    You mean you want to see the XML source?
    You need to replace the characters '<' and '&' with corresponding entities '&lt;' and '&amp;'. You can use replaceAll, but do the ampersands first.
    Then I suggest you probably want to put them in a <PRE> block.

  • How to generate report in pdf format through a JSP page

    I require to generate my report from my JSP page into a PDF format . How can i do it?

    Use a Java API which can create PDF files based on some collection of plain vanilla Java objects (List, String, Number, etc).
    Google can find them all. Just feed it with something like "Java PDF API" or so. A commonly used one is iText.
    That said, when talking about this in JSP context, ensure that you do NOT write raw Java code in JSP files using scriptlets. Raw Java code belongs in Java classes. In such case you need a Servlet. In JSP just use taglibs and EL to interact with backend Java code and data. Scriptlets are discouraged since over a decade.

  • Javax.servlet..ServletException in jaser report in jsp page

    Hi all,
    In my web application i am using jasperreport 3.0. to generate reports in excel format
    My Application is configured in apache-tomcat-5.5.26 in Mac Server.
    I have placed the following jar files in webapps/xxxx/WEB-INF/lib.
    jasperreports-3.0.0.jar,commons-digester-1.7.jar,itext-1.3.1.jar,commons-logging-1.1.jar,commons-beanutils-1.7.jar,commons-collections-3.2.jar,poi-3.0.1-FINAL-20070705.jar
    The reports are generated automatically and stored inside the webappss/xxxx/Reports/ folder. And i have given link to the generated excel file dynamically in JSP page.
    When i load the jsp pag, i am getting javax.servlet.servletExcetion displayed in jsp page and the following display in catalina.out file
    Nov 9, 2009 12:02:01 PM org.apache.tomcat.util.http.Parameters processParameters
    WARNING: Parameters: Invalid chunk ignored.
    Nov 9, 2009 12:02:01 PM org.apache.commons.digester.Digester startElement
    SEVERE: Begin event threw error
    java.lang.NoClassDefFoundError
         at net.sf.jasperreports.engine.xml.JRAbstractStyleFactory.createObject(JRAbstractStyleFactory.java:166)
         at org.apache.commons.digester.FactoryCreateRule.begin(FactoryCreateRule.java:389)
         at org.apache.commons.digester.Digester.startElement(Digester.java:1361)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
         at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1647)
         at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239)
         at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
         at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
         at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
         at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
         at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:150)
         at org.apache.jsp.source.admin.DateReport_jsp._jspService(DateReport_jsp.java:85)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         at java.lang.Thread.run(Thread.java:613)Please help me how to overcome this problem.
    Thanks in advance.

    yes the class mentioned in the stack trace is found in the jar file placed in web-inf/lib folder. can you tel what else can be the reason for this.

  • How to redirect a jsp page?

    Hi
    I have two jsp pages called submit.jsp and save.jsp.In the submit.jsp page
    I wrote the following code
    <form name= Submit action=save.jsp>
    <input type=Submit name=save value=save>
    whn i submit save .jsp page is opend and will dispaly a message saved the data.Now wht i want is after the save.jsp page is opened the page should be automatically redirected in 3 seconds to submit.jsp that is the first page.How can i dothis.Pls give me some code.
    Thanks

    Something like...
    <META HTTP-EQUIV="Refresh" CONTENT="3; URL=your.jsp">
    in your <head> tag where 3 is the number of seconds to wait.

Maybe you are looking for

  • Gravação da remessa não autorizada

    Prezados boa tarde, Estou tentando efetuar um processo de venda intercompany, o pedido intercompany está aparentemente correto, com local de expedição atribuido, tipo de remessa etc. Quando vou gerar a remessa na VL10D surge a mensagem " Ver log para

  • Strange lines are apearing when I open new page in new tab. They are on white page (new tab) before page I wanted shows up.

    hey are on white surface before page I wanted shows up. They are also sometimes beetween my bookmarks on bookmark toolbar, sometimes they are on the new tab (where the name of the tab is)

  • A contract modified in IS-U not updated at CRM

    Hi!!! I'm try to update the data of crm contract from sap isu contract, but isn't works fine, the status and the description of CRM contract for example is not updated. The Bdoc SI_CONTRACT is generated correctly, and the Badi's DOWNLOAD on ISU and C

  • DB Insert failed through JDBC Adapter

    Hi all, My system is on the latest patches of XI3.0 SP9. I am trying to insert some records into a database through JDBC adapter. The XML arriving at JDBC adapter is: <?xml version="1.0" encoding="UTF-8" ?> <ns:MaterialDataUpdate_Msg xmlns:ns="http:/

  • Developer 2000 error

    hi i have already installed developer/2000 (forms 6i) and when i want to connect (oracle 7.3) server and i press(control+j) i get this error no PDE-PCX012 which says SYS.PSTUBTBL unexpectedly contains Rows could you please help me and tell me what to