wood burning stoves 2.0*
The moose likes Servlets and the fly likes javaserlvet&xml&mysql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "javaserlvet&xml&mysql" Watch "javaserlvet&xml&mysql" New topic
Author

javaserlvet&xml&mysql

bernd pier
Ranch Hand

Joined: Jun 21, 2002
Posts: 30
hello,
i don`t know if this is the right forum.
i want to write a servlet,that uses xml to show the data and get the data from a mysql database.
now i`m searching for an online tutorial, that`s fits it. had anybody a link for me?
thanks
bernd
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
You're right -- it's not the right forum. Moving you to the servlets forum...
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
There are plenty of tutorials about which cover some or all of this technology, but before I can recommend one, I really need to know a bit more about what you plan to do with these buzzwords.
Can you give us an example scenario of what a user would provide as input, then how that informatiom would flow through and the rest of the system to provide results in whatever form are required. ?
I must admit, I'm puzzled as to the purpose of the XML in this system.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
bernd pier
Ranch Hand

Joined: Jun 21, 2002
Posts: 30
okay,
i have wrote a servlet, that connect to a mysql database and shows the data via html.
now i had to write this servlet again, but changed html to xml and xsl, so the look of the pages and the data are divide.
the first servlet contains the complete html code and i think with xml and xsl, i have a java file,that contains the connection to the mysql database and the xml file, a xml file and a xsl file, so that everythink has it`s own file and it`s clearer and easier to change it.
is this well describe or do you need more informations?
bernd
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

One way is to generate the xml like this:

now you have your XML in a StringBuffer (or String by calling sb.toString()). This String can you 'give' the XML/XSLT parser by converting it to a InputStream.
e.g.

/Rene


Regards, Rene Larsen
Dropbox Invite
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javaserlvet&xml&mysql