I have jsp page inside which am calling my xhtml page. Am mapping xhtml to facesServlet and have all resource servlet active so it maps all js and css file fine, if i hit xhtml page.
If I hit jsp page then those files are not referenced firebug pops out all sorts of js errors.
To work around, i added js and css files to web folder and am including and tried them including in xhtml as well as jsp page but those are not referenced and as of now, if i directly hit xhmtl page then file upload works fine but if i go and hit jsp page then end up getting js errors, is there any other way of getting js file included.
Here is how am referencing my js
files
<%@ include file="/common/taglibs.inc" %>
<html>
<head>
<link rel="stylesheet" href="/css/Main.css" type="text/css">
<link rel="stylesheet" href="/css/Admin.css" type="text/css">
<link rel="stylesheet" href="/css/Home.css" type="text/css">
<script type="text/javascript" src="/js/icefaces/ace-jquery.js"/>
<script type="text/javascript" src="/js/icefaces/ace-components.js"/>
<script type="text/javascript" src="/js/icefaces/icepush.js"/>
<script type="text/javascript" src="/js/icefaces/bridge.js"/>
<script type="text/javascript" src="/js/icefaces/compat.js"/>
<script type="text/javascript" src="/js/icefaces/fileEntry.js"/>
<script type="text/javascript" src="/js/icefaces/jsf.js"/>
<script type="text/javascript" src="/js/icefaces/icefaces-compat.js"/>
<!-- BEGIN SCRIPT TO OPEN RIGHT NOW HELP POPUP, THIS SCRIPT INCLUDES THE FUNCTION OPENRN-->
<
%@ include file="/js/popupRightNow.inc" %>
<!-- END SCRIPT TO OPEN RIGHT NOW HELP POPUP, THIS SCRIPT INCLUDES THE FUNCTION OPENRN-->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<jsp:include page="/navigation/TopNav.jsp" flush="true"/>
<jsp:include page="/trade_entry/UploadBlotter.xhtml"/>
<!--BEGIN BOTTOM NAV -->
<jsp:include page="/navigation/BottomNav.jsp" flush="true"/>
<!--END BOTTOM NAV -->
</body>
</html>
Any thoughts, suggestions?
Update:
I have requirement of creating new pages using jsf2
and i have created xhtml
page but i want to get my application header
and footer
themes and those are defined in jsp
now I tried looking for integrating jsp
into xhtml
but it was rightly suggested that one must not do it.
Tried How to include a JSP page in a Facelets page? but that didn't work either as my
tags were not recognized and so finally tried creating jsp
page and included xhtml
page inside it and that seemed to work but not 100%.
So as it stands right now if i hit xhtml
page directly then it works but if i hit jsp
page with header/footer
information then icefaces
or say jsf
stuffs doesn't work 100%, hope am able to clarify what am trying to achieve.
Update 2
js file from javax.faces.resources
are referenced fine on xhtml page but are not referenced on jsp
page.