I am developing a simple rest based spring application and trying to keep UI and REST services as a separate directory but both deployed under same tomcat instance. REST services returns JSON as response (no Spring MVC here, ResponseEntity )
There is no JSP pages. everything is HTML/jQuery. I am currenly implementing an login module which uses jcifs/ntlm as authentication.When the main page is loaded and making an ajax call to the service and response contains something like this
{
id: 111,
fName: Foo,
sName: bar
}
and my top left nav bar will show this as
Welcome, Foo bar (111)
Is there any way to preload this login information before my html page is rendered ( like template or something )?
I know this can be achieved using jsp with Spring MVC. But would like to know the possibility with Spring REST + HTML + JQuery
Thanks for your help