struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Armstrong" <big.steve....@sympatico.ca>
Subject RE: Accessing a static final constant from Class in JSP
Date Wed, 19 Nov 2003 02:43:24 GMT
Well, you can use a JSP expression which strictly speaking isn't a
scriptlet.  So, after you do your import, you can use constants like

<bean:write name="<%= GSOPConstants.A_BEAN_NAME %>" property="<%=
GSOPConstants.A_BEAN_PROPERTY %>"/>

Cheers,
-Steve

-----Original Message-----
From: Larry Meadors [mailto:Larry.Meadors@plumcreek.com]
Sent: Tuesday, November 18, 2003 10:48 AM
To: struts-user@jakarta.apache.org
Subject: RE: Accessing a static final constant from Class in JSP


I don't think there is one, but maybe somone will educate me. ;-)

Why not put this in ApplicationResources and then use the <bean:message>
tag?

Larry

>>> SNKUSUNAM@kcc.usda.gov 11/18/03 8:31 AM >>>

which tag do u use to access the constants from the class as I don't
want to use JSP Scriplets???

Thanks,
S!

>>> jimmye@imsi.com 11/17/03 05:41PM >>>
Import the class in your jsp, then you can directly access it.

<%@ page import="GSOPConstants"%>

-----Original Message-----
From: Srinivas Kusunam [mailto:SNKUSUNAM@kcc.usda.gov]
Sent: Monday, November 17, 2003 2:17 PM
To: struts-user@jakarta.apache.org
Subject: Accessing a static final constant from Class in JSP


Hi,
     I have a class called ProjConstants.java which is a static class
with
some static final constants here is the sample

public class GSOPConstants{
          public static final String LINK_EDIT = "linkEdit";
}

               How can I access this "LINK_EDIT"  constant from JSP
without
using scriplets???

       Any help appreciated.

Regards,
S!



---------------------------------------------------------------------
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



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


Mime
View raw message