Hi,
I supposed that my browser isn't submitting requests twice, because this
feature just only happens when I work with tiles. If my mappings use
forwards to jsp pages, everything works OK.
I've been investigating a bit more and I've found the exact point when
everything happens: trying to forward to mapping forward (In
RequestProcessor.java line 1057 - rd.forward(request, response);)
This is a snapshot of the two stack traces.
The first execution is finishing and trying to forwarding:
Thread [http-80-Processor24] (Suspended)
TilesRequestProcessor(RequestProcessor).doForward(String,
HttpServletRequest, HttpServletResponse) line: 1057
TilesRequestProcessor.doForward(String, HttpServletRequest,
HttpServletResponse) line: 261
TilesRequestProcessor.processTilesDefinition(String, boolean,
HttpServletRequest, HttpServletResponse) line: 237
TilesRequestProcessor.processForwardConfig(HttpServletRequest,
HttpServletResponse, ForwardConfig) line: 300
TilesRequestProcessor(RequestProcessor).process(HttpServletRequest,
HttpServletResponse) line: 231
ActionServlet.process(HttpServletRequest, HttpServletResponse) line:
1164
ActionServlet.doPost(HttpServletRequest, HttpServletResponse) line:
415
ActionServlet(HttpServlet).service(HttpServletRequest,
HttpServletResponse) line: 709
ActionServlet(HttpServlet).service(ServletRequest, ServletResponse)
line: 802
ApplicationFilterChain.internalDoFilter(ServletRequest,
ServletResponse) line: 252
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse)
line: 173
StandardWrapperValve.invoke(Request, Response) line: 213
StandardContextValve.invoke(Request, Response) line: 178
StandardHostValve.invoke(Request, Response) line: 126
ErrorReportValve.invoke(Request, Response) line: 105
StandardEngineValve.invoke(Request, Response) line: 107
CoyoteAdapter.service(Request, Response) line: 148
Http11Processor.process(InputStream, OutputStream) line: 856
Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
Object[]) line: 744
PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line:
527
LeaderFollowerWorkerThread.runIt(Object[]) line: 80
ThreadPool$ControlRunnable.run() line: 684
ThreadWithAttributes(Thread).run() line: 595
And then a new Thread is created and my action is executed another time.
Thread [http-80-Processor22] (Suspended (breakpoint at line 122 in
PartesMedicosAction))
PartesMedicosAction.execute(ActionMapping, ActionForm,
HttpServletRequest, HttpServletResponse) line: 122
TilesRequestProcessor(RequestProcessor).processActionPerform(HttpServletRequ
est, HttpServletResponse, Action, ActionForm, ActionMapping) line: 421
TilesRequestProcessor(RequestProcessor).process(HttpServletRequest,
HttpServletResponse) line: 226
ActionServlet.process(HttpServletRequest, HttpServletResponse) line:
1164
ActionServlet.doGet(HttpServletRequest, HttpServletResponse) line:
397
ActionServlet(HttpServlet).service(HttpServletRequest,
HttpServletResponse) line: 689
ActionServlet(HttpServlet).service(ServletRequest, ServletResponse)
line: 802
ApplicationFilterChain.internalDoFilter(ServletRequest,
ServletResponse) line: 252
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse)
line: 173
StandardWrapperValve.invoke(Request, Response) line: 213
StandardContextValve.invoke(Request, Response) line: 178
StandardHostValve.invoke(Request, Response) line: 126
ErrorReportValve.invoke(Request, Response) line: 105
StandardEngineValve.invoke(Request, Response) line: 107
CoyoteAdapter.service(Request, Response) line: 148
Http11Processor.process(InputStream, OutputStream) line: 856
Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
Object[]) line: 744
PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line:
527
LeaderFollowerWorkerThread.runIt(Object[]) line: 80
ThreadPool$ControlRunnable.run() line: 684
ThreadWithAttributes(Thread).run() line: 595
Cheers. Ronnie
-----Mensaje original-----
De: Ed Griebel [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 21 de julio de 2005 16:45
Para: Struts Users Mailing List
Asunto: Re: TilesRequestProcessor is executed twice
Ronnie-
I was looking at the stack dumps you provided and there are some
filters in there, possibly someone else has set them up. Regardless,
it doesn't look like that is causing your problem.
ApplicationFilterChain.internalDoFilter(ServletRequest,
ServletResponse) line: 252
ApplicationFilterChain.doFilter(ServletRequest,
ServletResponse) line: 173
Also, in the two stack traces, there is a doPost the first time, and a
doPost the second time. I've looked in the Struts source for
ActionServlet and there's no code in there that will submit a request
from doGet() to doPost() or vice-versa.
I know it's been asked before, but is it possible that your browser is
submitting the request twice, once as a get and once as a post? You
can verify this by setting a breakpoint at something earlier in the
call stack, say at ActionServlet.service line:802, and then seeing if
that breakpoint gets hit every time the breakpoint in
PartesMedicosAction is hit. If both breakpoints are hit, then it's not
something in Struts, so set your breakpoint back to something in
Tomcat, like one of the Valve classes.
-ed
On 7/21/05, Ronnie Arosa <[EMAIL PROTECTED]> wrote:
> Hi Wendy,
>
> I'm not using Filters.
>
> Ronnie.
>
> -----Mensaje original-----
> De: Wendy Smoak [mailto:[EMAIL PROTECTED]
> Enviado el: miƩrcoles, 20 de julio de 2005 20:02
> Para: Struts Users Mailing List
> Asunto: Re: TilesRequestProcessor is executed twice
>
> From: "Ronnie Arosa" <[EMAIL PROTECTED]>
> > Well, I'm debugging my source code with Sysdeo's eclipse plugin.
> > I toggled a breakpoint in one of my action, and founded that it'd
> > been executed twice.
> >
> > Of course results of my actions are obtained twice (i.e. an insert in a
> > database is done twice).
>
> If you have any Filters, check that you're only calling
chain.doFilter(...)
> _once_.
>
> --
> Wendy Smoak
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]