Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > [JSP] Strings Constants from JSP using Struts tags

Reply
Thread Tools

[JSP] Strings Constants from JSP using Struts tags

 
 
Matthias Nietz
Guest
Posts: n/a
 
      11-12-2003
Hey NG,

is there a way to share String Constants through an application without
coding Java in the JSPs?
<html:submit property="<%=CONSTANTS.anmeldetext%>" value="..."/>

It would already be happy if I could the Application-Resource keys here but
I can't nest the <bean:message> for <%=...%> into the <html:submit> tag. I
want to make sure that my Actionclass uses the same String to retrieve the
property from the request than used to declare it in the jsp. Is there
another way to achieve my aim?

Regards,

Matthias.



 
Reply With Quote
 
 
 
 
VisionSet
Guest
Posts: n/a
 
      11-12-2003



"Matthias Nietz" <(E-Mail Removed)> wrote in message
news:botj8p$1gvf8p$(E-Mail Removed)-berlin.de...
> Hey NG,
>
> is there a way to share String Constants through an application without
> coding Java in the JSPs?
> <html:submit property="<%=CONSTANTS.anmeldetext%>" value="..."/>
>
> It would already be happy if I could the Application-Resource keys here

but
> I can't nest the <bean:message> for <%=...%> into the <html:submit> tag.

I
> want to make sure that my Actionclass uses the same String to retrieve the
> property from the request than used to declare it in the jsp. Is there
> another way to achieve my aim?
>


Then there are the action form decalaration of properties in the
struts-config.xml

So you have 3 variables for the same property in jsp, xml, and model. jsp &
model versions can at least be homologous, one method is to use reflection
to lift out constants from an interface or wherever, and store them as
context attributes at startup.

--
Mike W


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can i use struts 2 tags in a struts 1 app? John M Java 1 03-07-2008 01:17 AM
JSF tags enclosed in custom JSP tags? koslows Java 0 05-12-2005 08:09 PM
Am I the only one who questions JSTL, Struts Tags, XSL Tags? Greg Smith Java 35 10-24-2004 07:46 AM
Evaluating struts tags inside my own custom tags... A. Brinkmann Java 2 04-16-2004 07:44 AM
JSP newbie - use include, custom tags, standard tags - or what? Mike Java 3 01-09-2004 09:30 AM



Advertisments