KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > deployment > plugins > api > FindJSPServlet


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.deployment.plugins.api;
21
22 import java.io.File JavaDoc;
23
24 /** This interface allows plugins to specify the location of servlets generated
25  * for JSPs.
26  *
27  * @author Petr Jiricka
28  */

29 public interface FindJSPServlet {
30
31     /** Returns the temporary directory where the server writes servlets generated
32      * from JSPs. The servlets placed in this directory must honor the Java
33      * directory naming conventions, i.e. the servlet must be placed in subdirectories
34      * of this directory corresponding to the servlet package name.
35      * @param moduleContextPath web module for which the temporary directory is requested.
36      * @return the root temp directory containing servlets generated from JSPs for this module.
37      */

38     public File JavaDoc getServletTempDirectory(String JavaDoc moduleContextPath);
39     
40     /** Returns the resource path of the servlet generated for a particular JSP, relatively
41      * to the main temporary directory.
42      * @param moduleContextPath context path of web module in which the JSP is located.
43      * @param jspResourcePath the path of the JSP for which the servlet is requested, e.g.
44      * "pages/login.jsp". Never starts with a '/'.
45      * @return the resource name of the servlet generated for the JSP in the module, e.g.
46      * "org/apache/jsps/pages/login$jsp.java". Must never start with a '/'.
47      * The servlet file itself does not need to exist at this point -
48      * if this particular page was not compiled yet.
49      */

50     public String JavaDoc getServletResourcePath(String JavaDoc moduleContextPath, String JavaDoc jspResourcePath);
51     
52     /** Returns the encoding of the generated servlet file.
53      * @param moduleContextPath context path of web module in which the JSP is located.
54      * @param jspResourcePath the path of the JSP for which the servlet is requested, e.g.
55      * "pages/login.jsp". Never starts with a '/'.
56      * @return the encoding of the servlet generated for the JSP in the module,
57      * e.g. "UTF8".
58      * The servlet file itself does not need to exist at this point -
59      * if this particular page was not compiled yet.
60      */

61     public String JavaDoc getServletEncoding(String JavaDoc moduleContextPath, String JavaDoc jspResourcePath);
62     
63 }
64
Popular Tags