1. /*
  2. * Copyright 2002-2004 the original author or authors.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package org.springframework.web.servlet.view.tiles;
  17. import java.util.Map;
  18. import javax.servlet.http.HttpServletRequest;
  19. import javax.servlet.ServletException;
  20. import org.springframework.web.servlet.support.JstlUtils;
  21. /**
  22. * Specialization of TilesView for JSTL pages,
  23. * i.e. Tiles pages that use the JSP Standard Tag Library.
  24. *
  25. * <p>Exposes JSTL-specific request attributes specifying locale
  26. * and resource bundle for JSTL's formatting and message tags,
  27. * using Spring's locale and message source.
  28. *
  29. * <p>This is a separate class mainly to avoid JSTL dependencies
  30. * in TilesView itself.
  31. *
  32. * @author Juergen Hoeller
  33. * @since 20.08.2003
  34. * @see org.springframework.web.servlet.support.JstlUtils#exposeLocalizationContext
  35. */
  36. public class TilesJstlView extends TilesView {
  37. protected void exposeModelAsRequestAttributes(Map model, HttpServletRequest request) throws ServletException {
  38. super.exposeModelAsRequestAttributes(model, request);
  39. JstlUtils.exposeLocalizationContext(request, getApplicationContext());
  40. }
  41. }