aspose file tools*
The moose likes JSP and the fly likes help connecting to mysql database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "help connecting to mysql database " Watch "help connecting to mysql database " New topic
Author

help connecting to mysql database

david halewood
Greenhorn

Joined: Dec 28, 2006
Posts: 3
I got this ervlet off of coreservlets.com but want to change it so instead of each catalogItem being typed in it gets the infomation from mysql database:


I have made this code below which gets data from mysql tables, at the moment i use it as a simple search but is there a way to merge the two together so the above code gets it catalogItems by using the select statement like in the code below?

Any help at all would be really helpful as i am really finding this hard, if you go to http://volume1.coreservlets.com/archive/Chapter9.html you can see the other files for how the catalog works. Again any help would be helpful this is very stessing lol

[ December 29, 2006: Message edited by: david halewood ]
[ December 29, 2006: Message edited by: david halewood ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

David,
JavaRanch tip:

If you are going to post more than a line or two of your code, wrap that
code in a set of UBB Code tags.
Doing so will help to preserve your code's indenting, making it easier to read.
If it is easier to read, more people will actaully read it and you will
stand a better chance of getting help with your question.
See UseCodeTags for more
help with UBB code tags.

I was going to add them for you but when attempting to do so, I noticed that the code has no indenting.
You can edit your post by clicking on the
link.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
david halewood
Greenhorn

Joined: Dec 28, 2006
Posts: 3


I came up with the above solution but it still does not work fully i have been told i need to add the item to a array during the first for loop, i called the array addedItem but do not know how to add the item to it can any body help me?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help connecting to mysql database