• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Action not getting called

 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chris Boldon
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much, I am hitting the action now and am happily on my way to discoverying the reason behind my new error:-).
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic