|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Aug 2006
Città: Trieste
Messaggi: 5553
|
[JSF - JSP]
Salve a tutti. Ho configurato una webapp e non riesco a fare includere nella pagina home.jspx la pagina top_frame.jspx
home.jspx Codice:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" version="2.0">
<jsp:directive.page language="java"
contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
<jsp:text>
<![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]>
</jsp:text>
<jsp:text>
<![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>
</jsp:text>
<f:view>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="#{facesContext.externalContext.requestContextPath}/pages/css/basestyle.css" rel="styleSheet" type="text/css"/>
<f:loadBundle basename="LocalizationResources" var="msg"/>
</head>
<body>
<jsp:include page="/pages/frames/top_frame.jspx"/>
</body>
</html>
</f:view>
</jsp:root>
Codice:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" version="2.0">
<f:subview id="top_frame">
<link href="#{facesContext.externalContext.requestContextPath}/pages/css/framestyle.css" rel="styleSheet" type="text/css"/>
<f:verbatim>
codice html
</f:verbatim>
</f:subview>
</jsp:root>
Premetto che prima avevo realizzato la pagina con sintassi html e utilizzando la direttiva <@ include page=""/> mi includeva correttamente la pagina in questione. Secondo questa guida dovrebbe essere corretto http://www.crazysquirrel.com/computi.../includes.jspx Tnx
__________________
You should never let your fears become the boundaries of your dreams. |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Jul 2009
Città: Varès
Messaggi: 658
|
sei sicuro che sia giusto l'uri /pages/frames/top_frame.jspx ?
se fai in terminale Codice:
ls /pages/frames/ |
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Aug 2006
Città: Trieste
Messaggi: 5553
|
Si sono sicuro, e' lo stesso che usavo prima con la direttiva <%@ include file="/pages/frames/top_frame.jsp" %>. Cmq mi aspetterei qualche messaggio di debug se non trova il file.
__________________
You should never let your fears become the boundaries of your dreams. |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Jul 2009
Città: Varès
Messaggi: 658
|
sinceramente continuando a rileggere il tuo codice non riesco a trovare nulla che non vada
se usi le pagine di quel tutorial, senza fare alcuna modifica, funziona tutto ? |
|
|
|
|
|
#5 | |
|
Senior Member
Iscritto dal: Aug 2006
Città: Trieste
Messaggi: 5553
|
Quote:
Volevo chiederti un altra cosa: in datatable utilizzo un managed bean per prendere i dati dal layer di persistenza (realizzato con hibernate e hsql) tramite un metodo findall. Ma nei vari esempi che ho visto di solito si utilizza una lista che viene inizializzata tramite il costruttore e che contiene gli item in questione. Si puo' fare anche con un metodo in modo da passare parametri o e' quello il modo corretto di procedere? tnx
__________________
You should never let your fears become the boundaries of your dreams. |
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 10:28.




















