Author: jleroux
Date: Wed Oct 23 11:28:31 2013
New Revision: 1534989
URL:
http://svn.apache.org/r1534989Log:
An enhanced patch from Shi Jinghai <<Change GROOVY_SUPPORT position in .classpath to remove "The method getContextPath() is undefined for the type ServletContext" message in Eclipse.>>
https://issues.apache.org/jira/browse/OFBIZ-5369While editing some java files with "request.getSession().getServletContext().getContextPath()" in Eclipse, an error message appears:
"The method getContextPath() is undefined for the type ServletContext".
This error message can be removed by changing GROOVY_SUPPORT position to be after servlet jar in .classpath
jleroux: I needed to also remove the now useless warning message I put in ControlServlet.java
Modified:
ofbiz/trunk/.classpath
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
Modified: ofbiz/trunk/.classpath
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/.classpath?rev=1534989&r1=1534988&r2=1534989&view=diff==============================================================================
--- ofbiz/trunk/.classpath (original)
+++ ofbiz/trunk/.classpath Wed Oct 23 11:28:31 2013
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="applications/content/lib/fontbox-1.7.1.jar"/>
<classpathentry kind="lib" path="applications/content/lib/jempbox-1.7.1.jar"/>
@@ -207,6 +206,7 @@
<classpathentry kind="src" path="specialpurpose/projectmgr/src"/>
<classpathentry kind="src" path="specialpurpose/webpos/src"/>
<classpathentry kind="src" path="specialpurpose/lucene/src"/>
+ <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?rev=1534989&r1=1534988&r2=1534989&view=diff==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Wed Oct 23 11:28:31 2013
@@ -72,7 +72,6 @@ public class ControlServlet extends Http
super.init(config);
if (Debug.infoOn()) {
ServletContext servletContext = config.getServletContext();
- //@SuppressWarnings("cast") You can neglect Eclipse saying "The method getContextPath() is undefined for the type ServletContext"
Debug.logInfo("LOADING WEBAPP [" + servletContext.getContextPath().substring(1) + "] "
+ servletContext.getServletContextName()
+ ", located at " + servletContext.getRealPath("/"), module);