问题
I have WAMP installed on my local machine and am looking to serve up charts using jFree's Eastwood charting, which requires me to use servlets. So basically I will insert images with src tags that have URLs pointing to my servlet on the same machine.
What's the easiest way to enable servlets on the same machine? Do I need to install a servlet server on a different port? Or is there a way to integrate it into WAMP?
回答1:
You have a couple of choices.
The easiest is to get a Web container such as Tomcat or Jetty and run it on a different port (by default it's usually 8080).
A Web container can be integrated into Apache and this tends to be what happens in production sites. See Tomcat-Apache HOWTO or Apache 2 with Tomcat 6: How to Configure. It's probably overkill for a local install.
来源:https://stackoverflow.com/questions/2815631/whats-the-easiest-way-to-add-java-servlets-to-a-wamp-configured-machine