You can use a org.springframework.web.servlet.mvc.Parameterizabl eViewController which takes a single property, the view name. Example:
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.
<bean id="userUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<bean id="loginController" class="org.springframework.web.servlet.mvc.ParameterizableViewController">
<property name="viewName" value="login" />
An example of the UrlBasedViewResolver might look like:
This will look for a page called login.jsp in the directory /WEB-INF/jsp and render it.
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
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".