This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New to Struts 2 framework

 
Akhilesh Murthy
Greenhorn
Posts: 25
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Root tag <strtus> </struts> is missing.
 
Akhilesh Murthy
Greenhorn
Posts: 25
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post url how you are calling the action and the location where you keep the jsp file
 
Akhilesh Murthy
Greenhorn
Posts: 25
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post how you are calling your action.
 
Akhilesh Murthy
Greenhorn
Posts: 25
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok..are you asking for the my action class which needs to be invoked.
 
Yuta Lolap
Ranch Hand
Posts: 86
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i get the doctype tag? It doesnt come on its own in the struts.xml file. please help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic