my dog learned polymorphism*
The moose likes Struts and the fly likes Action not getting 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 "Action not getting called" Watch "Action not getting called" New topic
Author

Action not getting called

Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
Hi, I'm new to struts and have had lots of questions since I started. I have a page where I want to iterate a list from the database. When the form shows up it always says there is no information to display and when I debug the action class never gets hit.

This is my struts-config:



This is my jsp:


My action's name is ProjectListAction.java and my form's name is ProjectListForm.java
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm wondering if the problem might be that you don't understand how to invoke a page from a Struts application. If the logic to populate the list of projects is in the ProjectListAction class, you should invoke this page with the following URL:

http://myserver.com/myApp/projectList.do

One other tip: The "attribute" in an action mapping is only used if it is different than the "name". Since yours are the same, I'd suggest you just eliminate the "attribute" from your action mapping.


Merrill
Consultant, Sima Solutions
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
Thank you very much, I am hitting the action now and am happily on my way to discoverying the reason behind my new error:-).
 
jQuery in Action, 2nd edition
 
subject: Action not getting called