What do you think about a servlet filter which cuts the anchor part?
Is the character '#' used in URLs for anything other than anchors?

Regards,
Norbi

Ps.: this topic seems to become offtopic because it's not tapestry related. But maybe other developers are interested as well about the best tapestry-based solution for this problem...

andyhot wrote:
When you call cycle.sendRedirect,
can you find at which url the browser is redirected ?

Which container are you using?

Tapestry passes the redirect url to the container's
HttpServletResponse.encodeRedirectURL

Perhaps that's where things get messed up...


Norbert Sándor wrote:
Anyone? Sorry for resending but I have found no solution until now.

Regards,
Norbi

Norbert Sándor wrote:
Hello,

I use the direct service to generate URLs with anchors. An example URL is

    http://localhost:8080/test/Home,$DirectLink.sdirect?sp=0#first

It works as expected as a normal link, but if I use the same URL for
redirection

cycle.sendRedirect("http://localhost:8080/test/Home,$DirectLink.sdirect?sp=0#first";);

I get a NumberFormatException (see below).

What am I doing wrong?

Thanks in advance:
Norbi


java.lang.NumberFormatException
For input string: "0#first"
Stack Trace:

    * java.lang.NumberFormatException.forInputString(Unknown Source)
    * java.lang.Integer.parseInt(Unknown Source)
    * java.lang.Integer.<init>(Unknown Source)
    * 
org.apache.tapestry.util.io.IntegerAdaptor.unsqueeze(IntegerAdaptor.java:55)

    * 
org.apache.tapestry.util.io.DataSqueezerImpl.unsqueeze(DataSqueezerImpl.java:181)

    * $DataSqueezer_10df945b052.unsqueeze($DataSqueezer_10df945b052.java)

    * 
org.apache.tapestry.data.NullDataSqueezerFilter.unsqueeze(NullDataSqueezerFilter.java:40)

    * 
org.apache.tapestry.data.AbstractDataSqueezerFilter.unsqueeze(AbstractDataSqueezerFilter.java:55)

    * $DataSqueezer_10df945b056.unsqueeze($DataSqueezer_10df945b056.java)

    * $DataSqueezer_10df945afed.unsqueeze($DataSqueezer_10df945afed.java)

    * 
org.apache.tapestry.services.impl.LinkFactoryImpl.extractListenerParameters(LinkFactoryImpl.java:183)

    * 
$LinkFactory_10df945afef.extractListenerParameters($LinkFactory_10df945afef.java)

    * org.apache.tapestry.engine.DirectService.service(DirectService.java:144)
    * ...


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

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.9/458 - Release Date: 2006.09.27.

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




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

Reply via email to