Craig -
I had tried it as a runtime expression (and just tried it again) -
<app:checkLogon name="<%= Constants.STAFF_LOGIN_KEY %>" />
but get the same result?!? If I put a system.out.println in the doEndTag of
checkLogon, it prints name = "<%= Constants.STAFF_LOGIN_KEY %>".
This is with Tomcat 3.2 if that matters.
—
On the other problem, in the resource file I have -
error.login=<li><b>Login Error: {0}</b></li>
Is that the correct syntax?
Thanks,
Ryan
>>> [EMAIL PROTECTED] 06/11/01 10:38AM >>>
On Mon, 11 Jun 2001, Ryan Cornia wrote:
> I'm trying to figure out how to pass a constant name/page to the example checkLogon
>tag. I created a Constants class, with -
> public final static String STAFF_LOGIN_KEY = "test:staffloggedin";
>
> in my jsp I put -
> <app:checkLogon name="<% Contants.STAFF_LOGIN_KEY %>" />"
>
You need to use a runtime expression instead:
<app:checkLogon name="<%= Constants.STAFF_LOGIN_KEY %>" />
^
|
|
> The issue is that it sets name in the checkLogon tag to the string " <%
>Contants.STAFF_LOGIN_KEY %>" not the value of that scriptlet ("stafflogon.jsp"). Any
>ideas?
>
> Also, I am trying to do substitution on an action error with the following -
>
> errors.add(ActionErrors.GLOBAL_ERROR,
> new ActionError("error.login", "test"));
>
> When this runs, the error message is -
> "Login Error: [Ljava.lang.Object;@158bf9 "
>
> Instead of
> "Login Error: test"
>
> This is with Struts 1.0B3.
>
What does the message format string named "error.login" look like?
> Thanks,
> Ryan "Newbie"
>
> Ryan Cornia
> Programmer Analyst
> Department of Community and Economic Development
> State of Utah
>
>
Craig McClanahan