Then we made a change to the servlet to ask it to return “/servoy-webclient” when redirecting. This time the url looks right and the login page showed up but other problems came: it cannot find the javascript files needed by servoy because all of them just have a relative path to /webapps/ROOT. If we launch solutions directly then those javascript files will be found in “/servoy-webclient/resources/…”; if redirecting then it went to “/host/resources/…” to look for them and broken. There are other resources referred in servoy using absolution path and they don’t have problem.
jcompagner:
dont do the redirect like that on the server (requestdispatch)
Just redirect through the client. So send a http redirect so that the browser does the redirect for you
Unfortunately there’s a problem with sending a redirect back to the client. If a 302 or 303 redirect code is sent the second request will be made as a GET request which won’t always work (it won’t work in the case where the parameters being passed in exceed the maximum URL length). The only way I’m aware of to redirect and keep it as a POST is to use a 307 redirect code. The problem here is the HTTP spec says:
If the 307 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
This means the user will be prompted before redirecting which makes it a bad user experience.
if you just redirect like what you do then wicket things that all request are coming from that location
so it will generate a relative urls to the link you specify so then all the links should work through that.
so if wicket gets
/yyy/xxxx
then al the urls will be generated with a relative path so it will be
/yyy/WICKETSTUFF
this works this way because of proxies so that real proxies like apache are working correctly.
if you want to have your own url then you have to map your own servlet/filter after /servoy-webclient/
so something like
then i dont know what really happens under water
i would expect that that would have worked.
But somehow the request doesnt have the right stuff that wicket can work with.