Deploy war on Tomcat [message #1803300] |
Tue, 26 February 2019 14:24 |
Hsuan-Ming Chen Messages: 2 Registered: February 2019 |
Junior Member |
|
|
Hello,
Currently, I made a specification language and associated software system program in RAP, it works really nice while running with Eclipse IDE.
However, I want to deploy it on the Tomcat Server.
I used Libra War Tool to export the project from Eclipse IDE to war file and deploy it on the server. but it always show :
HTTP Status 404 Not Found
Type Status Report
Message ProxyServlet: /
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
I did not know what's the problem with this.
Therefore, I decide to try the deployment with the "hello world" RAP program.
The "hello world" program works good, but once I put "javax.servlet" in the imported packages inside the MANIFEST file, then it does not work, it shows the "HTTP Status 404 Not Found" which I was mentioned.
I did follow the developer guide here:
https://www.eclipse.org/rap/developers-guide/devguide.php?topic=deployment.html
It says:
Make sure that the WAR does not contain the javax.servlet bundle. In the plug-in manifest the javax.servlet must be listed in the Import-Package section, not in Require-Bundle.
I have no idea in which part I did wrong.
Following is the code of the related file:
MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Helloworld
Bundle-SymbolicName: helloworld
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: helloworld
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.rap.rwt;bundle-version="[3.0.0,4.0.0)"
Service-Component: OSGI-INF/contribution.xml
Bundle-ClassPath: .
Import-Package: javax.servlet;version="3.1.0"
helloworld.launch
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.rap.ui.launch.RAPLauncher">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="false"/>
<booleanAttribute key="automaticValidate" value="true"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="false"/>
<booleanAttribute key="clearws" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/helloworld"/>
<booleanAttribute key="default" value="true"/>
<booleanAttribute key="default_auto_start" value="true"/>
<intAttribute key="default_start_level" value="4"/>
<booleanAttribute key="includeOptional" value="false"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.eclipse.equinox.http.jetty.log.stderr.threshold=info"/>
<stringAttribute key="org.eclipse.rap.launch.browserMode" value="INTERNAL"/>
<stringAttribute key="org.eclipse.rap.launch.contextpath" value="/"/>
<stringAttribute key="org.eclipse.rap.launch.dataLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.rap.tools.launch/helloworld"/>
<booleanAttribute key="org.eclipse.rap.launch.developmentMode" value="true"/>
<booleanAttribute key="org.eclipse.rap.launch.openBrowser" value="true"/>
<intAttribute key="org.eclipse.rap.launch.port" value="10080"/>
<stringAttribute key="org.eclipse.rap.launch.servletPath" value="/hello"/>
<intAttribute key="org.eclipse.rap.launch.sessionTimeout" value="0"/>
<booleanAttribute key="org.eclipse.rap.launch.terminatePrevious" value="true"/>
<booleanAttribute key="org.eclipse.rap.launch.useDefaultDataLocation" value="true"/>
<booleanAttribute key="org.eclipse.rap.launch.useManualContextPath" value="false"/>
<booleanAttribute key="org.eclipse.rap.launch.useManualPort" value="false"/>
<booleanAttribute key="org.eclipse.rap.launch.useSessionTimeout" value="false"/>
<stringAttribute key="pde.version" value="3.3"/>
<booleanAttribute key="show_selected_only" value="true"/>
<stringAttribute key="target_bundles" value="javax.servlet@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.felix.scr,org.eclipse.equinox.console@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.rap.rwt.osgi@default:default,org.eclipse.rap.rwt@default:default"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<stringAttribute key="workspace_bundles" value="helloworld"/>
</launchConfiguration>
build.properties
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
OSGI-INF/,\
.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05098 seconds