Solved

Question on Struts struts.config

Posted on 2004-04-29
2
332 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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

707 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