You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by scspieker <sc...@voidgamers.com> on 2008/11/18 19:16:46 UTC

Unrelated Action method being called repeatedly - How to debug?

I am developing an application that utilizes Struts 2.0.9 and Spring that
will perform as a CMS type system.  It is a rewrite of a PHP application
from several years ago.  Within the PHP app, there was a logical tie
between 'model' objects.  A category was a logical demarcation of types of
information.  Within each category there are one to many different
behavior types - Mailroom, Articles, Documents (Downloads), Image Gallery,
etc.  allowing for somewhat easy growth as needs require.

Naturally, the new Struts application uses some of these same concepts of
logically linking the category with behaviors and records of a type with
the associated behavior.

There are two generic views allowing users to quickly review information -
a Category view (not surprisingly, a Category action in the '/category'
namespace, with multiple methods such as list, view, save, edit, etc.) and
a Behavior view with the same pattern of methods in the /behavior
namespace.  The category view displays summaries of all of the behaviors
associated with that category.  The behavior view lists only the records
of that behavior's type in their own namespaces (i.e. /article, /document,
/image, etc.).

The final view is specific to the type of record - view an article, image,
download a document, etc.  These records are found using request
parameters supplied by the category or behavior view.

So far all of these function as expected but being studious in my
debugging efforts, I enabled debug logging on my actions and I see that
when an action is called to view a particular record type (say
/article.action?record=10) debug messages are displaying indicating that
the category.view method is being called as if iterating over each of the
behaviors that it 'contains'.

I have commented out the inclusion of the category action and namespace
and I attempt to access the behavior view URL (thus bypassing the category
view all together) and I am given a stack trace indicating that there is
no view method for namespace /category defined.  This message is
unexpected since there should be no association to the category action
whatsoever.

I am at a loss as to how to identify where this action is being called
from as it is not contained within any of the action definitions nor as a
result of some global result definition.

Can someone suggest a class that I can debug within eclipse to help me
identify where this action is being called from (such as an interceptor,
filter)?  I have checked all of my view JSP files and found no references
to s:action tag calls, so I am thinking there is something in the java
code that is a misconfiguration in my action definitions in some way.

Thanks in advance,
Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org