Hi everybody: Look i'm new in php calling Java. I wanna load PHP as a Servlet from Tomcat, but when i tried to run an test php script i get this error from tomcat screen: "2002-02-19 15:01:00 - Ctx() : Class not found: net.php.servlet" This message says my net.php.servlet class it's not found, now look at my config files: (by the way, my system: Win NT Client SP6, php 4.0.6, JDK 1.3.1, Tomcat 3.3a)
PHP.INI (java related)**************************************************** ;extension=php_interbase.dll extension=php_java.dll /* java extension */ ;extension=php_ldap.dll [Java] java.class.path = "d:\Php4\java\php_java.jar;d:\Php4\java\phpsrvlt.jar;d:\SQLLIB\java\db2java.zip;d:\SQLLIB\java\runtime.zip;d:\SQLLIB\java\sqlj.zip;d:\drivers\Jdbc\DB2_AS400\Jtopen_2_03\lib\jt400.jar;d:\php4\java\;d:\paquetes\;" java.home = c:\jdk1.3.1 ;java.library = c:\jdk1.3.1\jre\bin\hotspot\jvm.dll java.library = c:\jdk1.3.1\jre\bin\server\jvm.dll java.library.path = ".;d:\Php4\extensions\;c:\jdk1.3.1\lib\;c:\jdk1.3.1\jre\lib\;d:\Sqllib\java\;d:\drivers\Jdbc\DB2_AS400\Jtopen_2_03\lib\;d:\SQLLIB\LIB\;d:\SQLLIB\bin\;" PHP.INI (END)**************************************************** tomcat.conf (jserv) ***************************************************************** LoadModule jserv_module modules/ApacheModuleJServ.dll <IfModule mod_jserv.c> ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel notice ApJServDefaultHost localhost ApJServDefaultPort 8007 # # Mounting a single smart context: # # (1) Make Apache know about the context location. Alias /examples D:\jakarta-tomcat-3.3a\webapps\examples # (2) Optional, customize Apache context service. <Directory "D:\jakarta-tomcat-3.3a\webapps\examples"> Options Indexes FollowSymLinks # (2a) No directory indexing for the context root. # Options -Indexes # (2b) Set index.jsp to be the directory index file. # DirectoryIndex index.jsp </Directory> # (3) Protect the WEB-INF directory from tampering. <Location /examples/WEB-INF/> AllowOverride None deny from all </Location> # (4) Instructing Apache to send all the .jsp files under the context to the # jserv servlet handler. <LocationMatch /examples/*.jsp> SetHandler jserv-servlet </LocationMatch> # (5) Direct known servlet URLs to Tomcat. ApJServMount /examples/servlet /examples # (6) Optional, direct servlet only contexts to Tomcat. ApJServMount /servlet /ROOT </IfModule> tomcat.conf (END) ***************************************************************** web.xml (tomcat) ***************************************************************** <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <!-- ***** Intervencion con adicion de Servlet PHP4 --> <servlet> <servlet-name>php</servlet-name> <servlet-class>net.php.servlet</servlet-class> </servlet> <servlet> <servlet-name>php-formatter</servlet-name> <servlet-class>net.php.formatter</servlet-class> </servlet> <!-- ***** FIN Intervencion con adicion de Servlet PHP4 --> <servlet> <servlet-name> snoop </servlet-name> <servlet-class> SnoopServlet </servlet-class> <!-- <init-param> <param-name>foo</param-name> <param-value>bar</param-value> </init-param> --> </servlet> <servlet> <servlet-name> servletToJsp </servlet-name> <servlet-class> servletToJsp </servlet-class> </servlet> <!-- ***** Intervencion con adicion de Servlet Mapping para PHP4 --> <servlet-mapping> <servlet-name>php</servlet-name> <url-pattern>*.php</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>php-formatter</servlet-name> <url-pattern>*.phps</url-pattern> </servlet-mapping> <!-- ***** FIN Intervencion con adicion de Servlet Mapping para PHP4 --> <servlet-mapping> <servlet-name> snoop </servlet-name> <url-pattern> /snoop </url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name> snoop </servlet-name> <url-pattern> /snoop/* </url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name> snoop </servlet-name> <url-pattern> *.snp </url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name> servletToJsp </servlet-name> <url-pattern> /servletToJsp </url-pattern> </servlet-mapping> <taglib> <taglib-uri> http://java.apache.org/tomcat/examples-taglib </taglib-uri> <taglib-location> /WEB-INF/jsp/example-taglib.tld </taglib-location> </taglib> <security-constraint> <web-resource-collection> <web-resource-name>Protected Area</web-resource-name> <!-- Define the context-relative URL(s) to be protected --> <url-pattern>/jsp/security/protected/*</url-pattern> <!-- If you list http methods, only those methods are protected --> <http-method>DELETE</http-method> <http-method>GET</http-method> <http-method>POST</http-method> <http-method>PUT</http-method> </web-resource-collection> <auth-constraint> <!-- Anyone with one of the listed roles may access this area --> <role-name>tomcat</role-name> <role-name>role1</role-name> </auth-constraint> </security-constraint> <!-- Default login configuration uses BASIC authentication --> <!-- <login-config> <auth-method>BASIC</auth-method> <realm-name>Example Basic Authentication Area</realm-name> </login-config> --> <!-- Form-based login is enabled by default. If you wish to try Basic authentication, comment out the <login-config> section below and uncomment the one above. --> <login-config> <auth-method>FORM</auth-method> <realm-name>Example Form-Based Authentication Area</realm-name> <form-login-config> <form-login-page>/jsp/security/login/login.jsp</form-login-page> <form-error-page>/jsp/security/login/error.jsp</form-error-page> </form-login-config> </login-config> </web-app> web.xml (END) ***************************************************************** CAN ANYONE HELP ME, PLEASE. THANKS IN ADVANCE. Ralg -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php