Results 1 to 3 of 3

Thread: How to implement a view handling structure like this...?

  1. #1
    Join Date
    Apr 2006
    Location
    Dresden, Germany
    Posts
    483

    Default How to implement a view handling structure like this...?

    Hi folks,

    i want to implement a view structure like explained in the following. First my view pages directory structure shall look / looks like this:

    Code:
    WEB-INF/jsp
    WEB-INF/jsp/index.jsp
    WEB-INF/jsp/public/loginForm.jsp
    WEB-INF/jsp/secure/...jsp
    My central view accesspoint shall be index.jsp. There I'd like to define some standard layout (divs for headers, footers, main navigation... ) and a content div, where the actually destination jsp shall be included.
    So a call to /myApp/login.htm shall lead to index.jsp rendered with loginForm.jsp included in the content div.

    My Mainproblem is, that ever tutorial i can find, works with resolving view names directly to jsps. I can hardly imagine how to build a standard layout that way, without including at least references to headers and footers in EVERY single view page .

    Furthermore including a view located in WEB-INF/secure/ shall be intercepted with an AuthenticationInterceptor to check, wether a user is logged in or not. Once again the same problem...

    I'd be glad if anyone could give a hint to solve that problem or could give ideas how to specify mainlayout in a single file using the "normal" way of resolving views

    Regards
    Ollie

  2. #2

    Default

    Hi Ollie,

    Have you thought of using Tiles with Spring MVC? It allows you to specify logical JSP names, and the templating takes care of the headers, footers, menus etc...

    Mike

  3. #3
    Join Date
    Apr 2006
    Location
    Dresden, Germany
    Posts
    483

    Default

    Thanks a lot,

    that seems to have been the hint I needed

    Regards,

    Ollie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •