<c:out value="${dataMap.formattedText}" escapeXml="false"/> should do the trick.

Matt

On 11/24/06, Nathaniel Rahav <[EMAIL PROTECTED]> wrote:

OK, so I decided to play a trick on my Tomcat in order to get 1 velocity
template to render inside a JSP:
Inside my Spring Controller, I invoked the velocity engine:

VelocityEngineUtils.mergeTemplateIntoString
(velocityEngine,

templateNameHTML, model);

and I received a String called formattedText.
I put formattedText into another HashMap and sent it to my view, JSP which
consisted of one tag:

<c:out value="${dataMap.formattedText}"/>

There's just one catch: the page doesnt render my HTML. There is an
intermediary that is escaping all my HTML into &LT and &GT.

Is there a way to tell JSP to NOT escape the formatted HTML that is coming
through my <c:out> tag ?

I know this is POOR STYLE but really I just want to render ONE LITTLE PAGE
using the same velocity template!

Nat




On 11/22/06, Nathaniel Rahav <[EMAIL PROTECTED]> wrote:
>
> Greetings,
> I am using a velocity template to send an HTML email (which is working
well), and I would like to use that same template to display a pop-up window
from my app, displaying the exact same view as the email. This means that I
dont want to use the standard decorators. However I DO want to use the
Spring Controller to populate the velocity template with the relevant
object.
> Is there a way to specify in action-servlet.xml an additional view
resolver?
>
> This is what is currently at the bottom of action-servlet.xml
>
> <!-- View Resolver for JSPs -->
>     <bean id="viewResolver" class="
org.springframework.web.servlet.view.InternalResourceViewResolver">
>         <property name="requestContextAttribute" value="rc"/>
>         <property name="viewClass" value="
org.springframework.web.servlet.view.JstlView"/>
>         <property name="prefix" value="/WEB-INF/pages/"/>
>         <property name="suffix" value=".jsp"/>
>     </bean>
>
> From reading the spring Docs, it looks like I could change my view
resolver to be a ResourceBundle Resolver, but then I would need to put a
config file with all of my views and their resolvers, when all I need is an
exception to the rule above for just one Velocity template, so that I can
request a file called XYZ.vm or .vstl and get the view of that template sans
JSP-JSTL-Decorators etc..
>
> Is there any other way to integrate the velocity template into a page ?
>
>
> thanks
>
> Nat
>
>




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to