Darragh Power

Greenhorn
+ Follow
since Jul 24, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Darragh Power

I am trying to display results from my books table in my database. I am using a search box in my index.jsp to input the author name. I want to display all results from my db that match the author's name. The SearchQuery.java and SearchServlet.java both worked when all I wanted to do was display all records from my db, but now I've changed it around by adding a search box and trying to search by author.

index.jsp


SearchQuery.java


SearchServlet.java


Search.jsp


When I try to run I get this error:


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
dbhelpers.SearchQuery.getHTMLTable(SearchQuery.java:64)
controller.SearchServlet.doPost(SearchServlet.java:46)
javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

I'd really appreciate help.