Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Jetty WTP Plugin/Jetty WTP External WebApp"
(New page: {{Jetty}} == How to Use External Web Application == To read this section, please modify port with 8080. Sometimes it can be usefull to use a WEB Application which was not created with D...) |
m (Warned that unmaintained) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Jetty}} | {{Jetty}} | ||
+ | == Using an External Web Application == | ||
+ | {{Warning|This functionality is currently unmaintained, though it would be nice to find something that used it and wanted to improve it.}} | ||
+ | Sometimes you want to use a web application that you created by other means than generating a Dynamic WEB Project (for example, by using Ant). | ||
− | + | For instance, the Jetty7 distribution provides a <tt>test.war</tt> which shows you the features of Jetty 7 (WebSocket..). Here we use this WAR without creating a Dynamlc Web Project to start it. | |
− | + | {{note|The example that follows works only if the port for your web application is 8080.}} | |
− | + | <ol> | |
+ | <li>Copy <tt>test.war</tt> from D:\Servers\jetty-distribution-7.1.6.v20100715\webapps. | ||
+ | </li> | ||
− | |||
− | |||
− | |||
[[Image:Jetty-wtp-external1.jpg]] | [[Image:Jetty-wtp-external1.jpg]] | ||
− | + | ||
+ | |||
+ | <li>unzip <tt>test.war</tt> in D:\tmp : | ||
+ | </li> | ||
+ | |||
Line 19: | Line 25: | ||
− | + | <li>Navigate to the Modules tab of your Jetty server, in this case ''Jetty v7.0 Server at localhost''. | |
+ | </li> | ||
+ | |||
Line 25: | Line 33: | ||
− | + | ||
+ | <li>Click '''Add External Web Module'''. | ||
+ | </li>The Add Module dialog box opens. | ||
[[Image:Jetty-wtp-external4.jpg]] | [[Image:Jetty-wtp-external4.jpg]] | ||
− | |||
− | |||
− | Click | + | |
+ | <li> In the Document base field, enter '''D:\tmp\test'''. | ||
+ | <li>For the Path, enter '''/test''' (this is the context path). | ||
+ | |||
+ | <li>Click '''OK'''. | ||
+ | </li> The test module is now in the Web Modules list. | ||
+ | |||
+ | |||
[[Image:Jetty-wtp-external5.jpg]] | [[Image:Jetty-wtp-external5.jpg]] | ||
− | + | ||
+ | The page <nowiki>http://localhost:8080/test/</nowiki> now shows you Jetty home test WAR: | ||
+ | |||
[[Image:Jetty-wtp-external6.jpg]] | [[Image:Jetty-wtp-external6.jpg]] | ||
− | + | ||
+ | |||
+ | {{note|The list of web applications also includes <nowiki>http://localhost:8080/mywebapp/</nowiki>. You can add or remove any dynamic Web project or external Web application.}} |
Latest revision as of 12:16, 18 February 2013
Using an External Web Application
Sometimes you want to use a web application that you created by other means than generating a Dynamic WEB Project (for example, by using Ant).
For instance, the Jetty7 distribution provides a test.war which shows you the features of Jetty 7 (WebSocket..). Here we use this WAR without creating a Dynamlc Web Project to start it.
- Copy test.war from D:\Servers\jetty-distribution-7.1.6.v20100715\webapps.
- unzip test.war in D:\tmp :
- Navigate to the Modules tab of your Jetty server, in this case Jetty v7.0 Server at localhost.
- Click Add External Web Module. The Add Module dialog box opens.
- In the Document base field, enter D:\tmp\test.
- For the Path, enter /test (this is the context path).
- Click OK. The test module is now in the Web Modules list.
The page http://localhost:8080/test/ now shows you Jetty home test WAR: