Help coderanch get a
new server
by contributing to the fundraiser
  • 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 and Eclipse: No configuration found for the specified action in namespace: ''

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone. I'm running the struts2 simple HelloWorld app from http://www.vaannila.com/struts-2/struts-2-example/struts-2-hello-world-example-1.html, and getting this error: "No configuration found for the specified action: 'HelloWorld' in namespace: ''. Form action defaulting to 'action' attribute's literal value." Then, when I run the first jsp, it doesn't even call the HelloWorld.java.

I think the reason is that the app -- in Eclipse -- doesn't even find my struts.xml, because if I change the namespace property to something like this:



it still gives the same error, with namespace:''

My struts.xml is in the java src folder and it definitely in the project's classpath. Why isn't it getting found?

Thanks!
 
Ranch Hand
Posts: 110
Firefox Browser MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Johns,

Please post the contents of Jsp that you are accessing.

<package name="default" extends="struts-default" namespace="asdfasdfadsfasdf">


Default namespace is "/". You have to append "/" to the new namespace string

Are you able to access the page when you don't specify any namespace?

How are you accessing the action class. If you are using namespace then action url should be accessed using namespace
for example http://<IPADDRESS>:<PORT>/<ApplicationContextRoot>/<Namespace>/<Action>;

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also facing the same error with the same example.Can some body help me on this?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Vannila example posted has various dtd and other tags on the top of various jsp file index.jsp , success.jsp, struts.xml etc or try to compare your app code with the Example1 posted in the same site. it should work then.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this problem is easy.you can do this:
new a folder named "namespace" in WebRoot ,then drag success.jsp in it.
the action result url will be change into <ApplicationContextRoot>/<Namespace>/<result location>;
for example :
your url will be change into <ApplicationContextRoot>/asdfasdfadsfasdf/success.jsp
obviously,it's wrong url.because you don't have a jsp in the folder named asdfasdfadsfasd
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic