Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7646647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:15:44+00:00 2026-05-31T10:15:44+00:00

I have a workflow where I need to render an exception page. But this

  • 0

I have a workflow where I need to render an exception page. But this exception page is generic and can be called form various situations. I need to display some custom text in each of these exception pages. So I figured I can set some “param” in the result tag & it will be automatically available in the eventual jsp page. But I am unable to retrieve (or set) it. Here is my relevant code –

struts.xml –

 <global-results>
        <result name="TV_ACCESS_NOT_ALLLOWED">
            <param name="location">/jsp/base/exception/accessNotAllowedException.jsp</param>
            <param name="appDisplayName">Television</param>
        </result>
        <result name="RADIO_ACCESS_NOT_ALLLOWED">
            <param name="location">/jsp/base/exception/accessNotAllowedException.jsp</param>
            <param name="appDisplayName">Radio</param>
        </result>            
    </global-results>

In my JSP page I tried below options –

<gs:property value="%{appDisplayName}" />
<gs:property value="#appDisplayName" />
<gs:property value="appDisplayName" />
<gs:property value="%{param.appDisplayName}" />
<gs:property value="#param.appDisplayName" />
<gs:property value="param.appDisplayName" />

None of them worked. If you guys can point me to right direction it will be appreciated. Also is there a way to print all the variables available in the current context incl. session, page, request scopes?

UPDATE
I ended up resolving the issue by setting up variable in the parent action, which originally triggered the exception. I did not want to do this originally because I did not want to pollute the parent action, but I modified my template for handling normal flow of things to make use of the new variable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:15:45+00:00Added an answer on May 31, 2026 at 10:15 am

    Use global exception mappings for this purpose not a result, well you’ll need a result but it is the exception mapping that resolves the result see here: https://cwiki.apache.org/WW/exception-handling.html

    I’m not sure but I would manually print out want I want, the #session is a map of iteratable items so the following should work (not tested):

    <h1>From Session</h1>
    <s:iterator value="#session">  
     Session Key: <s:property/>
     <ol>
     <s:iterator>
       <li><s:parameter/></li>
     </s:iterator>
     </ol>
    </s:iterator>
    

    You would need to do the above for #application, #request, #page… whatever.

    An easier way if you don’t mind json… is to create an action with all the “Aware” interfaces that you would like with a json result type (using the struts2-json plugin) what is really nice about this is the json plugin will serialize all the public members of those objects no matter how deeply nested.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MOSS workflow where on the first form, the user can choose
I have some workflow to work with in Worflow foundation. I need to follow
I have created a workflow, and Im running it via WorkflowInstance.Run(). This workflow has
I have a workflow service created with WF 4.0 and the need to have
I have a business requirement where i need to create a workflow on a
I have a similar problem to this guy: Importing/Exporting Project Preferences , but my
I have a Windows Workflow Foundation (3.0) state machine in which I need certain
Im working with a workflow solution. In this workflow i have an Argument that
I have a workflow with a property in it, declared like this: public Person
I have a workflow running on an item in a list. The workflow has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.