This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes servlet called first Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet called first" Watch "servlet called first" New topic
Author

servlet called first

aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
what would be the url pattern for the servlet to be called as soon as the site url is typed.
and then this servlet gets some data from database and dispaches to index.jsp (home page).
is that possible and if so how can we do it ??

thanks alot!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

On my site, I have an example app that shows how to configure a webapp to use as servlet as the welcome page.
There is also a simple MVC example that has code for forwarding from the servlet to the JSP.

See:
http://simple.souther.us


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
GeeCON Prague 2014
 
subject: servlet called first