<url-pattern>/*</url-pattern>
Bear Bibeault wrote:
<url-pattern>/*</url-pattern>
Because * matches everything, this maps everything to your servlet. Bad idea. Very bad.
What you really want to do is to map your servlet as the "welcome file".
Look up <welcome-file-list> in the Servlets Spec.
Bear Bibeault wrote:Are you trying to create a front controller? If not, each link should have its own servlet.
You might find this article helpful to understand proper Java web app structure.
Richard Berglund wrote:Yes, my plan was to use it as a front end controller. Not certain whether or not that's a great idea, just following the information I've been reading.
Overall, I'm just trying to get acquainted with Java web development. Unfortunately, much of the information I've read doesn't offer much on overall design (when to use server-side vs client-side scripting, etc).
In some examples I've found I noticed the use of static html pages using sevlets or services to process actions (form submit, etc)
But that makes me wonder how to handle a session without writing that into each service.
Thanks for the link, I'll read that now!