aspose file tools*
The moose likes Struts and the fly likes execute() method is not being called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "execute() method is not being called" Watch "execute() method is not being called" New topic
Author

execute() method is not being called

Jaime Stuardo
Greenhorn

Joined: Apr 05, 2013
Posts: 6
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

Joined: Oct 29, 2001
Posts: 8927
    
    9

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.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jaime Stuardo
Greenhorn

Joined: Apr 05, 2013
Posts: 6
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
 
subject: execute() method is not being called