InfoCenter Home >
4: Developing applications >
4.2: Building Web applications >
4.2.10: Converting WAR files to Web applications (wartowebapp script)

4.2.10: Converting WAR files to Web applications (wartowebapp script)

This script converts a WAR file into a format that can be used by a standalone Servlet engine runtime outside of the full WebSphere administration system. It will not affect the operation of the WebSphere Application Server by configuring new web applications on the server. This script is intended to provide a means for developers to execute a web application from XML on a Servlet Engine inside a development runtime environment (such as VisualAge for Java). The wartowebapp script converts the web.xml file into a .webapp format file used by the Servlet engine.

The command line syntax is as follows:

wartowebapp [war filename] [webapp destination]
[virtual host name] [webapp path] [webapp name]

where:

  • war filename - full path to the WAR file
  • webapp destination - directory where web application will be rooted (a subdirectory will be created that matches the specified web app name)
  • virtual host - name of the virtual host you wish this application to be accessible from
  • webapp path - the context path of the web application
  • webapp name - the name of the web application you wish to use

Example:

wartowebapp c:\temp\servlet-tests.war c:\websphere\appserver\hosts\default_host
default_host /servlet-tests servlet_tests

If security is enabled, modify the sas.client.props file to authenticate using the properties file, instead of by prompting. See article 6.6.18 for details.

Go to previous article: Setting language encoding in Web applications Go to next article: Developing enterprise beans

 

 
Go to previous article: Setting language encoding in Web applications Go to next article: Developing enterprise beans