Hi all, forgive the strange question, let me explain better. Sometimes in a client application I have to collect information (for log purposes) about a web application. Let's say I have a String like "http://mysite/mypage.jsp?var1=5&var2=1" Now I want to extract the URI information as well as variables from the client side. Let's say I'm not on the serverside staff so I cannot have my servlet pass this information in any way. If I'm in a web context it's easy...just query the request object. But what about if I'm not inside a Servlet ? can I build a HttpRequest object for the sole purpose of working on a URL, and extracting this info ?? or my only chance is to substring() the String ? (which, I admit, I hate it!) Thanks a lot Francesco
You can't access the HTTP Session clientside as it is maintained purely on the server. Only the session ID is sent to the client, either as part of the URL or as a cookie. So you'll have to examine the HTTP headers and URL String and hope those contain the info you want.