File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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


bernd pier
Ranch Hand

Joined: Jun 21, 2002
Posts: 30
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?
Kyle Brown
Ranch Hand

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

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
Frank Carver

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 ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
bernd pier
Ranch Hand

Joined: Jun 21, 2002
Posts: 30
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?
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.


Regards, Rene Larsen
Dropbox Invite
I agree. Here's the link:
subject: javaserlvet&xml&mysql
It's not a secret anymore!