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 ?

Answers


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.


Need Your Help

Python - Limit amount of data subprocess.Popen can produce

python subprocess

I found lots of similar questions asking size of an object at run time in python. Some of the answers suggests to set a limit on amount of memory of sub-process. I do not want to set a limit on mem...

CheckedListBox checked items to object conversion?

c# winforms

I have a collection named Subjects with attributes as Name in string, and SubjectCode in int. I passed it to a checked list box. On the press of a button, i want to get the collection of all the it...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.