Eclipse WTP vs sydeo, " serves modules without publishing "
Categories:
Eclipse WTP vs. Sysdeo: Understanding 'Serves Modules Without Publishing'

Explore the differences between Eclipse WTP and the Sysdeo Tomcat plugin, focusing on how they handle module deployment and the common 'serves modules without publishing' issue.
When developing Java web applications in Eclipse, deploying to a Tomcat server is a common task. Historically, developers used the Sysdeo Tomcat plugin for this purpose. However, Eclipse's built-in Web Tools Platform (WTP) offers its own robust server integration. A frequent point of confusion arises when migrating from Sysdeo to WTP, particularly concerning the message 'serves modules without publishing'. This article delves into the core differences between these two approaches and clarifies what this message signifies.
The Core Difference: Deployment Mechanisms
The fundamental distinction between Sysdeo and WTP lies in how they deploy your web application modules to the Tomcat server. Understanding this difference is key to resolving deployment issues and leveraging the strengths of each tool.
flowchart TD A[Eclipse Project] --> B{Deployment Method?} B -->|Sysdeo| C[Build WAR/Copy Files] C --> D[Tomcat webapps/] B -->|WTP| E[Direct Workspace Linking] E --> F[Tomcat conf/Catalina/localhost/] D --> G[Server Runs] F --> G
Deployment flow comparison between Sysdeo and WTP
Sysdeo Tomcat Plugin: Traditional WAR Deployment
The Sysdeo Tomcat plugin operates on a more traditional deployment model. When you 'publish' a project using Sysdeo, it typically performs one of two actions:
- Builds a WAR file: It compiles your project, packages it into a Web Application Archive (WAR) file, and copies this WAR file to Tomcat's
webapps
directory. - Copies project files directly: Alternatively, it might copy the exploded contents of your web project (e.g.,
.class
files, JSPs, static resources) directly into a subdirectory underwebapps
.
In both scenarios, Sysdeo creates a physical copy of your application within the Tomcat installation directory. Any changes you make in your Eclipse workspace require a 'republish' to update the files in Tomcat's webapps
directory. This approach is straightforward but can be slower due to the copying process.
Eclipse WTP: Workspace-Based Deployment and 'Serves Modules Without Publishing'
Eclipse WTP takes a more integrated and efficient approach. Instead of copying files or building WARs for development, WTP leverages Tomcat's ability to define web applications via context files. When you add a web project to a WTP-managed Tomcat server, WTP typically:
- Creates a Context XML file: It generates a context XML file (e.g.,
your-app.xml
) in Tomcat'sconf/Catalina/localhost/
directory. - Links to Workspace: This context file points directly to your project's output directory within your Eclipse workspace (e.g.,
wtpwebapps
or the project'starget
folder if using Maven).
This is where the message 'serves modules without publishing' comes into play. It means that WTP is not physically copying your application's files to Tomcat's webapps
directory. Instead, Tomcat is configured to serve the application directly from its location within your Eclipse workspace. This offers several advantages:
- Faster Development Cycle: Changes to your code or resources in Eclipse are immediately reflected by Tomcat (often requiring only a server restart or module reload, not a full republish), as Tomcat is reading directly from the source.
- Reduced Disk Usage: No duplicate copies of your application are created.
- Simplified Debugging: Debugging directly against your workspace files is seamless.
While this is the default and often preferred behavior for development, it can sometimes be confusing for those accustomed to the Sysdeo model. For production deployment, you would typically still build a WAR file and deploy it manually or via a CI/CD pipeline.
Troubleshooting and Configuration
If you encounter issues or wish to change WTP's deployment behavior, here are some common configurations and troubleshooting tips:
- Server Location: In the server's overview editor in Eclipse (double-click the server in the Servers view), check 'Server Locations'. If 'Use workspace metadata (does not modify Tomcat installation)' is selected, WTP will use the direct linking method. If 'Use Tomcat installation' is selected, WTP will copy files to a temporary directory within the Tomcat installation.
- Module Publishing: Even with workspace-based deployment, you might still see 'Publishing...' messages. This usually refers to WTP ensuring that compiled classes and resources are up-to-date in the project's output directory that Tomcat is pointing to.
- M2E-WTP Integration: If you're using Maven (m2e) with WTP, ensure your project's 'Deployment Assembly' is correctly configured. This defines what gets included in the web application when deployed by WTP or when a WAR is built.
<!-- Example of a Tomcat Context XML file (conf/Catalina/localhost/mywebapp.xml) -->
<Context docBase="/path/to/your/eclipse/workspace/mywebapp/target/m2e-wtp/web-resources" reloadable="true">
<!-- Additional context parameters can go here -->
</Context>
A typical Tomcat context file generated by WTP, pointing to a workspace location.
conf/Catalina/localhost/
directory. WTP manages these files, and manual changes might be overwritten or cause conflicts.