Use of xml files in JSP ??

I wud like to know the wy we use XML files in JSP's or in any web development applications.

Transferring information in own markup language.
http://www.google.com/search?q=xml+tutorial+site:w3schools.com

Similar Messages

  • What is the best way to include an xml file in JSP?

    I have a jsp page that I need to include an xml file. The xml file
              uses an xsl to render the file. What is the best way to include the
              xml file and still maintain the structure of the style sheet?
              Thanks
              Jennifer
              

              The best way is using the tag lib. If you cannot, but you can use JAXP, you can
              try
              javax.xml.transform.Transformer.transform(Source xmlSource,
              Result outputTarget)
              throws TransformerException
              You construct the transformer with you xsl, use you xml file or DOM to form xmlSource,
              and use JSPWriter "out" to form outputTarget (StreamResult). But if your JSP page
              generates the xml itself, tag lib is the only way.
              [email protected] (Jennifer) wrote:
              >[email protected] (Jennifer) wrote in message news:<[email protected]>...
              >> I have a jsp page that I need to include an xml file. The xml file
              >> uses an xsl to render the file. What is the best way to include the
              >> xml file and still maintain the structure of the style sheet?
              >>
              >> Thanks
              >>
              >> Jennifer
              >
              >Or is there a way to parse the xml file with the jsp page to display
              >the information. I cannot use the Java Standard Tag Libraries as the
              >version of iplanet we are running does not support the JSTL
              >
              >Thanks
              >
              >Jennifer
              

  • How to generate a xml file with JSP?

    Hi,
    I want to dynamically generate maths formula in my web page. I think MathMl is a good choice. However, it needs xml file. I try to use JSP to generate the
    content of the xml file. However, it doesn't work. What should I do?
    Best regards.

    Hi,
    Thanks a lot for your replies. I used to write JSP to present quiz fetching from a database. To use MathML, xml file has to be used. I've tried to copy the content of the xml file to a jsp file and let the brower to display it. However, it doesn't work. I view the content of the page displayed by the brower. I simply contain nothing. So what it's the most convenience way to present the MathML dynamically.
    Best regards.
    From hoifo

  • Read xml file from jsp/servlet

    Hi all,
    I am a new comer to jsp and really appreciate if someone can help me on this:
    I will like to use a xml file to control access to my web app instead of using a database. Let say user.xml that will contains user name and password. Questions:
    1. where should I put this file? Under WEB-INF?
    2. In my jsp or servlet, how do i read the xml file, i mean how to i refer to the file (depend on question 1 as where the file should be placed)?
    Thank you very much.
    Sim

    Hi jlsim,
    you can place the xml file where you want, but remember that placing it under /WEB-INF is the most security way.
    I had a similar problem and I placed the xml file under /WEB-INF directory.
    To refer to it I did something like this:
    String realPath=getServletContext().getRealPath("WEB-INF/xml/workspaces.xml");//obtain the real path
    File f=new File(realPath);//obtain an instance of your file usable
    //to create an InputStream

  • Executing *.xml files as *.jsp files

    Under other web containers this usually takes about 4 lines in a config xml file.
    I am still hunting through the online doco
    but I was wondering if anyone could point
    me to the relevant section quicker ? ...
    Basically what I am looking to do is to
    tell the server to parse and execute *.xml
    files as *.jsp files. It should be a simple
    mapping somewhere in the config files.
    Thankyou in advance,
    Brian.

    Chuck,
    That isn't quite what I want to achieve. What I have done
    elsewhere is place the following servlet mapping in the Web
    Container's web.xml file.
    <servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.xml</url-pattern>
    </servlet-mapping>
    which then causes all *.xml files to be processed as *.jsp files.
    Servlet name being the name of the servlet that processes the
    JSP files for the web container. Is there an equivalent
    thing under BEA ? Does BEA have a servlet which processes
    JSP files or does it use something different ?
    Cheers,
    Brian.
    "Chuck Nelson" <[email protected]> wrote:
    >
    Brian,
    You should be able to update the web.xml for this purpose
    e.g.
    <servlet>
    <servlet-name>myFoo</servlet-name>
    <jsp-file>SnoopServlet.xml</jsp-file>
    </servlet>
    See the following URL for a more detailed description
    http://edocs.bea.com/wls/docs61/webapp/components.html#100437
    Chuck Nelson
    DRE
    BEA Technical Support

  • Can I Use a XML file as Managed Resource?

    Hi,
    I have a XML file which has all employee details.
    Can I use that XML file as a Resource in IDM?
    If so please let me know the steps to do.
    Please help me in this regard.
    Thanks
    RMS

    No.
    Since the XML file you have has custom tags, there is not a way for IDM to understand it's contents.
    IDM does offer a "Simulated" resource, which is an XML based resource, but it has a defined structure. You might be able to alter your XML to match what the Simulated Resource expects, or better yet, get it into a database and use the database table adapter.

  • Can you use an XML file to make Subclips for you?

    Hi everyone,
    I know this is a bit of a long-shot, but I am wondering if I can use an XML file(made after logging a few tapes, but before capture) to make subclips for me?
    Basically I have a painful project with 2 tapes i had to capture separately as 1 long individual clip each due to time-code breaks, but as i did first Log & Capture as usual (only to later find it wouldn't batch capture) i didn't want my hard work to go to waste!
    Hope I explained that clearly enough,
    Adam
    Message was edited by: Chocboy

    I'm assuming you captured using the non-controllable device setting and have the clip including TC breaks and blank areas etc.
    Try this:
    Load the clip into the Viewer and play it. Press M to set markers wherever you want them.
    If you want to give the marker a more decriptive name, press M a second time whilst the playhead is positioned on the marker. A dialog will open with text input fields. Or, click the marker in the Browser, then click the marker’s name to select it. You can now change the name.
    Drag in the Browser to select all the markers or click the first one, then shift click the last one.
    Choose Modify > Make Subclip. This will make all the subclips in one go and if you gave your markers new names, your subclips will use them.
    The subclips appear in addition to the original clip with the markers. You can rename the subclips, if you want. You can review the subclips, deleting any clips you might not need. If you do remove unused clips, you can use the Media Manager to remove your unused footage from disk, leaving the media for your remaining subclips alone.

  • Forwarding to an xml file from jsp page

    hi
    i am subhash. i have problem in forwarding an xml file from jsp page.
    i have a jsp page in which i have a button. upon click, its form method is triggered and the action is set to "serverpage.jsp". In that jsp page i have to move to an xml file. I would like u to send a sample code also for the same.
    Thank You,
    Subhash..

    Refer to the Generating XML from JSP section.
    http://java.sun.com/developer/technicalArticles/xml/WebAppDev2/

  • ScanNGo - Using localbackup.xml file

    Hi All, Wondering if someone would be able to help us out, we have hundards of CN51's and CN50's through AUS and NZ and have been looking into this ScanNGo barcode system. AUS have successuflly used the .XML file from the localbackup via SOTI Mobicontrol deployment system, but am trying to make it as easy as possible as with SOTI we still need to setup an APN connection before being able to connect to the device, so hence why am looking at the ScanNGo to atleast setup the APN. Searching the forums and I see people have had success in using the ScanNGo creator by using the localback.xml from the SmartSystems folder. Unfortunately this does not seem to work for me, it will scan all 9/9 barcodes from the ScanNGo system but then returns an error "Error reading scanned data into xml" Attached is the localback.xml file from which I can apparently use this file with the ScanNGo barcode creator ? Could someone please correct me if i'm wrong on this. Thanks, Much appreciated.

    Hello AdamD
    first, it is no good idea to apply a full backup xml to a device. You should only change the settings different from factory default. See other posts here about how to create a configuration xml with only changed settings.
    secondly, a backup xml does not contain security data like passwords. So the backup xml does not have the WWAN password(s):
    <Subsystem Name="WWAN Radio">
    <Field Name="ARD Enabled">
    0</Field>
    <Field Name="RadioType">
    2</Field>
    <Field Name="Restore Connection Entry Defaults">
    0</Field>
    <Field Name="Radio Power State">
    1</Field>
    <Field Name="Carrier">
    Worldwide UMTS</Field>
    <Field Name="Carrier Settings Auto Config">
    Enabled</Field>
    <Group Name="Carrier Settings">
    <Field Name="Restore Connection Entry Defaults">
    0</Field>
    <Group Name="Connection Info" Instance="Verizon">
    <Field Name="Connection Name">
    Verizon</Field>
    <Field Name="Phone">
    #777</Field>
    <Field Name="APN"/>
    <Field Name="Username"/>
    <Field Name="Password"/>
    <Field Name="AlwaysOn">
    0</Field>
    </Group>
    <Group Name="Connection Info" Instance="ATT">
    <Field Name="Connection Name">
    ATT</Field>
    <Field Name="Phone"/>
    <Field Name="APN">
    wap.cingular</Field>
    <Field Name="Username"/>
    <Field Name="Password"/>
    <Field Name="AlwaysOn">
    0</Field>
    </Group>
    <Group Name="Connection Info" Instance="Sprint">
    <Field Name="Connection Name">
    Sprint</Field>
    <Field Name="Phone">
    #777</Field>
    <Field Name="APN"/>
    <Field Name="Username"/>
    <Field Name="Password"/>
    <Field Name="AlwaysOn">
    0</Field>
    </Group>
    <Group Name="Connection Info" Instance="Worldwide UMTS">
    <Field Name="Connection Name">
    Worldwide UMTS</Field>
    <Field Name="Phone"/>
    <Field Name="APN">
    Spark</Field>
    <Field Name="Username"/>
    <Field Name="Password"/>
    <Field Name="AlwaysOn">
    1</Field>
    </Group>
    </Group>
    <Group Name="WWAN Information">
    <Field Name="Phone Number">
    Not Available</Field>
    <Field Name="Firmware Revision">
    REVISION 03.001</Field>
    <Field Name="ESN">
    990004190136592</Field>
    <Field Name="IMEI">
    990004190136592</Field>
    <Field Name="IMSI">
    505013475281816</Field>
    <Field Name="Network">
    Telstra Mobile</Field>
    <Field Name="Model">
    PXS8</Field>
    <Field Name="Manufacturer">
    Cinterion</Field>
    </Group>
    </Subsystem>
    As you can see, the "WWAN Information" is nothing to be used for a configiration xml. And you see that there are no passwords.
    AFAIS the only WWAN settings you need to setup the connection is:
    <Group Name="Connection Info" Instance="ATT">
    <Field Name="Connection Name">ATT</Field>
    <Field Name="Phone"/>
    <Field Name="APN">wap.cingular</Field>
    <Field Name="Username"/>
    <Field Name="Password"/>
    <Field Name="AlwaysOn">
    0</Field>
    </Group>
    But keep in mind that you have to maintain the xml structure around this.
    ~josef

  • I have to print two labels using single XML file.Error:Only one top level e

    Hi,
    I have to print two labels using single XML file. But its giving error:
    [Error] Error -1072896683 - Line: 38 Pos: 2 Error: Only one top level element is allowed in an XML document.
    Below is my XMl file:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE labels SYSTEM "label.dtd">
    <labels FORMAT="lib://FRD/PurchasedDoor.btw"  PRINTERNAME="IBM 6700-R80 (300 dpi)" _QUANTITY="1">
    <label>
    <variable name= "Color">AUTUMN</variable>
    <variable name= "Special_Message_Attribute">MSG*</variable>
    <variable name= "Special_Message">This is special Message Label</variable>
    <variable name= "Model"></variable>
    <variable name= "Build_Date">09-APR-12</variable>
    <variable name= "Assy_Cart"></variable>
    <variable name= "Assy_Slot"></variable>
    <variable name= "Finish_Cart"></variable>
    <variable name= "Finish_Slot"></variable>
    <variable name= "Serial_Number">1945.1.1.2-1</variable>
    <variable name= "Serial_Number_Barcode">1945.1.1.2-1</variable>
    <variable name= "Specie">BIRCH</variable>
    <variable name= "Truck_Group"></variable>
    <variable name= "Label_Sequence_No">1</variable>
    <variable name= "WIP_Cart"></variable>
    <variable name= "WIP_Slot"></variable>
    <variable name= "Cabinet_Sequence_No">110</variable>
    <variable name= "JC"></variable>
    <variable name= "Thickness"> </variable>
    <variable name= "Width"> </variable>
    <variable name= "Length"> </variable>
    <variable name= "Overlay"></variable>
    <variable name= "Options">B30</variable>
    <variable name= "Profile_No"></variable>
    <variable name= "Door_Style">NEWBERRY</variable>
    <variable name= "Glaze"></variable>
    <variable name= "Shape"></variable>
    <variable name= "Glass"></variable>
    <variable name= "Hinge_Side"></variable>
    <variable name= "Hinge_Type"></variable>
    <variable name= "EGE"></variable>
    </label>
    <labels FORMAT="lib://FRD/SpecialMessage.btw"  PRINTERNAME="IBM 6700-R80 (300 dpi)" _QUANTITY="1">
    <label>
    <variable name= "Serial_Number">1945.1.1.2-1</variable>
    <variable name= "Special_Message">This is special Message Label</variable>
    <variable name= "Cabinet_Sequence_No">110</variable>
    </label>
    </labels>
    Please suggest.

    >
    XML can only have one root element per file.
    >
    from XML Document: The Root Element

  • Using a data file in jsp to generate xml file

    hi
    can anybody help me to
    how to use a data file generated in unix in jsp to generate xml file.
    by using beans i am able to generate the xml.
    thanks in advance.

    You haven't provided adequate relevant information. If you need help provide proper relevant details.

  • How to display the data in XML files into JSP using Jdeveloper.

    Hi All,
    I have two XML files one XML file has the view names and the other has the table names of a particular views, how to display the data in JSP using JDeveloper where when i click a particular view the list of tables of that particular view from XML file two should be displayed in JSP Page.
    Are there any reference documents, regarding the above process please can anyone guide through how to do it.

    Let the servlet ask your business tier to provide the data, then stuff it into beans, and pack those into the Session instance. Then forward the request to the JSP, let the JSP get those beans and display them.

  • Writing an XML file from JSP

    Hi
    for some this question will seem to be a stupid, but i am really confused how can i write an XML file from with in JSP code. should i have to use same FileOutPutStream.
    Actually i am trying to make reports using Jasper api. It demands for an XML file which will then b converted into PDF file. Can any one help me in it.

    Jasper converts a JSP into a servlet - and cannot be used to generate PDFs.
    Assuming this is for a web application I would
    1. Generate the XML
    2. Generate the PDF from the XML
    3. Send the PDF to the client from a servlet (i.e. forget the JSP).
    Step 2 is actually quite complicated - you could do this manually with the IText API (http://www.lowagie.com/iText/) or use an XSL approach with Apache FOP (http://xmlgraphics.apache.org/fop/)

  • Using an XML file for server URL instead of hard coding

    I can't find a good example.
    Could someone give me an example of using a local XML file to set a server url variable so i don't have to hard code url's?
    This works and i can trace the xml file but how do i access the individual xml data nodes?
    protected function initApp():void
         var loader:URLLoader = new URLLoader(new URLRequest("config.xml"));
         loader.addEventListener(Event.COMPLETE,configLoadComplete);
    private function configLoadComplete(event:Event):void
         trace(event.target.data);

    Hi,
    <a href="foobar.xml">right click and select save as from the context menu</a>
    or
    write your xml data or a copy of it with a different extension (text) so that it is not parsed as application/xml-xhtml
    or
    Use AJAX to retrieve the xml file and display it as the textContent of a <textarea>
    window.open wraps the xml markup in html tags for display purposes.
    Rob^_^

  • Using session.xml file from WorkB in  a Session Facade based on another xml

    Hi
    I have the follwing scenario.
    Need to read data from a set of tables and convert them into an XML file based on an XSD.
    I am planning to use Toplink POJO in JDeveloper to create a SessionFacade to read the values.
    I tested the SessionFacade using a client and I was able to read the values correctly.
    Based on my xsd, I created a project in Workbench and mapped the classes created earlier, I was able to test this mapping using a test xml data file.
    I was able to read the file, Unmarshall it, manipulate it and generate an XML.
    Now the question is how do I call this Marshalling from my SessionFacade ?
    Since two session.xml files are in different format, I could not copy the content from one file into another.
    How do I create a JAXBContext based on a different session.xml?
    Thanks
    Sambath
    Oracle Consulting

    Hi Doug,
    Thanks for the response. I did the same and I was able to make it work, soon after I posted. I should have updated it :-)
    I used two sessions file.
    The OXM expected the name of the file to sessions.xml and I have to keep it that way. I created a ormsession.xml using JDeveloper and referred the ORM Project created in the Workbench to use it for ORM . In fact I created a dummy ormsession.xml file in JDeveloper wiht a session named "default". I started by creating an entry manually by copying the contents of the session definition and renamed to "MySession"
    Once again thanks for following up
    Thanks
    Sambath

Maybe you are looking for

  • Help required in SAPscript - new to sapscript

    Dear all, I have copied WESCHEINVERS3 from NACE and renamed it as ZWESCHEINVERS3. I have made modifications in the form and the program SAPMO7DR and renamed it has ZSAPMO7DR.Now, from where i will run the debug mode to see whatz happening inside the

  • SMTP doesn't work for my Runbox account

    All my gmail accounts work fine, but the new account (a Runbox one) I add doesn't. When I send a message from that account I get the "Connecting to server" box and nothing happens. When I click on it I get a message stating the sending mail failed an

  • HDMI to DVI for rentals

    Want to connect HDMI from ATV to DVI on projector, does this work for movie rentals or does DRM stop it?

  • JSP Inner class generates IllegalAccess Error

    I created an inner class inside of a JSP file. Unfortunately, Weblogic 5.1.0           compiles the inner class as private. So I got an IllegalAccessError. Is           there a way to use inner classes in JSP files?           Thank you.           - R

  • URGENT!! help on CHAT APPLET

    i've created a chat Applet as client. i want it to be used like this -user login -choose chat room -and start applet. what i've done now is chat applet. i want it to be used by multi user. and display online users name or username. but now it can onl