0

Proceeding from the question

In Struts1, how to use set-property tag inside action tag?

When set-property tag is used, its value is mapped to property in extended ActionMapping class. Is there any way to access this property in JSP ?

Community
  • 1
  • 1
Bilal Mirza
  • 2,576
  • 4
  • 30
  • 57

1 Answers1

1

You can make use of the bean:struts tag:

<bean:struts id="myActionMapping" mapping="/myAction" />

Once defined, you can access the properties straight on the myActionMapping JSP bean:

<bean:write name="myActionMapping" property="task" />

Or, using EL:

${myActionMapping.task}

Reference: struts-bean.tld

Bilal Mirza
  • 2,576
  • 4
  • 30
  • 57
Tomas Narros
  • 13,390
  • 2
  • 40
  • 56