Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy Eclipse RAP to Tomcat

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article is about deploying Eclipse RAP to Tomcat. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

If Eclipse RAP is installed, open the help interface and find the RAP help document "How to deploy a RAP application to a servlet container?" "This article, the article provides a link to download a psf, this is Eclipse project set file, the file content is as follows:

< ?xml version="1.0" encoding="UTF-8"?>

< psf version="2.0">

< provider id="org.eclipse.team.cvs.core.cvsnature">

< project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.servletbridge,org.eclipse.equinox.http.servletbridge"/>

< project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge,org.eclipse.equinox.servletbridge"/>

< project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/rt,org.eclipse.rap/releng/org.eclipse.rap.demo.feature,org.eclipse.rap.demo.feature"/>

< /provider>

< /psf>

You can also copy the content to a text file and change it to yourpsfile.psf file, import it into Eclipse as Eclipse project set, Eclipse will automatically download the corresponding plug-in from Eclipse CVS website, a total of three plug-ins were downloaded:

org.eclipse.equinox.http.servletbridge

org.eclipse.equinox.servletbridge

org.eclipse.rap.demo.feature

Open the webappBuilder.xml file under the script folder of the org.eclipse.rap.demo.feature project, modify the attribute value named "servletbridge.dir"(as if in line 18), and modify the value to the path of your "org.eclipse.equinox.servletbridge" project. It is recommended to use an absolute path, such as:

< property name="servletbridge.dir" value="D:/DeveloperWorks/Eclipse-3.5-RAP-SRC/org.eclipse.equinox.servletbridge" />

Then run the compilation directly using Ant, which will generate deployable files under the build folder of the plug-in. This prepares you to deploy Eclipse RAP to Tomcat.

Open the generated web.xml file and add the following content that has already been commented

< !-- < init-param>

< param-name>

commandline

< /param-name>

< param-value>

-console

< /param-value>

< /init-param>

-->

Restore to normal code, so that you can use OSGI console in Tomcat console, convenient to view and manage plug-in life cycle, complete plug-in update and uninstall functions, and then

< init-param>

< param-name>

enableFrameworkControls

< /param-name>

< param-value>

false

< /param-value>

< /init-param>

Change the parameter value from false to true, which enables control of the OSGI framework and facilitates debugging.

Then copy the contents under the demo folder under the build folder under org.eclipse.rap.demo.feature project to the webapps directory of Tomcat, start Tomcat, and enter "ss" on the console to view the plug-ins that have been loaded under the OSGI framework:

You can see that our deployed org.eclipse.rap.demo file is already active.

Open your browser and type http://localhost:8080/demo/rap to access it.

Thank you for reading! About "how to deploy Eclipse RAP to Tomcat" this article is shared here, I hope the above content can be of some help to everyone, so that we can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report