Tomcat 3.2.1 servlet load on startup problem
Hi, I have been following the instructions in the tomcat faq to start a servlet whenever tomcat starts, but with no luck, can someone give me a light? When-ever I start tomcat, the console should beam out a message which says "Servlet Loaded" and set a "appServerPath" variable, however, its just simply not load. I can run the servlet manually with no problem, the console will beam out the message, and set that variable here is the context path in the server.xml of tomcat: Context path="/myDir" docBase="C:\myDir" crossContext="true" debug="0" reloadable="true" trusted="false" /Context Here is the web.xml in the C:\myDir\WEB-INF\: which dezscribes the servlet to load: servlet servlet-nameservletInit_newsgroup/servlet-name servlet-classcom.myservlet.servletInit_newsgroup/servlet-class load-on-startup1/load-on-startup /servlet the servlet is located in C:\myDir\WEB-INF\classes\com\myservlet\ am I missing something? Thanks! servletInit_newsgroup.java
How to access servlets without prefixes
Hi all how can I access a servlet wich is mapped to any *.xml file without giving him any prefix like /mywebapp? servlet servlet-nameXmlFilter/servlet-name servlet-classmyServlets.xmlFilter.XmlFilter/servlet-class /servlet servlet-mapping servlet-nameXmlFilter/servlet-name url-pattern*.xml/url-pattern /servlet-mapping This should be accessable from every sub directory on my host. Host name="www.myhost.org" Context path="" docBase="C:/path/to/htdocs" debug="0" reloadable="true" trusted="true" /Context /Host This data is stored in $tomcat/conf/web.xml, because I thought these information are available for all hosts defined in server.xml. But it doesn't work. Why and how should I define it? Thanks in advance, Christian Parpart SurakWare [EMAIL PROTECTED] http://www.surakware.com
Re: Reloading JSP is a bug?
- Original Message - From: "Craig R. McClanahan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 22, 2000 11:55 PM Subject: Re: Reloading JSP is a bug? Andreas Sheriff wrote: Hi, JGuru states that there is a bug in Tomcat 3.1 where a jsp page converted to a servlet still loads, even though the original jsp page was deleted (http://www.jguru.com/jguru/faq/view.jsp?EID=224108). Is this still a bug in 3.2? Well, you have to get into a pedantic discussion of "bug" versus "feature" to decide what's really going on :-) When you are outside the scope of the relevant specifications (as we are here), it can get difficult to know sometimes. To complete the pedantic discussion, the difference between a bug and a feature is that a bug is unintended. I have Tomcat 3.2 installed on a Linux platform, but I find myself having to restart Tomcat whenever I want the jsp to reflect any change in the generated servlet. I have even tried deleting the source and class files in the work directory, but that doesn't work. Does anyone have any ideas on how to correct this? Or do I have to wait for Tomcat 4.0 to be completed. Let's divide this world into at least two sub-worlds: * I changed the JSP source code itself. All JSP engines are required by the specs to recompile the page in this case, and therefore reflect the changes. I've had no problems with this in 3.2 or 4.0. * I changed a bean class used in a JSP page, without updating the JSP page itself. The 3.1 and 3.2 approaches to auto-reloading a web app do not correctly detect all cases of this. The 4.0 approach should do so correctly for classes in WEB-INF/classes (not yet for classes in JAR files under WEB-INF/lib). Under *no* version of Tomcat will you be able to update classes that were loaded via the CLASSPATH, and have them reflected in changed behavior in your web app, without restarting Tomcat. I don't have my JSP files, nor the work directory in my classpath, yet, still, they do not reload without restarting Tomcat. Even if I delete the source and class files in the $TOMCAT_HOME/work directory they still get regenerated from the old JSF source. Is Tomcat caching my JSF file somewhere? If so, how do I get it to stop? By the way, I have my JSF files on a network drive, however, I don't think that the NFS is caching the file, because it sees the new copy when I restart Tomcat, not the NFS. How stable is Tomcat 4.0? Can I install it instead of 3.2 without error? Andreas Sheriff Craig McClanahan
Re: Reloading JSP is a bug? [humor]
On 12/23/2000 at 2:29 AM Andreas Sheriff wrote: To complete the pedantic discussion, the difference between a bug and a feature is that a bug is unintended. Oh, come-on, completing a pendantic discussion is clearly an oxymoron. Given the usual lack of architectural documentation, what was intended is anyone's guess. And, even then, some of the world's best features have been unintended (at least by us mere mortals) ;-). So the pendantic slice and dice quickly degrades to feature, unintended feature, intended but undocumented feature, and if all else fails, and the behaviour is clearly objectionable to any reasonable observer, and even cannot be spun by a marketing rep with a straight face, then it may actually be (ahemm) a bug. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 425-0252; Fax 716 223-2506. -- http://www.husted.com/
Re: Reloading JSP is a bug? [humor]
- Original Message - From: "Ted Husted" [EMAIL PROTECTED] To: "Tomcat User List" [EMAIL PROTECTED] Sent: Saturday, December 23, 2000 3:15 AM Subject: Re: Reloading JSP is a bug? [humor] On 12/23/2000 at 2:29 AM Andreas Sheriff wrote: To complete the pedantic discussion, the difference between a bug and a feature is that a bug is unintended. Oh, come-on, completing a pendantic discussion is clearly an oxymoron. Given the usual lack of architectural documentation, what was intended is anyone's guess. And, even then, some of the world's best features have been unintended (at least by us mere mortals) ;-). So the pendantic slice and dice quickly degrades to feature, unintended feature, intended but undocumented feature, and if all else fails, and the behaviour is clearly objectionable to any reasonable observer, and even cannot be spun by a marketing rep with a straight face, then it may actually be (ahemm) a bug. Good point. :) And the sad thing is, I know exactly what you're talking about. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 425-0252; Fax 716 223-2506. -- http://www.husted.com/
Re: mod_jk and apache 1.3.12
Did you verify that there is no syntax error in your httpd.conf ? apachectl -configure ? -Original Message- From: Boon Yeo [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: December 23, 2000 5:51 AM Subject: mod_jk and apache 1.3.12 I have compile mod_jk with no errors. I have place it in /etc/httpd/libexec (redhat 6.2 directory structure). I have modified httpd.conf to include LoadModule jk_module libexec/mod_jk.so But my apache 1.3.12 won't start. There are no error messages (not even in error_log) which I could use to debug what's going wrong. Any ideas? Thanks, -Boon
Re: Tomcat 3.2.1 servlet load on startup problem
"Sunny L.S.Chan" wrote: Hi, I have been following the instructions in the tomcat faq to start a servlet whenever tomcat starts, but with no luck, can someone give me a light? When-ever I start tomcat, the console should beam out a message which says "Servlet Loaded" and set a "appServerPath" variable, however, its just simply not load. I can run the servlet manually with no problem, the console will beam out the message, and set that variable here is the context path in the server.xml of tomcat: Context path="/myDir" docBase="C:\myDir" crossContext="true" debug="0" reloadable="true" trusted="false" /Context Here is the web.xml in the C:\myDir\WEB-INF\: which dezscribes the servlet to load: servlet servlet-nameservletInit_newsgroup/servlet-name servlet-classcom.myservlet.servletInit_newsgroup/servlet-class load-on-startup1/load-on-startup /servlet the servlet is located in C:\myDir\WEB-INF\classes\com\myservlet\ am I missing something? You've got all the configuration stuff right ... the problem is in your servlet. Your initialization message is generated in the doGet() method, which is only called when a request actually comes in. If you want to do things when the servlet is first loaded, place that code in the init() method instead. Note that init() does not receive a request object (because it is not called as the result of a request). Therefore, you will need to use some other technique to initialize your "appServerPath" context attribute. A common technique would be to use a servlet initialization parameter that is read in the init method: servlet servlet-nameservletInit_newsgroup/servlet-name servlet-classcom.myservlet.servletInit_newsgroup/servlet-class init-param param-nameserverPath/param-name param-valuehttp://www.mycompany.com:8080/param-value /init-param load-on-startup1/load-on-startup /servlet and then in your servlet: public void init() throws ServletException() { String path = getServletConfig().getInitParameter("serverPath"); getServletContext().setAttribute("appServerPath", path); System.out.println("Servlet loaded"); } Thanks! Craig McClanahan
Re: How to access servlets without prefixes
Christian Parpart wrote: Hi all how can I access a servlet wich is mapped to any *.xml file without giving him any prefix like /mywebapp? servlet servlet-nameXmlFilter/servlet-name servlet-classmyServlets.xmlFilter.XmlFilter/servlet-class /servlet servlet-mapping servlet-nameXmlFilter/servlet-name url-pattern*.xml/url-pattern /servlet-mapping This should be accessable from every sub directory on my host. Host name="www.myhost.org" Context path="" docBase="C:/path/to/htdocs" debug="0" reloadable="true" trusted="true" /Context /Host This data is stored in $tomcat/conf/web.xml, because I thought these information are available for all hosts defined in server.xml. That was true in Tomcat 3.1 (and 4.0), but was changed in 3.2. You will need to put your servlet and servlet-mapping definitions in the WEB-INF/web.xml file for each application. But it doesn't work. Why and how should I define it? Thanks in advance, Christian Parpart SurakWare [EMAIL PROTECTED] http://www.surakware.com Craig McClanahan
AW: How to access servlets without prefixes
-Ursprungliche Nachricht- Von: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Christian Parpart wrote: Hi all how can I access a servlet wich is mapped to any *.xml file without giving him any prefix like /mywebapp? servlet servlet-nameXmlFilter/servlet-name servlet-classmyServlets.xmlFilter.XmlFilter/servlet-class /servlet servlet-mapping servlet-nameXmlFilter/servlet-name url-pattern*.xml/url-pattern /servlet-mapping This should be accessable from every sub directory on my host. Host name="www.myhost.org" Context path="" docBase="C:/path/to/htdocs" debug="0" reloadable="true" trusted="true" /Context /Host This data is stored in $tomcat/conf/web.xml, because I thought these information are available for all hosts defined in server.xml. That was true in Tomcat 3.1 (and 4.0), but was changed in 3.2. You will need to put your servlet and servlet-mapping definitions in the WEB-INF/web.xml file for each application. Wonderfull, I think you know how to do that with 4.0, 'cause I downloaded it and configured it without success. What should I do to use Cocoon2 or 1.8.1 dev for all my *.xml files. I had spend my hole nights to find that out - without any good results. Please give me an example if you know how to define that. But it doesn't work. Why and how should I define it? Thanks in advance, Christian Parpart SurakWare [EMAIL PROTECTED] http://www.surakware.com Craig McClanahan Christian Parpart
Re: How to access servlets without prefixes
Hi I think this url could be of some help though i havent tested it out myself.. http://www.iris.dti.ne.jp/~u-osamu/indexfreebsd122.html Hope this helps Anand On Sat, Dec 23, 2000 at 05:59:06PM +0100, Christian Parpart wrote: -Ursprungliche Nachricht- Von: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Christian Parpart wrote: Hi all how can I access a servlet wich is mapped to any *.xml file without giving him any prefix like /mywebapp? servlet servlet-nameXmlFilter/servlet-name servlet-classmyServlets.xmlFilter.XmlFilter/servlet-class /servlet servlet-mapping servlet-nameXmlFilter/servlet-name url-pattern*.xml/url-pattern /servlet-mapping This should be accessable from every sub directory on my host. Host name="www.myhost.org" Context path="" docBase="C:/path/to/htdocs" debug="0" reloadable="true" trusted="true" /Context /Host This data is stored in $tomcat/conf/web.xml, because I thought these information are available for all hosts defined in server.xml. That was true in Tomcat 3.1 (and 4.0), but was changed in 3.2. You will need to put your servlet and servlet-mapping definitions in the WEB-INF/web.xml file for each application. Wonderfull, I think you know how to do that with 4.0, 'cause I downloaded it and configured it without success. What should I do to use Cocoon2 or 1.8.1 dev for all my *.xml files. I had spend my hole nights to find that out - without any good results. Please give me an example if you know how to define that. But it doesn't work. Why and how should I define it? Thanks in advance, Christian Parpart SurakWare [EMAIL PROTECTED] http://www.surakware.com Craig McClanahan Christian Parpart
Tomcat 3.2.1 on SCO O/S 5.0.4
I am trying to get Tomcat 3.2.1 running under SCO Openserver 5.0.4. The JSP examples fail with an Error 500. I have seen entries somewhere (the FAQ I believe) that suggest that the problem could be that "jasper.jar" or "tools.jar" are not in the CLASSPATH. The "jasper.jar" file is easy; it is in the Tomcat "lib" subdir; however, the "tools.jar" file is nowhere on my system. I have installed the Sun JRE and the JDK (SCO's version), but still have no "tools.jar". Has someone been here and done this? Thanks, Steve Wyatt
Re: How to access servlets without prefixes
Christian, add the "home" parameter to the Context. This is explained in the the server.xml comments near the Context entries. This seems to be required whenever you use a directory as docbase which is not in webapps. Dave - Original Message - From: "Christian Parpart" [EMAIL PROTECTED] To: "Apache Tomcat (User) MailingList" [EMAIL PROTECTED] Sent: Saturday, December 23, 2000 4:44 AM Subject: How to access servlets without prefixes Hi all how can I access a servlet wich is mapped to any *.xml file without giving him any prefix like /mywebapp? servlet servlet-nameXmlFilter/servlet-name servlet-classmyServlets.xmlFilter.XmlFilter/servlet-class /servlet servlet-mapping servlet-nameXmlFilter/servlet-name url-pattern*.xml/url-pattern /servlet-mapping This should be accessable from every sub directory on my host. Host name="www.myhost.org" Context path="" docBase="C:/path/to/htdocs" debug="0" reloadable="true" trusted="true" /Context /Host This data is stored in $tomcat/conf/web.xml, because I thought these information are available for all hosts defined in server.xml. But it doesn't work. Why and how should I define it? Thanks in advance, Christian Parpart SurakWare [EMAIL PROTECTED] http://www.surakware.com
Re: Tomcat 3.2.1 on SCO O/S 5.0.4
Steve, A good first step would be to run javac and see if it is available. The release notes for jdk1.1.7, which are here http://www.sco.com/java/jdk117b/ReleaseNotes.html state that most things are the same as with the Solaris distro. On Solaris, tools.jar is normally in /usr/jdk/lib Do you have a similar folder, and what's in it? Finally, echo your CLASSPATH and see what is already set. Dave - Original Message - From: "Steve Wyatt" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 23, 2000 1:27 PM Subject: Tomcat 3.2.1 on SCO O/S 5.0.4 I am trying to get Tomcat 3.2.1 running under SCO Openserver 5.0.4. The JSP examples fail with an Error 500. I have seen entries somewhere (the FAQ I believe) that suggest that the problem could be that "jasper.jar" or "tools.jar" are not in the CLASSPATH. The "jasper.jar" file is easy; it is in the Tomcat "lib" subdir; however, the "tools.jar" file is nowhere on my system. I have installed the Sun JRE and the JDK (SCO's version), but still have no "tools.jar". Has someone been here and done this? Thanks, Steve Wyatt
can't build tomcat source
I get this error when I attempt to run ./build.sh in my tomcat dir: root@stout:/usr/local/jakarta/jakarta-tomcat# ./build.sh Buildfile: build.xml BUILD FAILED build.xml:33: Could not create task of type: copy because I can't find it in the list of task class definitions I use ant fairly often to compile java projects, so I'm sure ant is working - it did successfully build jakarta-servletapi. _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: can't build tomcat source
Building Tomcat 3.2 or 4.0 requires Ant 1.2 (which is where the copy task was introduced). Craig McClanahan Sean Yunt wrote: I get this error when I attempt to run ./build.sh in my tomcat dir: root@stout:/usr/local/jakarta/jakarta-tomcat# ./build.sh Buildfile: build.xml BUILD FAILED build.xml:33: Could not create task of type: copy because I can't find it in the list of task class definitions I use ant fairly often to compile java projects, so I'm sure ant is working - it did successfully build jakarta-servletapi. _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: Tomcat threads..
On Fri, 22 Dec 2000, Craig R. McClanahan wrote: | Endre Stølsvik wrote: | | I'm trying desperately to get tomcat to use only ONE thread. But I always | seem to end up with 10 or so.. | | I guess this is because of tomcat internals, but just how many threads | does tomcat really need? | | | Tomcat needs one thread for each simultaneous request you want it to be able to | handle, plus a few assorted background threads (such as checking for expired | sessions). | | Even if you modified Tomcat to use only one thread, you would be terribly | disappointed with the performance. Consider that most browsers (by default) | will initiate multiple requests, even for a single user, to retrieve images on | that page. Yes, this is only for development purposes. I have a bunch of separate server setups on one box, one for each developer (because of the not working at all reload issue on tomcat 3.2). Only one guy is using each tomcat, so the whole point is that I don't want a bunch of threads doing nothing. I'm wondering about how that threadpool is working (I set it up with max 3, 0 min_spare and 1 max_spare. But I still got around 10-12 threads (Linux ps shows this because of the hack linux uses for threads)). Just how many background threads is tomcat actually using? Thanks! -- Mvh, Endre
Re: can't build tomcat source
I installed ant 1.2 and everything works perfect. Thanks so much! I'll scrutinized over version #s from now on. Original Message Follows From: "Craig R. McClanahan" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: can't build tomcat source Date: Sat, 23 Dec 2000 11:32:56 -0800 Building Tomcat 3.2 or 4.0 requires Ant 1.2 (which is where the copy task was introduced). Craig McClanahan Sean Yunt wrote: I get this error when I attempt to run ./build.sh in my tomcat dir: root@stout:/usr/local/jakarta/jakarta-tomcat# ./build.sh Buildfile: build.xml BUILD FAILED build.xml:33: Could not create task of type: copy because I can't find it in the list of task class definitions I use ant fairly often to compile java projects, so I'm sure ant is working - it did successfully build jakarta-servletapi. _ Get your FREE download of MSN Explorer at http://explorer.msn.com _ Get your FREE download of MSN Explorer at http://explorer.msn.com
need help to run tomcat
hello friends i am using tomcat 3.2 first time and i face a problem to run tomcat3.2 . after setting JAVA_HOME TOMCAT_HOME when i run startup.bat file it show me the message that cannot find file 'c:\jdk1.3;\bin\java (or one of components). Check to ensure the path and filename are correct and that all requried libraries are avaiable. please give me the solution of this problem. thanks Amit Madan _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com
Installation Problems
Hello, i allready succesfully installed Tomcat with Apache on my Windows NT4 workstation at work. There i have : Apache 1.3.14, Tomcat 3.2, JDK 1.2.2 Now i would like to install it on my home WindowsNT4-Server too. There i have installed: Apache 1.3.14, MS-IIS 3,MS-Proxy 2, Tomcat 3.2 and the new JDK 1.3 I tried to run Tomcat through Apache on a different port. That did not work. Then i tried to make it work with the isapi_redirect.dll through IIS. After some hours i managed to get a "Tomcat/log/isapi.log". In the log i read: -8- [jk_isapi_plugin.c (408)]: HttpFilterProc started [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of http://192.168.1.1/examples [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (430)]: In jk_uri_worker_map_t::map_uri_to_worker, wrong parameters [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [jk_isapi_plugin.c (452)]: HttpFilterProc [http://192.168.1.1/examples] is not a servlet url [jk_isapi_plugin.c (461)]: HttpFilterProc check if [http://192.168.1.1/examples] is points to the web-inf directory -8- What does that mean? Is it because of a different JDK or is it because i misconfigured the tomcat-server? I copied the uriworkermap.properties-auto for the configuration of the workers. thanx for your help Nostromo
[repost] endless loop in jsp
Sorry to repost this question, but I really have no clue. The problem is that java grabs 100% of my CPU in some conditions, when I try to access some jsp files, and I cannot figure how to solve it. Here is the configuration: I am using apache tomcat. I have some virtual hosts, defined like this: VirtualHost 1.2.3.4 ServerAdmin [EMAIL PROTECTED] DocumentRoot /zob ServerName www.zob.com ErrorLog /var/log/httpd-zob.error_log TransferLog /var/log/httpd-zob.access_log ApJServMount /servlets /ROOT/servlets Directory "/zob/*/WEB-INF" Options None Deny from all /Directory /VirtualHost In tomcat.conf, I have: ApJServMount default /root AddType text/jsp .jsp AddHandler jserv-servlet .jsp And in server.xml: Host name="www.zob.com" Context path="/servlets" docBase="/zob/servlets" debug="0" reloadable="true" / /Host The problem is the following: When I access a jsp file in /zob/servlets, it works well. But if I try to access a jsp file somewhere else (for instance /zob/foo.jsp), a java process hangs, and takes 100% of my cpu. The only solution is to kill it and restart tomcat. If I try to access a non existent jsp file in /zob/servlets, I get a (correct) 404 page, but if I try to access a non-existent jsp file somewhere else, tomcat hangs also (100% cpu). The problem is that after tomcat begins looping, it becomes obviously impossible to access any other page :-( Is there something wrong in my configuration? Bruno. -- Avec Linux vous avez un noyau, avec Windows des pépins.
tomcat startup error
hi, i am using tomcat server in linux platform. It was working well but afterwards i tried to install xml in my linux box. then xml was also working well. but when i reboot the system and tried to startup the tomcat-apache server i got this type of error: and also i tried by removing the directories which was used during unzipping the xml it also doesnot work. [root@host user]# Using classpath: .:/usr/software/jakarta-tomcat/lib/ant.jar: /usr/software/jakarta-tomcat/lib/jasper.jar: /usr/software/jakarta-tomcat/lib/servlet.jar: /usr/software/jakarta-tomcat/lib/test: /usr/software/jakarta-tomcat/lib/webserver.jar:/ usr/software/jakarta-tomcat/lib/xml.jar: /usr/software/jdk1.2.2/bin/../lib/tools.jar:: /usr/software/jakarta-tomcat/lib/servlet.jar: /usr/software:/usr/software/mysql/mm.mysql.jdbc-1.2c/mysql_comp.jar: /usr/software/Energy/eol/java: /usr/software/mysql/mm.mysql.jdbc-1.2c/mysql_comp.jar [root@host user]#FATAL: configuration error java.lang.ClassNotFoundException: com.sun.xml.parser.Parser at java.net.URLClassLoader$1.run(URLClassLoader.java:201) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:311) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.xml.sax.helpers.ParserFactory.makeParser(ParserFactory.java:124) at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:191) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:143) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163) FATAL: configuration error java.lang.Exception: Error creating sax parser at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:207) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:143) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163) please any one can help me thanx in advance. utsab regards, utsab koirala world distribution nepal 243706 res. phone 479605 Get free email and a permanent address at http://www.netaddress.com
Re: tomcat startup error
You need to put parser.jar in your classpath. Download at: http://java.sun.com/xml Dave --- utsab koirala [EMAIL PROTECTED] wrote: hi, i am using tomcat server in linux platform. It was working well but afterwards i tried to install xml in my linux box. then xml was also working well. but when i reboot the system and tried to startup the tomcat-apache server i got this type of error: and also i tried by removing the directories which was used during unzipping the xml it also doesnot work. [root@host user]# Using classpath: .:/usr/software/jakarta-tomcat/lib/ant.jar: /usr/software/jakarta-tomcat/lib/jasper.jar: /usr/software/jakarta-tomcat/lib/servlet.jar: /usr/software/jakarta-tomcat/lib/test: /usr/software/jakarta-tomcat/lib/webserver.jar:/ usr/software/jakarta-tomcat/lib/xml.jar: /usr/software/jdk1.2.2/bin/../lib/tools.jar:: /usr/software/jakarta-tomcat/lib/servlet.jar: /usr/software:/usr/software/mysql/mm.mysql.jdbc-1.2c/mysql_comp.jar: /usr/software/Energy/eol/java: /usr/software/mysql/mm.mysql.jdbc-1.2c/mysql_comp.jar [root@host user]#FATAL: configuration error java.lang.ClassNotFoundException: com.sun.xml.parser.Parser at java.net.URLClassLoader$1.run(URLClassLoader.java:201) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:311) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.xml.sax.helpers.ParserFactory.makeParser(ParserFactory.java:124) at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:191) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:143) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163) FATAL: configuration error java.lang.Exception: Error creating sax parser at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:207) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:143) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163) please any one can help me thanx in advance. utsab HR br regards,brbrbr utsab koiralabr world distribution nepalbr 243706br br font color=maroon size=5res. phone 479605/fontbr BR HR noshade width="90%" Get free email and a permanent address at a href=http://www.netaddress.com/?N=1http://www.netaddress.com/a __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
AW: How to access servlets without prefixes
Hi, unfortunately there was no description of any home attribute. I just found in all Tomcat version I downloaded the following: Ejb name="ejb/EmplRecord" type="Entity" home="com.wombat.empl.EmployeeRecordHome" remote="com.wombat.empl.EmployeeRecord"/ What does it mean, perhaps 'Extended java bean'? But you meant to add the home attribute to the context (the Context-tag?). Host name="cparpart.homeip.net" Context path="" home="??" [ place it here?, for what ] docBase="C:/Eigene Dateien/projects/surakware/htdocs" debug="0" reloadable="true" trusted="true" Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="surakware_access_log." suffix=".txt" pattern="common"/ Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="surakware_log." suffix=".txt" timestamp="true"/ /Context /Host Thanks, Christian. -Ursprüngliche Nachricht- Von: Dave Smith [mailto:[EMAIL PROTECTED]] Gesendet: Samstag, 7. Oktober 2000 19:32 An: [EMAIL PROTECTED] Betreff: Re: How to access servlets without prefixes Christian, add the "home" parameter to the Context. This is explained in the the server.xml comments near the Context entries. This seems to be required whenever you use a directory as docbase which is not in webapps. Dave - Original Message - From: "Christian Parpart" [EMAIL PROTECTED] To: "Apache Tomcat (User) MailingList" [EMAIL PROTECTED] Sent: Saturday, December 23, 2000 4:44 AM Subject: How to access servlets without prefixes Hi all how can I access a servlet wich is mapped to any *.xml file without giving him any prefix like /mywebapp? servlet servlet-nameXmlFilter/servlet-name servlet-classmyServlets.xmlFilter.XmlFilter/servlet-class /servlet servlet-mapping servlet-nameXmlFilter/servlet-name url-pattern*.xml/url-pattern /servlet-mapping This should be accessable from every sub directory on my host. Host name="www.myhost.org" Context path="" docBase="C:/path/to/htdocs" debug="0" reloadable="true" trusted="true" /Context /Host This data is stored in $tomcat/conf/web.xml, because I thought these information are available for all hosts defined in server.xml. But it doesn't work. Why and how should I define it? Thanks in advance, Christian Parpart SurakWare [EMAIL PROTECTED] http://www.surakware.com