This week's giveaway is in the Java/Jakarta EE forum. We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line! See I suggest using error = sqle.getMessage() to see the actual error being returned by the DB. That will be quite informative in determining the error. LIkewise, use error = e.getMessage() Also, is this code just testing the ability to query the DB? It seems as though it will return one column of all records in the table. Perhaps you meant in your queryString: "select * from Post where SUBJECT = " + subject And remember, if SUBJECT is a varchar, you have to enclose your subject variable with single quotes: "select * from Post where SUBJECT = '" + subject + "'"
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Originally posted by Joe Broderick: Hello, I can display everything from a table to a jsp, but if i want to only display some of the data based on a query, how can I do that? I tried to pass a string from the jsp to the bean which is connected to the database, but it does not work.