This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Rich That's becaue the & is used to separate name value pairs in the query string. so when you ask for the parameter 'refurl' it thinks the end of that parameter is at the &. If 'threadid' is always the next parameter name then you can just use: String thread = request.getParameter("threadid"); to get the value of that parameter. If it is different all the time you can use the getQueryString( ) method of the HttpServletRequest object and then parse it yourself. hope that helps
What I do.. is when the click on a link.. on the top of the page it checks to see if the are login or not.. if they are not.. I want to send them back to the original page... So I get set a variable of the page the are on.. and just pass it only through the login process... So how do I use the URL encode?? <% // This gets the current url String url = ""; String servername = request.getServerName(); int serverport = request.getServerPort(); String uri= request.getRequestURI(); String query = request.getQueryString(); url += "http://"; url += servername; url += ":"; url += serverport; url += uri; url += "?"; url += query; %> a href="forum_login.jsp?refurl=<%= url %>" class="mouseover">Login</a>