Hello:

 

I am trying to develop a small application that contains a Login.jsp, in case 
of failure the controller must redirect to Login.jsp again;   in case of 
success the controller must redirect to a Java application ,MainMenu.class.

 

I think this is done in struts-config.xml file:

 

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"

"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

<!-- This is the Struts configuration file for the Login example application -->

<struts-config>

<!-- ========== Data Source Definitions ================================ -->

<!-- ========== Form Bean Definitions ================================== --> 

<form-beans>

<form-bean name="loginForm" 

type="jhtp5.jsp.LoginForm"/>

</form-beans> 



<!-- ========== Action Mapping Definitions ============================= --> 

<action-mappings> 

<action path="/login"

type="jhtp5.jsp.LoginAction"

name="loginForm"

scope="request"

input="/login.jsp"

validate="true">

<forward name="failure" path="/login.jsp"/>

<forward name="success" path="/MainMenu.class"/>

</action>

</action-mappings>

<!-- ========== Message Resources Definitions ========================== -->

<message-resources null="false"

parameter="ApplicationResources"/>

</struts-config>

 

Is this OK??????

What is the right way to do it????

Any help is welcome.

 

Vangelis
                                          
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009

Reply via email to