more portable launcher
This commit is contained in:
parent
df442059da
commit
79a499ceec
3 changed files with 11 additions and 22 deletions
27
album.launch
27
album.launch
|
|
@ -1,25 +1,14 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
<launchConfiguration type="RunJettyRunWebApp">
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
<stringAttribute key="bad_container_name" value="/album/j"/>
|
||||||
<listEntry value="/album"/>
|
|
||||||
</listAttribute>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
|
||||||
<listEntry value="4"/>
|
|
||||||
</listAttribute>
|
|
||||||
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
|
|
||||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||||
|
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
|
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="RunJettyRunWebAppClassPathProvider"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.caucho.server.resin.Resin"/>
|
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="runjettyrun.Bootstrap"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-conf conf/resin.conf"/>
|
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="album"/>
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="album"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djava.util.logging.manager=com.caucho.log.LogManagerImpl -Djava.system.class.loader=com.caucho.loader.SystemClassLoader -Dresin.home=${workspace_loc:resin3} -Dresin.root=. -Xmx512m -Xss1m -XX:MaxPermSize=128m"/>
|
<stringAttribute key="run_jetty_run.CONTEXT_ATTR" value="/"/>
|
||||||
<booleanAttribute key="yk-capture-cpu-on-exit" value="false"/>
|
<stringAttribute key="run_jetty_run.PORT_ATTR" value="5080"/>
|
||||||
<booleanAttribute key="yk-capture-memory-on-exit" value="false"/>
|
<stringAttribute key="run_jetty_run.WEBAPPDIR_ATTR" value="webapp"/>
|
||||||
<booleanAttribute key="yk-disable-alloc" value="false"/>
|
|
||||||
<booleanAttribute key="yk-disable-counts" value="false"/>
|
|
||||||
<booleanAttribute key="yk-launch-ui" value="true"/>
|
|
||||||
<intAttribute key="yk-mem-threshold" value="90"/>
|
|
||||||
<booleanAttribute key="yk-startup-with-object-allocations" value="false"/>
|
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ import com.drew.metadata.MetadataException;
|
||||||
public class AlbumServlet
|
public class AlbumServlet
|
||||||
extends HttpServlet
|
extends HttpServlet
|
||||||
{
|
{
|
||||||
String basePath = "/home/erik/Photos/Wedding";
|
String basePath = "photos";
|
||||||
EntryDao dao;
|
EntryDao dao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -53,7 +53,7 @@ public class AlbumServlet
|
||||||
page = "photo";
|
page = "photo";
|
||||||
}
|
}
|
||||||
File file = new File(basePath + pathInfo);
|
File file = new File(basePath + pathInfo);
|
||||||
System.out.println("path=" + file);
|
// System.out.println("path=" + file);
|
||||||
if (!file.canRead()) {
|
if (!file.canRead()) {
|
||||||
res.setStatus(HttpServletResponse.SC_FORBIDDEN);
|
res.setStatus(HttpServletResponse.SC_FORBIDDEN);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>album</servlet-name>
|
<servlet-name>album</servlet-name>
|
||||||
<url-pattern>/wedding/*</url-pattern>
|
<url-pattern>/photos/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
</web-app>
|
</web-app>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue