You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Greg Lappen (JIRA)" <ta...@jakarta.apache.org> on 2005/04/18 20:23:44 UTC
[jira] Created: (TAPESTRY-300) Bug in external jsp tag
Bug in external jsp tag
-----------------------
Key: TAPESTRY-300
URL: http://issues.apache.org/jira/browse/TAPESTRY-300
Project: Tapestry
Type: Bug
Components: Web
Versions: 3.0, 3.0.3
Reporter: Greg Lappen
I am using Tapestry for some new pages in my admin section. I have other pages that are jsps that I want to have contain links to Tapestry pages. I used the "page" tag and it worked great. I need to pass a service parameter to one page so I tried using the external tag and made my page implement IExternalPage. To pass the parameter, which is an object ID, as an int and not a string, I tried using the "parameters" parameter in the external tag like this:
<tapestry:external page="AdViewer" parameters="ognl:getAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
This gave me the following error:
javax.servlet.jsp.JspException: Unable to evaluate OGNL expression 'etAttribute("nlAd").id': Unable to read expression '<parsed expression>' of org.apache.jasper.runtime.PageContextImpl@a5fd35.
at org.apache.tapestry.jsp.AbstractTapestryTag.evaluateExpression(AbstractTapestryTag.java:156)
at org.apache.tapestry.jsp.AbstractTapestryTag.convertExpression(AbstractTapestryTag.java:135)
at org.apache.tapestry.jsp.AbstractTapestryTag.convertParameters(AbstractTapestryTag.java:127)
at org.apache.tapestry.jsp.AbstractTapestryTag.constructExternalServiceParameters(AbstractTapestryTag.java:81)
at org.apache.tapestry.jsp.ExternalTag.getURLRetriever(ExternalTag.java:38)
at org.apache.tapestry.jsp.AbstractLinkTag.doStartTag(AbstractLinkTag.java:105)
Notice the ognl expression in the error message is missing the 'g' in the beginning. When I added an extra character like this:
<tapestry:external page="AdViewer" parameters="ognl:ggetAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
it worked. The tag is stripping the ognl: off the expression improperly, losing the first character. I tested with 3.0.3 also (it was high time I upgraded!) and it still did the same thing.
Greg
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
[jira] Resolved: (TAPESTRY-300) Bug in external jsp tag
Posted by "Brian K. Wallace (JIRA)" <ta...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/TAPESTRY-300?page=all ]
Brian K. Wallace resolved TAPESTRY-300:
---------------------------------------
Resolution: Fixed
Applied patch to take into account the colon in the constant for OGNL_EXPRESSION_PREFIX.
> Bug in external jsp tag
> -----------------------
>
> Key: TAPESTRY-300
> URL: http://issues.apache.org/jira/browse/TAPESTRY-300
> Project: Tapestry
> Type: Bug
> Components: Web
> Versions: 3.0.3, 3.0
> Reporter: Greg Lappen
> Assignee: Brian K. Wallace
> Fix For: 3.0.5
> Attachments: TAPESTRY-300-branch-3.0.patch
>
> I am using Tapestry for some new pages in my admin section. I have other pages that are jsps that I want to have contain links to Tapestry pages. I used the "page" tag and it worked great. I need to pass a service parameter to one page so I tried using the external tag and made my page implement IExternalPage. To pass the parameter, which is an object ID, as an int and not a string, I tried using the "parameters" parameter in the external tag like this:
> <tapestry:external page="AdViewer" parameters="ognl:getAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
> This gave me the following error:
> javax.servlet.jsp.JspException: Unable to evaluate OGNL expression 'etAttribute("nlAd").id': Unable to read expression '<parsed expression>' of org.apache.jasper.runtime.PageContextImpl@a5fd35.
> at org.apache.tapestry.jsp.AbstractTapestryTag.evaluateExpression(AbstractTapestryTag.java:156)
> at org.apache.tapestry.jsp.AbstractTapestryTag.convertExpression(AbstractTapestryTag.java:135)
> at org.apache.tapestry.jsp.AbstractTapestryTag.convertParameters(AbstractTapestryTag.java:127)
> at org.apache.tapestry.jsp.AbstractTapestryTag.constructExternalServiceParameters(AbstractTapestryTag.java:81)
> at org.apache.tapestry.jsp.ExternalTag.getURLRetriever(ExternalTag.java:38)
> at org.apache.tapestry.jsp.AbstractLinkTag.doStartTag(AbstractLinkTag.java:105)
> Notice the ognl expression in the error message is missing the 'g' in the beginning. When I added an extra character like this:
> <tapestry:external page="AdViewer" parameters="ognl:ggetAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
> it worked. The tag is stripping the ognl: off the expression improperly, losing the first character. I tested with 3.0.3 also (it was high time I upgraded!) and it still did the same thing.
> Greg
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
[jira] Updated: (TAPESTRY-300) Bug in external jsp tag
Posted by "Brian K. Wallace (JIRA)" <ta...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/TAPESTRY-300?page=all ]
Brian K. Wallace updated TAPESTRY-300:
--------------------------------------
Attachment: TAPESTRY-300-branch-3.0.patch
Problem in this substring:
String expression =
_parameters.substring(TemplateParser.OGNL_EXPRESSION_PREFIX.length() + 1);
OGNL_EXPRESSION_PREFIX is "ognl:" (note the colon), not "ognl" (minus the colon) so adding 1 takes the substring into the expression one character.
Fix removes the "+ 1"
> Bug in external jsp tag
> -----------------------
>
> Key: TAPESTRY-300
> URL: http://issues.apache.org/jira/browse/TAPESTRY-300
> Project: Tapestry
> Type: Bug
> Components: Web
> Versions: 3.0.3, 3.0
> Reporter: Greg Lappen
> Attachments: TAPESTRY-300-branch-3.0.patch
>
> I am using Tapestry for some new pages in my admin section. I have other pages that are jsps that I want to have contain links to Tapestry pages. I used the "page" tag and it worked great. I need to pass a service parameter to one page so I tried using the external tag and made my page implement IExternalPage. To pass the parameter, which is an object ID, as an int and not a string, I tried using the "parameters" parameter in the external tag like this:
> <tapestry:external page="AdViewer" parameters="ognl:getAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
> This gave me the following error:
> javax.servlet.jsp.JspException: Unable to evaluate OGNL expression 'etAttribute("nlAd").id': Unable to read expression '<parsed expression>' of org.apache.jasper.runtime.PageContextImpl@a5fd35.
> at org.apache.tapestry.jsp.AbstractTapestryTag.evaluateExpression(AbstractTapestryTag.java:156)
> at org.apache.tapestry.jsp.AbstractTapestryTag.convertExpression(AbstractTapestryTag.java:135)
> at org.apache.tapestry.jsp.AbstractTapestryTag.convertParameters(AbstractTapestryTag.java:127)
> at org.apache.tapestry.jsp.AbstractTapestryTag.constructExternalServiceParameters(AbstractTapestryTag.java:81)
> at org.apache.tapestry.jsp.ExternalTag.getURLRetriever(ExternalTag.java:38)
> at org.apache.tapestry.jsp.AbstractLinkTag.doStartTag(AbstractLinkTag.java:105)
> Notice the ognl expression in the error message is missing the 'g' in the beginning. When I added an extra character like this:
> <tapestry:external page="AdViewer" parameters="ognl:ggetAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
> it worked. The tag is stripping the ognl: off the expression improperly, losing the first character. I tested with 3.0.3 also (it was high time I upgraded!) and it still did the same thing.
> Greg
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
[jira] Updated: (TAPESTRY-300) Bug in external jsp tag
Posted by "Brian K. Wallace (JIRA)" <ta...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/TAPESTRY-300?page=all ]
Brian K. Wallace updated TAPESTRY-300:
--------------------------------------
Fix Version: 3.0.5
Assign To: Brian K. Wallace
> Bug in external jsp tag
> -----------------------
>
> Key: TAPESTRY-300
> URL: http://issues.apache.org/jira/browse/TAPESTRY-300
> Project: Tapestry
> Type: Bug
> Components: Web
> Versions: 3.0.3, 3.0
> Reporter: Greg Lappen
> Assignee: Brian K. Wallace
> Fix For: 3.0.5
> Attachments: TAPESTRY-300-branch-3.0.patch
>
> I am using Tapestry for some new pages in my admin section. I have other pages that are jsps that I want to have contain links to Tapestry pages. I used the "page" tag and it worked great. I need to pass a service parameter to one page so I tried using the external tag and made my page implement IExternalPage. To pass the parameter, which is an object ID, as an int and not a string, I tried using the "parameters" parameter in the external tag like this:
> <tapestry:external page="AdViewer" parameters="ognl:getAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
> This gave me the following error:
> javax.servlet.jsp.JspException: Unable to evaluate OGNL expression 'etAttribute("nlAd").id': Unable to read expression '<parsed expression>' of org.apache.jasper.runtime.PageContextImpl@a5fd35.
> at org.apache.tapestry.jsp.AbstractTapestryTag.evaluateExpression(AbstractTapestryTag.java:156)
> at org.apache.tapestry.jsp.AbstractTapestryTag.convertExpression(AbstractTapestryTag.java:135)
> at org.apache.tapestry.jsp.AbstractTapestryTag.convertParameters(AbstractTapestryTag.java:127)
> at org.apache.tapestry.jsp.AbstractTapestryTag.constructExternalServiceParameters(AbstractTapestryTag.java:81)
> at org.apache.tapestry.jsp.ExternalTag.getURLRetriever(ExternalTag.java:38)
> at org.apache.tapestry.jsp.AbstractLinkTag.doStartTag(AbstractLinkTag.java:105)
> Notice the ognl expression in the error message is missing the 'g' in the beginning. When I added an extra character like this:
> <tapestry:external page="AdViewer" parameters="ognl:ggetAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
> it worked. The tag is stripping the ognl: off the expression improperly, losing the first character. I tested with 3.0.3 also (it was high time I upgraded!) and it still did the same thing.
> Greg
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org