Hi,I have extracted struts-blank.war and working on struts.I have created a login.jsp page and placed inside pages folder . Here it is,
I want my login page to be executed by default as welcome page when I use the URL http://localhost:8080/Tracker ,where Tracker is my project name.
My web.xml file is as below.
And my struts configuration file (struts-config.xml) is below.
and index.jsp is,
I haven't mentioned <welcome-file-list> anywhere . I dont understand how index.jsp is called by default when I use the above URL. In the <global forwards> ,I changed the path to "/pages/login.do" ,but still index.jsp is called . First of all, index.jsp is not written anywhere (web.xml & Struts configuration file) .This question might be silly, but I just wanted to know what is happening internally. What exactly service() method of ActionServlet is doing.
According to the Servlet Specification, the behavior is server-dependent if you do not declare a welcome file. For example, the Glassfish docs say:
If no welcome file is specified, the GlassFish Server will use a file named index.html as the default welcome file. If there is no welcome file and no file named index.html, the GlassFish Server returns a directory listing.