Quantcast

[ANNOUNCE] Velocity Engine 2.0 test build available

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ANNOUNCE] Velocity Engine 2.0 test build available

Claude Brisson-2
The test build of Velocity Engine 2.0 is available.

No determination as to the quality ('alpha,' 'beta,' or 'GA') of
Velocity Engine 2.0 has been made, and at this time it is simply a "test
build". We welcome any comments you may have, and will take all feedback
into account if a quality vote is called for this build.

Release notes:

*
https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/release-notes.html

Distribution:

  * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/

Maven 2 staging repository:

  *
https://repository.apache.org/content/repositories/orgapachevelocity-1010/

A vote regarding the quality of this test build will be initiated within
the next couple of days.


Regards,

   Claude


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANNOUNCE] Velocity Engine 2.0 test build available

Greg Huber
Seems to be working OK.  Thanks.

For the ResourceLoader changes I have been doing this :

public  InputStream getResourceStream(String name)....

return result = servletContext.getResourceAsStream(path);

but now must use :

public Reader getResourceReader(String name, String encoding)....

return result = new BufferedReader(new InputStreamReader(
                            servletContext.getResourceAsStream(path)));

Is this the most efficient way to the Reader class?  Seems a lot more
processing than just the InputStream??





On 7 November 2016 at 10:06, Claude Brisson <[hidden email]> wrote:

> The test build of Velocity Engine 2.0 is available.
>
> No determination as to the quality ('alpha,' 'beta,' or 'GA') of Velocity
> Engine 2.0 has been made, and at this time it is simply a "test build". We
> welcome any comments you may have, and will take all feedback into account
> if a quality vote is called for this build.
>
> Release notes:
>
> * https://dist.apache.org/repos/dist/dev/velocity/velocity-eng
> ine/2.0/release-notes.html
>
> Distribution:
>
>  * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/
>
> Maven 2 staging repository:
>
>  * https://repository.apache.org/content/repositories/orgapache
> velocity-1010/
>
> A vote regarding the quality of this test build will be initiated within
> the next couple of days.
>
>
> Regards,
>
>   Claude
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANNOUNCE] Velocity Engine 2.0 test build available

Sergiu Dumitriu
If you don't want surprises, you should also specify the encoding to
use. I'm guessing that the files you're reading have a known encoding
that's kept from the build into the distribution package, but you don't
always have control over the system where it's installed.

try {
    return new BufferedReader(new
InputStreamReader(servletContext.getResourceAsStream(path), "UTF-8"));
} catch (UnsupportedEncodingException e) {
    // This should never happen, UTF-8 is mandatory for a valid JVM
    return null;
}

On 11/08/2016 07:13 AM, Greg Huber wrote:

> Seems to be working OK.  Thanks.
>
> For the ResourceLoader changes I have been doing this :
>
> public  InputStream getResourceStream(String name)....
>
> return result = servletContext.getResourceAsStream(path);
>
> but now must use :
>
> public Reader getResourceReader(String name, String encoding)....
>
> return result = new BufferedReader(new InputStreamReader(
>                             servletContext.getResourceAsStream(path)));
>
> Is this the most efficient way to the Reader class?  Seems a lot more
> processing than just the InputStream??
>
>
>
>
>
> On 7 November 2016 at 10:06, Claude Brisson <[hidden email]> wrote:
>
>> The test build of Velocity Engine 2.0 is available.
>>
>> No determination as to the quality ('alpha,' 'beta,' or 'GA') of Velocity
>> Engine 2.0 has been made, and at this time it is simply a "test build". We
>> welcome any comments you may have, and will take all feedback into account
>> if a quality vote is called for this build.
>>
>> Release notes:
>>
>> * https://dist.apache.org/repos/dist/dev/velocity/velocity-eng
>> ine/2.0/release-notes.html
>>
>> Distribution:
>>
>>  * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/
>>
>> Maven 2 staging repository:
>>
>>  * https://repository.apache.org/content/repositories/orgapache
>> velocity-1010/
>>
>> A vote regarding the quality of this test build will be initiated within
>> the next couple of days.
>>
>>
>> Regards,
>>
>>   Claude
>>
>>
>>
>


--
Sergiu Dumitriu
http://purl.org/net/sergiu

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANNOUNCE] Velocity Engine 2.0 test build available

Greg Huber
Unfortunately it only takes a String :

javax.servlet.ServletContext.getResourceAsStream(java.lang.String path)

So hopefully the encoding will be correct (Tomcat).

....Also I have noticed that if I call a method that has a null

eg $entry.filePath == null

$myPojo.thumbResource($entry.name, $entry.filePath)

I get an exception :

java.lang.IllegalArgumentException: wrong number of arguments at..

where before it used to work :

public String thumbResource(String name, String filePath) {
        if (StringUtils.isNotEmpty(name)
                && StringUtils.isNotEmpty(filePath)) {
            return getThumbResource(name, filePath);
        } else {
            return thumbResource();
        }
    }

Is there a workaround for this?

Thanks



On 8 November 2016 at 13:54, Sergiu Dumitriu <[hidden email]>
wrote:

> If you don't want surprises, you should also specify the encoding to
> use. I'm guessing that the files you're reading have a known encoding
> that's kept from the build into the distribution package, but you don't
> always have control over the system where it's installed.
>
> try {
>     return new BufferedReader(new
> InputStreamReader(servletContext.getResourceAsStream(path), "UTF-8"));
> } catch (UnsupportedEncodingException e) {
>     // This should never happen, UTF-8 is mandatory for a valid JVM
>     return null;
> }
>
> On 11/08/2016 07:13 AM, Greg Huber wrote:
> > Seems to be working OK.  Thanks.
> >
> > For the ResourceLoader changes I have been doing this :
> >
> > public  InputStream getResourceStream(String name)....
> >
> > return result = servletContext.getResourceAsStream(path);
> >
> > but now must use :
> >
> > public Reader getResourceReader(String name, String encoding)....
> >
> > return result = new BufferedReader(new InputStreamReader(
> >                             servletContext.getResourceAsStream(path)));
> >
> > Is this the most efficient way to the Reader class?  Seems a lot more
> > processing than just the InputStream??
> >
> >
> >
> >
> >
> > On 7 November 2016 at 10:06, Claude Brisson <[hidden email]> wrote:
> >
> >> The test build of Velocity Engine 2.0 is available.
> >>
> >> No determination as to the quality ('alpha,' 'beta,' or 'GA') of
> Velocity
> >> Engine 2.0 has been made, and at this time it is simply a "test build".
> We
> >> welcome any comments you may have, and will take all feedback into
> account
> >> if a quality vote is called for this build.
> >>
> >> Release notes:
> >>
> >> * https://dist.apache.org/repos/dist/dev/velocity/velocity-eng
> >> ine/2.0/release-notes.html
> >>
> >> Distribution:
> >>
> >>  * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/
> >>
> >> Maven 2 staging repository:
> >>
> >>  * https://repository.apache.org/content/repositories/orgapache
> >> velocity-1010/
> >>
> >> A vote regarding the quality of this test build will be initiated within
> >> the next couple of days.
> >>
> >>
> >> Regards,
> >>
> >>   Claude
> >>
> >>
> >>
> >
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANNOUNCE] Velocity Engine 2.0 test build available

Claude Brisson-2
In reply to this post by Claude Brisson-2
A new test build of Velocity Engine 2.0 is available.

No determination as to the quality ('alpha,' 'beta,' or 'GA') of
Velocity Engine 2.0 has been made, and at this time it is simply a "test
build". We welcome any comments you may have, and will take all feedback
into account if a quality vote is called for this build.

Release notes:

*
https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/release-notes.html

Distribution:

  * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/

Maven 2 staging repository:

  *
https://repository.apache.org/content/repositories/orgapachevelocity-1011/

A vote regarding the quality of this test build will be initiated within
the next couple of days.


Regards,

   Claude


On 07/11/2016 11:06, Claude Brisson wrote:

>
> The test build of Velocity Engine 2.0 is available.
>
> No determination as to the quality ('alpha,' 'beta,' or 'GA') of
> Velocity Engine 2.0 has been made, and at this time it is simply a
> "test build". We welcome any comments you may have, and will take all
> feedback into account if a quality vote is called for this build.
>
> Release notes:
>
> *
> https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/release-notes.html
>
> Distribution:
>
>  * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.0/
>
> Maven 2 staging repository:
>
>  *
> https://repository.apache.org/content/repositories/orgapachevelocity-1010/
>
> A vote regarding the quality of this test build will be initiated
> within the next couple of days.
>
>
> Regards,
>
>   Claude
>
>
Loading...