Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Eclipse problem with variable cannot be resolved (Java problem to resolve include)
Eclipse problem with variable cannot be resolved [message #639881] Thu, 18 November 2010 09:12
No real name is currently offline No real nameFriend
Messages: 1
Registered: November 2010
Junior Member
I'm trying to validate mvnForum with Eclipse. This development environment gives me error undeclared variable, having a number of files one within the other: in a file I have included the use of the variable and in the other I have the variable declaration, so Eclipse give error.
How can I avoid receiving these errors?
Alternatively, what kind of development environment I can use?



I have a file with this code:

<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="net.myvietnam.mvncore.util.ParamUtil" %>

<%@ include file="inc_common.jsp"%>
<%@ include file="inc_doctype.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<mvn:html locale="${currentLocale}">


...



<%@ include file="header.jsp"%>
<br/>

<table width="95%" align="center">


...



<%@ include file="footer.jsp"%>
</mvn:body>
</mvn:html>
</fmt:bundle>



So in inc_common.jsp, i have:

...

String contextPath = request.getContextPath();

...

and in header.jsp i have:

...

<img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/search.gif " alt="<fmt:message key="mvnforum.common.action.search"/>" title="<fmt:message key="mvnforum.common.action.search"/>" hspace="0" vspace="0" border="0" align="bottom"/>

...

where Eclipse see contextPath like an error with this declaration:

"contextPath cannot be resolved to a variable"



Can I set up Eclipse to concatenate files and show him the files included?
Previous Topic:Remote System Explorer
Next Topic:incorrect Debug As->PHP Web Page launch url
Goto Forum:
  


Current Time: Fri Apr 26 03:35:32 GMT 2024

Powered by FUDForum. Page generated in 0.02647 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top