0

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

ukanth
  • 2,718
  • 5
  • 28
  • 38
  • Yes, there are close to infinity number of ways to achieve this. Pretty much every framework, platform, product or technology ever developed for java web aims at controlling what information gets rendered on a given page :) You'll need to be a little bit more specific regarding your architecture. How do you generate the html? Are they just static html-files that you serve, or do you have some dynamic rendering, for instance? – pap May 28 '12 at 14:24
  • Yes, HTML pages are static in nature. when the page loads it makes an AJAX call to the service and get the user information from jcifs – ukanth May 29 '12 at 04:32

0 Answers0