File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "help connecting to mysql database " Watch "help connecting to mysql database " New topic

help connecting to mysql database

david halewood

Joined: Dec 28, 2006
Posts: 3
I got this ervlet off of 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 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

Joined: Dec 11, 2004
Posts: 13410

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

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

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:
subject: help connecting to mysql database
Similar Threads
two dropdown menus
Error 500 when trying to run servlet connecting to mysql
Storing of Data
Sending Email from jsp page
cookies problem