Views with No Controllers






Views with No Controllers

There might be times when you do not need or want to write a controller. For example, suppose we want to implement a help screen for Time Expression. We want this help screen to be accessible as /help.htm and have the real file (help.jsp) hidden in /WEB-INF/jsp. In this case, we would first define UrlFilenameViewController in timex-servlet.xml, as shown next:

<bean id="urlFilenameController"
class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>

Then we can reference urlFilenameController in our handler mapping (the urlMap bean in timex-servlet.xml, for example):

<prop key="/help.htm">urlFilenameController</prop>



 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows