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  />


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

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




Agile Java Development with Spring, Hibernate and Eclipse
Agile Java Development with Spring, Hibernate and Eclipse
ISBN: 0672328968
EAN: 2147483647
Year: 2006
Pages: 219

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net