beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremiah Johnson" <>
Subject RE: curious behavior with href that contains a %
Date Wed, 12 Jul 2006 17:21:33 GMT
I see now that my example was pretty opaque - sorry about that.  The
short answer to my own question is that I am misusing the anchor tag.
To get the results that I was expecting, I need to move the stuff that I
consider parameters to the real parameter tag:

  <p><netui:anchor href="">
    <netui:parameter name="" value="${reserved}"/>
    <netui:label value="${reserved}" />
  <p><netui:label value="${encoded}" /></p>

In my real case, I was building a link to another machine that included
both a machine name and some parameters; by putting all of that into the
href, I was getting the 'mixed' results.  I need to put just the path
part into href and the parameters into the parameter tag and all will be

Thank you.

- jeremiah
> -----Original Message-----
> From: Jeremiah Johnson
> Sent: Wednesday, July 12, 2006 12:26 AM
> To:
> Subject: curious behavior with href that contains a %
> My observation is that href in netui:anchor and at least one of the
> netui-data tags is specifically 'encoding' the % if it appears.  It
> seems to me that either the value in href should be fully encoded or
> % should be left as is.
> Here is an attempt at a simplified example:
> --- clip from
> 	@Jpf.Action(forwards = { @Jpf.Forward(name = "success", path =
> "index.jsp") })
> 	protected Forward begin() {
> 		getRequest().setAttribute("reserved",
> comma,");
> 		getRequest().setAttribute("encoded",
> n:at@and&doller$comma,"));
> 		return new Forward("success");
> 	}
> ---
> I take that reserved stuff and put that in a netui:label and
> netui:anchor and see that it is altered in the netui:anchor.
> --- clip from index.jsp
> <netui:body>
> 	<p><netui:anchor href="${reserved}">
> 		<netui:label value="${reserved}" />
> 	</netui:anchor></p>
> 	<p><netui:label value="${encoded}" /></p>
> </netui:body>
> ---
> So the value of href in the page rendered to the browser is
> uestion?colon:at@and&doller$comma,
> I expected either the same result as what is in one of the labels, but
> only the % is changed.  Is this a bug or am I doing something wrong or
> have incorrect expectations?
> Thank you.
> - jeremiah
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

View raw message