Lines 48-54
Link Here
|
48 |
import java.util.logging.Logger; |
48 |
import java.util.logging.Logger; |
49 |
import javax.management.MBeanServerConnection; |
49 |
import javax.management.MBeanServerConnection; |
50 |
import javax.management.ObjectName; |
50 |
import javax.management.ObjectName; |
51 |
import org.netbeans.modules.j2ee.deployment.plugins.spi.FindJSPServlet; |
51 |
import org.netbeans.modules.j2ee.deployment.plugins.spi.FindJSPServlet2; |
52 |
import org.netbeans.modules.j2ee.weblogic9.WLConnectionSupport; |
52 |
import org.netbeans.modules.j2ee.weblogic9.WLConnectionSupport; |
53 |
import org.netbeans.modules.j2ee.weblogic9.WLPluginProperties; |
53 |
import org.netbeans.modules.j2ee.weblogic9.WLPluginProperties; |
54 |
import org.netbeans.modules.j2ee.weblogic9.deploy.WLDeploymentManager; |
54 |
import org.netbeans.modules.j2ee.weblogic9.deploy.WLDeploymentManager; |
Lines 58-64
Link Here
|
58 |
* @author Petr Hejl |
58 |
* @author Petr Hejl |
59 |
*/ |
59 |
*/ |
60 |
// FIXME user can configure the directory for JSP servlets |
60 |
// FIXME user can configure the directory for JSP servlets |
61 |
public class WLFindJSPServlet implements FindJSPServlet { |
61 |
public class WLFindJSPServlet implements FindJSPServlet2 { |
62 |
|
62 |
|
63 |
private static final Logger LOGGER = Logger.getLogger(WLFindJSPServlet.class.getName()); |
63 |
private static final Logger LOGGER = Logger.getLogger(WLFindJSPServlet.class.getName()); |
64 |
|
64 |
|
Lines 70-75
Link Here
|
70 |
|
70 |
|
71 |
@Override |
71 |
@Override |
72 |
public File getServletTempDirectory(String moduleContextPath) { |
72 |
public File getServletTempDirectory(String moduleContextPath) { |
|
|
73 |
// XXX should it be always existing directory ? |
73 |
ApplicationDescriptor desc = getApplicationDescriptor(moduleContextPath); |
74 |
ApplicationDescriptor desc = getApplicationDescriptor(moduleContextPath); |
74 |
if (desc == null) { |
75 |
if (desc == null) { |
75 |
return null; |
76 |
return null; |
Lines 87-93
Link Here
|
87 |
// FIXME multiple subdirs - what does that mean |
88 |
// FIXME multiple subdirs - what does that mean |
88 |
File servletDir = new File(subdir, "jsp_servlet"); // NOI18N |
89 |
File servletDir = new File(subdir, "jsp_servlet"); // NOI18N |
89 |
if (servletDir.exists() && servletDir.isDirectory()) { |
90 |
if (servletDir.exists() && servletDir.isDirectory()) { |
90 |
return servletDir; |
91 |
// FIXME make simpler |
|
|
92 |
return servletDir.getParentFile(); |
91 |
} |
93 |
} |
92 |
} |
94 |
} |
93 |
} |
95 |
} |
Lines 104-110
Link Here
|
104 |
String[] parts = fixedJspResourcePath.split("/"); // NOI18N |
106 |
String[] parts = fixedJspResourcePath.split("/"); // NOI18N |
105 |
String jspFile = parts[parts.length - 1]; |
107 |
String jspFile = parts[parts.length - 1]; |
106 |
|
108 |
|
107 |
StringBuilder result = new StringBuilder(); |
109 |
StringBuilder result = new StringBuilder("jsp_servlet/"); // NOI18N |
108 |
for (int i = 0; i < (parts.length - 1); i++) { |
110 |
for (int i = 0; i < (parts.length - 1); i++) { |
109 |
result.append("_").append(parts[i]).append("/"); // NOI18N |
111 |
result.append("_").append(parts[i]).append("/"); // NOI18N |
110 |
} |
112 |
} |
Lines 120-125
Link Here
|
120 |
} |
122 |
} |
121 |
|
123 |
|
122 |
@Override |
124 |
@Override |
|
|
125 |
public String getServletBasePackageName(String moduleContextPath) { |
126 |
return "jsp_servlet"; // NOI18N |
127 |
} |
128 |
|
129 |
@Override |
130 |
public String getServletSourcePath(String moduleContextPath, String jspRelativePath) { |
131 |
StringBuilder builder = new StringBuilder("jsp_servlet/"); // NOI18N |
132 |
String parts[] = jspRelativePath.split("/"); // NOI18N |
133 |
for (int i = 0; i < parts.length; i++) { |
134 |
String part = parts[i]; |
135 |
if (part.length() > 0 && i < (parts.length - 1)) { |
136 |
builder.append("_"); // NOI18N |
137 |
} |
138 |
builder.append(part); |
139 |
if (i < (parts.length - 1)) { |
140 |
builder.append("/"); // NOI18N |
141 |
} |
142 |
} |
143 |
return builder.toString(); |
144 |
} |
145 |
|
146 |
@Override |
123 |
public String getServletEncoding(String moduleContextPath, String jspResourcePath) { |
147 |
public String getServletEncoding(String moduleContextPath, String jspResourcePath) { |
124 |
return "UTF8"; // NOI18N |
148 |
return "UTF8"; // NOI18N |
125 |
} |
149 |
} |