CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Tomcat displays a directory listing instead of the project default home page

Print topic Send  topic

Author Message
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?
View profile  Send private message
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.
View profile  Send private message
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)?
View profile  Send private message
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>


View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.