Solved

Question on Struts struts.config

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Website checklist for browser compatibility? 2 57
Java array 10 86
maximize the sum of fractions 33 75
Eclipse neon2 "Java build path" correctness 7 43
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.

734 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