Solved

XML and JSP Purchase Order Form

Posted on 2002-04-24
14
498 Views
Last Modified: 2008-03-06
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
Comment
Question by:trigabert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
14 Comments
 
LVL 27

Expert Comment

by:BigRat
ID: 6965399
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
 

Author Comment

by:trigabert
ID: 6965412
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
 
LVL 27

Expert Comment

by:BigRat
ID: 6965490
"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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:trigabert
ID: 6965640
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
 
LVL 27

Expert Comment

by:BigRat
ID: 6965673
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
 

Author Comment

by:trigabert
ID: 6965723
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
 

Author Comment

by:trigabert
ID: 6965730
sorry.......my arthritis
0
 
LVL 27

Expert Comment

by:BigRat
ID: 6965764
OK. My paws are not what they used to be :)
0
 

Author Comment

by:trigabert
ID: 6965813
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
 
LVL 27

Accepted Solution

by:
BigRat earned 80 total points
ID: 6965947
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
 

Author Comment

by:trigabert
ID: 6965974
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
 

Author Comment

by:trigabert
ID: 6965981
where can i post the extra questions
0
 

Author Comment

by:trigabert
ID: 6965991
where can i post the extra questions
0
 
LVL 27

Expert Comment

by:BigRat
ID: 6966027
In the XML topic area!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question