• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 509
  • Last Modified:

XML and JSP Purchase Order Form

We need to retrieve records from a database using JSP code in our XML document which is a purchase order form, and display them on the XML PO form web page.
 
Our problem is the jsp code to display the stuff in the page and then write it to a text file or something.  Are there any examples on the web of how to do this so that we can try it out before writing our own.  we are not very good at jsp!? We have spent weeks trying to get this to work, please help!
(We are using an oracle database and have an ssl enabled apache server set up with Tomcat to handle servlets and JSPs.)
Thanks ypu
triga
0
trigabert
Asked:
trigabert
  • 8
  • 6
1 Solution
 
BigRatCommented:
What has the XML document go to do with retrieval? I would have thought that the select from the database gets you a record set and you would generate HTML out of it?

Or have you converted the record set to XML and now want to convert the XML into an HTML form?
0
 
trigabertAuthor Commented:
We have no problems retrieving the record set and displaying it in the html version of our page.

We need to retrieve it and display it in the xml version.

Can we generate an xml page the same as a html page or do we have to input the fields into an already created xml form?  if so how do we know our xml form is right and what jsp code to use!?

Thanks for your help
triga

0
 
BigRatCommented:
"We need to retrieve it and display it in the xml version"

Are we talking about an already partially designed system, an already avaliable form, or are we talking about doing something completely new?

One normally takes the RS and constructs an XML "document" (I use the term looasely because i is often just a string), and then one sends the document to the browser together with an XSL style-sheet. The sheet transforms the XML to HTML which then gets displayed. If the browser is not XML enabled one does the transform on the server and sends the resultant XML.

So, next question?

HTH
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
trigabertAuthor Commented:
We have a partially designed system and we already have an xml form by creating an html page in frontpage and converted it to xml.  We are trying to get stuff from the database into it using JSP if this is possible?

Is it easier to automatically generate  the xml page with the records from oracle in it?

Thanks
Triga
0
 
BigRatCommented:
The XML situation is such that the XML file/document/string contains only the naked data needing to be displayed. The formatting is done via an XSL style-sheet.
   I am not familiar with the Oracle API, but it does have a facility like MS SQL 2K to generate XML data of the form :-

<record>
   <field1>data1</field1>
   <field2>data2</field2>
   ....
</record>

An XSL style sheet would do soemthing like :-

<xsl:template match="/">
   <table>
   <xsl:for-each select="/record">
      <tr>
        <xsl:apply-templates select="."/>
      </tr>
   </xsl:for-each>
   </table>
</xsl:template>

<xsl:template match="field1">
   <td><xsl:value-of select=."></td>
</xsl:template>

and so on.

Get the picture?
0
 
trigabertAuthor Commented:
We have a partially designed system and we already have an xml form by creating an html page in frontpage and converted it to xml.  We are trying to get stuff from the database into it using JSP if this is possible?

Is it easier to automatically generate  the xml page with the records from oracle in it?

Thanks
Triga
0
 
trigabertAuthor Commented:
sorry.......my arthritis
0
 
BigRatCommented:
OK. My paws are not what they used to be :)
0
 
trigabertAuthor Commented:
i dont have a clue where to start with this stupid xml and jsp stuff.
AAAHGGhh.
is there any tutorial that is useful i need to learn it in like 2 hours!  i am severly confused.  Do you want to do it and email it me?????? hee hee only joking ( not really)

Thanks for your help.  how do i give you the points?  just click on Accept Comment as Answer beside your name.  Hope my arthritis doesnt cause the mouse to click something else!!!!!!

Triga
0
 
BigRatCommented:
Yes "accept comment as answer" and then follow the instructions would be OK.

I'd offer to help you get started, but not in 2 hours!

The first thing to do is to get the XML data out of the database. Once you have that writing a styleheet is confusing and difficult, but with a simple version to start off with you might be albe to learn quite quickly.

Again, you can always post further questions here.
0
 
trigabertAuthor Commented:
can u send me a simple version to start us off?  PPPPLLLEEASSEE?  
I'd give you a zillion points  (if I had them)  We thought we had converted our HTML page to a XML page and spent 2 days at it only to find out its still a HTML page!  How do you convert it?

The records in the database aren't in XML form they are just normal.  All we want is to get the stuff out of the database and into the Purchase order form (which we can do through jsp)This isnt doing anything with XML.
  Then because the suppliers dont have our system installed we just want to convert the web page containing the records into a standard XML form and write it to a text file?

Is this easy or are we completely thick?

Thanks again
triga
0
 
trigabertAuthor Commented:
where can i post the extra questions
0
 
trigabertAuthor Commented:
where can i post the extra questions
0
 
BigRatCommented:
In the XML topic area!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now