Jump to content
Sign in to follow this  
carcleo

Problemas com diretórios

Recommended Posts

carcleo

Estou usando Eclipse Luna.

Tenho seguinte jsp com 3 div's no body e 3 includes a jsp's dentro desses includes.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link type="text/css" rel="stylesheet" href="_global/_css/estiloSite.css" />
<title>Igreja Metodista Wesleyana São Gotardo</title>
</head>
<body>

<div id="topo"> <jsp:include page="topo.jsp" /> </div>
<div id="meio"> <jsp:include page="indexConteudo.jsp" /> </div>
<div id="base"> <jsp:include page="base.jsp" /> </div>

</body>
</html>
Fiz assim e funcionarm os includes:
<%@ include file="/topo.jsp" %>
<%@ include file="indexConteudo.jsp" %>
<%@ include file="/base.jsp" %>
Precisei criar uma pasta

_global

para colocar os arquivos

topo.jsp e base.jsp

Então começou o problema

Depois fiz os includes dos 3 jeitos abaixo e não funcionou nenhum

<%@ include file="_global/topo.jsp" %>
<%@ include file="indexConteudo.jsp" %>
<%@ include file="_global/base.jsp" %>

<%@ include file="/_global/topo.jsp" %>
<%@ include file="indexConteudo.jsp" %>
<%@ include file="/_global/base.jsp" %>

<jsp:include page="_global/topo.jsp" />
<jsp:include page="indexConteudo.jsp" />
<jsp:include page="_global/base.jsp" />
Apenas o

indexConteudo.jsp

que esta na mesma pasta que

index.jsp

inclui corretamente

Onde esta o erro?

Share this post


Link to post
Share on other sites
carcleo

Podem Esquecer,

Coisa do Eclipse.

Agora deu certo! Vai entender!

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
   pageEncoding="ISO-8859-1"%>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link type="text/css" rel="stylesheet" href="_global/_css/estiloSite.css" />
<title>Igreja Metodista Wesleyana São Gotardo</title>
</head>
<body>

<div id="topo"> <jsp:include page="_global/topo.jsp" /> </div>
<div id="meio"> <jsp:include page="indexConteudo.jsp" /> </div>
<div id="base"> <jsp:include page="_global/base.jsp" /> </div>

</body>
</html>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.