Re: where to put config.xml
Hi Saeed I think this better that you don't put CATALINA_HOME in your environment variables, because TOMCAT recognizes that automatically (because this same as Tomcat installation dir), plus you can put the JAVA_HOME directly in setclasspath.bat (in bin dir). In installaton time you must indicate your JAVA_HOME.After that you must don't change your JAVA_HOME or create an environment variable for that. By Sayeed [EMAIL PROTECTED] wrote: Dear Sir/Madam I do not know much about the Question - so sorry sir/madam as i am new to this thing. I do have however question from you. I start learning JSP and ohter J2EE tools recently. I buy a book of Professional JSP 2nd Edition. Sir i am facing a problem: I dowload jakarta_tomcat 4.1.30.exe from the website. I already do have jdk1.3 at my PC ( iam using win98 OS). Now after installing jakarta_tomcat to a folder c\apache\tomcat, I create two environment variables into my Autoexe.bat file as under : set JAVA_HOME=C:\jdk1.3 set CATALINA_HOME=C:\APACHE\TOMCAT Now when I Start Tomcat - a DOS base window is opened and remained active for few seconds and then close automatically. Also i try Startup.bat file at MS DOS promt, it shows some lines as follows: C:\Apache\Tomcat\binstartup Using CATALINA_BASE: C:\APACHE\TOMCAT Using CATALINA_HOME: C:\APACHE\TOMCAT Using CATALINA_TMPDIR: C:\APACHE\TOMCAT\temp Using JAVA_HOME: C:\jdk1.3 C:\Apache\Tomcat\bin And in the mid also a new DOS base window shows a name 'Java' opened for few seconds and automatically closed. Sir/Madam, whats the wrong with the tomcat? coz as per book instructions it must shows a Catalina named window and remained active till I did not issue a command Shutdown. So please guide me what I should do in this connection in detail. An early reply shall highly bhe appreicated. Saeed Programmer - Original Message - From: John Hill To: 'Tomcat Users List' Sent: Tuesday, July 20, 2004 4:38 PM Subject: where to put config.xml Hi can anyone tell me where I should put the config.xml file for a web application. IF I put it under META-INF , tomcat doesnt seem to find it. Does it need to be in a WAR file for this to occur ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!
? servlet tag
I'm relitivly new to servlets but My environment: jakarta-tomcat-4.1.30 Red Hat 9 - 2.4.20-31.9 Server version: Apache/2.0.40 Server built: Apr 21 2004 11:49:03 MySQL 3.23.58 The Error Jul 25, 2004 7:05:24 AM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 18 column -1: Element web-app does not allow servlet here. org.xml.sax.SAXParseException: Element web-app does not allow servlet here. This is repeated for lines 27,36 45 each of which is servlet tag. All the servlets seem to work just fine except every evening my system falls over and I have to restart tomcat (and at the same time I restart Apache). I've looked at the dtd and it looks like the xml should be good. I've run the web.xml file through od to see if I got some strange characters in it but couldn't find anything. Here is my web.xml file. What am I doing wrong? Any suggestions? ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameBasinCalendar/servlet-name servlet-classBasinCalendar/servlet-class /servlet servlet-mapping servlet-nameBasinCalendar/servlet-name url-pattern/servlet/BasinCalendar/url-pattern /servlet-mapping servlet servlet-nameEditCalendar/servlet-name servlet-classEditCalendar/servlet-class /servlet servlet-mapping servlet-nameEditCalendar/servlet-name url-pattern/servlet/EditCalendar/url-pattern /servlet-mapping servlet servlet-nameEditAccount/servlet-name servlet-classEditAccount/servlet-class /servlet servlet-mapping servlet-nameEditAccount/servlet-name url-pattern/servlet/EditAccount/url-pattern /servlet-mapping servlet servlet-nameCounter/servlet-name servlet-classCounter/servlet-class /servlet servlet-mapping servlet-nameCounter/servlet-name url-pattern/servlet/Counter/url-pattern /servlet-mapping servlet servlet-nameHelloWorld/servlet-name servlet-classHelloWorld/servlet-class /servlet servlet-mapping servlet-nameHelloWorld/servlet-name url-pattern/servlet/HelloWorld/url-pattern /servlet-mapping /web-app ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ? servlet tag
Nolan Toone wrote: I'm relitivly new to servlets but My environment: jakarta-tomcat-4.1.30 Red Hat 9 - 2.4.20-31.9 Server version: Apache/2.0.40 Server built: Apr 21 2004 11:49:03 MySQL 3.23.58 The Error Jul 25, 2004 7:05:24 AM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 18 column -1: Element web-app does not allow servlet here. org.xml.sax.SAXParseException: Element web-app does not allow servlet here. This is repeated for lines 27,36 45 each of which is servlet tag. All the servlets seem to work just fine except every evening my system falls over and I have to restart tomcat (and at the same time I restart Apache). I've looked at the dtd and it looks like the xml should be good. I've run the web.xml file through od to see if I got some strange characters in it but couldn't find anything. Here is my web.xml file. What am I doing wrong? Any suggestions? ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameBasinCalendar/servlet-name servlet-classBasinCalendar/servlet-class /servlet servlet-mapping servlet-nameBasinCalendar/servlet-name url-pattern/servlet/BasinCalendar/url-pattern /servlet-mapping servlet servlet-nameEditCalendar/servlet-name servlet-classEditCalendar/servlet-class /servlet servlet-mapping servlet-nameEditCalendar/servlet-name url-pattern/servlet/EditCalendar/url-pattern /servlet-mapping servlet servlet-nameEditAccount/servlet-name servlet-classEditAccount/servlet-class /servlet servlet-mapping servlet-nameEditAccount/servlet-name url-pattern/servlet/EditAccount/url-pattern /servlet-mapping servlet servlet-nameCounter/servlet-name servlet-classCounter/servlet-class /servlet servlet-mapping servlet-nameCounter/servlet-name url-pattern/servlet/Counter/url-pattern /servlet-mapping servlet servlet-nameHelloWorld/servlet-name servlet-classHelloWorld/servlet-class /servlet servlet-mapping servlet-nameHelloWorld/servlet-name url-pattern/servlet/HelloWorld/url-pattern /servlet-mapping /web-app You have to group servlet tags together. Cannot mix them with servlet-mapping. Sounds stupid, but that is the DTD. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk2, apache2, tomcat5, on redhat 9 issue
Mark Eggers wrote: You will need to install the httpd-devel rpm as well. This will give you apxs and other material needed to compile mod_jk2. You might check on yum to see if mod_jk2 is already compiled. It is for Fedora Core 2. I don't know if it is for Redhat 9. I build my own Apache, mod_jk2, etc. from source so all I can tell you is what Synaptic, yum, and rhn tell me. /mde/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks Mark! That did the trick for that, however, I am getting problems when I run apxs after the make. -- # /usr/sbin/apxs -n jk2 -i mod_jk2.so /usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/httpd/build/libtool' mod_jk2.so /usr/lib/httpd/modules /usr/lib/httpd/build/libtool --mode=install cp mod_jk2.so /usr/lib/httpd/modules/ cp mod_jk2.so /usr/lib/httpd/modules/mod_jk2.so mv: cannot move `/usr/lib/httpd/modules/' to a subdirectory of itself, `/usr/lib/httpd/modules/mod_jk2.so.so' chmod 755 /usr/lib/httpd/modules/mod_jk2.so chmod: failed to get attributes of `/usr/lib/httpd/modules/mod_jk2.so': No such file or directory apxs:Error: Command failed with rc=65536 -- My apache2 install is in /etc/httpd not /usr/lib/httpd so I don't know why it is trying put the module there. After I ran that, I copied the mod_jk2.so to /etc/httpd/modules/. but then apache does not work: I put this line in httpd.conf: LoadModule jk2_module modules/mod_jk2.so then ran this test: -- # /usr/sbin/httpd -t Syntax error on line 213 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send -- I'm not sure how to fix this Does anyone have any suggestions? Thanks again! Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ? servlet tag
: !DOCTYPE web-app :PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN :http://java.sun.com/dtd/web-app_2_3.dtd; : : You have to group servlet tags together. Cannot mix them with : servlet-mapping. Sounds stupid, but that is the DTD. IIRC, the 2.4 spec allows for (what some would consider) the more intuitive format, keeping servlet/mapping sets together. For the OP: if you're using Tomcat 5, you could try the 2.4 schema and see whether that works. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to know which xml file (under directory webapp) causes SAXParseException ?
On Sun, Jul 25, 2004 at 09:51:05AM +0800, Chris wrote: : When TC gets SAXParseException (such as following ), how to know : *which* XML file , usually under $TC$webapp/, cause the error? : It seems there is no file info about the XML file. What about the log entries above the exception? Do any of those specify which context Tomcat is attempting to deploy (and thus, which WEB-INF/web.xml is causing the problem)? Otherwise, for a quick'n'dirty solution, run your various deployment descriptors through a validator to find the troublemaker. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk2, apache2, tomcat5, on redhat 9 issue
Rick Bragg wrote: Mark Eggers wrote: You will need to install the httpd-devel rpm as well. This will give you apxs and other material needed to compile mod_jk2. You might check on yum to see if mod_jk2 is already compiled. It is for Fedora Core 2. I don't know if it is for Redhat 9. I build my own Apache, mod_jk2, etc. from source so all I can tell you is what Synaptic, yum, and rhn tell me. /mde/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks Mark! That did the trick for that, however, I am getting problems when I run apxs after the make. -- # /usr/sbin/apxs -n jk2 -i mod_jk2.so /usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/httpd/build/libtool' mod_jk2.so /usr/lib/httpd/modules /usr/lib/httpd/build/libtool --mode=install cp mod_jk2.so /usr/lib/httpd/modules/ cp mod_jk2.so /usr/lib/httpd/modules/mod_jk2.so mv: cannot move `/usr/lib/httpd/modules/' to a subdirectory of itself, `/usr/lib/httpd/modules/mod_jk2.so.so' chmod 755 /usr/lib/httpd/modules/mod_jk2.so chmod: failed to get attributes of `/usr/lib/httpd/modules/mod_jk2.so': No such file or directory apxs:Error: Command failed with rc=65536 -- My apache2 install is in /etc/httpd not /usr/lib/httpd so I don't know why it is trying put the module there. After I ran that, I copied the mod_jk2.so to /etc/httpd/modules/. but then apache does not work: I put this line in httpd.conf: LoadModule jk2_module modules/mod_jk2.so then ran this test: -- # /usr/sbin/httpd -t Syntax error on line 213 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send -- I'm not sure how to fix this Does anyone have any suggestions? Thanks again! Rick oops, /etc/httpd/modules is a symlink of /usr/lib/httpd/modules/ But I still don't know why I am haveing the errors running apxs... Thanks again Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ? servlet tag
THANKS! Now I'll just have to wait and see if it falls over tonight. If so I'll be back. Now back to the fun stuff (Java programming). Thanks again. You have to group servlet tags together. Cannot mix them with servlet-mapping. Sounds stupid, but that is the DTD. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:[EMAIL PROTECTED] ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resolved - WebSphere suuports servlets in /welcome-list does Tomcat
All of you missed a very important trick. Specifing an index.do in the welcome-file/ tag is ok, but remember index.do is NOT a FILE, rather it is a struts action mapping!. Therefore just including index.do in this tag would not work! The trick (yes trick since I do not see this documented anywhere) is to place an empty index.do in the webApplication directory. Once Tomcat loactes the file, it executes the (URL)mapping to this file, which kicks in the struts ActionServlet. I notice this seems to be an issue with a lot of people on the internet, so I would document it - later! Bill Barker [EMAIL PROTECTED] wrote:Suite yourself :). The other work-around would be to put a (possibly empty) index.do file to let Tomcat know that there is something there for it to serve. R A wrote in message news:[EMAIL PROTECTED] The point of me adding action *.do is that I want all request that match *.do to go through the Sruts ActionServlet. This includes any *.do in the . The ActionServlet delegates the request to the RequestProcessor, which uses the command pattern to map to the appropriate action. It should not be necessary to add index.do as a servlet. Bill Barker wrote: Tomcat 5 supports servlets as welcome-files, just not extension-mapped ones (e.g. *.do, *.jsp). The reason is that extension-mapped servlets would alway be choosen, even though in most cases the servlet couldn't handle it. Simply adding a mapping like: action /index.do solves your problem. R A wrote in message news:[EMAIL PROTECTED] When entering a servlet(action) in the tag, Tomcat returns a directory listing. Does it support servlets in the tags? - Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
Re: jk2, apache2, tomcat5, on redhat 9 issue
I'm not sure what's borked with installing modules on Redhat since I build everything myself. Based on your error messages, it doesn't seem that the rpm's apxs is finding everything correctly. There have been several threads on this in the mailing list, so you can search there as well. If I recall correctly, you'll need to do the following when you run configure for mod_jk2.so. 1) cd to jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2 2) run configure with: ./configure --with-apxs2=$APACHE_HOME/bin/apxs \ --with-tomcat41=$CATALINA_HOME \ --with-apr-lib=location-of-libapr.so \ --with-jni \ --with-pcre where $APACHE_HOME is where apache is installed (although check to make sure apxs is there), $CATALINA_HOME is where Tomcat is installed, and location-of-libapr.so is where libapr.so is located. JNI is the Java native interface so that UNIX sockets will work. You will need to set JAVA_HOME to point to your J2SDK install. Getting this to work is problematic on stock Redhat installs, because I don't think the necessary libraries were linked into the stock httpd server. I think the reason that this was avoided was to reduce the dependency list for httpd. There have been a lot of discussions on how to fix UNIX socket operations on stock Redhat installs. Basically you have to modify server/apache2/Makefile and add a line containing EXTRA_LDFLAGS with several libraries. You could also do: export EXTRA_LDFLAGS= . . . . where . . . . is the list of libraries before running configure. I don't recall the libraries right off hand, so you'll need to query the mailing list archive. Only add pcre if you have the Perl regular expression library installed (most likely you do). I'm not sure that httpd and httpd-devel install libapr.so and libaprutil.so. There are RPMs for those as well, so you might do the following: rpm -q rpm-name --filesbypkg where rpm-name would be the appropriate one for httpd or httpd-devel. Make sure that the libraries are there. If they are not, then you'll have to get the appropriate RPMs for apr and apr-util. mod_jk2.so (starting with 2.0.4) require these libraries. When those libraries are installed, make sure that they're in your LD_LIBRARY_PATH. The easiest way to do this is to create a file called apache.conf in /etc/ld.so.conf.d. There should be a line in it that points to the directory where apr and apr-util live. The run /sbin/ldconfig as root to add the libraries. Note - Only do the above if the libraries are not already in a path that is included in the ldconfig configuration. Once that is done, you should be able to run mod_jk2.so. Then you'll get to configure it. There have been many discussions on how to configure mod_jk2, and several links have been posted to the mailing list. HTH /mde/ just my two cents . . . . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resolved - WebSphere suuports servlets in /welcome-list does Tomcat
An alternative could be an extra servlet mapping in web.xml -Tim R A wrote: All of you missed a very important trick. Specifing an index.do in the welcome-file/ tag is ok, but remember index.do is NOT a FILE, rather it is a struts action mapping!. Therefore just including index.do in this tag would not work! The trick (yes trick since I do not see this documented anywhere) is to place an empty index.do in the webApplication directory. Once Tomcat loactes the file, it executes the (URL)mapping to this file, which kicks in the struts ActionServlet. I notice this seems to be an issue with a lot of people on the internet, so I would document it - later! Bill Barker [EMAIL PROTECTED] wrote:Suite yourself :). The other work-around would be to put a (possibly empty) index.do file to let Tomcat know that there is something there for it to serve. R A wrote in message news:[EMAIL PROTECTED] The point of me adding action *.do is that I want all request that match *.do to go through the Sruts ActionServlet. This includes any *.do in the . The ActionServlet delegates the request to the RequestProcessor, which uses the command pattern to map to the appropriate action. It should not be necessary to add index.do as a servlet. Bill Barker wrote: Tomcat 5 supports servlets as welcome-files, just not extension-mapped ones (e.g. *.do, *.jsp). The reason is that extension-mapped servlets would alway be choosen, even though in most cases the servlet couldn't handle it. Simply adding a mapping like: action /index.do solves your problem. R A wrote in message news:[EMAIL PROTECTED] When entering a servlet(action) in the tag, Tomcat returns a directory listing. Does it support servlets in the tags? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie Question
Yes! two different machines... I will name it as machine 1 and machine 2... machine 1 and machine 2 both have CES_DS datasource name declared.. MS Access DB resides inside machine 2... so machine 2 does not have any problems.. while machine 1 have problems connecting to MS Access DB inside machine 2... if Sun's jdbc:odbc:CES_DS connection is wrong for machine 1 then what connection will i use? Machine 1 have Exchange Server while Machine 2 have Sharepoint Server... just for info... Please Help Me!!! -Original Message- From: Dave Bender [mailto:[EMAIL PROTECTED] Sent: Fri 7/23/2004 9:11 PM To: Tomcat Users List Cc: Subject:RE: Newbie Question Can you provide some more detail? When you say you're running two servers accessing an Access database, do you mean two different machines or just different server instances on the same machine? If you're trying to access Access from a different machine, you may have to use a different jdbc driver. I don't think the Sun jdbc:odbc driver can reach a data source running on a different machine. Dave -Original Message- From: Aris Javier [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 4:55 AM To: Tomcat Users List Subject: Newbie Question Hello! This is a newbie question... =) I have two servers running accessing single MS Access database I used jdbc:odbc:CES_DS in server.xml CES_DS is the data source name I used for both servers... pointing to MS Access DB... However this error occurs... org.apache.commons.dbcp.DbcpException: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. How to access a single database using two servers using DSN connection...? Please Help! Thanks a lot! aris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TC 5 - root application
Hi, Using Tomcat 5, I wish to move my application from under webapps, into a defined directory somewhere on the server hard drive. Instead of defining a context for my application, I wish to point Tomcat to my application as ROOT to a generic location i.e http://localhost points to c:\site\index.jsp, for example. I have configured it to be using port 80 already. Thanks Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mail Delivery (failure tomcat-user@jakarta.apache.org)
If the message will not displayed automatically, follow the link to read the delivered message. Received message is available at: www.jakarta.apache.org/inbox/tomcat-user/read.php?sessionid-19195