|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Setting default content-type in VelocityViewServletAll,
I have been unable to find the documentation on what property to set to change the default content-type set by the VelocityViewServlet (and VelocityLayoutServlet). Can someone point me to the right place? Thanks, -chris |
|
|
Re: Setting default content-type in VelocityViewServlethttp://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/tools/view/servlet/VelocityViewServlet.html#setContentType(javax.servlet.http.HttpServletRequest,%20javax.servlet.http.HttpServletResponse)
or http://velocity.markmail.org/search/default%20content%20type%20VelocityViewServlet?page=1 not exactly easy to find if you're browsing around, sorry. the default.contentType property works for both Tools 1.x and 2.0. On Tue, May 20, 2008 at 12:26 PM, Christopher Schultz <chris@...> wrote: > All, > > I have been unable to find the documentation on what property to set to > change the default content-type set by the VelocityViewServlet (and > VelocityLayoutServlet). Can someone point me to the right place? > > Thanks, > -chris > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Setting default content-type in VelocityViewServletNathan,
Nathan Bubna wrote: > not exactly easy to find if you're browsing around, sorry. Yeah, not so much. It would be good if there was a collection of configuration properties, maybe in a table on a web page. It's not clear where to set this "property": " The default implementation is : response.setContentType(defaultContentType); where defaultContentType is set to the value of the default.contentType property, or "text/html" if that is not set. " I set 'default.contentType=text/xml' in velocity.properties and the default content type appears not to have changed from the text/html default. :( Any suggestions? -chris |
|
|
Re: Setting default content-type in VelocityViewServletAll,
Christopher Schultz wrote: > It's not clear where to set this "property": While the above statement is true, the one below is not: > I set 'default.contentType=text/xml' in velocity.properties and the > default content type appears not to have changed from the text/html > default. I was editing velocity.properties in the wrong project. :( It's a crappy day in DC, so my brain isn't working very well. Sorry! -chris |
|
|
Re: Setting default content-type in VelocityViewServletOn Tue, May 20, 2008 at 1:02 PM, Christopher Schultz
<chris@...> wrote: > Nathan, > > Nathan Bubna wrote: >> >> not exactly easy to find if you're browsing around, sorry. > > Yeah, not so much. It would be good if there was a collection of > configuration properties, maybe in a table on a web page. That would rock. wanna help? if someone got it started, i'd be happy to jump in. > It's not clear where to set this "property": when in doubt, put it in velocity.properties. though, yeah, some things are in web.xml. hmm. i suppose we ought to do some consistifying. > > " > The default implementation is : > > response.setContentType(defaultContentType); > > > where defaultContentType is set to the value of the default.contentType > property, or "text/html" if that is not set. > " > > > I set 'default.contentType=text/xml' in velocity.properties and the default > content type appears not to have changed from the text/html default. > > :( > > Any suggestions? > > -chris > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Setting default content-type in VelocityViewServletNathan,
Nathan Bubna wrote: > On Tue, May 20, 2008 at 1:02 PM, Christopher Schultz > <chris@...> wrote: >> Nathan, >> >> Nathan Bubna wrote: >>> not exactly easy to find if you're browsing around, sorry. >> Yeah, not so much. It would be good if there was a collection of >> configuration properties, maybe in a table on a web page. > > That would rock. wanna help? if someone got it started, i'd be happy > to jump in. web would be better, how do I change stuff there? -chris |
|
|
Re: Setting default content-type in VelocityViewServletOn Wed, May 21, 2008 at 6:48 AM, Christopher Schultz
<chris@...> wrote: > Nathan, > > Nathan Bubna wrote: >> >> On Tue, May 20, 2008 at 1:02 PM, Christopher Schultz >> <chris@...> wrote: >>> >>> Nathan, >>> >>> Nathan Bubna wrote: >>>> >>>> not exactly easy to find if you're browsing around, sorry. >>> >>> Yeah, not so much. It would be good if there was a collection of >>> configuration properties, maybe in a table on a web page. >> >> That would rock. wanna help? if someone got it started, i'd be happy >> to jump in. > > Sure. What's the best way to do that? Wiki? Web page in the site? If the web > would be better, how do I change stuff there? Since you can, it's probably best to put it in the distributed docs, since the wiki is harder to version and distribute. Just check out https://svn.apache.org/repos/asf/velocity/tools/trunk and make the changes in the xdocs there. You should probably put the table into the xdocs/view.xml page, since most settings are for all VelocityView uses (VVS, VLS, and veltag) then perhaps we can add separate tables (which have links back to the main one) on xdocs/view.servlet.xml for VVS-specific properties, on xdocs/view.layout.xml for VLS properties. Veltag is a bit different, as it's specific properties are set via tag attributes and not velocity.properties or web.xml. Still, i suppose we could document those too. Really, though, the bulk of configuration possibilities are at the VelocityView level. So, i'd just start there and not worry about the rest right away. > -chris > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
velocity loggingI just updated to Velocity 1.5 and I am using the Log4JLogChute as my logsystem class. I am wanting to use the default configuration. The issue I am having is my velocity.log file max size is around 120KB before it starts over. How can I increase the file size to 25MB using velocity.properties?
Snippet of my velocity.properties file: runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4JLogChute runtime.log.invalid.references = false * Changing this size doesn't seem to help within my application runtime.log.logsystem.log4j.file.size=2500000 Thanks, John --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
RE: velocity loggingI looked in the Log4JLogChute class and found the appender.setMaximumFileSize(100000) that explains the file size. I have defined the property runtime.log.logsystem.log4j.logger in velocity.properties with my logger and no longer use the runtime.log property. Works like a charm.
-john -----Original Message----- From: John Randall [mailto:John.Randall@...] Sent: Wednesday, May 21, 2008 4:20 PM To: 'Velocity Users List' Subject: velocity logging I just updated to Velocity 1.5 and I am using the Log4JLogChute as my logsystem class. I am wanting to use the default configuration. The issue I am having is my velocity.log file max size is around 120KB before it starts over. How can I increase the file size to 25MB using velocity.properties? Snippet of my velocity.properties file: runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4JLogChute runtime.log.invalid.references = false * Changing this size doesn't seem to help within my application runtime.log.logsystem.log4j.file.size=2500000 Thanks, John --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: velocity loggingJohn,
Thanks for letting us know what worked! In the archives now for those hitting a similar issue. WILL On Wed, May 21, 2008 at 3:33 PM, John Randall <John.Randall@...> wrote: > I looked in the Log4JLogChute class and found the > appender.setMaximumFileSize(100000) that explains the file size. I have > defined the property runtime.log.logsystem.log4j.logger in > velocity.properties with my logger and no longer use the runtime.log > property. Works like a charm. > > -john > > > -----Original Message----- > From: John Randall [mailto:John.Randall@...] > Sent: Wednesday, May 21, 2008 4:20 PM > To: 'Velocity Users List' > Subject: velocity logging > > I just updated to Velocity 1.5 and I am using the Log4JLogChute as my > logsystem class. I am wanting to use the default configuration. The issue I > am having is my velocity.log file max size is around 120KB before it starts > over. How can I increase the file size to 25MB using velocity.properties? > > Snippet of my velocity.properties file: > runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4JLogChute > runtime.log.invalid.references = false > > * Changing this size doesn't seem to help within my application > runtime.log.logsystem.log4j.file.size=2500000 > > Thanks, > John > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > -- Forio Business Simulations Will Glass-Husain wglass@... www.forio.com |
| Free Forum Powered by Nabble | Forum Help |