Problem While returning a xml object from a jsp using java code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JagPeram
    New Member
    • Jan 2007
    • 13

    #1

    Problem While returning a xml object from a jsp using java code

    Is it possible to return a xml object from a jsp using java code?

    here is my code:

    <html>
    <head><title>Pa ge Title</title></head>
    <body>
    <table width="100%">
    <tr>
    <td>

    <!-- here is where i return a xml object -->
    <%
    String testOne = request.getPara meter("HeyYou") ;
    response.setCon tentType("appli cation/xml");
    response.setHea der("Cache-Control", "no-cache");
    response.getWri ter().write("<t estValue>"+test One+"</testValue>");
    %>
    <!-- Ends here -->

    </td>
    </tr>
    </table>
    </body>
    </html>

    When i do like this, in the jsp page where i receive this object, i'm getting a null value for this xml object.

    Pls anyone help me with this

    - jagadesh
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by JagPeram
    Is it possible to return a xml object from a jsp using java code?

    here is my code:

    <html>
    <head><title>Pa ge Title</title></head>
    <body>
    <table width="100%">
    <tr>
    <td>

    <!-- here is where i return a xml object -->
    <%
    String testOne = request.getPara meter("HeyYou") ;
    response.setCon tentType("appli cation/xml");
    response.setHea der("Cache-Control", "no-cache");
    response.getWri ter().write("<t estValue>"+test One+"</testValue>");
    %>
    <!-- Ends here -->

    </td>
    </tr>
    </table>
    </body>
    </html>

    When i do like this, in the jsp page where i receive this object, i'm getting a null value for this xml object.

    Pls anyone help me with this

    - jagadesh
    How are you retrieving the object in the other JSP?
    Is your XML well formed?

    Comment

    Working...