WSO2 Developer Studio simplifies the deployment of Web Applications to WSO2 carbon based servers by facilitating the export of exploded Web Apps instead of having to package them into Composite Application (C-App) projects.
Creating a web application
- Create a web application.
- Add the
javaee-web-api.jar
to the build path. In order to enable context reloading, place a
context.xml
file (see example content below) in theMETA-INF
folder of the web app.<Context reloadable="true"> <Loader className="org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader" loaderClass="org.wso2.carbon.webapp.mgt.loader.CarbonWebappClassLoader"/> </Context>
Importing a web application
- After importing the existing web application, add the j
avaee-web-api.jar
to the build path. - A sample web application can be found here.
Deploying the Web Application to WSO2 carbon based servers
- Click Window > Show View > Other as shown below.
- Click Servers under the Server folder.
- On the Servers view, click the link to create a new server.
- Select the carbon server version.
- Click the Add link next to the the Server Runtime Environment field.
- Browse to the WSO2 AS server (in this case 5.3.0) as shown below and click Finish.
- Add the web application to be configured in the server.
- Right-click on the server and click Start.
- WSO2 Application Server will automatically start and the web application will be deployed to the server. After logging in to the server, click List under the Web Applications category to view the deployed Web Application.
- Click Go To URL and the web page opens as shown below.
Republishing the web application
- It is possible to change the web application. For example, change the title in the
index.jsp
to<h3>Welcome !!!!!!</h3>
. The web application will automatically be republished to the server.
- You can view the change by refreshing the web page.