users@glassfish.java.net

Virtual Server 'redirect_1' param removing '?' from redirected links

From: <glassfish_at_javadesktop.org>
Date: Mon, 27 Jul 2009 23:59:18 PDT

This is a little strange: Let's say I have a URL in the form of

https://localhost:8181/boas/def?p1=z&p2=y.

Now, I want that URL to redirect to https://localhost:8181/v_tester/def?p1=z&p2=y

Now, I just need Glassfish to redirect everything in /boas/ to /v_tester/. Unfortunately, that doesn't work as expected. Instead of getting

https://localhost:8181/v_tester/def?p1=z&p2=y

I get

https://localhost:8181/v_tester/defp1=z&p2=y

Note the missing question mark after the 'def'... Does anyone know why? And if so, what can I do about it? I'm using Glassfish V2 UR2 on Ubuntu 9.04, running Sun Java build 1.5.0_18-b02

The redirect param I'm using looks like:

<property name="redirect_1" value="from=/boas/ url-prefix=/v_tester/"/>

This has been placed in the default 'server' VS.

Also, looking in the logs, I'm getting an warning llike:

[#|2009-07-28T00:10:59.992+1200|WARNING|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8181-4;/v_tester/defp1=RFI&p2=FR;_RequestID=afeb0eb2-37b4-4a07-9bb0-81d0a6d723be;|WEB0144: Invalid redirect URL [/v_tester/defp1=RFI&sf=FR]: Impossible to URL encode|#]

I'm not sure what that's trying to tell me, but I assume it shouldn't be appearing.

Also, I've discovered that I can't do something like

<property name="redirect_1" value="from=/a/ url-prefix=/b/a"/>

It just seems to endlessly replace the new 'a'... I'm not sure if that's intentional or not?

Anyway, let me know if I'm doing something wrong, or if I should file a bug report for this.

Oh, and for reference, I'm doing this because I'm trying to implement a site that looks and feels extremely similar to an existing one. Why? Because I need to be able to test an HTML Screen Scraper I'm writing for it, and they don't have a test site. They ONLY have a production site. Doh. Believe me, if there was a better alternative I would not be doing this. However, there is not, and I'm stuck doing things this way. Sad, but that's the real world for you.

Thanks,

- Andrew Thorburn
[Message sent by forum member 'ipsi' (ipsi)]

http://forums.java.net/jive/thread.jspa?messageID=357830