cancel
Showing results for 
Search instead for 
Did you mean: 

URI in java-backed WebScript

lemmy
Champ in-the-making
Champ in-the-making
Hi,

I need to access the URI in the browser within my java-backed web script (uri of the requested site, not uri of web-script). In the webscript I have the variables WebScriptRequest req and WebScriptResponse res.
I can see the correct uri in the debugger in req.context.renderContext.uri.  Unfortunately I can't easily find the correct getters.

Is there any way to get the uri in the webscript?

Regards,
Lemmy
1 REPLY 1

lemmy
Champ in-the-making
Champ in-the-making
Got it:

import org.springframework.extensions.surf.RequestContext;

RequestContext context = ThreadLocalRequestContext.getRequestContext();
String uri = context.getUri();