• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Opening a new JSF/JSP page in a new browser tab

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(Old to Java, new to JSF/JSP)

We have a set of JSF/JSP pages. One is a table of items, which is successfully being displayed in a browser window.
We would like to click on one of the items have a details page open in a new tab without closing the source tab.

We have no problem getting the item ID. We are having a problem opening the related details page in a separate tab within the current browser window (response.sendRedirect and requestDispatcher.forward open over the current window).

We are using JSF/JSP (and Gantt Charts, but not really relevent).
If possible, we do not want new Javascript, only JSF/JSP and backend Java.

We know for HTTP we would use something like:
<A HREF="newwindow.html" TARGET="_blank">a new window</A>

We have tried things like:
<%@ page language="java" %>
<%@ taglib uri="<a href="http://java.sun.com/jsf/html" target="_blank" ...
<%@ taglib uri="<a href="http://java.sun.com/jsf/core" target="_blank" ...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
...

Much time has been spent - I guess we are searching on the wrong keywords. Any help would be appreciated.

Thanks,
John
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Killman wrote:We know for HTTP we would use something like:
<A HREF="newwindow.html" TARGET="_blank">a new window</A>


Do you mean HTML (not HTTP)? And yup, that's the way you do it. Remember that all JSP or JSF does is to format HTML to send to the browser.

We have tried things like:
<%@ page language="java" %>
<%@ taglib uri="<a href="http://java.sun.com/jsf/html" target="_blank" ...
<%@ taglib uri="<a href="http://java.sun.com/jsf/core" target="_blank" ...


What did you think such a taglib declaration would do?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic