File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes New to Struts 2 framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "New to Struts 2 framework" Watch "New to Struts 2 framework" New topic
Author

New to Struts 2 framework

Akhilesh Murthy
Greenhorn

Joined: Oct 07, 2009
Posts: 24

Hi,

This is my first application on struts 2. I have followed all the methods for the setup of Struts 2, but i have encountered the following error.



I have placed my class folder under Web-INF folder and my struts.xml is located under the classes folder.

My struts.xml looks like this:

can anyone let me know where am i going wrong.

Thanks




Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Root tag <strtus> </struts> is missing.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Akhilesh Murthy
Greenhorn

Joined: Oct 07, 2009
Posts: 24

Thanks, i had missed that.

But even after adding the tag i am facing another issue now i am getting error "There is no Action mapped for namespace / and action name product_action"

my struts.xml is



Please let me know if i am missing something.

Thanks
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

post url how you are calling the action and the location where you keep the jsp file
Akhilesh Murthy
Greenhorn

Joined: Oct 07, 2009
Posts: 24

I have placed my Jsp code under WEB-CONTENT folder.

This is my jsp code which is calling action



my struts.xml looks like this



my target jsp is this:


Thanks in advance for your help!!
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Post how you are calling your action.
Akhilesh Murthy
Greenhorn

Joined: Oct 07, 2009
Posts: 24

Ok..are you asking for the my action class which needs to be invoked.
Yuta Lolap
Ranch Hand

Joined: Jun 03, 2012
Posts: 80

how do i get the doctype tag? It doesnt come on its own in the struts.xml file. please help.
 
 
subject: New to Struts 2 framework