?
Solved

Question on Struts struts.config

Posted on 2004-04-29
2
Medium Priority
?
335 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
xjiang007 earned 120 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

777 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