dekacode
Posts: 53
|
Posted: 05/05/2004, 8:30 PM |
|
Project: C:\Program Files\CodeChargeStudio\Examples\Internet\Copy of Forum\Forum.ccs
Code: Servlets 2.2 JDK 1.3 with Templates
Home page: Default.cpp
Tomcat displays a directory listing instead of the project default home page
Should default.jsp or default.java be in the project folder?
|
|
|
ignat
Posts: 55
|
Posted: 05/05/2004, 11:57 PM |
|
Default.jsp should exist. Check web.xml for welcome-file-list element. Also you can configure your application server not to show directory listings.
|
|
|
Dave
|
Posted: 05/06/2004, 5:45 PM |
|
Code language: Servlets 2.2
How to configure Tomcat to recognize index.jsp as the default home page
Clicking on index.jsp, in the Tomcat folder listing, displays the home page
correctly.
CCS-project/Web.xml
<welcome-file-list>
<welcome-file>index.do</welcome-file>
</welcome-file-list>
Index.jsp
<%
response.sendRedirect("index.do");
%>
No luck modifying the CCS-project/Web.xml as the contents of the
Tomcat/webapps/CCS-project directory disappears!
"ignat" <ignat@forum.codecharge> wrote in message
news:94099e1cc475f2@news.codecharge.com...
> Default.jsp should exist. Check web.xml for welcome-file-list element.
Also you
> can configure your application server not to show directory listings.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
ignat
Posts: 55
|
Posted: 05/07/2004, 12:19 AM |
|
If you have Index.jsp redirecting to index.do, then in welcome-file-list specify Index.jsp as default page.
What do you mean project directory disappears. How do you publish your application (war autodeployment, context in server.xml, Tomcat manager)?
|
|
|
dekacode
Posts: 53
|
Posted: 05/07/2004, 9:25 AM |
|
The deployment works OK now.
What is *.do and index.do and why is it necessary to change index.do to index.jsp in web.xml <welcome-file-list> ?
<servlet-mapping>
<servlet-name>controller</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.do</welcome-file>
</welcome-file-list>
|
|
|