I have different types of users, when a user is logged in I need to show a specific page that is associated to that user's type.
The problem is that since the application directly retrieve the pages from Tile it does not retrieve their information, therefore I need to refresh the page to let it retrieve its information and get populated.
How should I make it to do it automatically?
Java
public static String getRole() {
String user = SecurityContextHolder.getContext().getAuthentication().getAuthorities().toString();
if user is standard{
return "stand";
}
if user is vip{
return "vip";
}
}
Struts.xml
<action name="myProject" class="com.myProject.controller.authentication">
<result name="stand" type="tiles">standard</result>
<result name="vip" type="tiles">vip</result>
<result name="">index.jsp</result>
</action>