• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

There is no Action mapped for action name HelloWorld. - [unknown location]

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i am using tomcat 6.0 and struts-2.0.14

when i am deploying the helloworld application,i am getting error



Struts Problem Report

Struts has detected an unhandled exception:
# Messages: There is no Action mapped for action name HelloWorld.
Stacktraces
There is no Action mapped for action name HelloWorld. - [unknown location]

com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
java.lang.Thread.run(Unknown Source)


You are seeing this page because development mode is enabled. Development mode, or devMode, enables extra debugging behaviors and reports to assist developers. To disable this mode, set:

struts.devMode=false

in your WEB-INF/classes/struts.properties file.

please reply immediately...
 
Sheriff
Posts: 9691
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi welcome to javaranch.

please reply immediately


Please Ease Up. The error message is simple, there's no action mapped with the name HelloWorld in your application. Please check the struts.xml file to see if there's any capitalization mistake. Post the struts.xml here if you can't figure out the problem even after that...
 
Pandian Ranganathan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ankit...


My web content directory is

struts2new
->WEB-INF
------lib
------libext
------src
|--------java(sub folder in inside the src)
|----net
|--roseindia
|-Struts2HelloWorld.java
|--------classes
|--------build.xml
|--------struts.xml
------classes
------web.xml
->pages
|---HelloWorld.jsp

My struts.xml file is below...

<?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.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />

<package name="roseindia" namespace="/roseindia" extends="struts-default">

<action name="HelloWorld" class="net.roseindia.Struts2HelloWorld">
<result>/pages/HelloWorld.jsp</result>
</action>

<!-- Add actions here -->
</package>


<!-- Add packages here -->

</struts>

Reply as soon as possible...
 
Ankit Garg
Sheriff
Posts: 9691
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are using a namespace for your package, what is the URL that you used in your browser to access the hello world action?? You'll need to add /roseindia in the URL before the action name...
 
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try adding /roseindia in the URL before the action name
 
Pandian Ranganathan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ankit and siva masilamani...

Thanks for your immediate reply

i want to know the best website for learning struts2 in easy way and simple examples...

please tell the website name...

i am very interesting to learn struts2...

i never studied struts1..Is it necessary to learn struts1 before starting struts2

when i using this url i will get the output

http://localhost:8080/struts2new/roseindia/HelloWorld.action

The output is:

[b]Struts 2 Hello World Tutorial!

Current date and time is: Sat Oct 24 18:58:45 IST 2009


i want to display the output when i am using this url

http://localhost:8080/struts2new/

what can i do for that...

Thanks in advance...
 
Ankit Garg
Sheriff
Posts: 9691
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is it necessary to learn struts1 before starting struts2


No, its not necessary. Instead of online tutorial, I would recommend you read a book on struts 2 (list of books and tutorials can be found here).

i want to display the output when i am using this url
http://localhost:8080/struts2new/


First of all you'll have to remove the namespace from the package declaration in the struts.xml file. Read this page to know about action mappings...
 
Pandian Ranganathan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ankit...

Thank you for your immediate reply.....
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic