i'm trying to write a servlet that parses an xml file and then hits the database. do i extend HTTPServlet or HandlerBase? i feel i should know this by now. don't know why i'm confused. thanks in advance for the help. jb
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
0
Your servlet should extend HTTPServlet, and I recommend that you create one or more support classes to do your XML parsing and database access. Your parser class(es) can then extend HandlerBase. In my experience one of the most common mistakes with using servlets is to assume that all the code must be written "inside" the servlet. A servlet is just a java class, and should be made no bigger than it needs to be to handle and process HTTP requests and parameters, and dispatch to appropriate processing in other classes.