'Double Execution' of Struts Actions

R

RonS

I'm new to Struts and although my application is working, I'm having trouble
figuring out some strange behavior. I've been converting straight JSP/Servlets
to JSP/ActionForm/Actions. It seems that whenever I convert a Servlet to an
Action the JSP and it's associated Action are executed twice on every submission.

The app works fine, but my logs show that the first execution is the 'real'
one (the reported values are what show up on the user web page). But there is
also a log of another pass through the code. I can't figure out where this one
is coming from or going to.

Anyone else seen anything like this?
Thanks - Ron
 
W

Wendy Smoak

RonS said:
I'm new to Struts and although my application is working, I'm having trouble
figuring out some strange behavior. I've been converting straight JSP/Servlets
to JSP/ActionForm/Actions. It seems that whenever I convert a Servlet to an
Action the JSP and it's associated Action are executed twice on every submission.

The app works fine, but my logs show that the first execution is the 'real'
one (the reported values are what show up on the user web page). But there is
also a log of another pass through the code. I can't figure out where this one
is coming from or going to.

Anyone else seen anything like this?

Do you have any JavaScript, possibly onClick() handlers doing a submit();
without a return;? (Both the JavaScript submit and the actual button click
will "work" and you'll get two submits.)

I just tracked one of these down in my own app, and it was a Filter that
called chain.doFilter(...) twice.
 
R

RonS

Wendy said:
Do you have any JavaScript, possibly onClick() handlers doing a submit();
without a return;? (Both the JavaScript submit and the actual button click
will "work" and you'll get two submits.)

I just tracked one of these down in my own app, and it was a Filter that
called chain.doFilter(...) twice.
Thanks Wendy
No JavaScript in the app. I'll check for the double chain.doFilter and let you
know.
 
R

RonS

Wendy said:
Do you have any JavaScript, possibly onClick() handlers doing a submit();
without a return;? (Both the JavaScript submit and the actual button click
will "work" and you'll get two submits.)

I just tracked one of these down in my own app, and it was a Filter that
called chain.doFilter(...) twice.

No JavaScript and only one chain.doFilter(...) per Filter. Any other
suggestions? ... anyone?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top