Re: checkLogon issue, and ActionError substitution problem...
Aha ... that's because the "app.tld" for this attribute declares that it does not accept runtime expressions. You can go ahead and change that on your copy (it's in the WEB-INF directory of the Struts example declaration) if you want -- this will be fixed in the final 1.0 release. Craig On Mon, 11 Jun 2001, Ryan Cornia wrote: > Craig - > > I had tried it as a runtime expression (and just tried it again) - > > > 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=Login Error: {0} > > 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 - > > " > > > > You need to use a runtime expression instead: > > > ^ > | > | > > > 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 > > > >
Re: checkLogon issue, and ActionError substitution problem...
Do you have an import for the Constants class at the top of your JSP page? -- Martin Cooper At 10:01 AM 6/11/01, Ryan Cornia wrote: >Craig - > >I had tried it as a runtime expression (and just tried it again) - > > >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=Login Error: {0} > >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 - > > " > > > >You need to use a runtime expression instead: > > > ^ > | > | > > > 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
Re: checkLogon issue, and ActionError substitution problem...
Craig - I had tried it as a runtime expression (and just tried it again) - 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=Login Error: {0} 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 - > " > You need to use a runtime expression instead: ^ | | > 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
Re: checkLogon issue, and ActionError substitution problem...
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 - > " > You need to use a runtime expression instead: ^ | | > 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
checkLogon issue, and ActionError substitution problem...
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 - " 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. Thanks, Ryan "Newbie" Ryan Cornia Programmer Analyst Department of Community and Economic Development State of Utah