Re: [Mav-user] How to suppress Velocity Transforms?
Hi Dan Jeff told me about the following trick some time ago. I needed to get the SVG plugin to understand that SVG content was coming instead of html. Below is the first line of my velocity template: $response.setContentType("image/svg+xml") the rest of my SVG document... /johan - Original Message - From: "Dan Finkelstein" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, August 24, 2003 10:49 PM Subject: [Mav-user] How to suppress Velocity Transforms? > Hi -- > > I know this is a really dumb question, esp considering that I've been using > and relying on Maverick for over 1 1/2 years, but here goes anyway... > > Maverick transforms my Velocity templates (the .vm files) and these are > displayed without any problem. What I want to do is, in one particular > place, is to apply the Velocity transform, and then return it as a > text/plain file instead of html. > > In, maverick.xml, the section looks like: > > > > path="admin/remoteAccessResponse.vm"/> > > > When I run RemoteAccess.m, it is identified to the browser as html Any > ideas? > > Thanks a lot, > Dan > > > > > --- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines > at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 > [INVALID FOOTER] > --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 [INVALID FOOTER]
RE: [Mav-user] How to suppress Velocity Transforms?
It should be possible to call $response.setContentType() anywhere near the top of the template. Without Maverick transforms (which can change the output flow considerably), this works the same way that JSP works: . The servlet container provides a buffer of some size into which output is written. . When the buffer becomes full, it is "committed" and flushed to the output stream; all output after that is sent directly to the output stream. . Until the buffer is committed, any changes can be made to the http response headers, but afterwards it's illegal - the headers have already been written. The "standard" JSP (and Velocity) pattern is to set the content-type in the template itself. For XSLT this is not really an option, so an "output-type" attribute on the maverick config node is used. Jeff Schnitzer [EMAIL PROTECTED] > -Original Message- > From: Johan Lundberg [mailto:[EMAIL PROTECTED] > Sent: Monday, August 25, 2003 11:27 AM > To: [EMAIL PROTECTED] > Subject: Re: [Mav-user] How to suppress Velocity Transforms? > > Hi Dan > > Jeff told me about the following trick some time ago. I needed to get the > SVG plugin to understand that SVG content was coming instead of html. > Below > is the first line of my velocity template: > > $response.setContentType("image/svg+xml") > the rest of my SVG document... > > /johan > - Original Message - > From: "Dan Finkelstein" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Sunday, August 24, 2003 10:49 PM > Subject: [Mav-user] How to suppress Velocity Transforms? > > > > Hi -- > > > > I know this is a really dumb question, esp considering that I've been > using > > and relying on Maverick for over 1 1/2 years, but here goes anyway... > > > > Maverick transforms my Velocity templates (the .vm files) and these are > > displayed without any problem. What I want to do is, in one particular > > place, is to apply the Velocity transform, and then return it as a > > text/plain file instead of html. > > > > In, maverick.xml, the section looks like: > > > > > > > > > path="admin/remoteAccessResponse.vm"/> > > > > > > When I run RemoteAccess.m, it is identified to the browser as html > Any > > ideas? > > > > Thanks a lot, > > Dan > > > > > > > > > > --- > > This SF.net email is sponsored by: VM Ware > > With VMware you can run multiple operating systems on a single machine. > > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines > > at the same time. Free trial click > here:http://www.vmware.com/wl/offer/358/0 > > [INVALID FOOTER] > > > > > > --- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines > at the same time. Free trial click > here:http://www.vmware.com/wl/offer/358/0 > [INVALID FOOTER] --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 [INVALID FOOTER]
Re: [Mav-user] How to suppress Velocity Transforms?
I think that's a Velocity thing and not a Maverick thing. Try this in your template: $response.setContentType('text/plain') -dk On Sunday, August 24, 2003, at 03:49 PM, Dan Finkelstein wrote: Hi -- I know this is a really dumb question, esp considering that I've been using and relying on Maverick for over 1 1/2 years, but here goes anyway... Maverick transforms my Velocity templates (the .vm files) and these are displayed without any problem. What I want to do is, in one particular place, is to apply the Velocity transform, and then return it as a text/plain file instead of html. In, maverick.xml, the section looks like: When I run RemoteAccess.m, it is identified to the browser as html Any ideas? Thanks a lot, Dan --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 [INVALID FOOTER] --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 [INVALID FOOTER]