Jonny Devine wrote:1) Is it possible to include a FrontController (servlet) using ...
[Edit: after reading your post a few times -- I now understand what you are asking]
Yes, you can include a URL that invokes a front controller that dispatches to an action.
You might find
this article helpful to see how a Front Controller can be used in web apps.
because I keep getting errors no matter what I try such as NullPointerException and IllegalStateException. What is my FrontController meant to do with this request? If I use the dispatcher.foward method I get IllegalStateException: Cannot forward after response has been committed.
IllegalStateException usually means that you have emitted some output before a forward. The null pointer is always the result of a programming bug. We'll need more info.
2) Is it possible to retrieve information from database in a JSP without a Servlet and without putting java code in the JSP?
Possible? Yes.
A really really bad idea? Certainly.
Again, use the right tool for the job.