1) Please be sure to take the time to compose descriptive subjects for your posts; read this for more information. A title such as "please help me out" is not helpful. What would happen if all posts had such a title?
Please go back and change your post to add a more meaningful subject by clicking the button on your post.
2) Please do not ask for answers in email. Keep any discussion within the forums. Please read this for more information.
write a plain java class as a Model , servlet as a controller and Presentation code in JSP.
Model:-Model is responsible for providing the data from the database and saving the data
into the data store. All the business logic are implemented in the Model. Data entered by
the user through View are check in the model before saving into the database. Data
access, Data validation and the data saving logic are part of Model.
View:-View represents the user view of the application and is responsible for taking the
input from the user, dispatching the request to the controller and then receiving response
from the controller and displaying the result to the user. HTML, JSPs, Custom Tag
Libraries and Resources files are the part of view component.
Controller: Controller is intermediary between Model and View. Controller is
responsible for receiving the request from client. Once request is received from client it
executes the appropriate business logic from the Model and then produce the output to
the user using the View component.
structure of files in Tomcat (create a directory in webapp say MyApp)
It is not compulsary to make index file, but it is good if you have it.
when you enter URL in the browser and if requested resource is not present in your application then instead of giving HTTP 404 error message you can display that page (i.e. index.html or index.jsp). For this you have to configure welcome pages in web.xml like..
David, you are right, welcome file is not for providing UI incase of HTTP 404 error. It is used when you have opened application without any extension means you have provided URL address like 127.0.0.1:8080/<Context Path>.
In this case welcome file will come in picture. Its not related to 404 error any where if requested resource is not present .