Solved

Question on Struts struts.config

Posted on 2004-04-29
2
314 Views
Last Modified: 2010-03-31
Is it possible to write the struts.config such that the first thing which happens is it is forwaded to a Welcom.jsp/home.jsp
So instead of explicitly having URL/welcome.jsp - the struts recoginised the URL and it bring up the welcome page

thanks
0
Comment
Question by:aswam1975
2 Comments
 
LVL 1

Accepted Solution

by:
xjiang007 earned 30 total points
ID: 10953771
You can first add     <welcome-file-list> <welcome-file>index.jsp</welcome-file></welcome-file-list> in web.xml to forward the default first page to index.jsp page. Then in your struts-config.xml file add the global forward tag :  
   <global-forwards>
        <forward     name="welcome"      path="/WEB-INF/pages/welcome.jsp"/>
    </global-forwards>

In your index.jsp page : <logic:redirect forward="welcome"/>.

But,  you can directly use <welcome-file-list> <welcome-file>welcome.jsp</welcome-file></welcome-file-list> in web.xml to forward the default welcome page to welcome.jsp page.

0
 

Author Comment

by:aswam1975
ID: 10960802
Thank You!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 195
Apps blocked by Java 9 80
difference of if loops 23 49
eclipse buid path vs tomcat lib path 10 23
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question