I have written a controller to redirect to the specified page. While redirecting to the page it is showing the given URL in the browser and then only it is redirecting. How to prevent it to not to show the URL. Any one kindly help me
The code is
render :update do |page|
page.redirect_to "/jasperserver/j_spring_security_check?j_username=#{username}&j_password=#{password}"
end
Not sure I get it. Why are you using
render :updateto begin with? Why not justredirect_tothe URL you want?Beyond that, though, I was concerned by the username & password in the querystring. Maybe this is just meant as an example…but if not, you might consider some sort of encryption.
And also escaping any odd characters in the username or password might be a good idea.
I wouldn’t have posted an answer, since I don’t understand the need for render :update, but the other stuff seemed worth pointing out.