mosho wrote:
Hi Scott,

I  added a unspecified() method in my action class and it works now.
I am not able to understand though how it is working, unspecified() is
called when parameter name doesn;t exist, right?
I have a parameter name= navigation and its value is shown as {submitText}.
But it calls unspecified  method, for that value as it would have done if
value is null. I am assuming it is calling unspecified() because it is not able to find
the key name {submitText}
I hope I read your reply correctly.....

You should NEVER EVER see "{submitText}" when you're stepping through Java, or in the log window, or in an exception stack trace!!! The ONLY place it should appear is in your JSP. In ALL OTHER PLACES, you should see the text that you put in your MessageResources.properties. If you're seeing "{submitText}" verbatim, then your JSP compiler is ignoring EL, or it's not written correctly. For this line in your JSP,

 hiddenField.value = "${submitText}";

Go ahead and request your page in your browser, then go to view source. Scroll down to where this line should appear in the HTML, and make sure it says something like,

 hiddenField.value = "Next";

instead.

Now there might be a workaround... I gave you the EL method because I find it much cleaner than embedding XML-like tags in JavaScript, but the following may also work in your JSP:

hiddenField.value = '<bean:message key="button.next" />';

This might work... I don't LIKE it, because it's an XML (tag library, whatever) tag inside JavaScript inside HTML in a JSP... but oh well. Note the quotes -- the outermost are single quotes, the innermost are double quotes. Double check them even if you copied/pasted them just to get into the habit.

If you were using {submitText} in your post as a placeholder for the actual text that should appear to the browser, my apologies, though I hope you understand what I was getting at :).

If this WAS the case, since you're not using EL, feel free to remove the lines I gave you in an earlier post,

 <c:set var="submitText">
   <bean:message key="button.submit" />
 </c:set>

As you don't need them.

- Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to