Genuis! I did something like this and it works. I've put the code below. I've
spent ages trying to get this to work in Struts without any success since
iand Tapestry does it simply and easily. Tapestry kicks ass!
Many thanks.
Heres the code...
public class Index {
@Inject
@Service("RequestGlobals")
private RequestGlobals requestGlobals;
void onActivate(String id) {
String servletPath =
requestGlobals.getHTTPServletRequest().getServletPath();
String requestedClub = servletPath.substring(1);
int indexOfFirstSlash = requestedClub.indexOf("/");
if(indexOfFirstSlash > -1) {
requestedClub = requestedClub.substring(0,
requestedClub.indexOf("/"));
}
System.out.println("### requestedClub: " + requestedClub);
//now send club to club page...
}
}
--
View this message in context:
http://www.nabble.com/Querying-request-URL-from-within-Tapestry-5-tp25202317p25202854.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]