Utilização de <xmlns:jsp="http://java.sun.com/JSP/Page>">

2 respostas
marcelohonsa

E ai Pessoal…

Estou com uma dificuldade aqui…

Seguinte, quando utilizo JSF 1.2, e declaro a seguinte diretiva : xmlns:jsp="http://java.sun.com/JSP/Page no início da página, qual arquivo .jar eu tenho que ter em WEB-INF/lib, para que ela possa funcionar corretamente??

Segue um exemplo de página com esta utilização, mas que as tags referente a libary citada, não funciona…

<?xml version="1.0" encoding="iso-8859-1"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" 
          xmlns:f="http://java.sun.com/jsf/core" 
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:t="http://myfaces.apache.org/tomahawk"> 
<jsp:text>
<html>
<head>
<title>.:: DATASHEARCH ::.</title>
<link href="../scripts/data.css" rel="stylesheet" type="text/css"></link>
<script type="text/javascript" src="../scripts/scripts.js"></script>
<script type="text/javascript" src="../scripts/calendar1.js"></script>
<script type="text/javascript" src="../scripts/calculatorTigra.js"></script>
</head>
<body>
<table width="722" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
	<jsp:directive.include file="topo.jsp"/>  
</table>
<table width="722" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td background="../img/barrameuback.gif"><img src="../img/nada.gif" width="10" height="23"></img>
</td>
  </tr>
</table>
<table width="722" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td background="../img/fundoback.jpg"><table width="722" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top"><table width="702" border="0" cellspacing="0" cellpadding="0" valign="top">
            <tr>
              <td width="100%" align="left" valign="top">  
                          
              <table width="100%" height="100%" align="center" valign="top">
              <tr>
              	<td width="180" align="left" valign="top">
					<!-- CARREGA O MENU DO ADMINISTRADOR  -->
					<jsp:directive.include file="menuAdministrador.jsp"/>  
            	</td>       	
              	<td width="522" align="left" valign="top">
              	<!-- CORPO DOS FORMULÁRIOS -->     	              	              	              	              	              	              	
              	</td>              	
              </tr>
              </table>
  			     		      				              
              </td>
            </tr>
          </table>
          </td>
          <td width="10"><img src="../img/nada.gif" width="10" height="260"></img></td>
        </tr>
      </table>      
      </td>
  </tr>
</table>

<table width="722" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>    
    <img src="../img/rodape.gif" width="722" height="69" border="0" usemap="#Map"></img>
    </td>
  </tr>
</table>
		<!-- CARREGA OS MAPEAMENTOS INFERIORES  -->
		<jsp:directive.include file="../commons/mapeamentoBotton.jsp"/>  		
</body>
</html>
</jsp:text> 
</jsp:root>

Agradeço quem puder ajudar…

2 Respostas

bebad

truta
que jsp mais esquisito cara ???
pq vc poe argumentos que são inúteis.

recomendo vc estudar um pouco sobre scriptless e tags.

mas pra te adiantar ai vai um codigo de scriptless que funciona e com uns comentarios…
boa sorte.

<jsp:root version="1.2" 
        xmlns:jsp="http://java.sun.com/JSP/Page" 
        xmlns:nomeDaTAG="urn:jsptld:http://minhatag.net">
  <jsp:directive.page contentType="text/html; charset=UTF-8" />
  <!-- aqui faz imports de classes a serem usadas -->
  <jsp:directive.page import="org.teste.sample.*" />
  
  <!-- aqui vc faz includes -->
  <jsp:include page="inc/teste.jsp" flush="true" />

  <!-- aqui vc poe codigos java que queira usar na classe -->
  <jsp:scriptlet>

</jsp:scriptlet>

  <jsp:include page="inc/teste.jsp" flush="true" />

</jsp:root>
marcelohonsa

Resolvido problema de outra forma…

bebad, não sei sobre qual argumento inútil você está falando?
Acho que só coloquei aquilo que realmente precisava…

segue um código que estou utilizando :

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
<head>
<title>.:: DATASHEARCH ::.</title>
<link href="../scripts/data.css" rel="stylesheet" type="text/css"></link>
<script type="text/javascript" src="../scripts/scripts.js"></script>
<script type="text/javascript" src="../scripts/calendar1.js"></script>
<script type="text/javascript" src="../scripts/calculatorTigra.js"></script>
</head>
<body>

	<ui:include src="../administracao/topo.jsp">	
	</ui:include>
	
<table width="722" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
  <tr>
    <td background="../img/barrameuback.gif"><img src="../img/nada.gif" width="10" height="23"></img>
</td>
  </tr>
  </tbody>
</table>
<table width="722" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
  <tr>
    <td background="../img/fundoback.jpg"><table width="722" border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
          <td valign="top"><table width="702" border="0" cellspacing="0" cellpadding="0" valign="top">
          <tbody>
            <tr>
              <td width="100%" align="left" valign="top">  
                          
              <table width="100%" height="100%" align="center" valign="top">
              <tbody>
              <tr>
              	<td width="180" align="left" valign="top">
					<!-- CARREGA O MENU DO ADMINISTRADOR  -->
						<ui:include src="../administracao/menuAdministrador.jsp">	
						</ui:include>					
            	</td>       	
              	<td width="522" align="left" valign="top">	 
              	<ui:insert name="body">
              	<!-- CORPO DOS FORMULÁRIOS -->     
				</ui:insert>              	             	              	              	              	              	              	
              	</td>              	
              </tr>
              </tbody>
              </table>
  			     		      				              
              </td>
            </tr>
            </tbody>
          </table>
          </td>
          <td width="10"><img src="../img/nada.gif" width="10" height="260"></img></td>
        </tr>
        </tbody>
      </table>      
      </td>
  </tr>
  </tbody>
</table>

<table width="722" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
  <tr>
    <td>    
    <img src="../img/rodape.gif" width="722" height="69" border="0" usemap="#Map"></img>
    </td>
  </tr>
  </tbody>
</table>
		<!-- CARREGA OS MAPEAMENTOS INFERIORES  -->
					<ui:include src="../commons/mapeamentoBotton.jsp">	
					</ui:include>		

</body>	


</html>
Criado 2 de março de 2007
Ultima resposta 5 de mar. de 2007
Respostas 2
Participantes 2