?
Solved

Static Pages with no model or controller

Posted on 2008-11-07
3
Medium Priority
?
414 Views
Last Modified: 2013-11-11
I have a web app that has a few pages that are static HTML pages that do not have a model. I want these pages to only be viewed after the client has logged in, but I don't want to have to create controllers for each of them when they do not have models and will not change. I was thinking about creating one controller for all the static pages, but I don't know if this is the best approach or even if it is possible.
Any advice would be appreciated.
0
Comment
Question by:iharmony24
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
rrz earned 500 total points
ID: 22905664
You could change the HTML files to JSP files and then check for a session-scoped variable before allowing access.   Or you could write a Filter that could prevent access to the HTML files.   Which way do you want to go ?
0
 
LVL 28

Expert Comment

by:rrz
ID: 22905789
0
 

Author Closing Comment

by:iharmony24
ID: 31514398
I ended up taking your first approach where I converted the html pages to jsp. I have a spring servlet that maps the request to a httpInterceptor where it makes sure that the session variable has been set. If the check passes, the servlet then maps to one controller (handeling all static pages) that parses the uri for the view name, which it then displays.
Thanks for your help,
Tarah
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
A solution for Fortify Path Manipulation.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month17 days, 11 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question