more portable launcher

This commit is contained in:
knut 2008-12-22 04:59:00 +00:00
parent df442059da
commit 79a499ceec
3 changed files with 11 additions and 22 deletions

View file

@ -1,25 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<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"/>
<launchConfiguration type="RunJettyRunWebApp">
<stringAttribute key="bad_container_name" value="/album/j"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.caucho.server.resin.Resin"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-conf conf/resin.conf"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="RunJettyRunWebAppClassPathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="runjettyrun.Bootstrap"/>
<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&#13;-Djava.system.class.loader=com.caucho.loader.SystemClassLoader&#13;-Dresin.home=${workspace_loc:resin3}&#13;-Dresin.root=.&#13;-Xmx512m&#13;-Xss1m&#13;-XX:MaxPermSize=128m"/>
<booleanAttribute key="yk-capture-cpu-on-exit" value="false"/>
<booleanAttribute key="yk-capture-memory-on-exit" value="false"/>
<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"/>
<stringAttribute key="run_jetty_run.CONTEXT_ATTR" value="/"/>
<stringAttribute key="run_jetty_run.PORT_ATTR" value="5080"/>
<stringAttribute key="run_jetty_run.WEBAPPDIR_ATTR" value="webapp"/>
</launchConfiguration>

View file

@ -31,7 +31,7 @@ import com.drew.metadata.MetadataException;
public class AlbumServlet
extends HttpServlet
{
String basePath = "/home/erik/Photos/Wedding";
String basePath = "photos";
EntryDao dao;
@Override
@ -53,7 +53,7 @@ public class AlbumServlet
page = "photo";
}
File file = new File(basePath + pathInfo);
System.out.println("path=" + file);
// System.out.println("path=" + file);
if (!file.canRead()) {
res.setStatus(HttpServletResponse.SC_FORBIDDEN);
return;

View file

@ -29,7 +29,7 @@
<servlet-mapping>
<servlet-name>album</servlet-name>
<url-pattern>/wedding/*</url-pattern>
<url-pattern>/photos/*</url-pattern>
</servlet-mapping>
</web-app>