Coyote, tomcat4 and apache, catalina.Connector not found
Im trying to connect tomcat4 and apache with coyote and when I launch tomcat here is what I get: java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: org/apache/catalina/Connector at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:694) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:133) at java.net.URLClassLoader.defineClass(URLClassLoader.java:319) at java.net.URLClassLoader.access$400(URLClassLoader.java:92) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:677) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:238) at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java(Compiled Code)) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1093) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1076) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:142) at org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:616) at org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412) at org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91) at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:362) at javax.xml.parsers.SAXParser.parse(SAXParser.java:301) at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) Has anyone an Idea ? I don't know where that Connector class is and should be. Any help welcome. Thx in advance -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat 4 interaction with apache 2.0
HI all, I ma trying to make work tomcat 4.0.2 with apache 2.0, I added the following line at the end of the httpd.conf file : Include /etc/tomcat4/conf/tomcat4.conf which content is : # tomcat /etc/rc.d script example configuration file # Use with version 1.07 of the scripts or later # Where your java installation lives # JAVA_HOME=/usr/java/jdk JAVA_HOME=/opt/IBMJava2-13 # You can pass some parameters to java # here if you wish to #JAVACMD=$JAVA_HOME/bin/java -Xminf0.1 -Xmaxf0.3 # Where your tomcat installation lives # That change from previous RPM where TOMCAT_HOME # used to be /var/tomcat. # Now /var/tomcat will be the base for webapps only CATALINA_HOME=/var/tomcat4 JASPER_HOME=/var/tomcat4 CATALINA_TMPDIR=/var/tomcat4/temp # What user should run tomcat TOMCAT_USER=tomcat4 # You can change your tomcat locale here #LANG=en_US # If you wish to further customize your tomcat environment, # put your own definitions here # (i.e. LD_LIBRARY_PATH for some jdbc drivers) # Just do not forget to export them :) LoadModule webapp_module modules/mod_webapp.so -- I also have the mod_jk.so available I don't know which to use or why. When I launch apache here is what I get : ./apachectl start Syntax error on line 31 of /etc/tomcat4/conf/tomcat4.conf: Cannot load /usr/local/apache2/modules/mod_webapp.so into server: /usr/local/apache2/modules/mod_webapp.so: undefined symbol: ap_table_get ./apachectl start: httpd could not be started Anyone has evre encountered this problem ? if so, please tell me what I did wrong. Thanks in advance -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Applet - http tunneling - user authentication
Hi tomcatters, Im using user authentication on apache and I would like to make an applet communicate with a servlet through http tunneling. Here is a snippet of the code I use : dataURL = new URL(http,myserver,80,/myservlet?action=connect); connection = dataURL.openConnection(); connection.setUseCaches(false); connection.setRequestProperty(header,value); jTextField1.setText(dataURL.toString()); ObjectInputStream in = new ObjectInputStream(connection.getInputStream()); String value = (String) in.readObject(); jTextField1.setText(Connection established, server says : + value + .); in.close(); When I deactivate the authorization section, it works fine but with it I always got a 401 in access.log Anybody has ever tried to do similar things ? Any help is welcome Regis
web.xml config for taglib
When I try to put my tag files outside of tomcat/webapps/ROOT directory (like in apache/htdocs/jsp) I got this error : org.apache.jasper.compiler.CompileException: C:\utils\Apache\htdocs\jsp\SimpleExample.jsp(12,0) Unable to open taglibrary csajsp-taglib.tld : C:\utils\Apache\htdocs\jsp\WEB-INF\web.xml (The system cannot find the path specified) is there something to be put in this yet inexistant web.xml file ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: unable to use ajp13 ...
There should be something like 2001-01-17 10:27:14 - PoolTcpConnector: Starting Ajp13ConnectionHandler on 8009 in your tomcat window mike niemaz wrote: CPC Livelink Admin wrote: You need to make a copy of mod_jk-auto because it will alwys be generated with ajp12 connections. So make a copy, mod it to use ajp13, and refer apache to your copy instead of the auto file. -Original Message- From: Barclay, Tom [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 10:45 AM To: '[EMAIL PROTECTED]' Subject: RE: unable to use ajp13 ... Did you set the AJP13 protocol in the JkMount directives? Hi, Yes I set up the JkMount directives in mod_jk.conf file such as: JkMount /docsoul/servlet/* ajp13 JkMount /docsoul/jsp/*.jsp ajp13 This mod_jk.conf is a copy of the auto generated mod_jk.conf-auto with some modifications (ajp12 changed by ajp13, some noisy mounted context removed (like .cvsignore, CVS!!!), and more ...). And there's a link to it in my http.conf such as: Include /home/niemaz/DocumentSoul/build/tomcat/conf/mod_jk.conf But I'm not sure ajp13 is really used indeed How could I check this out? Thanx, --mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
jsp document root
Sorry to ask such a trivial question to all of you but how can I put my .jsp files outside of the ROOT Directory of tomcat in e.g. in apache\htdocs ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
session tracking
Im a bit confused cuz I were told session tracking automatically switched from cookies to url rewriting when cookies arent enabled in browser but it doesn't seem to work with this simple example : package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.net.*; import java.util.*; /** Simple example of session tracking. * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * copy; 2000 Marty Hall; may be freely used or adapted. */ public class ShowSession extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String title = "Session Tracking Example"; HttpSession session = request.getSession(true); String heading; // Use getAttribute instead of getValue in version 2.2. Integer accessCount = (Integer)session.getAttribute("accessCount"); if (accessCount == null) { accessCount = new Integer(0); heading = "Welcome, Newcomer"; } else { heading = "Welcome Back"; accessCount = new Integer(accessCount.intValue() + 1); } // Use setAttribute instead of putValue in version 2.2. session.setAttribute("accessCount", accessCount); out.println(ServletUtilities.headWithTitle(title) + "BODY BGCOLOR=\"#FDF5E6\"\n" + "H1 ALIGN=\"CENTER\"" + heading + "/H1\n" + "H2Information on Your Session:/H2\n" + "TABLE BORDER=1 ALIGN=\"CENTER\"\n" + "TR BGCOLOR=\"#FFAD00\"\n" + " THInfo TypeTHValue\n" + "TR\n" + " TDID\n" + " TD" + session.getId() + "\n" + "TR\n" + " TDCreation Time\n" + " TD" + new Date(session.getCreationTime()) + "\n" + "TR\n" + " TDTime of Last Access\n" + " TD" + new Date(session.getLastAccessedTime()) + "\n" + "TR\n" + " TDNumber of Previous Accesses\n" + " TD" + accessCount + "\n" + "/TABLE\n" + "/BODY/HTML"); } /** Handle GET and POST requests identically. */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } } Could anyone help me ? Is there a thing to configure to accept session tracking ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: init-param
You may need to add a context in TOMCAT_HOME/conf/server.xml like Context path="" docBase="webapps/webdev/WEB-INF" / Fabio Sato wrote: I'm facing a strange problem with servlets and init parameters under Tomcat 3.2.1: I created a servlet and put it in the following directory: $TOMCAT_HOME/webapps/webdev/WEB-INF/classes/coreservlets/ Then, I created the file web.xml under the WEB-INF directory: ?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 servlet servlet-name ShowMsg /servlet-name servlet-class coreservlets.ShowMessage /servlet-class init-param param-namemessage/param-name param-valuexxx/param-value /init-param init-param param-namerepeats/param-name param-value5/param-value /init-param /servlet /web-app With this configuration the servlet didn't read any of the init parameters and both values are set to null. But if I remove the package declaration of the source file, recompile it, put the servlet in the WEB-INF/classes directory, and remove the package prefix in the servlet-class section of the web.xml, everything works fine. Any hints? -- Fbio Sato - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: session tracking
Thanks but how could it work when clicking on netscape reload button ? Christopher Kirk wrote: For session tracking to work, look at the following 2 methods resonse.encodeURL and response.encodeRedirectURL In this way, session tracking will only work when following links because URL re-writting requires a link to modify whereas cookies go by the domain within the HTTP request. So, to make your example work you would have to add a href="%=response.encodeURL(address)%"Click me/a - Chris Brainbench MVP Java2 -Original Message- From: Regis Muller [mailto:[EMAIL PROTECTED]] Sent: 15 January 2001 11:05 To: [EMAIL PROTECTED] Subject: session tracking Im a bit confused cuz I were told session tracking automatically switched from cookies to url rewriting when cookies arent enabled in browser but it doesn't seem to work with this simple example : package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.net.*; import java.util.*; /** Simple example of session tracking. * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * copy; 2000 Marty Hall; may be freely used or adapted. */ public class ShowSession extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String title = "Session Tracking Example"; HttpSession session = request.getSession(true); String heading; // Use getAttribute instead of getValue in version 2.2. Integer accessCount = (Integer)session.getAttribute("accessCount"); if (accessCount == null) { accessCount = new Integer(0); heading = "Welcome, Newcomer"; } else { heading = "Welcome Back"; accessCount = new Integer(accessCount.intValue() + 1); } // Use setAttribute instead of putValue in version 2.2. session.setAttribute("accessCount", accessCount); out.println(ServletUtilities.headWithTitle(title) + "BODY BGCOLOR=\"#FDF5E6\"\n" + "H1 ALIGN=\"CENTER\"" + heading + "/H1\n" + "H2Information on Your Session:/H2\n" + "TABLE BORDER=1 ALIGN=\"CENTER\"\n" + "TR BGCOLOR=\"#FFAD00\"\n" + " THInfo TypeTHValue\n" + "TR\n" + " TDID\n" + " TD" + session.getId() + "\n" + "TR\n" + " TDCreation Time\n" + " TD" + new Date(session.getCreationTime()) + "\n" + "TR\n" + " TDTime of Last Access\n" + " TD" + new Date(session.getLastAccessedTime()) + "\n" + "TR\n" + " TDNumber of Previous Accesses\n" + " TD" + accessCount + "\n" + "/TABLE\n" + "/BODY/HTML"); } /** Handle GET and POST requests identically. */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } } Could anyone help me ? Is there a thing to configure to accept session tracking ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]