I want to login in webapp using java and angular. The only part I want to utilize is common views like header and footer using angular ui router which I have already implemented.
Html:
<body>
<div id="wrap">
<!--header-->
<div ui-view="header"></div>
<!--main content-->
<div ui-view="content"></div>
</div>
<!--footer-->
<div ui-view="footer"></div>
</body
Now the confusion is once I have logged in, I would like to change the login status in header nav bar to [welcome {user name} + loggedin] etc. If I use java jsp, I am not sure how it works to change the status - may be with tag library?
Example:
<security-constraint>
<web-resource-collection>
<web-resource-name>PRIVATE REST API</web-resource-name>
<url-pattern>/private*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>Have to be a USER</description>
<role-name>USERS</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>userauth</realm-name>
</login-config>
<security-role>
<description/>
<role-name>USERS</role-name>
</security-role>
</security-constraint>
I find it easy in angular but most of the examples are only based on angular but not angular + java
Also other point of concern is choosing angular+java login over plain java-jsp login? why some people choose the one over other? Before I drill down into building a huge app, I would like to get some expert advice as there are hundreds of different ways in achieving the same