Last modified by Yana Oksner on 2026/01/08 12:39

From version 27.1
edited by Ulrich Köster
on 2023/11/13 11:56
Change comment: Renamed back-links.
To version 28.1
edited by Yana Oksner
on 2026/01/08 12:39
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.uli
1 +XWiki.yanasd
Content
... ... @@ -6,7 +6,7 @@
6 6  
7 7  You need to create a web.xml file. You can download a simple web.xml file [[here>>attach:web.xml]]. Don't forget to change the displayName and the WOMainBundle properties:
8 8  
9 -{{noformat}}
9 +{{code}}
10 10  
11 11  <web-app>
12 12   ...
... ... @@ -19,7 +19,7 @@
19 19   ...
20 20  </web-app>
21 21  
22 -{{/noformat}}
22 +{{/code}}
23 23  
24 24  == Step 2: Create/generate an Info.plist file ==
25 25  
... ... @@ -29,7 +29,7 @@
29 29  
30 30  The application jar must follow the NSJarBundle format. The NSJarBundle is a package organized in Resources and WebServerResources folders. In addition, the Resources folder must contain a valid Info.plist file. Your application classes, resources and webserver resources must be package as a jar. It is easy to configure Maven to do this:
31 31  
32 -{{noformat}}
32 +{{code}}
33 33  
34 34  <build>
35 35   ...
... ... @@ -63,13 +63,13 @@
63 63   ...
64 64  </build>
65 65  
66 -{{/noformat}}
66 +{{/code}}
67 67  
68 68  == Step 4: Add the required dependencies ==
69 69  
70 70  You must add the following dependency to run the application as a true WAR:
71 71  
72 -{{noformat}}
72 +{{code}}
73 73  
74 74  <dependency>
75 75   <groupId>com.webobjects</groupId>
... ... @@ -77,11 +77,11 @@
77 77   <version>${woversion}</version>
78 78  </dependency>
79 79  
80 -{{/noformat}}
80 +{{/code}}
81 81  
82 82  **NOTE**: If you are using WebObjects 5.2.x or 5.3.x you have to add this additional dependency:
83 83  
84 -{{noformat}}
84 +{{code}}
85 85  
86 86  <dependency>
87 87   <groupId>com.webobjects</groupId>
... ... @@ -89,11 +89,11 @@
89 89   <version>${woversion}</version>
90 90  </dependency>
91 91  
92 -{{/noformat}}
92 +{{/code}}
93 93  
94 94  **NOTE**: If your application uses Wonder you must add the ERXServlet dependency:
95 95  
96 -{{noformat}}
96 +{{code}}
97 97  
98 98  <dependency>
99 99   <groupId>wonder.core</groupId>
... ... @@ -101,7 +101,7 @@
101 101   <version>1.0</version>
102 102  </dependency>
103 103  
104 -{{/noformat}}
104 +{{/code}}
105 105  
106 106  Read this [[tutorial>>url:http://wiki.objectstyle.org/confluence/display/WONDER/Creating+a+wonder+app+to+deploy+as+a+servlet||shape="rect"]] to find how to configure the ERXServletAdaptor in your application.
107 107  
... ... @@ -109,11 +109,11 @@
109 109  
110 110  The default [[maven-war-plugin>>url:http://maven.apache.org/plugins/maven-war-plugin/||shape="rect"]] can handle the war packaging correctly. You have to change the packaging of your POM to 'war' in order to use this plug-in:
111 111  
112 -{{noformat}}
112 +{{code}}
113 113  
114 114  <packaging>war</packaging>
115 115  
116 -{{/noformat}}
116 +{{/code}}
117 117  
118 118  It's done.
119 119  
... ... @@ -123,7 +123,7 @@
123 123  
124 124  If you are using variables in your resource files (i.e. the Info.plist), you have to configure Maven to filter the Resources folder like this:
125 125  
126 -{{noformat}}
126 +{{code}}
127 127  
128 128  <build>
129 129   ...
... ... @@ -139,11 +139,11 @@
139 139   ...
140 140  </build>
141 141  
142 -{{/noformat}}
142 +{{/code}}
143 143  
144 144  If you are using variables in the web.xml file, you have to configure Maven to filter deployment descriptors like this:
145 145  
146 -{{noformat}}
146 +{{code}}
147 147  
148 148  <build>
149 149   ...
... ... @@ -161,7 +161,7 @@
161 161   ...
162 162  </build>
163 163  
164 -{{/noformat}}
164 +{{/code}}
165 165  
166 166  = Running your application as true WAR =
167 167  
... ... @@ -171,7 +171,7 @@
171 171  
172 172  Add the following configuration to your POM:
173 173  
174 -{{noformat}}
174 +{{code}}
175 175  
176 176  <build>
177 177   ...
... ... @@ -182,17 +182,17 @@
182 182   ...
183 183  </build>
184 184  
185 -{{/noformat}}
185 +{{/code}}
186 186  
187 187  == Step 2: Start the Jetty container with Maven ==
188 188  
189 189  Just execute:
190 190  
191 -{{noformat}}
191 +{{code}}
192 192  
193 193  mvn clean jetty:run-war
194 194  
195 -{{/noformat}}
195 +{{/code}}
196 196  
197 197  == Step 3: See the result ==
198 198