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.
The moose likes Servlets and the fly likes javascript in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "javascript in jsp" Watch "javascript in jsp" New topic

javascript in jsp

Pradeep Baisani

Joined: May 23, 2001
Posts: 2
I am trying to open a new page in jsp using response.sendRedirect('url')
As, the url should be opened in a diffrent browser, in jsp I have used some javascript which takes the url and opens in a new browser. But, response.sendRedirect("javascript:windowOpen('url');") is showing an error page.
Would some one suggest me how to open a new page in a new window from jsp.
Mark Simms
Ranch Hand

Joined: Jul 20, 2000
Posts: 36
The Javascript only acts if placed within the CALLED url.
url = url+"#popup; // indicate a pop-up (new) window is needed
In the CALLED JSP, make sure this code is present:
if (window.location.hash=="#popup")

I agree. Here's the link:
subject: javascript in jsp
It's not a secret anymore!