• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

There is no Action mapped for namespace / and action name . - [unknown location]

 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am a newbie in Struts 2...
i am trying to execute a Login.jsp and i am using eclipse as the development environment....i have stored the struts.xml in ApplicationResources.properties file......

but when i run the program i get....

There is no Action mapped for namespace / and action name . - [unknown location]
...
i went through previous links in javaranch which had same posts but even though i made changes like puttings struts.xml under WeB-InF dirrectory and all...my problem is not getting solved...thanks...
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

maggie joseph wrote:Hi,
I am a newbie in Struts 2...
i am trying to execute a Login.jsp and i am using eclipse as the development environment....i have stored the struts.xml in ApplicationResources.properties file......

but when i run the program i get....

There is no Action mapped for namespace / and action name . - [unknown location]
...
i went through previous links in javaranch which had same posts but even though i made changes like puttings struts.xml under WeB-InF dirrectory and all...my problem is not getting solved...thanks...



Try creating an action in struts which would have a result entry like :

<action name="start">
<result>/login.jsp</result>
</action>

Then try to direct your website to this location : http://localhost:8080/start

That should work if you are in Tomcat (change the port accordingly)

To make it the default page, make an entry of the /start in the <welcome-file-list> in web.xml

hope that helps!!!

 
Sheriff
Posts: 9697
43
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

i have stored the struts.xml in ApplicationResources.properties file......


You've placed your xml file in a properties file?? The struts.xml is supposed to go into the WEB-INF/classes directory. So you should put it in the root of your source folder in your eclipse project (the place where any classes with no package goes). After that you need to show us some code, what does your struts.xml look like, your Action class' code, what URL are you entering in the browser??
 
maggie karve
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am just tying to execute an example from the tutorial available in this link..my code is the same as

http://java.dzone.com/articles/struts2-tutorial-part-27

i have placed my files in eclipse as mentioned in the tutorial.....
still i have getting error.....i have placed the same struts.xml file under WEB-INF/classes folder..........
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Turn devMode on, set the log level to DEBUG, and check the startup logs; we'll go from there. Also post the config and deployed directory tree.
 
maggie karve
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...this is what i get when i put devmode on..



I am using Struts 2.1.8.1.....

and my directory for strut.xml is
C:\Software\Tomcat 6.0\webapps\testapp\WEB-INF\classes\struts.xml and rest all the files i have made are in the same path as mentioned in the tutorial....i have put the jsp files Login.jsp and Welcome.jsp in C:\Software\Tomcat 6.0\webapps\testapp directory.....i even made the same jsp and deployed it in eclipse under

C:\Software\workspace\StrutsHelloWorld\WebContent folder......

is there anything else that i am missing???
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Turn devMode on, set the log level to DEBUG, and check the startup logs; we'll go from there. Also post the config and deployed directory tree.

 
maggie karve
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting error while starting Tomcat...

i set the devmode on by including struts.properties file



and struts.xml file

when i started Tomcat i am getting the foll...
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll need to satisfy the missing dependencies before proceeding.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maggie,

Although the IDE puts a copy of struts.xml in your WEB-INF/classes folder when it builds your project. You will need to have a copy in your /src folder. Mine is in the root of my Java Resources/src folder.

Also, my IDE blows up when in "dev mode" - I don't recommend it.

Good luck,
Marcella
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The issue is with the missing dependencies, as the stack trace states.

If your IDE "blows up" with devMode on then something is wrong with your IDE setup; I run in devMode during development under several IDEs without issue.
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic