Wednesday Jul 25, 2007

Can I use Struts with Web Server 7?

When I was asked whether one could use the Apache Struts framework with Sun Java System Web Server 7, I was sure I would find an answer (confirming that one indeed could) if I searched the Internet. I was somewhat surprised and disappointed when I didn't any evidence either supporting or disproving the theory, so I decided to try it out myself.

I downloaded and unzipped the samples for both Struts 1(struts-1.3.8-apps.zip) and Struts 2(struts-2.0.9-apps.zip) from http://struts.apache.org/download.cgi. I then started the administration server of my Web Server 7 installation and deployed a few of the sample web applications to my test server.

Sample web application URI
struts-1.3.8/apps/struts-blank-1.3.8.war /blank1
struts-1.3.8/apps/struts-cookbook-1.3.8.war /cookbook1
struts-1.3.8/apps/struts-examples-1.3.8.war /examples1
struts-2.0.9/apps/struts2-blank-2.0.9.war /blank2
struts-2.0.9/apps/struts2-showcase-2.0.9.war /showcase2

I started my server after deploying the above samples. If your server is already running you don't have to restart the server when you deploy web applications(the server can dynamically reload Java web applications).

% bin/startserv
Sun Java System Web Server 7.0U1 B07/13/2007 16:10
info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_12] from [Sun Microsystems Inc.]
info: WEB0100: Loading web module in virtual server [test] at [/blank1]
info: WEB0100: Loading web module in virtual server [test] at [/cookbook1]
info: WEB0100: Loading web module in virtual server [test] at [/examples1]
info: WEB0100: Loading web module in virtual server [test] at [/blank2]
info: WEB0100: Loading web module in virtual server [test] at [/showcase2]
(rest of output deleted)

All the samples worked! All I did was simply deploy the .war files to Web Server 7. Cool!

So, can Struts can be used with Sun Java System Web Server 7? Yes! Yes! Yes!

About

arvindsrinivasan

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today