tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@apache.org
Subject cvs commit: jakarta-tomcat/src/doc faq
Date Mon, 12 Mar 2001 04:18:15 GMT
larryi      01/03/11 20:18:15

  Modified:    src/doc  faq
  Log:
  Update the jar file list.
  
  Also, add a question and answer to explain the problem that can occur when
  using beans with properties whose second letter is capitalized.
  
  Revision  Changes    Path
  1.3       +72 -11    jakarta-tomcat/src/doc/faq
  
  Index: faq
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/doc/faq,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- faq	2001/02/08 21:40:01	1.2
  +++ faq	2001/03/12 04:18:14	1.3
  @@ -57,6 +57,7 @@
      specific problem/exception can be obtained by looking at the 
      server-side trace.
   
  +
   Q: What do I need in my CLASSPATH?
   
   A: All you need is a correct version of JDK (1.1.x or 1.2). 
  @@ -70,19 +71,31 @@
      All other classes, jar files that are needed, are put by the startserver
      script and you don't need to worry about them.
   
  +
   Q: Where are the classes for JSPs and Servlets?
  +
  +A: lib classes:
  +
  +     tomcat.jar         -- Executable jar for starting Tomcat
  +     stop-tomcat.jar    -- Executable jar for stopping Tomcat
  +
  +   lib/common classes
  +
  +     core_util.jar      -- Utility classes used by apps and container
  +     jasper-runtime.jar -- JSP Engine runtime classes
  +     servlet.jar        -- Public APIs for Servlets and JSP
  +     tomcat_core.jar    -- Tomcat web server core classes
  +
  +   lib/container classes
  +
  +     facade22.jar       -- Servlet Engine classes.
  +     jasper.jar         -- JSP Engine translation classes
  +     jaxp.jar           -- Public APIs for XML parser interface
  +     parser.jar         -- Public XML parser reference implementation
  +     tomcat_modules.jar -- Tomcat module classes
  +     tomcat_util.jar    -- Utility classes.
  +     tomcat-startup.jar -- Tomcat start/stop classes
   
  -A: lib/facade22.jar	      -- Servlet Engine classes.
  -   lib/jaxp.jar               -- Public APIs for XML parser interface
  -   lib/parser.jar             -- Public XML parser reference implementation
  -   lib/tomcat_core.jar        -- Tomcat web server core classes
  -   lib/tomcat_modules.jar     -- Tomcat module classes
  -   lib/tomcat-startup.jar     -- Tomcat start/stop classes
  -   lib/common/servlet.jar     -- Public APIs for Servlet.
  -   lib/shared/jasper.jar      -- JSP Engine classes
  -   lib/shared/tomcat_util.jar -- Utility classes.
  -   lib/tomcat.jar             -- Executable jar for starting Tomcat
  -   lib/stop-tomcat.jar        -- Executable jar for stopping Tomcat
   
   Q: Can I combine these classes with other webservers?
   
  @@ -91,6 +104,7 @@
      the Servlet 2.2 API but we have not tested this release on any servlet 
      engine other than the one in Tomcat.
   
  +
   Q: Where do I put my jsp sources and beans?
   
   A: If you just want to test JSPs without creating a separate web-application
  @@ -196,12 +210,14 @@
   
        http://localhost:8080/WEBAPP/yourfile.jsp
   
  +
   Q: How are the URIs mapped at the server?
   
   A: First, the web-server will match the beginning of the requested URI
      against the prefixes of all contexts (web-applications). If no context 
      matches, it will use the default context instead. 
   
  +
   Q: What do different init parameters for the JSP engine mean?
   
      * keepgenerated: 
  @@ -281,3 +297,48 @@
               *.jsp
           </url-pattern>
       </servlet-mapping>
  +
  +
  +Q. I have a bean with a property whose second letter is capitalized.
  +   Why won't my JSP page that uses this bean compile?
  +
  +A. This may not happen often, but can be difficult to determine why.
  +   The reason is found in the Java Beans specification, where in section
  +   "8.8 Capitalization of inferred names" it states:
  +
  +       Thus when we extract a property or event name from the middle of an
  +       existing Java name, we normally convert the first character to lower
  +       case. However to support the occasional use of all upper-case names,
  +       we check if the first two characters of the name are both upper case
  +       and if so leave it alone.
  +
  +   This means that if you have a bean with a setter method of "setXLoc",
  +   then the inferred property is "XLoc", not "xLoc".  If you used this
  +   bean in a JSP page and you tried to use "xLoc" as the property, it
  +   would not compile. Using "XLoc" as the property would succeed.
  +
  +   If you insist on using "xLoc" on the JSP page, you can make this possible
  +   by creating a BeanInfo class for the bean.  The following is an example
  +   of such a BeanInfo class for a simple bean called Coordinate.  It
  +   explicitly defines the properties of the bean to be "xLoc" and "yLoc".
  +
  +   import java.beans.*;
  +   public class CoordinateBeanInfo extends SimpleBeanInfo
  +   {
  +      private final static Class beanClass = Coordinate.class;
  +
  +      public PropertyDescriptor[] getPropertyDescriptors()
  +      {
  +         try {
  +            PropertyDescriptor xLocDesc =
  +               new PropertyDescriptor("xLoc",beanClass,"getXLoc","setXLoc");
  +            PropertyDescriptor yLocDesc =
  +               new PropertyDescriptor("yLoc",beanClass,"getYLoc","setYLoc");
  +
  +            PropertyDescriptor [] pdv = { xLocDesc, yLocDesc };
  +            return pdv; 
  +         } catch (IntrospectionException e) {
  +            throw new Error(e.toString());
  +         }
  +      }
  +   }
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org


Mime
View raw message