Opened 7 years ago

Closed 6 years ago

#254 closed Issue (Fixed)

Ibisph-view does not work with Tomcat 8

Reported by: Paul Leo Owned by: Paul Leo
Priority: +Medium Milestone: 2.3 - Testing
Component: View-App Version: 2.3
Severity: Moderate Effort Keywords: Tomcat

Description (last modified by Garth Braithwaite)

ibisph-view does not work with Tomcat 8 - The issue has to do with the way Tomcat 8 is returning a different ServletContext? object that doesn't support the old way of doing a getRealPath.

Garth has done some reading and has tried a variety of fixes but nothing is working 100% --If Tomcat 8 has cleaned up servlet 3.1 which seems to be the issue, then a new way of dealing with getRealPath has to be found. Garth has made progress and it is working with TC7 and TC8 --but needs some config mods for relative paths. It will be addressed again at some future point.

In the meantine do not attempt to use Tomcat 8 with IBIS

* GARTH: Fixed path codebase. Refactored ContextAndPathService? to better handle relative resource lookups in light of the Tomcat8 / Servlet 3.1 spec cleaning up relative getRealPath lookups. Put in lots of debug logger messages to assist. Have ran TC8 with 2.3 for months without any issues. See core code for path mods.

Change History (4)

comment:1 Changed 6 years ago by Garth Braithwaite

Milestone: Unassigned2.3 - Development
Owner: set to Garth Braithwaite
Priority: Unknown+Medium
Severity: UnknownModerate Effort
Type: DefectIssue
Version: Unknown2.3

SVN #6139 has code and release notes that helps address the issue. The issue appears to be that servlet 3.1 (TC8) tightens the servlet getRealPath when getting files via relative path. The new code seems to work fine for TC 7 and 8 but only if the paths are not of the type "../xxxx". These relative paths will need to be worked on still or the path values will need to be converted to explicit paths.

comment:2 Changed 6 years ago by Garth Braithwaite

Milestone: 2.3 - Development2.3 - Testing
Owner: changed from Garth Braithwaite to Paul

svn #6145 tested with TC8 all relative paths. Appears to be working. To test simply run the app and hit all the main request types to see if they work. If issues turn on debug level logging:

<logger name="org.ibisph.web" level="DEBUG"/>

and look for entries like:

2014-02-13 11:26:42.042 ERROR [localhost-startStop-1] org.ibisph.web.ContextAndPathService?.getRealPath(WEB-INF/xml) - Error directly accessing getRealPath. Exception message: The resource path [WEB-INF/xml] is not valid

Search for entries like: org.ibisph.web.ContextAndPathService? in the log file.

comment:3 Changed 6 years ago by Garth Braithwaite

Description: modified (diff)
Owner: changed from Paul to Paul Leo

comment:4 Changed 6 years ago by Garth Braithwaite

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.