Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ServletFilter and underlying JiraWebAction

Titus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2015

When I use a servlet filter for filtering input requests and responses how can I get the underlying webaction of type JiraWebActionSupport?

I need to check the webaction for set error messages or error fields. Depending on them the filter will do something else e.g. a redirect as the filter would do without any set error message.

The filter is declared in atlassian-plugin.xml:

 

 <servlet-filter name="secSignIDCreateUserFilter"

                key="com.secsign.jira.servlet.filter.SecSignIDCreateUserFilter"

                class="com.secsign.jira.servlet.filter.SecSignIDCreateUserFilter"

                location="before-decoration"

                weight="200">

        <url-pattern>*AddUser*.jspa</url-pattern>

        <dispatcher>REQUEST</dispatcher>

</servlet-filter>

 

AddUser is the webaction from jira-core.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2015

You can't simply get the corresponding action from a filter, and I would even say that that would be "bad architecture".

Why don't you use the action to return a "redirect" result? It is dead simple and "theoretically correct":

<action name="start-qualityanalysis" class="...StartContentQualityAnalysisAction">
  <result name="success" type="redirect">/admin/plugins/archiving/statistics.action</result>
</action>

 

Titus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2015

Thanks for the answer. You are right, it would be a bad architecture. For a normal action the redirect would work fine but I need to override one of JIRAs built in action. And I dont know yet if I could ship any edited jsp of JIRA with a plugin.

TAGS
AUG Leaders

Atlassian Community Events