File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: servlet called first
It's not a secret anymore!