´ÙÀ½ ÀÌÀü Â÷·Ê

9. ¼­ºí¸´ ½ÃÇè

ApacheJServ ÆÐÅ°Áö´Â ¾ÆÆÄÄ¡¸¦ À§ÇÑ ±¸¼º ³»¿ëÀ» httpd.conf ¿¡ Ãß°¡Çϱ⠶§¹®¿¡ ¼­¹ö°¡ ½ÇÇà ÁßÀÎ °æ¿ì¿¡ ¼­¹ö¸¦ Àç±âµ¿ÇÏ¿©¾ß ÇÑ´Ù.

9.1 ¼­¹ö ±âµ¿

¸ÕÀú, À¥ ¼­¹ö¸¦ ±âµ¿ÇØ¾ß ÇÑ´Ù. ¸¸ÀÏ, ÇöÀç À¥ ¼­¹ö°¡ ½ÇÇà ÁßÀ̶ó¸é Àç±âµ¿À» ÇØ¾ß ÇÑ´Ù.

# /etc/rc.d/init.d/httpd stop
# /etc/rc.d/init.d/httpd start

9.2 ¼­¹ö »óÅ º¸±â

¾ÆÆÄÄ¡ ¼­¹öÀÇ error_log ÆÄÀÏÀ» ¿­¾î ÆÄÀÏÀÇ ³¡ ºÎºÐÀ» µé¿©´Ù º¸ÀÚ. ´ÙÀ½°ú °°Àº ³»¿ëÀÌ ÀÖ´Ù¸é, ¾ÆÆÄÄ¡ ¼­¹ö µ¥¸ó°ú ¼­ºí¸´ ¿£ÁøÀÌ Á¤»óÀû À¸·Î µ¿ÀÛ ÁßÀÓÀ» ¾Ë ¼ö ÀÖ´Ù.

+------------------------------------------------------------------+
|  ......                                                          |
|  ... [notice] Apache/1.3.9 (Unix) (ALZZA/Linux) PHP/4.0b3        |
|      ApacheJServ/1.1b3 configured -- resuming normal operations  |
|  ......                                                          |
+------------------------------------------------------------------+

9.3 ¼­ºí¸´ ½ÇÇà

ÆÐÅ°Áö¸¦ ¼³Ä¡Çϸé, /home/httpd/servlets µð·ºÅ丮¿¡ Hello, IsItWorking ¼­ºí¸´ ÆÄÀϵéÀÌ »ý¼ºµÈ´Ù. À¥ ºê¶ó¿ìÀú¸¦ ¶ç¿ö ÀÌ Áß Çϳª¸¦ ½ÇÇàÇØ º¸ÀÚ.

IsItWorking ¼­ºí¸´À» ½ÇÇàÇϱâ À§ÇÑ URLÀº ´ÙÀ½°ú °°´Ù.

http://localhost/servlets/IsItWorking

[IsItWorking ¼­ºí¸´ ½ÇÇà °á°ú: À¥ ºê¶ó¿ìÀú È­¸é http://my.netian.com/~donquabi/linux/jserv/itsworking.jpg]

9.4 JSP ½ÇÇà

¼­ºí¸´ ½ÇÇàÀÌ ¼º°øÀûÀ̸é JSP ÆÄÀÏÀ» ½ÃÇèÇÑ´Ù. ¸¸ÀÏ ¿À·ù°¡ ÀÖ´Ù¸é, JSP ÆÄÀÏ¿¡ ´ëÇؼ­µµ ¿À·ù¸¦ ¸¸³¯ ¼ö ¹Û¿¡ ¾ø´Ù.

GNUJSP ÆÐÅ°Áö¸¦ ¼³Ä¡Çϸé, JSP ¿¹Á¦µµ ÇÔ²² ¼³Ä¡µÈ´Ù. À§Ä¡´Â /usr/doc/gnujsp-1.0.0/examples ÀÌ´Ù. ÀÌ Áß hello.jsp ÆÄÀÏÀ» /home/httpd/html µð·ºÅ丮¿¡ º¹»çÇÏ°í, À¥ ºê¶ó¿ìÀú¸¦ ÅëÇØ Á¢±ÙÇØ º»´Ù.

hello.jsp ÆÄÀÏ¿¡ Á¢±ÙÇϱâ À§ÇÑ URLÀº ´ÙÀ½°ú °°´Ù.

http://localhost/hello.jsp

[hello.jsp À¥ ºê¶ó¿ìÀú È­¸é http://my.netian.com/~donquabi/linux/jserv/hello-jsp.jpg]


´ÙÀ½ ÀÌÀü Â÷·Ê