change default.properties in jar

View: New views
9 Messages — Rating Filter:   Alert me  

change default.properties in jar

by Louis Masters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If I want to change a piece of text in the default.properties file in the
JSPWiki.jar, how would I go about doing that?  Can I override it somehow,
or should I go the unjar-change-jar route?

Thanks,
Lou

Re: change default.properties in jar

by Janne Jalkanen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Yeah, you just need to make sure the resource is found first. For  
example, you could package the default.properties into  
aaa_myproperties.jar,
and that would be found first in the classpath.

/Janne

On 19 May 2009, at 21:10, Louis.Masters@... wrote:

> If I want to change a piece of text in the default.properties file  
> in the
> JSPWiki.jar, how would I go about doing that?  Can I override it  
> somehow,
> or should I go the unjar-change-jar route?
>
> Thanks,
> Lou


Re: change default.properties in jar

by Harry Metske :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

isn't easier to put the default.properties in WEB-INF/classes ?

(at least for Tomcat that is searched first before WEB-INF/lib/*.jar)

Harry

2009/5/19 Janne Jalkanen <janne.jalkanen@...>

>
> Yeah, you just need to make sure the resource is found first. For example,
> you could package the default.properties into aaa_myproperties.jar,
> and that would be found first in the classpath.
>
> /Janne
>
> On 19 May 2009, at 21:10, Louis.Masters@... wrote:
>
>  If I want to change a piece of text in the default.properties file in the
>> JSPWiki.jar, how would I go about doing that?  Can I override it somehow,
>> or should I go the unjar-change-jar route?
>>
>> Thanks,
>> Lou
>>
>
>

Re: change default.properties in jar

by Janne Jalkanen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Probably :-)

/Janne

On 19 May 2009, at 22:43, Harry Metske wrote:

> isn't easier to put the default.properties in WEB-INF/classes ?
>
> (at least for Tomcat that is searched first before WEB-INF/lib/*.jar)
>
> Harry
>
> 2009/5/19 Janne Jalkanen <janne.jalkanen@...>
>
>>
>> Yeah, you just need to make sure the resource is found first. For  
>> example,
>> you could package the default.properties into aaa_myproperties.jar,
>> and that would be found first in the classpath.
>>
>> /Janne
>>
>> On 19 May 2009, at 21:10, Louis.Masters@... wrote:
>>
>> If I want to change a piece of text in the default.properties file  
>> in the
>>> JSPWiki.jar, how would I go about doing that?  Can I override it  
>>> somehow,
>>> or should I go the unjar-change-jar route?
>>>
>>> Thanks,
>>> Lou
>>>
>>
>>


Re: change default.properties in jar

by gila :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Surely :-) but under classes/templates/default.properties  (at least
with 2.8.x)

L

Janne Jalkanen wrote:

>
> Probably :-)
>
> /Janne
>
> On 19 May 2009, at 22:43, Harry Metske wrote:
>
>> isn't easier to put the default.properties in WEB-INF/classes ?
>>
>> (at least for Tomcat that is searched first before WEB-INF/lib/*.jar)
>>
>> Harry
>>
>> 2009/5/19 Janne Jalkanen <janne.jalkanen@...>
>>
>>>
>>> Yeah, you just need to make sure the resource is found first. For
>>> example,
>>> you could package the default.properties into aaa_myproperties.jar,
>>> and that would be found first in the classpath.
>>>
>>> /Janne
>>>
>>> On 19 May 2009, at 21:10, Louis.Masters@... wrote:
>>>
>>> If I want to change a piece of text in the default.properties file
>>> in the
>>>> JSPWiki.jar, how would I go about doing that?  Can I override it
>>>> somehow,
>>>> or should I go the unjar-change-jar route?
>>>>
>>>> Thanks,
>>>> Lou
>>>>
>>>
>>>
>


Re: change default.properties in jar

by Louis Masters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, I put the changed default.properties file pretty much everywhere in
the war directory and nothing worked.  Am I missing something?

I tried:
WEB-INF/default.properties
WEB-INF/templates/default.properties
WEB-INF/classes/default.properties
WEB-INF/classes/templates/default.properties
WEB-INF/lib/default.properties
WEB-INF/lib/templates/default.properties
<war>/templates/default.properties

I'm using 2.8.1 under JBoss 4.2 and java 1.5.

Thanks,
Lou





"lgilardoni61@..." <lgilardoni61@...>
05/20/2009 03:15 AM
Please respond to
jspwiki-user@...


To
jspwiki-user@...
cc

Subject
Re: change default.properties in jar






Surely :-) but under classes/templates/default.properties  (at least
with 2.8.x)

L

Janne Jalkanen wrote:

>
> Probably :-)
>
> /Janne
>
> On 19 May 2009, at 22:43, Harry Metske wrote:
>
>> isn't easier to put the default.properties in WEB-INF/classes ?
>>
>> (at least for Tomcat that is searched first before WEB-INF/lib/*.jar)
>>
>> Harry
>>
>> 2009/5/19 Janne Jalkanen <janne.jalkanen@...>
>>
>>>
>>> Yeah, you just need to make sure the resource is found first. For
>>> example,
>>> you could package the default.properties into aaa_myproperties.jar,
>>> and that would be found first in the classpath.
>>>
>>> /Janne
>>>
>>> On 19 May 2009, at 21:10, Louis.Masters@... wrote:
>>>
>>> If I want to change a piece of text in the default.properties file
>>> in the
>>>> JSPWiki.jar, how would I go about doing that?  Can I override it
>>>> somehow,
>>>> or should I go the unjar-change-jar route?
>>>>
>>>> Thanks,
>>>> Lou
>>>>
>>>
>>>
>



Re: change default.properties in jar

by Harry Metske :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, as I said "at least for Tomcat that is searched first before
WEB-INF/lib/*.jar" :-)
I don't know the classloading hierarchy in JBoss, maybe that's different.

Switching to the dev-list:
Any JBoss expert on the list who can answer this question  ?

regards,
Harry

2009/5/20 <Louis.Masters@...>

> OK, I put the changed default.properties file pretty much everywhere in
> the war directory and nothing worked.  Am I missing something?
>
> I tried:
> WEB-INF/default.properties
> WEB-INF/templates/default.properties
> WEB-INF/classes/default.properties
> WEB-INF/classes/templates/default.properties
> WEB-INF/lib/default.properties
> WEB-INF/lib/templates/default.properties
> <war>/templates/default.properties
>
> I'm using 2.8.1 under JBoss 4.2 and java 1.5.
>
> Thanks,
> Lou
>
>
>
>
>
> "lgilardoni61@..." <lgilardoni61@...>
> 05/20/2009 03:15 AM
> Please respond to
> jspwiki-user@...
>
>
> To
> jspwiki-user@...
> cc
>
> Subject
> Re: change default.properties in jar
>
>
>
>
>
>
> Surely :-) but under classes/templates/default.properties  (at least
> with 2.8.x)
>
> L
>
> Janne Jalkanen wrote:
> >
> > Probably :-)
> >
> > /Janne
> >
> > On 19 May 2009, at 22:43, Harry Metske wrote:
> >
> >> isn't easier to put the default.properties in WEB-INF/classes ?
> >>
> >> (at least for Tomcat that is searched first before WEB-INF/lib/*.jar)
> >>
> >> Harry
> >>
> >> 2009/5/19 Janne Jalkanen <janne.jalkanen@...>
> >>
> >>>
> >>> Yeah, you just need to make sure the resource is found first. For
> >>> example,
> >>> you could package the default.properties into aaa_myproperties.jar,
> >>> and that would be found first in the classpath.
> >>>
> >>> /Janne
> >>>
> >>> On 19 May 2009, at 21:10, Louis.Masters@... wrote:
> >>>
> >>> If I want to change a piece of text in the default.properties file
> >>> in the
> >>>> JSPWiki.jar, how would I go about doing that?  Can I override it
> >>>> somehow,
> >>>> or should I go the unjar-change-jar route?
> >>>>
> >>>> Thanks,
> >>>> Lou
> >>>>
> >>>
> >>>
> >
>
>
>

Re: change default.properties in jar

by gila :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, just checked under tomcat and working fine with
WEB-INF\classes\templates\default_en.properties (i use
default_en.properties so that I just change what I need and all the rest
defaults to default.properties). Did you restarted (I suspect this is
read at startup)?

Possible however that under jboss (recently checked on tomcat and the
suggested way is guaranteed to work but I believe this depend also on
the container ) order of loading is different.

Luca


Louis.Masters@... wrote:

> OK, I put the changed default.properties file pretty much everywhere in
> the war directory and nothing worked.  Am I missing something?
>
> I tried:
> WEB-INF/default.properties
> WEB-INF/templates/default.properties
> WEB-INF/classes/default.properties
> WEB-INF/classes/templates/default.properties
> WEB-INF/lib/default.properties
> WEB-INF/lib/templates/default.properties
> <war>/templates/default.properties
>
> I'm using 2.8.1 under JBoss 4.2 and java 1.5.
>
> Thanks,
> Lou
>
>
>
>
>
> "lgilardoni61@..." <lgilardoni61@...>
> 05/20/2009 03:15 AM
> Please respond to
> jspwiki-user@...
>
>
> To
> jspwiki-user@...
> cc
>
> Subject
> Re: change default.properties in jar
>
>
>
>
>
>
> Surely :-) but under classes/templates/default.properties  (at least
> with 2.8.x)
>
> L
>
> Janne Jalkanen wrote:
>  
>> Probably :-)
>>
>> /Janne
>>
>> On 19 May 2009, at 22:43, Harry Metske wrote:
>>
>>    
>>> isn't easier to put the default.properties in WEB-INF/classes ?
>>>
>>> (at least for Tomcat that is searched first before WEB-INF/lib/*.jar)
>>>
>>> Harry
>>>
>>> 2009/5/19 Janne Jalkanen <janne.jalkanen@...>
>>>
>>>      
>>>> Yeah, you just need to make sure the resource is found first. For
>>>> example,
>>>> you could package the default.properties into aaa_myproperties.jar,
>>>> and that would be found first in the classpath.
>>>>
>>>> /Janne
>>>>
>>>> On 19 May 2009, at 21:10, Louis.Masters@... wrote:
>>>>
>>>> If I want to change a piece of text in the default.properties file
>>>> in the
>>>>        
>>>>> JSPWiki.jar, how would I go about doing that?  Can I override it
>>>>> somehow,
>>>>> or should I go the unjar-change-jar route?
>>>>>
>>>>> Thanks,
>>>>> Lou
>>>>>
>>>>>          
>>>>        
>
>
>
>  


Re: change default.properties in jar

by Louis Masters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Luca:

Thanks.  Your note helped me figure out what I was doing wrong.  The
default_en.properties file completely overrides the default.properties
file so whenI was changing the default.props with my default.props, it was
being overriden by the default default_en.props.

Thanks to all who posted on this.

-Lou


"lgilardoni61@..." <lgilardoni61@...> wrote on 05/20/2009
05:30:48 PM:

> Well, just checked under tomcat and working fine with
> WEB-INF\classes\templates\default_en.properties (i use
> default_en.properties so that I just change what I need and all the rest

> defaults to default.properties). Did you restarted (I suspect this is
> read at startup)?
>
> Possible however that under jboss (recently checked on tomcat and the
> suggested way is guaranteed to work but I believe this depend also on
> the container ) order of loading is different.
>
> Luca
>
>
> Louis.Masters@... wrote:
> > OK, I put the changed default.properties file pretty much everywhere
in

> > the war directory and nothing worked.  Am I missing something?
> >
> > I tried:
> > WEB-INF/default.properties
> > WEB-INF/templates/default.properties
> > WEB-INF/classes/default.properties
> > WEB-INF/classes/templates/default.properties
> > WEB-INF/lib/default.properties
> > WEB-INF/lib/templates/default.properties
> > <war>/templates/default.properties
> >
> > I'm using 2.8.1 under JBoss 4.2 and java 1.5.
> >
> > Thanks,
> > Lou
> >
> >
> >
> >
> >
> > "lgilardoni61@..." <lgilardoni61@...>
> > 05/20/2009 03:15 AM
> > Please respond to
> > jspwiki-user@...
> >
> >
> > To
> > jspwiki-user@...
> > cc
> >
> > Subject
> > Re: change default.properties in jar
> >
> >
> >
> >
> >
> >
> > Surely :-) but under classes/templates/default.properties  (at least
> > with 2.8.x)
> >
> > L
> >
> > Janne Jalkanen wrote:
> >
> >> Probably :-)
> >>
> >> /Janne
> >>
> >> On 19 May 2009, at 22:43, Harry Metske wrote:
> >>
> >>
> >>> isn't easier to put the default.properties in WEB-INF/classes ?
> >>>
> >>> (at least for Tomcat that is searched first before
WEB-INF/lib/*.jar)

> >>>
> >>> Harry
> >>>
> >>> 2009/5/19 Janne Jalkanen <janne.jalkanen@...>
> >>>
> >>>
> >>>> Yeah, you just need to make sure the resource is found first. For
> >>>> example,
> >>>> you could package the default.properties into aaa_myproperties.jar,
> >>>> and that would be found first in the classpath.
> >>>>
> >>>> /Janne
> >>>>
> >>>> On 19 May 2009, at 21:10, Louis.Masters@... wrote:
> >>>>
> >>>> If I want to change a piece of text in the default.properties file
> >>>> in the
> >>>>
> >>>>> JSPWiki.jar, how would I go about doing that?  Can I override it
> >>>>> somehow,
> >>>>> or should I go the unjar-change-jar route?
> >>>>>
> >>>>> Thanks,
> >>>>> Lou
> >>>>>
> >>>>>
> >>>>
> >
> >
> >
> >
>