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-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

How to deploy Eclipse RAP to Tomcat, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

After the last time I successfully migrated my RCP project to a browser, I began to study how to deploy it to Tomcat. To be honest, so far, there is very little information about it, and there is not much discussion about it on the Eclipse RAP newsgroup. The introduction article in RAP's help system doesn't seem to be very detailed (it seems a little out of date).

In this article, a link is provided to download a psf, which is the project set file of Eclipse. The contents of the file are as follows:

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

Org.eclipse.equinox.http.servletbridge

Org.eclipse.equinox.servletbridge

Org.eclipse.rap.demo.feature

Java code

1. 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 on line 18), and change the value to the path of your "org.eclipse.equinox.servletbridge" project. It is recommended to use an absolute path, such as:

Then run the compilation directly using Ant, which generates deployable files under the plug-in's build folder.

Open the generated web.xml file and comment on the following

The parameter value in false is changed to true, so that you can start the control of the OSGI framework and facilitate debugging.

Run the ConfigIniCreator.java under the project (which should be on line 39) and change the path of the specified plugins directory to the absolute path of your machine. For example, the path of my project is:

After running, the printed results replace the contents of the config.ini file in the\ org.eclipse.rap.demo.feature\ build\ demo\ WEB-INF\ eclipse\ configuration directory.

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

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

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

After reading the above, have you learned how to deploy Eclipse RAP to Tomcat? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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