You can use a org.springframework.web.servlet.mvc.Parameterizabl eViewController which takes a single property, the view name. Example:
Code:
<bean id="userUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/login.html">loginController</prop>
</props>
</property>
</bean>
<bean id="loginController" class="org.springframework.web.servlet.mvc.ParameterizableViewController">
<property name="viewName" value="login" />
</bean>
That will render the view with the named loginPage. How that view is resolved depends on your view resolver. Typically, that's a ResourceBundleViewResolver, a UrlBasedViewResolver, or BeanNameViewResolver. The latter being the simplest for little apps. The former are more realistic for any normal application.
An example of the UrlBasedViewResolver might look like:
Code:
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix"><value>/WEB-INF/jsp/</value></property>
<property name="suffix"><value>.jsp</value></property>
</bean>
This will look for a page called login.jsp in the directory /WEB-INF/jsp and render it.
If you go directly to some page without going through the controller, you're bypassing the whole MVC framework. For entirely static pages, this might be okay. For anything that's dynamic, it's probably a Bad Idea. The controller should fetch the model from wherever (usually the service layer), and pass it to the view for rendering. You'll find out more about this if you search for "web mvc" or "web model 2".
Christian