• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

execute() method is not being called

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
reply
    Bookmark Topic Watch Topic
  • New Topic