Set up a development environment for JAX-RS applications
The application server provides command-line tools to develop web services clients and implementations that are based on the Java API for RESTful Web Services (JAX-RS) specification. We must set up the development environment before starting developing web services.
Before we can set up a web services development environment within WebSphere Application Server, install WAS. For detailed information about installing the application server, read about installing the application server environment.
To develop JAX-RS applications, the JAX-RS libraries must be added to the class path definition. See the information for our assembly tools to understand how to include libraries on the class path for the JAX-RS application.
Set up a web services development environment by completing the following actions.
Tasks
- Set up the environment.
(Windows) Run the setupCmdLine.bat command from the /profile_root/<application_server>/bin directory.
(Linux) (AIX) (HPUX) (Solaris) Operating systems such as AIX or Linux source the script to the parent shell to inherit the exported variables by running the following command from the . /profile_root/<application_server>/bin directory:
. ./setupCmdLine.sh (Notice the space between the periods.)(Dist) We can set WAS_USER_SCRIPT to profile_root\<application_server>\bin\setupCmdLine.bat, which has the same effect as running the setupCmdLine command.
(iSeries) Run the setupCmdLine script on the Qshell command line from the . /profile_root/bin directory.
(ZOS) Run the setupCmdLine script from the . /profile_root/<application_server>/bin directory.
- Configure the path. We can add the WebSphere and Java bin directories to your path by typing:
(Windows) (ZOS)
set PATH=%WAS_PATH%;%PATH%(AIX) (HPUX) (Solaris) (Linux)
export PATH=$WAS_PATH:$PATH
We have set up an environment so that we can develop RESTful web services.
What to do next
Develop the JAX-RS application and configure the web.xml file for the JAX-RS servlet.
Related:
Development and assembly tools Directory conventions