velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@binarix.com>
Subject Re: How can I get rid of !DOCTYPE HTML ... header generated by Velocity?
Date Thu, 04 Oct 2001 07:34:24 GMT
Mircea Zahan wrote:
> 
> No, I can't, I didn't write the Velocity classes :op
> And modifying the Velocity classes is not a sollution, if that's
> what you suggest.
> 
> Velocity generates the header, you can check that on the
> simplest example you got. Look at the source of the rendered page,
> in the browser.

OK, I admit, I was being a bit of a bastard in my reply ;-)

My point was that Velocity doesn't force you into any such thing -
Velocity can generate Visual Basic (apologies to everyone for using rude
words :-) program code for all it cares about the output. So, if you
could show a bit of code and explain how your app works, that would
really help.

Personally, I use Velocity to serve XHTML. It takes the document from
the file, parses it into AST (I think :-) and during the merge inserts
the values into the resulting document. What's the meat of the document
is totally irrelevant.

I just created this document in one of my applications (named code.vm):

------------------------------------------
This is a totally bogus document $res.encodeURL($req.getRequestURI()).
------------------------------------------

and this is what the browser serves:

------------------------------------------
This is a totally bogus document /code.vm.
------------------------------------------

There are no headers at all...

Bojan

Mime
View raw message