This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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:-).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Action not getting called