struts-config : pb navigation
Bonjour,
J'ai une index.jsp :
Code:
1 2 3 4 5 6 7
| <html:html>
<html:form action="/goToConsultation">
<html:submit value="Consultation" ></html:submit>
</html:form>
<br>
</html:html> |
un struts-config.xml:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| <form-bean
name="goToConsultationForm"
type="com.formbean.GoToConsultationForm"/>
</form-beans>
<action-mappings>
<action
path="/goToConsultation"
name="goToConsultationForm"
type="com.action.GoToConsultation"
scope="request">
<forward name="success" path="/private/consultation.jsp" redirect="true"/>
</action>
</action-mappings> |
Mais quand je click sur le bouton Consultation j'ai le message d 'erreur suivant :
Citation:
type Rapport d'état
message /medic/goToConsultation
description La ressource demandée (/medic/goToConsultation) n'est pas disponible.
Pour info je sécurise mon appli en mettant les pages sous le repertoire private. La sécurité est paramétrée dans web.xml :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <!-- Gestion de la sécurité -->
<security-constraint>
<display-name>Authentification avant utilisation</display-name>
<web-resource-collection>
<web-resource-name>partie protégée de l'application</web-resource-name>
<url-pattern>/private/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>admin</role-name>
</security-role>
<!-- Gestion du login -->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>medic</realm-name>
<!-- Form login = la page de bienvenue et de login, si ca passe alors on est redirigé -->
<!-- vers private/index.jsp sinon vers admin/errorLogin-->
<form-login-config>
<form-login-page>/admin/login.jsp</form-login-page>
<form-error-page>/admin/errorlogin.jsp</form-error-page>
</form-login-config>
</login-config>
<welcome-file-list>
<welcome-file>private/index.jsp</welcome-file>
</welcome-file-list> |
J'arrive bien a la page private/index.jsp, mais en cliquant sur le bouton Consultation, j'ai le message d'erreur.
Pouvez vous m'aider?
Merci!