Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java_server thread: RE: Running code for Chapter 5 of "Professional Java Server Progr


Message #1 by "Burford, Brian" <BBurford@a...> on Mon, 11 Sep 2000 08:18:07 -0400
Here is my attempts of translating the LWS instructions to Tomcat:

The configuration instructions for LWS call for editing
"server.properties", "mime.properties", "rules.properties", and
"servlets.properties".  There do not appear to be any such files in Tomcat
3.1.  In fact, from all I've read, "server.xml" and "web.xml" accomplish
what these property files do in LWS.  An example is the mappings of the
servlets e.g.:

 "chatRoom  com.wrox.context.chat.ChatRoomServlet"
  
 They show putting that map in "servlets.properties" as: 
servlet.listRooms.code=com.wrox.context.chat.ListRoomServlet
  
 I have guessed that I would build a <server-mapping> directive in "web.xml" as:

 <servlet-mapping>
   <servlet-name>
       listRooms
   </servlet-name>
   <url-pattern>
       com.wrox.context.chat.ListRoomsServlet
   </url-pattern>
 </servlet-mapping>
  
 The one I'm really scratching my head over is in loading the
 "ChatAdminServlet" at engine startup.  There is an "init" method that
calls:
 String propsFile = getInitParameter("chatprops");
  
 The instructions say to add this line to "servlets.properties" in order
to set the value of the "chatprops" initialization parameter:
 servlet.chatAdmin.initArgs=chatprops=/usr/local/lws/config/chatapp/chat
.properties
  
I have seen nothing like this in Tomcat.  Further, the more I plow into
this the more confused I get.  I need to find some documentation that
describes in a little more detail how to deploy web applications and
setting up contexts, mapping, etc.
  
Any help would certainly be appreciated
-mark

  Return to Index