setting up status as 401 inside the jsp in tiles framework hasn't worked

24 Views Asked by At

My code is like

 <definition name="base" template="/layouts/classic.jsp">
<put-attribute name="title" value="Tiles tutorial homepage" />
<put-attribute name="header" value="/tiles/banner.jsp" />
<put-attribute name="menu" value="/tiles/common_menu.jsp" />
<put-attribute name="body" value="/tiles/home_body.jsp" />
<put-attribute name="footer" value="/tiles/credits.jsp" />

<definition name="test" extends="base">
    <put-attribute name="body" value="/jsp/unauthorised.jsp" />
</definition>

In unauthorized.jsp I am setting the response status as 401. I am checking the network in the browser status was coming as 200 If I call without extending the base it works fine. Please let me know if anyone faced the similar isse.

1

There are 1 best solutions below

0
QGA On

I think because it fails back to the body attribute of the base definition. Try to comment the body of the base definition and give it a try