Question

Ceci est mon struts config file: La racine de mon projet est StrutsProject .

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
 <constant name="struts.devMode" value="false" />
 <package name="first" namespace="/helloworld" extends="struts-default">
  <action name="HelloWorld" class="com.abc.actions.HelloWorldAction">
   <result name="SUCCESS">/pages/login.jsp</result>
  </action>
 </package>
</struts>

Je suis en train d'accéder à l'URL suivante: http://localhost:8080/StrutsProject/helloworld/HelloWorld.action

Je reçois l'erreur suivante:

There is no Action mapped for action name helloworld. - [unknown location]
 at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
 at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497)
 at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

S'il vous plaît aider, Siddharth

Était-ce utile?

La solution

est l'emplacement de votre fichier JSP est correct ??

/pages/login.jsp

Ou il doit être

/WEB-INF/pages/login.jsp
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top