My Notepad

  • My Linux Notes
  • My Grid Notes
  • To do List
  • Monday, May 15, 2006

     

    Tomcat's jspServlet is stupid!

    It took me the whole afternoon and most of night to find out why my first jsp progamm didn't work!
    when you use "jsp:useBean" to find your java class, don't put it in default package!! because that wont work! Although we all know that WEB-INF/classes will be searched by tomcat to find your jsp beans, you cant put your *.class files directly under "WEB-INF/classes" directory, instead, you have to put your beans in a package!! For example, you have to created a sub directory called "beans" under "WEB-INF/classes" and add following line at the beginning of your beans code:
    "package beans;" Of couse you have to use sth like
    jsp:useBean id="xx" class="beans.YouClassName"
    in your jsp code.

    Kind of stupid..

    Comments: Post a Comment



    << Home

    Archives

    December 2005   January 2006   February 2006   April 2006   May 2006   June 2006   July 2006   November 2006   February 2007   May 2007   June 2007   November 2007   February 2008   March 2008   April 2008   August 2008   December 2008   March 2009   April 2009   May 2009   June 2009   October 2009   November 2009   December 2009   May 2013  

    This page is powered by Blogger. Isn't yours?