The Artima Developer Community
Sponsored Link

Java Answers Forum
window.location.href= Question

2 replies on 1 page. Most recent reply: Sep 17, 2003 11:19 AM by Sergiy Kamenyev

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Sergiy Kamenyev

Posts: 2
Nickname: skaa
Registered: Sep, 2003

window.location.href= Question Posted: Sep 17, 2003 7:55 AM
Reply to this message Reply
Advertisement
Is there in JAVA something like it is in JAVASCRIPT:

window.location.href='http://www.vemix.com'

? I need to change location at the beginning of my JSP.
Thank you


gratiartis

Posts: 8
Nickname: gratiartis
Registered: Sep, 2003

Re: window.location.href= Question Posted: Sep 17, 2003 9:30 AM
Reply to this message Reply
It looks as though you need to use either response.sendRedirect() or <jsp:forward>.

Using <jsp:forward> you will be passing all your HTTP parameters on to the new page, whereas response.sendRedirect() does not.

So <jsp:forward> may be more useful if you are passing the user on to another page within your application for additional processing. response.sendRedirect() is more appropriate if you are sending the user to an external site.

Sergiy Kamenyev

Posts: 2
Nickname: skaa
Registered: Sep, 2003

Re: window.location.href= Question Posted: Sep 17, 2003 11:19 AM
Reply to this message Reply
Thank you!
I found about sendRedirect() in the Help but know nothing about <jsp:forward>. I will try.

Flat View: This topic has 2 replies on 1 page
Topic: major HELP needed for program Previous Topic   Next Topic Topic: problems with JTable

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use