Bug 73402 - Obtaining servlet path from framework provider
Obtaining servlet path from framework provider
Status: RESOLVED FIXED
Product: javaee
Classification: Unclassified
Component: Code
5.x
All All
: P2 (vote)
: 5.x
Assigned To: Petr Pisl
issues@javaee
: API_REVIEW_FAST
Depends on:
Blocks: 73003
  Show dependency treegraph
 
Reported: 2006-03-08 22:19 UTC by Petr Pisl
Modified: 2006-04-03 13:32 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2006-03-08 22:19:47 UTC
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;
    }
Comment 1 Pavel Buzek 2006-03-09 14:29:54 UTC
This looks good to me. Thanks.
Comment 2 Petr Pisl 2006-03-27 15:31:32 UTC
If there are no comments, I'm going commit the changes into release55 branch.
Comment 3 Petr Jiricka 2006-04-03 12:50:02 UTC
Isn't this issue completed?
Comment 4 Petr Pisl 2006-04-03 13:32:02 UTC
Commited to trunk on Thursday.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo