Displaying data in xml using jsp

how do we display data in database from jsp using xlst format in xml browser view

how do we display data in database from jsp using xlst
format in xml browser viewRefer this Post
http://forum.java.sun.com/thread.jsp?forum=45&thread=482077&tstart=0&trange=15
-Regards
Manikantan

Similar Messages

  • Creating XML using JSP

    Hi I want to create a xml using JSP For eg I want to create a report
              and I want to take all the data required for the report from the user
              and want to put all the information in a session and whenever a user
              wants to see the html output I should be able to parse the xml file
              and show it to user.
              I know it is doable but I am confused about storing the data in
              session and concerting that data into XML file any help would be
              great.
              Thanks,
              Preeti
              

    Sounds like you might want to look at XML data binding. Something like JAXB
              or Castor can create an object that can be turned into XML by merely calling
              a single method and probably streamed to Xalan or whatever to create HTML.
              However, don't quote me on this - I am having enough troubles with trying to
              get the compiled Objects to be as I wish. Basically, they both take your
              DTD with an extra file that defines the types to be used in the classes -
              i.e. instead of string int might be used - and which tags to turn into
              classes and general information such as this about the output of your
              classes. You then simply call Unmarshal (for both castor and JAXB) and it
              loads the file from the selected input stream into the created object, you
              edit the object, what ever - store it on the server... and call Marshal to
              get back the xml... as this is all using streams it could be passed to Xalan
              for processing i think...
              Hope I've helped, and answered your question a little!
              "Preeti Sikri" <[email protected]> wrote in message
              news:[email protected]...
              > Hi I want to create a xml using JSP For eg I want to create a report
              > and I want to take all the data required for the report from the user
              > and want to put all the information in a session and whenever a user
              > wants to see the html output I should be able to parse the xml file
              > and show it to user.
              >
              > I know it is doable but I am confused about storing the data in
              > session and concerting that data into XML file any help would be
              > great.
              >
              > Thanks,
              > Preeti
              

  • Display data in smartforms using report

    hi,
    i want to display data from smartform using report.
    i have a preview buttons in report when i select preview buttons displays in smarts
    regards
    amit

    design the smartform as per ur need and get  the function module generated by smartform and pass it to ur report programas below..
    case sy-ucomm.
    when 'smartform'.
    pass the f.m that is generated by system in smartforms
           CALL FUNCTION '/1BCDWB/SF00000265'
        EXPORTING
        ARCHIVE_INDEX              =
        ARCHIVE_INDEX_TAB          =
        ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         =
        MAIL_APPL_OBJ              =
        MAIL_RECIPIENT             =
        MAIL_SENDER                =
        OUTPUT_OPTIONS             =
        USER_SETTINGS              = 'X'
          DATE_L                     = s_fkdat-low
          DATE_H                     = s_fkdat-high
          PLANT_L                    = s_werks-low
          PLANT_H                    = s_werks-high
      IMPORTING
        DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            =
        JOB_OUTPUT_OPTIONS         =
        TABLES
          IFINAL                     = ifinal1[]
      EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 4
        OTHERS                     = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endcase.

  • How to write static Data in xml using XStream

    Hi All,
    I have a swing desktop application.
    In this ProposalData class contains all the input value of the application.
    I want to write proposal data to XML using XStream.
    Below I attached the part of code which responsible for create xml.
    But it is written all the non static data to the xml not the static data.
    public class ReadWriteXml {
        static ProposalData proposalData = new ProposalData();
        static XStream xstream = new XStream(new DomDriver()); // does not require XPP3 library
        FileWriter fileWriter = null;
        FileReader fileReader = null;
        public void writeXMLFile(String fileName)throws IOException{
            try{
                fileWriter = new FileWriter(fileName);
                proposalData = VPProposalApp.getApplication().getInstances().updateData();
                xstream.toXML(proposalData, fileWriter);
                } catch (Exception e) {
                                System.out.println("IOException : "+e);
    }Can any body help me to write the satac data in xml using Xstream.
    Please help me.
    Thanks in Advance
    Ananda

    Note: This thread was originally posted in the Swing forum, but moved to this forum for closer topic alignment.

  • Error when reading data from XML using JAXB?

    Hi all,
    I get the error message when reading data from XML using JAXB.
    [org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.]
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException
    (AbstractUnmarshallerImpl.java:315)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:481)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:199)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:142)
    I don't find the reason, please help!
    Thanks in advance!

    The problem is sovled.

  • Reading XML using JSP

    Hi,
    My company just bought a software, which this s/w will generate a HTML file with the XML tags and data inside it.
    I will need to read the XML tags and data inside the HTML file using JSP.
    Does anyone know how to do this?
    Please help mi!!Thanks!

    http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html

  • Problem displaying data in Excel with Jsp

    HI,
    For some reason when i save data from jsp to excel, my Excel dont display data.This code was working fine from past 3 years all of sudden it starts givin this problem.
    However When i open my .xls file in notepad i see data there. The problem is because of XML declaration (<?xml version="1.0" encoding="UTF-8"?> which parsed generate. If i remove this it works fine.
    Out put in file looks like this
    <?xml version="1.0" encoding="UTF-8"?>
    <table border=1 width="100%">
    <tr>
    <TH>Name</TH>
    <TH>Last Name</TH>
    <TH>state</TH>
    <TH>Country</TH>
    <TH>Currency</TH>
    </tr>
    <tr>
    <TD class="odd">John</TD>
    <TD class="odd">Hayden</TD>
    <TD class="odd">IL</TD>
    <TD class="odd">USA</TD>
    <TD class="odd">USD</TD>
    </tr>
    <tr>
    <tr>
    <TD class="odd">Ricky</TD>
    <TD class="odd">Ponting</TD>
    <TD class="odd">IL</TD>
    <TD class="odd">USA</TD>
    <TD class="odd">EUR</TD>
    </tr>
    </tr>
    </table>
    Jsp Code
    String rptHTML = (String)session.getAttribute("ReportStrHTML");
         System.out.println(rptHTML);
         response.setHeader("Content-Disposition","attachment;filename=Test.xls");
         response.setContentType("application/vnd.ms-excel");
    Thanks

    In Excel, Tools > Macro > security > medicum and Trusted tab check To access VB.

  • Export data to XML from JSP possible?

    I have a small JSP to retrieve data in a Browse form. Is there information on how to save information retrieved in a Browse (or Edit) form to XML output in order for a spreadsheet application (e.g. Excel) to pull up the data? I have not noticed this in the help files. Are there sample codes examples that illustrate this?
    Is exporting data to XML even possible using JDeveloper 9.0.3?

    You can call write XML on your ViewObject to get an XML representation.
    If you are using IE you can change the content type for a page to :
    <%@ page contentType="application/vnd.ms-excel" %>
    This will open excel within your browser. It seems to deal nicely with any data in the page that is formatted in HTML <table> elements.
    Matt

  • Display data in EP using BAPI-    BAPI_PO_GETITEMSREL

    hi all!!
    I need to display data in EP from R/3 and i'm using a BAPI mentioned in subject for it ,can anybody provide the step by step instructions.
    eagerly waitin
    sachin

    Hi Sachin,
    Go through the step by step tutorial for the WebDynpro application creation from following link.
    You can then create your application in Netweaver development studio Webdynpro.
    Link:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/76b45d9688e04abe1a1070410ddc1e/content.htm
    Regards,
    Tejas

  • Display data to matrix using LoadFromDataSource

    Hello all,
    I tried to display data to matrix.
    I used matrix object's LoadFromDatasouce.
    But it didn't display data at all.
    Pls help me!!
    creationPackage.ObjectType = "EVOSS_BUSTR"      
    creationPackage.UniqueID = "TEST
    creationPackage.FormType = "TEST"
    creationPackage.BorderStyle =  SAPbouiCOM.BoFormTypes.ft_Fixed
    Set oForm = SBO_Application.Forms.AddEx(creationPackage)
    sTableName = "@EVOSS_BUSTR"   
        oForm.Title = sTitle
        oForm.Height = 300
        oForm.Width = 350
        oForm.DataSources.DBDataSources.Add ("sTableName")
        Set oItem = oForm.Items.Add("1", it_BUTTON)
        oItem.Left = 5
        oItem.Width = 65
        oItem.Top = 240
        oItem.Height = 19
        Set oButton = oItem.Specific
        oButton.Type = bt_Caption
        Set oItem = oForm.Items.Add("2", it_BUTTON)
        oItem.Left = 75
        oItem.Width = 65
        oItem.Top = 240
        oItem.Height = 19
        Set oButton = oItem.Specific
        oButton.Type = bt_Caption
        'Adding a matrix
        Set oItem = oForm.Items.Add("TEST, it_MATRIX)
        oItem.Left = 5
        oItem.Width = 340
        oItem.Top = 10
        oItem.Height = 200
        oItem.AffectsFormMode = True
        Set oMatrix = oItem.Specific
        Set oColumns = oMatrix.Columns
        'Adding col 1
        Set oColumn = oColumns.Add("ColNb", it_EDIT)
        oColumn.TitleObject.Caption = "#"
        oColumn.Width = 20
        oColumn.Editable = False
        'oColumn.DataBind.SetBound True, "", "#"
        'Adding col 2
        Set oColumn = oColumns.Add("EVOSS_Code", it_EDIT)
        oColumn.TitleObject.Caption = "Code"
        oColumn.Width = 80
        oColumn.Editable = True
        oColumn.DataBind.SetBound True, sTableName, "Code"
        'Adding col 3
        Set oColumn = oColumns.Add("EVOSS_Name", it_EDIT)
        oColumn.TitleObject.Caption = "Name"
        oColumn.Width = 220
        oColumn.Editable = True
        oColumn.DataBind.SetBound True, sTableName, "Name"
        oMatrix.AddRow
        Set oColumn = oMatrix.Columns.Item("EVOSS_Code")
        Set eItemCode = oColumn.Cells.Item(1).Specific
    '   oForm.Mode = fm_FIND_MODE
    '   oForm.DataBrowser.BrowseBy = "EVOSS_Code"
        'oMatrix.SelectionMode = ms_None
         oForm.Visible = True
         add_line = True
         oMatrix.LoadFromDataSource

    Hello.
    For load a data to a matrix you need call a Query method of the dbdatasource to obtain data from the database.
    By.

  • How to send/receive XML using JSP

    Hi,
    I'm new to all this JSP/XML stuff so apologies if this is trivial.
    I'm trying to send an XML file via HTTP POST using JSP. Anyone know how to do this?
    Once the XML has been sent, how do you use JSP to request the XML file? I've figured out how to parse it already.
    Also, is it possible to call xsql directly within JSP?
    Thanks!

    I'm trying to send an XML file via HTTP POST using JSP. Anyone know how to do this?The question is, does anybody understand what you mean by this. Let me take a guess. You want to upload an XML file to a server. If this guess is right, then the answer is don't use JSP to do that. JSP is for generating output to be sent to a client. Use a servlet to handle an upload. And you don't need to write it yourself, there are already several file-upload servlets available on the web.
    Second guess: you have a POST request that asks your server to send an XML file back to the client. If it's a static XML file you don't need a JSP or a servlet or anything, just let your web server handle it just like any other static file. If it's dynamically generated then there's an answer worth giving, but I doubt that this is your question. But if it is, let us know.

  • How to save form data as XML using Reader XI

    Dear all,
    I have designed a form using live cycle designer 9 and activated the form extensions using Acrobat X Pro.
    The form includes an email send button.
    Our clients uses the Reader X and XI.
    Using Reader X the pressing of the button will open a dialog box asking the user to send the form/form data using the default email client
    OR
    one can save the form data as xml file on the local machine and attach it later.
    However, using Reader XI there is no such possibility of saving the data as XML. One can just chose between the default email client or another email account.
    I tried even a button using javascript xfa.host.exportData("",0); but nothing. In fact the button shows no function at all.
    What do I wrong?
    Does anybody has a hint please?
    Thanks in advance.
    gersti

    I'm pretty impressed of Adobe and their stuff (I do NOT refer to the community), how helpful they are.
    Perhaps I didn't understand  the meaning on the offical customer support website, stating:
    The best way to contact us...  
    Ask our experts 
    Our community and staff are at your service 24/7
    Even worst, their is a similar question from 25/09/2013 (http://forums.adobe.com/message/5711946#5711946) and no feedback form Adobe stuff at all.
    Great service guys!
    Thanks a lot!

  • Embedding inline HTML data in XML using the mx:XML tag with &lt; and &gt;

    What is best practice for embedding HTML within the
    <mx:XML> tag? Programmatically, I can implement this
    successfully:
    [Bindable]
    public var xmlDP:XML = <component data="&lt;" />;
    However, I get the following error if I try to store the same
    data inline in an mx:XML tag, as such:
    <mx:XML id="xmlDP">
    <component data="&lt;" />
    </mx:XML>
    Error #1095: XML parser failure: Unterminated attribute.
    If I change the MXML tag as follows, it works fine:
    <mx:XML id="xmlDP">
    <component data="&amp;lt;" />
    </mx:XML>
    Unfortunately, I also can not source the mx:XML tag to an XML
    file which uses &lt; or &gt; codes, as it yields the same
    results. This leads me to believe that the <mx:XML> tag does
    not support the special character codes for < and >, but why?
    Incidentally, this code also gives a 1095 error:
    <mx:XML id="xmlDP">
    <component data="&#0060;" />
    </mx:XML>
    This is causing an issue with my source data as it is not
    hand typed into Flex, and standard XML supports the &lt; and
    &gt; codes. I have tried a full HTML string, as shown below,
    but this also generates the error:
    <mx:XML id="xmlDP">
    <component data="&lt;b&gt;Test&lt;/b&gt;"
    />
    </mx:XML>
    Many thanks for any input you may have!

    I’m generating the XML source file with
    Microsoft’s XML Notepad 2007. It will encode invalid special
    characters automatically. My understanding is that this is the
    proper way to handle the less than symbol in a XML string, that is
    to say using the &lt; code.
    With respect to the escape and un-escape methods, I am able
    to successfully implement these in AS, but not in MXML. This makes
    sense considering they are AS methods, but I was hoping to be able
    to do something like:
    <mx:XML id="xmlDP">
    <component data="escape('<');" />
    </mx:XML>
    This gives the following compilation error:
    The value of attribute "data" must not contain the '<'
    character.
    As does using the escape character as such:
    <mx:XML id="xmlDP">
    <component data="\<" />
    </mx:XML>
    Below is an example of what the escape character may be used
    for in AS:
    var myString:String = "\"";
    trace(myString);
    // result: "
    Likewise, I can escape the < character as such:
    var myString:String = escape("<");
    trace(myString);
    // result: %3C
    <mx:XML id="xmlDP">
    <component data="%3C" />
    </mx:XML>
    trace(un-escape(xmlDP.@data));
    // result: <
    As you can see, using %3C and unescaping in AS will yield the
    correct result; however, this is not a practical method of
    representing the data in MXML as I would have to write an AS method
    to un-escape the XML string anyway, so I might as well just store
    the data in AS to begin with. I was hoping for a way to source an
    mx:XML object, without having to load it into ActionScript
    manually. Here’s an example of the functionality I would
    expect:
    <mx:XML id="xmlDP">
    <component data="&gt;" />
    </mx:XML>
    trace(xmlDP.@data);
    // result: >
    Only this does not work for the less than symbol. I’m
    assuming at this point that this is a bug in the Flex compiler.
    Thanks again for your help troubleshooting this one!

  • How to manipulate data in AS400 using JSP?

    hi i am developing a system and i am using JSP with AS400 as its database.
    My question in how am i be able to access the data from the database to the pages?
    How can i also manipulate the data in the database using JSPs?ex..add,edit,delete
    Can anyone help me about it..it would be better if i got to see some sample codes.

    Now then first of all lets come back to origination of specification
    to me AS 400 is a product technology from IBM.
    IBM offers solutions for operating on respective platform using a specific Application Programming Environment and if you are looking for a solution using Java Environments the below PDF / articles might have to serve your need.
    http://www.redbooks.ibm.com/pubs/html/as400/v4r5/ic2924/info/java/rzaid/java400.pdf
    http://search400.techtarget.com/tip/1,289483,sid3_gci537120,00.html?FromTaxonomy=%2Fpr%2F2fa
    http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/rzahh/javadoc/RLReadFileExample.html
    http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.javatools.doc/tasks/t4over.htmand if you are looking for a open source solution the below project library might intrest you
    http://jt400.sourceforge.net/Hope that might help :)
    REGARDS,
    RaHuL

  • Master page fields not displaying data from XML file

    Hi,
    For some reason if I a add a field on the master page, when previewed it does not display the xml data assigned to the field.
    I have a work around, but it looks messy and would prefer to resolve the problem correctly.
    My work around is to create another field with the same name in the "Design view" layout, and change the presence to invisible. I don't even have to link it to the xml data, simply select Global as the default binding.
    Any ideas what I have done wrong, I assume it's a simple setting somewhere but I have no idea what it is.
    Thanks
    Russell

    If there, try removing the $. at the beginning of the binding that gets puts there if you select the item from the pop up list.
    I have a text field that is read only and bound without the $. that was working fine for displaying data. I have a drop down that had the $. and was not saving. I removed the $. and now it is getting saved to the XML. However, it does not display on the next render of the form.

Maybe you are looking for

  • How do I simply get a photo off my iPhone 5 to my PC?

    Jeez, you might think this would be intuitive or straight forward but I can find no way to take a photo from my iPhone 5 and transfer it to my Dell PC.  Do I need a sticking App for that simple, simple task or am I just an idiot?  Trying to make a Ch

  • Mail transfer - no messages in mailboxes

    I transfered my mailboxes to a new computer by copying the files in Library-Mail-Mailboxes to an external hard drive and then dropped them onto a new Mac Book Air. The mailboxes are showing up perfectly but there are no messages contained within each

  • No "Open" optio in IE, "Save" and "Cancel" only

    I have an issue with a machine that does not give me to option to open a pdf when clicking on a link or and email pdf. I have uninstalled/reinstalled the reader and uninstalled IE7 and all the other tricks and tips generally associated with this issu

  • Quick Question Macbook Pro 15.4"

    Hi, Need some help with my mac what should i do??? THE mac IS AT THE MOMENT WORKING BUT UNFORTUNATELY SOMETIMES IT IS FAULTY (SCREEN TURNS BLACK AND NEEDS A RESTART) also WHEN IT SWITCHES TO THE AMD CHIP AS THERE IS A PROBLEM WITH THE GPU. What would

  • Newbie question on how to return java objects from java stored procedures

    Hi, As you may guess, i'm new to this. I have a stored procedure that does some calculations and creates a list of java objects as the result of the query. How would I return the list from the database to the client application? Would I have to creat