Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javaserlvet&xml&mysql

 
bernd pier
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right -- it's not the right forum. Moving you to the servlets forum...
Kyle
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
bernd pier
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic