the directory structure of the web application is:
-TOMCAT_ROOT
- - webapps
- - - application root (this is where you place HTML and JSP files)
- - - - subdirectory (hierarchical organization of HTML and JSP files)
- - - -  WEB_INF (this is where web.xml will go)
- - - - - classes (this is where class files will go and is the CLASSPATH
of the application)


System.out.print statements will output to the Tomcat command line
(STOUT/STERR)
print statements using PrintWriter will output to the response object (to
your HTML page)



Neill Laney
http://home.nc.rr.com/nlaney
--
Web Developer/Technical Support Specialist.



                                                                                       
                       
                    dsergent@imex                                                      
                       
                    pert.com             To:     [EMAIL PROTECTED]        
                       
                                         cc:                                           
                       
                    03/27/2001           Subject:     add a new servlet ....           
                       
                    04:50 AM                                                           
                       
                    Please                                                             
                       
                    respond to                                                         
                       
                    tomcat-user                                                        
                       
                                                                                       
                       
                                                                                       
                       




I try to add a new servlet which is supposed to load on startup. But I
don't know where I'm supposed to put the class file. If I use a println()
method in the init fonction of my class, where is it supposed to write
something ???

my web.xml file :
....
    <servlet>
        <servlet-name>
                Settings
        </servlet-name>
        <servlet-class>
                SettingsServlet
        </servlet-class>
        <init-param>
                <param-name>rootFile</param-name>
                <param-value>c:\testJSP\init.conf</param-value>
        </init-param>
        <load-on-startup>
                -2147483646
        </load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Settings</servlet-name>
        <url-pattern>/servlet/Settings</url-pattern>
    </servlet-mapping>
....


thks a lot for your answer

David
a french tomcat beginner




Reply via email to