Let's start all over.
First make a few assumptions:
Your web-application directory is: /webprg/tomcat/webapps/ROOT/
Therefore your classes will go under:
/webprg/tomcat/webapps/ROOT/WEB-INF/classes/test/HelloWorld.class
(note: WEB-INF needs to be in upper-case)
1) Create a file hello.jsp (that has the <jsp:include page
="test.HelloWorld" flush="true"/> statement).
Save this hello.jsp file under "/webprg/tomcat/webapps/ROOT/"
2) Your DocumentRoot in http.conf should be:
       DocumentRoot /webprg/tomcat/webapp/ROOT/
3) Your Context entry in server.xml should be:
        <Context path="" docBase="ROOT" debug="0"/>
4) Stop and restart Tomcat
5) Acccess hello.jsp using the URL:
      http://localhost/hello.jsp

RS



                                                                                       
                    
                      MadBit                                                           
                    
                      <madbit@telepolis        To:       Tomcat Users List             
                    
                      .com>                     <[EMAIL PROTECTED]>       
                    
                                               cc:                                     
                    
                      08/13/02 04:56 AM        Subject:  Re: .shtml with 4.0.4         
                    
                      Please respond to                                                
                    
                      "Tomcat Users                                                    
                    
                      List"                                                            
                    
                                                                                       
                    
                                                                                       
                    




     Well, I have an application on the apache directory:

/webprg/apache/htdocs/test

An example .shtml would be:

<html>
<head><title>Testing shtml</title></head>
<body>
Testing:
<servlet code="test.HelloWorld"></servlet>
</body>
</html>


I transform to .jsps (or .jhtml i saw on a previus msg on this list)

<html>
<head><title>Testing shtml</title></head>
<body>
Testing:
<jsp:include page="test.HelloWorld" flush="true"/>
</body>
</html>


My tomcat 4.0.4 (i tested on 4.1.8 beta too) is on
/webprg/tomcat/

y put the servlets on
/webprg/tomcat/webapp/ROOT/Web-inf/classes/test/HelloWorld.class

If I call from the browser "http://localhost/servlet/test.HelloWorld";
the servlet works fine. If I call the .shtml,
"http://localhost/test/hello.shtml";, the static part appears and the
browser remains in awaintg data state.


This are the changes on tomcat's web.xml I made:

- Enabled de ssi servlet.
- Enabled .shtml mapping to ssi servlet

On server.xml I'm using the  ajp 1.3 connector on 8009.

<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
                port="8009" minProcessors="5" maxProcessors="75"
                acceptCount="10" debug="0"/>



This is the workers.properties:

workers.tomcat_home=/webprg/tomcat
workers.java_home=/java/jdk1.4.0_01
ps=/
worker.list=ajp12, ajp13

worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

---
Changes made on httpd.conf:
DocumentRoot C:/webprg/Apache/htdocs

AddType text/html .shtml
AddHandler server-parsed .shtml

LoadModule jk_module modules/mod_jk.dll
Addmodule mod_jk.c

JkWorkersFile /webprg/tomcat/conf/jk/workers.properties
JkLogFile /webprg/apache/logs/mod_jk.log
JkLogLevel info


JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /*.shtml ajp13

     On the logs seems to do nothing but on tomcat-apache server log:

2002-08-13 11:45:52 [org.apache.catalina.connector.warp.WarpConnector]
Error accepting requests
java.net.SocketException: socket closed
     at java.net.PlainSocketImpl.socketAccept(Native Method)
     at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343)
     at java.net.ServerSocket.implAccept(ServerSocket.java:438)
     at java.net.ServerSocket.accept(ServerSocket.java:409)
     at
org.apache.catalina.connector.warp.WarpConnector.run(WarpConnector.java:590)

     at java.lang.Thread.run(Thread.java:536)

On the tomcat's localhost_log:

2002-08-13 11:46:24 StandardHost[localhost]: Installing web application
at context path /webdav from URL file:C:\webprg\tomcat\webapps\webdav
2002-08-13 11:46:24 WebappLoader[/webdav]: Deploying class repositories
to work directory C:\webprg\tomcat\work\Standalone\localhost\webdav
2002-08-13 11:46:24 StandardManager[/webdav]: Seeding random number
generator class java.security.SecureRandom
2002-08-13 11:46:24 StandardManager[/webdav]: Seeding of random number
generator has been completed
2002-08-13 11:46:24 ContextConfig[/webdav]: Added certificates ->
request attribute Valve
2002-08-13 11:46:24 StandardWrapper[/webdav:default]: Loading container
servlet default
2002-08-13 11:46:24 default: init
2002-08-13 11:46:24 StandardWrapper[/webdav:invoker]: Loading container
servlet invoker
2002-08-13 11:46:24 invoker: init
2002-08-13 11:46:24 jsp: init
2002-08-13 11:46:24 StandardWrapper[/webdav:ssi]: Loading container
servlet ssi
2002-08-13 11:46:24 ssi: init

No messages on mod_jk.log.


[EMAIL PROTECTED] escribi�::

 >Well can't pin-point the problem since you haven't provided any clues.
What
 >do the DocumentRoot, Context, and JkMount statements say? How about
 >displaying the directory structure of where the jsps and shtml files are
 >located.
 >How about displaying the appropriate portions of the log in here. Might
 >help in quickly resolving your problem.
 >
 >RS
 >
 >
 >
 >

 >                      MadBit

 >                      <madbit@telepolis        To:       Tomcat Users
List
 >                      .com>
<[EMAIL PROTECTED]>
 >                                               cc:

 >                      08/12/02 05:07 PM        Subject:  Re: .shtml
with 4.0.4
 >                      Please respond to

 >                      "Tomcat Users

 >                      List"

 >

 >

 >
 >
 >
 >
 >
 >     Any changes to httpd.conf or web.xml files? I have a 404 from
 >tomcat. The pages are located on apache.
 >
 >[EMAIL PROTECTED] escribi�::
 >
 > >First the <servlet code...></servlet> isn't supported by Tomcat. It
 >isn't a
 > >standard tag i.e. it isn't defined in the servlet specs. You should use
 > ><jsp include /> instead. Convert  the .shtml files (be careful if you
 >have
 > >SSI includes or CGI processing in the shtml files) that contain the
 > ><servlet> tags to .jsps.
 > >And then replace the
 > ><servlet code="classpath.Class"></servlet>
 > >with
 > ><jsp:include page="/servlet/classpath.Class" flush="true"/>
 > >
 > >
 > >RS
 > >
 > >
 > >
 > >
 > >
 >
 > >                      MadBit
 >
 > >                      <madbit@telepolis        To:
 >[EMAIL PROTECTED]
 > >                      .com>                    cc:
 >
 > >                                               Subject:  .shtml with
 >4.0.4
 > >                      08/12/02 04:45 AM
 >
 > >                      Please respond to
 >
 > >                      "Tomcat Users
 >
 > >                      List"
 >
 > >
 >
 > >
 >
 > >
 > >
 > >
 > >
 > >
 > >    Hello.
 > >
 > >    I'm using Tomcat 4.0.4 with Apache 1.3.26 on Windows 2000.
 > >
 > >    I want to use .shtml pages. In tomcat I enabled de SSI servlet and
 > >mapping on web.xml,
 > >and on Apache I enabled the AJP connector and enabled .shtml
processing:
 > >
 > >
 > >
 > >>LoadModule jk_module modules/mod_jk.dll
 > >>Addmodule mod_jk.c
 > >>
 > >>JkWorkersFile /webprg/tomcat/conf/jk/workers.properties
 > >>JkLogFile /webprg/apache/logs/mod_jk.log
 > >>JkLogLevel info
 > >>
 > >>
 > >
 > >....
 > >
 > >AddType text/html .shtml
 > >AddHandler server-parsed .shtml
 > >
 > >...
 > >JkMount /*.jsp ajp13
 > >JkMount /servlet/* ajp13
 > >JkMOunt /*.shtml ajp13
 > >
 > >    On a .shtml page I have a <servlet code
="classpath.Class"></servlet>
 > >call. The called Class it's working fine calling directely via
 > >'localhost/servlet/classpath.Class' URL but with the .shtml the Class
 > >seems not to be called and the browser never end to load the page,
 > >always it's on awaiting data state.
 > >
 > >    Anyone can help me?
 > >
 > >   Thanks
 > >
 > >
 > >Rogelio Herranz
 > >[EMAIL PROTECTED]
 > >
 > >
 > >
 > >--
 > >To unsubscribe, e-mail:   <
 > >mailto:[EMAIL PROTECTED]>
 > >For additional commands, e-mail: <
 > >mailto:[EMAIL PROTECTED]>
 > >
 > >
 > >
 > >
 > >
 > >
 > >
 > >--
 > >To unsubscribe, e-mail:
 ><mailto:[EMAIL PROTECTED]>
 > >For additional commands, e-mail:
 ><mailto:[EMAIL PROTECTED]>
 > >
 > >
 > >
 > >
 >
 >
 >
 >
 >
 >
 >--
 >To unsubscribe, e-mail:   <
 >mailto:[EMAIL PROTECTED]>
 >For additional commands, e-mail: <
 >mailto:[EMAIL PROTECTED]>
 >
 >
 >
 >
 >
 >
 >
 >--
 >To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
 >For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
 >
 >
 >
 >






--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>







--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to