Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

execute() method is not being called

 
Jaime Stuardo
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello... I am new to Struts2 and I have a problem.

I have a simple page, with an Index.jsp file at the root directory. An Index.java code in "src" folder, inside "agenda" package.

struts.xml file contains this snippet:

The Index.java code contains:

When I run the application, the index page was shown (the jsp file) but "esta es una prueba" message did not appear. Then I added the throw sentence and the page did not show the exception. With those tests I can be sure that execute method is not getting called.

Action is recognized since I see it in configuration browser.

What is it wrong with it?

Thanks a lot in advance
Jaime
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch. Please UseCodeTags. They preserve your code formatting and make it easier to read.
The URL for a Struts action is different from a JSP. If you request a JSP from the web server, you get the JSP. You want to request what you have mapped in struts.xml, probably home.do.
 
Jaime Stuardo
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot..

it worked

Regards,
Jaime

Joe Ess wrote:Welcome to the JavaRanch. Please UseCodeTags. They preserve your code formatting and make it easier to read.
The URL for a Struts action is different from a JSP. If you request a JSP from the web server, you get the JSP. You want to request what you have mapped in struts.xml, probably home.do.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic