Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Struts2 config error

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am new to Struts2 and I am developing my first application. I am getting this error which has almost made me Quit. Please help me how can I get rid of this and run my application.

IDE: Eclipse Galileo(3.5.1)
Server: Tomcat 6.0

Folder Structure:


Jars inside SecondAttempt/WebContent/Web-INF/lib/











When I run this code I get this error:
Jan 28, 2010 12:16:27 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /
Jan 28, 2010 12:16:27 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/29 config=null
Jan 28, 2010 12:16:27 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1070 ms
Jan 28, 2010 12:16:32 AM org.apache.struts2.components.ActionComponent executeAction
SEVERE: Could not execute action: //jsp/HelloWorld
There is no Action mapped for namespace //jsp and action name HelloWorld. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(
at org.apache.struts2.components.ActionComponent.executeAction(
at org.apache.struts2.components.ActionComponent.end(
at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(
at org.apache.jsp.jsp.index_jsp._jspx_meth_s_005faction_005f0(
at org.apache.jsp.jsp.index_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at Source)

Please tell me if the problem is with the folder structure or the links or something else.
Posts: 9671
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shashank, welcome to javaranch.

Shashank please Use Code Tags when you post a source code. That way your code looks formatted. Unformatted code is hard to read. You can add code tags by wrapping your code in [code] [/code] tags. You can edit your message using button and then add code tags to it.

As the error indicates, struts is looking for an action named HelloWorld in /jsp namespace because your index.jsp is in the /jsp folder. If an action is not found in a namespace, struts looks for that action in the default namespace. I don't know why struts is not looking for HelloWorld action in default namespace, David can throw light on it (maybe I missed something). Also check if you have all the dependencies in your application's libraries (struts 2.0.14)...
Shashank Bekal
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have updated the post with code tags. I hope this helps.
    Bookmark Topic Watch Topic
  • New Topic