This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I'm asking for a review for compatible API change. The target is 5.5 Every jsp can be run directly through the Run File action. In the web project this action call browser with the url, which is composed in this way: http://targetserver:serverport/contextpath/servletpath?query. Generally the serlvet path is relative path between document root of the web application and the jsp file. But the frameworks can influence the servlet path and change the servlet path in the way that is needed by the framework. I proposed to add method to the FrameworkProvider, which returns the servletPath for the given FileObject (usually jsp file). The method can return null and then is used the general approach for obtaining servlet path. The method will have no impact on framework providers, which are already implemented. /** * Returns the servlet path of the request's URL that calls the web component. * This path starts with a "/" character and includes either the servlet name * or a path to the servlet/jsp. Includes as well the mapping, but does not include * any extra path information or a query string. * The method can return null. Then common servlet path is used. * <br/> * JSF Example: There is index.jsp directly in the document base. Normally the URL * for accessing this page in browser should be http://server:port/contextpath/index.jsp. * The servletpath is /index.jsp. * Because the index.jsp includes jsf tags, should be called with appropriate JSF servlet * mapping. If the mapping is /faces/*, then the right url is * http://server:port/contextpath/faces/index.jsp and this method should returns /faces/index.jsp. * @param fo arbitrary FileObject. Should be a jsp file. * @return A string that contains the servletPath including mapping as well. Can return null. * */ public String getServletPath(FileObject file){ return null; }
This looks good to me. Thanks.
If there are no comments, I'm going commit the changes into release55 branch.
Isn't this issue completed?
Commited to trunk on Thursday.