org.springframework.web.servlet.view
Class InternalResourceViewResolver

java.lang.Object
  extended byorg.springframework.context.support.ApplicationObjectSupport
      extended byorg.springframework.web.context.support.WebApplicationObjectSupport
          extended byorg.springframework.web.servlet.view.AbstractCachingViewResolver
              extended byorg.springframework.web.servlet.view.UrlBasedViewResolver
                  extended byorg.springframework.web.servlet.view.InternalResourceViewResolver
All Implemented Interfaces:
ApplicationContextAware, ViewResolver

public class InternalResourceViewResolver
extends UrlBasedViewResolver

Convenience subclass of UrlBasedViewResolver that supports InternalResourceView (i.e. Servlets and JSPs), and subclasses like JstlView and TilesView.

The view class for all views generated by this resolver can be specified via setViewClass. See UrlBasedViewResolver's javadocs for details.

BTW, it's good practice to put JSP files that just serve as views under WEB-INF, to hide them from direct access (e.g. via a manually entered URL). Only controllers will be able to access them then.

Since:
17.02.2003
Author:
Juergen Hoeller
See Also:
UrlBasedViewResolver.setViewClass(java.lang.Class), UrlBasedViewResolver.setPrefix(java.lang.String), UrlBasedViewResolver.setSuffix(java.lang.String), UrlBasedViewResolver.setRequestContextAttribute(java.lang.String), InternalResourceView, JstlView, TilesView

Field Summary
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
InternalResourceViewResolver()
          Sets default viewClass to InternalResourceView.
 
Method Summary
protected  java.lang.Class requiredViewClass()
          Requires InternalResourceView.
 
Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
getCacheKey, loadView, setContentType, setPrefix, setRequestContextAttribute, setSuffix, setViewClass
 
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
isCache, resolveViewName, setCache
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, requiredContextClass
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalResourceViewResolver

public InternalResourceViewResolver()
Sets default viewClass to InternalResourceView.

See Also:
UrlBasedViewResolver.setViewClass(java.lang.Class)
Method Detail

requiredViewClass

protected java.lang.Class requiredViewClass()
Requires InternalResourceView.

Overrides:
requiredViewClass in class UrlBasedViewResolver
See Also:
InternalResourceView


Copyright (C) 2003-2004 The Spring Framework Project.