You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by sudhi <su...@insage.com> on 2000/07/07 20:53:18 UTC
Problem in response tag library
Hi,
I was trying to encode the URL using response taglib.
But I was not able to do it, b'cos my xsp:page wont compile.
This is what my xml snippet looks like.
---------------------------
<LINK>
<response:encode-url url="manage.xml"/>
</LINK>
----------------------------
This is what the error I get.
----------------------------
java.lang.Exception: XSP Java Compiler: Compilation failed for
_index.java
394: Method encodeURL(java.lang.String) not found in
interface javax.servlet.http.HttpServletResponse.
response.encodeURL(
^
1 error
------------------------------
It should be response.encodeUrl right ?
Another one is encode-redirect-url,
------------------------------
<xsl:template match="response:encode-redirect-url">
<xsl:variable name="url">
<xsl:choose>
<xsl:when test="@url">"<xsl:value-of select="@url"/>"</xsl:when>
<xsl:when test="url">
<xsl:call-template name="get-nested-content">
<xsl:with-param name="content" select="url"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="as">
<xsl:call-template name="value-for-as">
<xsl:with-param name="default" select="'string'"/>
</xsl:call-template>
</xsl:variable>
<xsp:expr>
<xsl:choose>
<xsl:when test="$as = 'node'">
XSPResponseLibrary.encodeRedirectURL(
response,
String.valueOf(<xsl:copy-of select="$url"/>),
document
)
</xsl:when>
<xsl:when test="$as = 'string'">
response.encodeRedirectURL(
String.valueOf(<xsl:copy-of select="$url"/>),
<======================= extra ","
)
</xsl:when>
</xsl:choose>
</xsp:expr>
</xsl:template>
------------------------------
Let me know if I am doing something wrong.
I am using Cocoon 1.7.4
Jserv 1.1
Apache 1.3.12
Thanks
Sudhi
Problem in response tag library
Posted by sudhi <su...@insage.com>.
Hi,
I posted this one on July 7th. But nothing happened.
Today I took a dev snapshot of cocoon-1.8, this problem still exists.
Can somebody correct this ?
TIA
Sudhi
sudhi wrote:
>
> Hi,
> I was trying to encode the URL using response taglib.
> But I was not able to do it, b'cos my xsp:page wont compile.
> This is what my xml snippet looks like.
> ---------------------------
> <LINK>
> <response:encode-url url="manage.xml"/>
> </LINK>
> ----------------------------
> This is what the error I get.
> ----------------------------
> java.lang.Exception: XSP Java Compiler: Compilation failed for
> _index.java
> 394: Method encodeURL(java.lang.String) not found in
> interface javax.servlet.http.HttpServletResponse.
> response.encodeURL(
>
> ^
> 1 error
> ------------------------------
>
> It should be response.encodeUrl right ?
>
> Another one is encode-redirect-url,
>
> ------------------------------
> <xsl:template match="response:encode-redirect-url">
> <xsl:variable name="url">
> <xsl:choose>
> <xsl:when test="@url">"<xsl:value-of select="@url"/>"</xsl:when>
> <xsl:when test="url">
> <xsl:call-template name="get-nested-content">
> <xsl:with-param name="content" select="url"/>
> </xsl:call-template>
> </xsl:when>
> </xsl:choose>
> </xsl:variable>
>
> <xsl:variable name="as">
> <xsl:call-template name="value-for-as">
> <xsl:with-param name="default" select="'string'"/>
> </xsl:call-template>
> </xsl:variable>
>
> <xsp:expr>
> <xsl:choose>
> <xsl:when test="$as = 'node'">
> XSPResponseLibrary.encodeRedirectURL(
> response,
> String.valueOf(<xsl:copy-of select="$url"/>),
> document
> )
> </xsl:when>
> <xsl:when test="$as = 'string'">
> response.encodeRedirectURL(
> String.valueOf(<xsl:copy-of select="$url"/>),
> <======================= extra ","
> )
> </xsl:when>
> </xsl:choose>
> </xsp:expr>
> </xsl:template>
>
> ------------------------------
>
> Let me know if I am doing something wrong.
> I am using Cocoon 1.7.4
> Jserv 1.1
> Apache 1.3.12
>
> Thanks
> Sudhi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org