*
The moose likes Struts and the fly likes struts action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts action class" Watch "struts action class" New topic
Author

struts action class

Matt Sloan
Greenhorn

Joined: Aug 27, 2004
Posts: 26
I changed something by accident and i can't figure out what I did. My jsp calls the struts form, but the action class never gets called...

here is a clip from my struts-config as it stands now...



This was working last night and I have spent all day trying to figure out what I changed this morning. Anyone have any suggestions? I know this is kinda broad, but any pointers are greatly appreciated!
[ September 02, 2004: Message edited by: Matt Sloan ]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

What happens in the browser when the page is submitted?


A good workman is known by his tools.
Matt Sloan
Greenhorn

Joined: Aug 27, 2004
Posts: 26
It would probably help if I give a description of the problem huh?

I have a jsp/form that accepts user input(a date selection, and a couple of checkboxes). When the user is done, they click on the save button and their choices get stored in the database. However, when I click save, the browser calls the .do and then says 'done'. The records don't get saved. Any break points in the Action class are never tripped (and yes I am sure I am running in de-bugging mode). I do know that my Form class is called.

Like I said, this was working just fine last night when I went home. Then I had to go and change something this morning...
Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134
Hi,

Try to put the System.out.println statements at the first line in execute method and go on testing until u find a point where the code is not executed. This should really help you. This happens to me also, but this is best way i solve the problems.

Regards,
Shankar
[ September 02, 2004: Message edited by: Shankar Narayana ]

"Failure is not when you fall down; its only when you fail to get up again."
Matt Sloan
Greenhorn

Joined: Aug 27, 2004
Posts: 26
Yeah, I did that and in addition to adding the System.out.println as the first line of the execute statement, I put a break point. Nothing gets printed out, and the breakpoint never gets tripped. This is why I am thinking that my action class never gets called.
Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134
Can you post your jsp page, and cud you please edit your first post to fit into the screen width.


Thanks,
Shankar
Matt Sloan
Greenhorn

Joined: Aug 27, 2004
Posts: 26
Shankar here is my jsp:


also, here is hte formbean element from my struts config:


Thanks for your help!

Matt
Matt Sloan
Greenhorn

Joined: Aug 27, 2004
Posts: 26
Alright PAINFULL lesson learned.

In my action class, I imported the company specific ActionForm class, not the struts ActionForm class. Even though the company ActionForm class extends the struts ActionForm class, it didn't work.

Thanks for your help!!!
 
Don't get me started about those stupid light bulbs.
 
subject: struts action class
 
Similar Threads
tomcat problem.
How is the HTML form action created from servlet-mapping url-pattern?
Struts2 Annotations
Problem running a simple webapplication in struts
Update user profile