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"?>
|
||||
<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 -Djava.system.class.loader=com.caucho.loader.SystemClassLoader -Dresin.home=${workspace_loc:resin3} -Dresin.root=. -Xmx512m -Xss1m -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue