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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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.