0

This is my struts config file: The root of my project is 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>

I am trying to access the following URL: http://localhost:8080/StrutsProject/helloworld/HelloWorld.action

I am getting the following error:

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)

Please help, Siddharth

Roman C
  • 49,761
  • 33
  • 66
  • 176
Sid
  • 4,893
  • 14
  • 55
  • 110
  • Do you get any errors on start up? Where is your struts.xml file? – Jeremy Stein Feb 03 '10 at 14:56
  • I have the struts.xml in my src folder, which is copied to WEB-INF/classes folder when I built it. I don't get any error on start up. – Sid Feb 04 '10 at 05:04

1 Answers1

1

Is your JSP file location is correct??

/pages/login.jsp

Or It should be

/WEB-INF/pages/login.jsp
Vinayak Bevinakatti
  • 40,205
  • 25
  • 108
  • 139