You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mo...@physics.gmu.edu on 2003/11/17 21:42:25 UTC

using ApplicationResources.properties in the Action class

Hi All
I have my Action Class and ActionForm classes under project/src/java/ and
all the jsp stuff under web/project. I have struts-config.xml etc under
web/project/WEB-INF. I have the ApplicationResources.properties file under
web/project/WEB-INF/classes. How can i access the
ApplicationResources.properties file and its properties from my Action
class. I do not want that to be under my src/java directory. Let me know

Thanks

--Mohan





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: using ApplicationResources.properties in the Action class

Posted by mo...@physics.gmu.edu.
Cool guys
Sorry for asking such a dumb question. It can be easily called using the
MessageResources class.

Thank you


> I have and a structure like this
> project/src/java/webapp/- this contains the code ActionForm and Action
> classes
> project/web/app1-contains jsps for app1 and also
>  project/web/app1/WEB-INF/struts-config.xml,web.xml.,classes/ApplicationResource.properties
>
> project/web/app2-contains jsps for app1 and also
> project/web/app2/WEB-INF/struts-config.xml,web.xml.,classes/ApplicationResource.properties
>
> the java code in src directory is common to application app1 and app2.
> In my java code i want to use the ApplicationResources.properties for
> each app and produce generic code.
>
> Thank you
> --Mohan
>
>
>
>
>> Put the file where you want it and have ant copy the file to the
>> proper location for you.
>>
>> -jeff
>>
>> On Monday, November 17, 2003, at 02:42  PM, mohan@physics.gmu.edu
>> wrote:
>>
>>> Hi All
>>> I have my Action Class and ActionForm classes under project/src/java/
>>> and
>>> all the jsp stuff under web/project. I have struts-config.xml etc
>>> under web/project/WEB-INF. I have the ApplicationResources.properties
>>> file  under
>>> web/project/WEB-INF/classes. How can i access the
>>> ApplicationResources.properties file and its properties from my
>>> Action class. I do not want that to be under my src/java directory.
>>> Let me know
>>>
>>> Thanks
>>>
>>> --Mohan
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
>> additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
> additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: using ApplicationResources.properties in the Action class

Posted by mo...@physics.gmu.edu.
I have and a structure like this
project/src/java/webapp/- this contains the code ActionForm and Action
classes
project/web/app1-contains jsps for app1 and also
 project/web/app1/WEB-INF/struts-config.xml,web.xml.,classes/ApplicationResource.properties

project/web/app2-contains jsps for app1 and also
project/web/app2/WEB-INF/struts-config.xml,web.xml.,classes/ApplicationResource.properties

the java code in src directory is common to application app1 and app2.
In my java code i want to use the ApplicationResources.properties for each
app and produce generic code.

Thank you
--Mohan




> Put the file where you want it and have ant copy the file to the proper
> location for you.
>
> -jeff
>
> On Monday, November 17, 2003, at 02:42  PM, mohan@physics.gmu.edu wrote:
>
>> Hi All
>> I have my Action Class and ActionForm classes under project/src/java/
>> and
>> all the jsp stuff under web/project. I have struts-config.xml etc
>> under web/project/WEB-INF. I have the ApplicationResources.properties
>> file  under
>> web/project/WEB-INF/classes. How can i access the
>> ApplicationResources.properties file and its properties from my Action
>> class. I do not want that to be under my src/java directory. Let me
>> know
>>
>> Thanks
>>
>> --Mohan
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
>> additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
> additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: using ApplicationResources.properties in the Action class

Posted by Jeff Kyser <kt...@comcast.net>.
Put the file where you want it and have ant copy the file to the proper
location for you.

-jeff

On Monday, November 17, 2003, at 02:42  PM, mohan@physics.gmu.edu wrote:

> Hi All
> I have my Action Class and ActionForm classes under project/src/java/ 
> and
> all the jsp stuff under web/project. I have struts-config.xml etc under
> web/project/WEB-INF. I have the ApplicationResources.properties file 
> under
> web/project/WEB-INF/classes. How can i access the
> ApplicationResources.properties file and its properties from my Action
> class. I do not want that to be under my src/java directory. Let me 
> know
>
> Thanks
>
> --Mohan
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org