How to mix different types of views in spring configuration?
greetings all i am using jsp as a view technology in my web app
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> </bean>
and i want to use velocity too as a view technology in sending emails and i want to configure this in the xml file, but i don't know how ?
any ideas how to do this ?
If you want to use Velocity to construct emails, then this is not a "view", as far as Spring MVC is concerned. Views and ViewResolvers are used to render output to the browser.
Spring MVC does provide support for using Velocity as a view layer, but this isn't relevant to what you're trying to do.
However, Spring also provides some support classes to make the clunky Velocity API a bit less awkward to use (see javadocs). These have no relation to the Spring MVC view layer, though. Just use them directly from your code, building the emails and sending them.