Solved

Question on Struts struts.config

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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 learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now