Fwd: Specify location of server.xml as a start up argument
Hi dev team, Any comments on this ?. It will be nice to run a different application by flipping server.xml. -- Forwarded message -- From: Anto Paul <[EMAIL PROTECTED]> Date: Feb 13, 2007 1:04 PM Subject: Specify location of server.xml as a start up argument To: users@tomcat.apache.org Hi, I run Tomcat from inside Eclipse. I pass the start up parameters to boot strap class. I want to specify server.xml as an argument so I could switch between run configuration to run different applications rather than edit server.xml context element or have 2 tomcat installations. Is it possible ?. I know about using different catalina.base and I am looking for a simpler config. Regards, Anto Paul
Specify location of server.xml as a start up argument
Hi, I run Tomcat from inside Eclipse. I pass the start up parameters to boot strap class. I want to specify server.xml as an argument so I could switch between run configuration to run different applications rather than edit server.xml context element or have 2 tomcat installations. Is it possible ?. I know about using different catalina.base and I am looking for a simpler config. Regards, Anto Paul
How to specify security policy file for a web application
Hi, I need to specify java policy file for a web application. I am looking for a way so that each web application will have its own policy file. It will be nice if policy file can be put in the web application directory itself. Regards, Anto Paul
Re: Download file Problem - 404 error
On 1/31/06, DEEPA M N <[EMAIL PROTECTED]> wrote: > Hi > I did as u said. This is wat the error i m getting. > > > D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes>java > com.deepa.servlet.DownloadFiles > Exception in thread "main" java.lang.NoClassDefFoundError: > com/deepa/servlet/DownloadFiles (wrong name: DownloadFiles) > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(Unknown Source) > at java.security.SecureClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.access$100(Unknown Source) > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClassInternal(Unknown Source) > This means that the class is not in the correct package. Put the following line as the first line in the file DownloadFiles.java package com.deepa.servlet; > > > D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes\com\deepa\servlet>java > DownloadFiles > Exception in thread "main" java.lang.NoClassDefFoundError: > javax/servlet/http/HttpServlet > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(Unknown Source) > at java.security.SecureClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.access$100(Unknown Source) > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClassInternal(Unknown Source) > > Thank u > > > Anto Paul <[EMAIL PROTECTED]> wrote: > In what package it is defined ?. > Are you sure you deleted the old classfiles and compiled the > classfiles to the right folder ? > Go to WEB-INF\classes and type java com.deepa.servlet.DownloadFiles. > Go to classes com/deepa/servlet and type java DownloadFiles. > > It should give the same error since it is not in the right > package/directory structure. > > > > > > - > Jiyo cricket on Yahoo! India cricket > -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download file Problem - 404 error
ardEngineValve.invoke(StandardEngineValve.java:109) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) > at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) > at java.lang.Thread.run(Thread.java:595) > > Thank u in advance > Deepa > > > > - > Jiyo cricket on Yahoo! India cricket > -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download file Problem - 404 error
On 1/31/06, DEEPA M N <[EMAIL PROTECTED]> wrote: > Hi Vineesh, > The class name is DownloadFiles.class > Pls let me know wat is access permissions of the class and tomcat. > I m posting my web.xml after including package. > > >PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" > "http://java.sun.com/dtd/web-app_2_3.dtd";> > > Tomcat Documentation > > Tomcat Documentation. > > > > DownloadFiles > com.deepa.servlet.DownloadFiles > > > > DownloadFiles > /servlet/DownloadFiles > > > > Now wen i run the appln, I get error 500. Pls let me know where i hav gone > wrong. 500 means internal server error. check the log files for the error and post it. > I believe there might be some silly mistake. > Always welcome ur help. > thank u > Regards > Deepa > > > vineesh kumar <[EMAIL PROTECTED]> wrote: > Deepa, > plz check the following things > is ur class is public? > whether the class name is DownloadFiles.class itself? > also check the access permissions of the class and tomcat > directory if ur on a X'nix machine > > > > - > Jiyo cricket on Yahoo! India cricket > -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download file Problem - 404 error
On 1/30/06, Bob Hall <[EMAIL PROTECTED]> wrote: > --- DEEPA M N <[EMAIL PROTECTED]> wrote: > > > Hi > > I m using Jdk1.5 and Tomcat 5.0.28 for my proj. I > > have written a code which can download a file from > > the server. The code is compiling properly. I pasted > > the .class file in the > > webapps/DownloadFile/WEB-INF/classes/ > > Also i hav written web.xml in the WEB-INF folder. > > After running a appln, i get 404 Resource not > > found error. > > > > Before i hav worked on servlet and tomcat, i was > > not getting such issues before. But now i m facing > > such type of issues, i need to solve it as early as > > possible. Here is a web.xml lines: > > > > > >> PUBLIC "-//Sun Microsystems, Inc.//DTD Web > > Application 2.3//EN" > > "http://java.sun.com/dtd/web-app_2_3.dtd";> > > > > Tomcat Documentation > > > > Tomcat Documentation. > > > > > > > > DownloadFiles > > DownloadFiles > > > > > > > > DownloadFiles > > > > /servlet/DownloadFiles > > > > > > > > Pls do let me know how can i solve this prob. > > I always appreciate ur help. > > Thanks in advance. > > > > Deepa > > Deepa, > > Your servlet must be in a package to work with Java > 1.4 > and greater. > Hi Bob, I dont think the servlet need to be in a packge to call it from a URL. It must be in a package if it is imported in another class. Deepa Everything seems to be fine with given web.xml. Did you extended the HttpServlet class and implemented the service method() ?. Check error log for any errors. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How and where to specify the log format in Tomcat
On 1/23/06, Sheshadri Patel <[EMAIL PROTECTED]> wrote: > Hi All, > > How and where to enable Tomcat server to use NCSA Common or NCSA Combined > format in their log files? http://tomcat.apache.org/tomcat-5.0-doc/config/valve.html It should be configured in the server.xml. Look for the AccessLogValve element. The pattern attribute specifies the log format. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i
On 1/20/06, gupta vidhi <[EMAIL PROTECTED]> wrote: > hello, > > i was searching Oracle 8i driver for jdk1.5, but not getting.i had > downloaded classes12.jar from oracle.com and saved in my > >c:\Program Files\Tomcat\jakarta-tomcat-1.4.31\webapps\ROOT\WEB-INF\lib\ > > Is this path correct or i've to store it in my ORACLE_H0ME\jdbc\lib ? > may be ojdbc14.jar is for jdk1.4? > is it possible to download both in the lib folder? You need to use either one. and put it in WEB-INF\lib and not ORACLE_HOME\jdbc\lib. You should check the log files there may be more errors in it. First stop Tomcat delete log files start Tomcat and test and post the log files. Check Tomcat console also if you have one. There are other log files mainly stdout, stderr other than localhost*. and post the relevant error messages. > Thanks & Regards, > Vidhi > > > Anto Paul <[EMAIL PROTECTED]> wrote: > On 1/20/06, gupta vidhi wrote: > > my problem of Tomcat is been solved.now my simple JSP pages(without DB > > connectivity) is been solved. > > but when i'm executing my JSP page(with DB Connectivity) is creating > > problems and showing the following error : > > > > javax.servlet.ServletException: No suitable driver > > at > > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:498) > > at org.apache.jsp.test_DB1_jsp._jspService(test_DB1_jsp.java:98) > > and so on. > > > Are you sure that the classes12.jar is not corrupted ?. > > > i'd set the CLASSPATH of classes12.jar as: > > > > C:\Program Files\Tomcat\jakarta-tomcat-4.1.31\webapps\ROOT\WEB-INF\lib > > > > > There is no use of setting the CLASSPATH variable. Tomcat wont take > this for running the application. > > If it is not solving your problem you may have to download ojdbc14.jar > from oracle.com and use it as it may be due to the JDK 1.5. > > > > Kindly help. > > > > Regards, > > Vidhi > > David Smith wrote: > > I'd recommend checking that your classes12.jar file is valid. This > > should work: > > > > $JAVA_HOME/bin/jar -v -t -f webapps/ROOT/WEB-INF/lib/classes12.jar > > > > It'll list the table of contents of the archive and be verbose about it. > > Replace -t with -x to extract files for further inspection. > > > > --David > > > > gupta vidhi wrote: > > > > >i'm sending you the whole localhost file: > > > 2006-01-19 12:11:09 HostConfig[localhost]: Deploying configuration > > > descriptor admin.xml > > >2006-01-19 12:11:29 HostConfig[localhost]: Deploying configuration > > >descriptor manager.xml > > > > > > > > > > >... on and on and on . > > > > > > > >2006-01-19 12:11:31 HostConfig[localhost]: Deploying web application > > >directory ROOT > > >2006-01-19 12:11:31 StandardHost[localhost]: Installing web application at > > >context path from URL file:C:\Program > > >Files\Tomcat\jakarta-tomcat-4.1.31\webapps\ROOT > > >2006-01-19 12:11:31 WebappLoader[]: Deploying class repositories to work > > >directory C:\Program > > >Files\Tomcat\jakarta-tomcat-4.1.31\work\Standalone\localhost\_ > > >2006-01-19 12:11:31 WebappLoader[]: Deploy JAR /WEB-INF/lib/classes12.jar > > >to C:\Program > > >Files\Tomcat\jakarta-tomcat-4.1.31\webapps\ROOT\WEB-INF\lib\classes12.jar > > >2006-01-19 12:11:31 StandardHost[localhost]: ContainerBase.addChild: start: > > >LifecycleException: start: : java.lang.ClassCastException: > > >org.apache.naming.resources.FileDirContext > > > at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:631) > > > at > > > org.apache.catalina.core.StandardContext.start(StandardContext.java:3486) > > > at > > > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774) > > > at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760) > > > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548) > > > at > > > org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260) > > > at org.apache.catalina.core.StandardHost.install(StandardHost.java:741) > > > at > > > org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512) > > > at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354) > > > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671) > > > at > > > org.apache.catalina.startup.Host
Re: Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i
- > >java.lang.ClassCastException: org.apache.naming.resources.FileDirContext > > at > > org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:1012) > > at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:618) > > at org.apache.catalina.core.StandardContext.start(StandardContext.java:3486) > > at > > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774) > > at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760) > > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548) > > at > > org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260) > > at org.apache.catalina.core.StandardHost.install(StandardHost.java:741) > > at > > org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512) > > at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354) > > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671) > > at > > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) > > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149) > > at org.apache.catalina.core.StandardHost.start(StandardHost.java:707) > > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) > > at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316) > > at org.apache.catalina.core.StandardService.start(StandardService.java:450) > > at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143) > > at org.apache.catalina.startup.Catalina.start(Catalina.java:463) > > at org.apache.catalina.startup.Catalina.execute(Catalina.java:350) > > at org.apache.catalina.startup.Catalina.process(Catalina.java:129) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:585) > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) > > 2006-01-19 12:11:31 StandardHost[localhost]: Error deploying application at > > context path > >java.lang.IllegalStateException: ContainerBase.addChild: start: > >LifecycleException: start: : > > > and more semi relevant stuff in the remaining logs ... > > > > > Regards, > > Vidhi > > > > > > > >Anto Paul wrote: > > On 1/19/06, gupta vidhi wrote: > > > > > >>i'd made some JSP & HTML pages(without DB Connectivity) and also execute > >>them successfully, before copying classes12.jar file in WEB-INF\lib, but > >>now when i'm executing my pages with or without DB Connec.,they aren't > >>executing and showing the same error as i'd told you in my previous mail. > >>now i'm unable to understand, what shud i do,bcoz i'm unable to understand > >>the problem? > >>if Tomcat would have not been installed properly,then how could the pages > >>had executed successfully before.but now the same Tomcat is showing error > >>with every page. > >>what could be the reason behind this? > >> > >> > >> > > > >If other JSP pages work Tomcat is configured properly. > >As a next step check log files in the logs directory of Tomcat. See > >the files like localhost*. The error message will be there. Post it. > > > > > > > >>Anto Paul wrote: > >>On 1/19/06, gupta vidhi wrote: > >> > >> > >>>Hello, > >>>thanx for the code.i'd executed but facing some problems.its showing the > >>>following error: > >>> > >>>HTTP Status 500 - No Context configured to process this request > >>>- > >>> > >>>type Status report > >>>message No Context configured to process this request > >>>description The server encountered an internal error (No Context > >>>configured to process this request) that prevented it from fulfilling this > >>>request. > >>> > >>>- > >>> > >>>Apache Tomcat/4.1.31 > >>> > >>> > >>It should be because that Tomcat is not configured. To test this you > >>should create a file named index.htm
Re: Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i
On 1/19/06, gupta vidhi <[EMAIL PROTECTED]> wrote: > i'd made some JSP & HTML pages(without DB Connectivity) and also execute them > successfully, before copying classes12.jar file in WEB-INF\lib, but now when > i'm executing my pages with or without DB Connec.,they aren't executing and > showing the same error as i'd told you in my previous mail. > now i'm unable to understand, what shud i do,bcoz i'm unable to understand > the problem? > if Tomcat would have not been installed properly,then how could the pages > had executed successfully before.but now the same Tomcat is showing error > with every page. > what could be the reason behind this? > If other JSP pages work Tomcat is configured properly. As a next step check log files in the logs directory of Tomcat. See the files like localhost*. The error message will be there. Post it. > > Anto Paul <[EMAIL PROTECTED]> wrote: > On 1/19/06, gupta vidhi wrote: > > Hello, > > thanx for the code.i'd executed but facing some problems.its showing the > > following error: > > > > HTTP Status 500 - No Context configured to process this request > > - > > > > type Status report > > message No Context configured to process this request > > description The server encountered an internal error (No Context configured > > to process this request) that prevented it from fulfilling this request. > > > > - > > > > Apache Tomcat/4.1.31 > > > It should be because that Tomcat is not configured. To test this you > should create a file named index.html with some text in it and try > accessing it. If it works Tomcat is configured. BTW where tomcat is > installed and what is the path to the application you are trying to > access ?. > > > as you had asked me to copy classes12.zip from Oracle\jdbc\lib. but i'm bot > > finding the jdbc folder in my ORACLE_HOME. its in my : > > C:\oracle1\jdk\lib\classes\sun\jdbc path.now this path don't have lib > > folder in it.this jdbc folder consists of odbc folder which again don't > > have any lib folder. > > > > > You should use Search -> Find from Windows start menu to locate the > file classes12.zip or search for jdbc in your computer. If it is not > found you should download it from oracle.com. Ritchie has given the > link in a prevoius post. There you can download driver for any higher > version of Oracle database and it will work for 8.0 also. Put the file > in WEB-INF\lib and restart Tomcat. > > > > i feel the above error might be coming bcoz of the same reason. > > now you say, what should i do and what the matter is all about? > > > > Regards, > > > > Vidhi > > Anto Paul wrote: > > On 1/18/06, gupta vidhi wrote: > > > i've JDBC installed in other path than Tomcat.you asked me to put the > > > JDBC driver library into WEB-INF\lib. there's WEB-INF directory,but it do > > > not have lib as its sub directory.what can be done for this? > > > kindly tell me how to do the path setting of JDBC with JSP. > > > i'd made a page in JSP,but when executing its generating error as: > > > > > > javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Data > > > source name not found and no default driver specified > > > and so on. > > > kindly tell how to connect my JSP page with JDBC. > > > > > > > A JDBC tutorial is here > > http://www-db.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html > > > > Don't use JDBC-ODBC bridge. From the error message it seems that > > it is using JDBC-ODBC bridge. > > You will get the JDBC driver from ORACLE_HOME\jdbc\lib. For 8i the > > file will be classes12.zip. Create a lib directory in WEB-INF > > directory. Tomcat is case sensitive and lib must be in small letters. > > Copy classes12.zip to WEB-INF\lib and rename it to classes12.jar. Now > > to connect to database use the JDBC URL like > > jdbc:oracle:thin:hr/[EMAIL PROTECTED]:1521:orcl. > > > > Don't for to restart Tomcat after putting the JAR file in WEB-INF\lib. > > > > The Oracle installation provides some sample Java code. Look in > > jdbc folder for it. > > > > -- > > rgds > > Anto Paul > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > - > > Yahoo! Photos > > Ring in the New Year with Photo Calendars. Add photos, events, holidays, > > whatever. > > > > > -- > rgds > Anto Paul > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > Yahoo! Photos > Got holiday prints? See all the ways to get quality prints in your hands > ASAP. > -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to download admin webapp
On 1/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > Appologies if the answer to this is obvious. > > Could someone please explain where to obtain the admin webapp for tomcat 5. > You can find it in the same place where you downloaded Tomcat binary. Go to tomcat.apache.org and click on the download link. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i
On 1/19/06, gupta vidhi <[EMAIL PROTECTED]> wrote: > Hello, > thanx for the code.i'd executed but facing some problems.its showing the > following error: > > HTTP Status 500 - No Context configured to process this request > - > > type Status report > message No Context configured to process this request > description The server encountered an internal error (No Context configured > to process this request) that prevented it from fulfilling this request. > > - > > Apache Tomcat/4.1.31 It should be because that Tomcat is not configured. To test this you should create a file named index.html with some text in it and try accessing it. If it works Tomcat is configured. BTW where tomcat is installed and what is the path to the application you are trying to access ?. > as you had asked me to copy classes12.zip from Oracle\jdbc\lib. but i'm bot > finding the jdbc folder in my ORACLE_HOME. its in my : > C:\oracle1\jdk\lib\classes\sun\jdbc path.now this path don't have lib > folder in it.this jdbc folder consists of odbc folder which again don't have > any lib folder. > You should use Search -> Find from Windows start menu to locate the file classes12.zip or search for jdbc in your computer. If it is not found you should download it from oracle.com. Ritchie has given the link in a prevoius post. There you can download driver for any higher version of Oracle database and it will work for 8.0 also. Put the file in WEB-INF\lib and restart Tomcat. >i feel the above error might be coming bcoz of the same reason. > now you say, what should i do and what the matter is all about? > > Regards, > > Vidhi > Anto Paul <[EMAIL PROTECTED]> wrote: > On 1/18/06, gupta vidhi wrote: > > i've JDBC installed in other path than Tomcat.you asked me to put the JDBC > > driver library into WEB-INF\lib. there's WEB-INF directory,but it do not > > have lib as its sub directory.what can be done for this? > > kindly tell me how to do the path setting of JDBC with JSP. > > i'd made a page in JSP,but when executing its generating error as: > > > > javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Data > > source name not found and no default driver specified > > and so on. > > kindly tell how to connect my JSP page with JDBC. > > > > A JDBC tutorial is here > http://www-db.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html > > Don't use JDBC-ODBC bridge. From the error message it seems that > it is using JDBC-ODBC bridge. > You will get the JDBC driver from ORACLE_HOME\jdbc\lib. For 8i the > file will be classes12.zip. Create a lib directory in WEB-INF > directory. Tomcat is case sensitive and lib must be in small letters. > Copy classes12.zip to WEB-INF\lib and rename it to classes12.jar. Now > to connect to database use the JDBC URL like > jdbc:oracle:thin:hr/[EMAIL PROTECTED]:1521:orcl. > > Don't for to restart Tomcat after putting the JAR file in WEB-INF\lib. > > The Oracle installation provides some sample Java code. Look in > jdbc folder for it. > > -- > rgds > Anto Paul > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > Yahoo! Photos > Ring in the New Year with Photo Calendars. Add photos, events, holidays, > whatever. > -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i
On 1/18/06, gupta vidhi <[EMAIL PROTECTED]> wrote: > > i'd copied the classes12.zip from C:\jdbc\lib. there's no folder of > ORACLE_HOME. > now,what else to be done? By ORACLE_HOME I meant where oracle is installed. You cannot attach files while sending mail to this list. The code should look like this <%@ page import="java.sql.*"%> <%@ page import="oracle.jdbc.driver.*"%> <% String url = "jdbc:oracle:thin:@192.168.4.220:1521:ora9i"; String user = "scott"; String password = "tiger"; DriverManager.registerDriver(new oracle.jdbc.OracleDriver()); Connection conn = DriverManager.getConnection (url,user, password); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery ("select empno from emp"); while (rs.next()) { out.print(rs.getString (1) + ""); } rs.close(); stmt.close(); conn.close(); %> > i'm sending you my JSP page. kindly tell me what code should be > written/added to execute it successfully. > i'd created the table named as user1 in oracle 8.0 and inserted some values > in it. > the name of the database in which this table is been created is prime. > > Regards, > Vidhi > > Anto Paul <[EMAIL PROTECTED]> wrote: > On 1/18/06, gupta vidhi wrote: > > i've JDBC installed in other path than Tomcat.you asked me to put the JDBC > driver library into WEB-INF\lib. there's WEB-INF directory,but it do not > have lib as its sub directory.what can be done for this? > > kindly tell me how to do the path setti ng of JDBC with JSP. > > i'd made a page in JSP,but when executing its generating error as: > > > > javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Data > source name not found and no default driver specified > > and so on. > > kindly tell how to connect my JSP page with JDBC. > > > > A JDBC tutorial is here > http://www-db.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html > > Don't use JDBC-ODBC bridge. From the error message it seems that > it is using JDBC-ODBC bridge. > You will get the JDBC driver from ORACLE_HOME\jdbc\lib. For 8i the > file will be classes12.zip. Create a lib directory in WEB-INF > directory. Tomcat is case sensitive and lib must be in small letters. > Copy classes12.zip to WEB-INF\lib and rename it to classes12.jar. Now > to connect to database use the JDBC URL like > jdbc:oracle:thin:hr/[EMAIL PROTECTED]:1521:orcl. > > Don't for to restart Tomcat after putting the JAR file in WEB-INF\lib. > > The Oracle installation provides some sample Java code. Look in > jdbc folder for it. > > -- > rgds > Anto Paul > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > Yahoo! Photos > Got holiday prints? See all the ways to get quality prints in your hands > ASAP. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i
On 1/18/06, gupta vidhi <[EMAIL PROTECTED]> wrote: > i've JDBC installed in other path than Tomcat.you asked me to put the JDBC > driver library into WEB-INF\lib. there's WEB-INF directory,but it do not have > lib as its sub directory.what can be done for this? > kindly tell me how to do the path setting of JDBC with JSP. > i'd made a page in JSP,but when executing its generating error as: > > javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Data > source name not found and no default driver specified > and so on. > kindly tell how to connect my JSP page with JDBC. > A JDBC tutorial is here http://www-db.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html Don't use JDBC-ODBC bridge. From the error message it seems that it is using JDBC-ODBC bridge. You will get the JDBC driver from ORACLE_HOME\jdbc\lib. For 8i the file will be classes12.zip. Create a lib directory in WEB-INF directory. Tomcat is case sensitive and lib must be in small letters. Copy classes12.zip to WEB-INF\lib and rename it to classes12.jar. Now to connect to database use the JDBC URL like jdbc:oracle:thin:hr/[EMAIL PROTECTED]:1521:orcl. Don't for to restart Tomcat after putting the JAR file in WEB-INF\lib. The Oracle installation provides some sample Java code. Look in jdbc folder for it. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat log analyser
On 1/18/06, Stas Ostapenko <[EMAIL PROTECTED]> wrote: > Hello ! > > I'm searching for tomcat log analyser. Under Apache (not Tomcat) i > have used AWStats. > Is there something similar for standalone Tomcat ? Tomcat can use AWStats if you configure Tomcat to run CGI script. Or are you asking for an access log analyzer written in Java ? -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wrong System encoding
On 1/18/06, jacky <[EMAIL PROTECTED]> wrote: > hi, > RedHat7.3(System encoding is iso8859-15), tomcat 4.1.30 > When i use System.getProperty("file.encoding") in a jsp, it print > "utf-8". I think the "utf-8" must be the encode of tomcat,but how can i get > the system encode: iso8859-15? In fact, i need the right encode to > write/read file. > BTW, i wander why the encode of tomcat container changes to "utf-8". Is > the reason because i used "reponse.setContentType("text/html; charset=utf-8")? > Any suggestion is helpful! I dont know the solution but just to know did you tried running a java application at the command prompt to test the value of System.getProperty("file.encoding") ? -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i
On 1/18/06, gupta vidhi <[EMAIL PROTECTED]> wrote: > hello, > > i'm using jakarta-tomcat-4.1.31and jdk-1_5_0_02-windows-i586-p-iftw in WIN > 2000 Professional. > I wish to connect Oracle 8.0(plus) with JSP pages. > i request you to kindly tell me how to do this? If you are learning JSP you can connect to a database using JDBC. It is same as using JDBC in any other java application. What you should take care is to put the JDBC driver library in the WEB-INF\lib directory of the application so that Tomcat sees it. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is "AAA" in "Realms and AAA" means ?
Hi all, At Tomcat 5.5 docs home page the 6th documentation title is "6) Realms and AAA". In it what does "AAA" means ? Just out of curiousity. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tom TC committers - a small error on Tomcat docs pages
Hi all, The docs page top logo points to jakarta.apache.org also the writing on the logo is of jakarta.apache.org. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.27 >> java.net.SocketException: Software caused connection abort: recv failed
On 11/29/05, Rajiv Singla <[EMAIL PROTECTED]> wrote: > Hi, > > I was already using 'autoReconnect=true' option. > But after going through MySql website, I found that it has been deprecated > and in order to use 'autoReconnect' option you now need to use > 'enableDeprecatedAutoreconnect=true'. > > I am trying this option for now, if it doesn't work then maybe I'll have to > find another solution. Read the thread posted on the same day "JDBC/MySQL user login goes stale". > > > > -Original Message- > From: Tim Funk [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 29, 2005 5:24 PM > To: Tomcat Users List > Subject: Re: Tomcat 5.0.27 >> java.net.SocketException: Software caused > connection abort: recv failed > > > Not a tomcat issue. Its a mysql driver issue. IIRC - there is an > autoreconnect option for the mysql driver. > > -Tim > > Rajiv Singla wrote: > > >>Hi, > >> > >>I am working on a web application which uses Tomcat-5.0.27 as Application > >>server and MySql 4.1 as DB server. > >>The application uses Struts 1.1 and Hibernate 3.0 frameworks. > >> > >>I am facing a problem with the application. If the servers are kept running > >>idle for a long time(7-8 hours or overnight) and then someone tries to > >>login, the application does not allow the user to login and throws > >>exceptions. > >>When I restart the MySql server, the problem still remains but if I restart > >>the Tomcat server, it works fine. > >> > >>Could someone tell me what is the problem with the servers and how it could > >>be rectified? > >> > >>Here is the full stack trace of errors I get : > >> > >>STACKTRACE: > >> > >>java.net.SocketException: Software caused connection abort: recv failed > >>at java.net.SocketInputStream.socketRead0(Native Method) > >>at java.net.SocketInputStream.read(SocketInputStream.java:129) > >>at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) > >>at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > >>at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > >>at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1316) > >>at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463) > >>at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854) > >>at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109) > >>at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203) > >>at com.mysql.jdbc.Connection.execSQL(Connection.java:2090) > >>at > >>com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496) > > > - > 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] > > -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Web-application and Tomcat icon
On 11/29/05, Aladin Alaily <[EMAIL PROTECTED]> wrote: > Hello, > > Every time I deploy an application using Tomcat 5.5.12, the usual tomcat > icon is being displayed in the url. > > I would like to know how I can replace that icon with my own... or > better yet, no put any icon at all. The icon displayed on the browser is favicon.ico that is in ROOT. You can replace it with your own icon. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: test
This mail to [EMAIL PROTECTED] escaped my Gmail filter for tomcat mail lists. At present I have filters for users@tomcat.apache.org and [EMAIL PROTECTED] When does [EMAIL PROTECTED] came into existence ? -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
test
testing this email id -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sorry-HowToUnSubscribe
It has changed to [EMAIL PROTECTED] Tomcat has been moved from jakarta.apache.org/tomcat to tomcat.apache.org. On 10/19/05, Binildas C <[EMAIL PROTECTED]> wrote: > Sorry to intrude your mailboxes. > > Can somebody help me pointing out how to Un-Subscribe > from "users@tomcat.apache.org" mailing list. I tried > by sending mail to > "[EMAIL PROTECTED]", but am > getting error (below). > > Thanks > Binil > > --- [EMAIL PROTECTED] wrote: > > > Date: 19 Oct 2005 05:28:28 - > > From: [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > > Subject: failure notice > > > > Hi. This is the qmail-send program at apache.org. > > I'm afraid I wasn't able to deliver your message to > > the following addresses. > > This is a permanent error; I've given up. Sorry it > > didn't work out. > > > > <[EMAIL PROTECTED]>: > > Sorry, no mailbox here by that name. (#5.1.1) > > > > --- Below this line is a copy of the message. > > > > Return-Path: <[EMAIL PROTECTED]> > > Received: (qmail 70407 invoked by uid 99); 19 Oct > > 2005 05:28:27 - > > Received: from asf.osuosl.org (HELO asf.osuosl.org) > > (140.211.166.49) > > by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 > > Oct 2005 22:28:27 -0700 > > X-ASF-Spam-Status: No, hits=1.9 required=10.0 > > tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST > > X-Spam-Check-By: apache.org > > Received-SPF: pass (asf.osuosl.org: local policy) > > Received: from [202.43.219.77] (HELO > > web8602.mail.in.yahoo.com) (202.43.219.77) > > by apache.org (qpsmtpd/0.29) with SMTP; Tue, 18 > > Oct 2005 22:28:27 -0700 > > Received: (qmail 14948 invoked by uid 60001); 19 Oct > > 2005 05:28:04 - > > DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; > > s=s1024; d=yahoo.co.in; > > > > > h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; > > > > > b=nSRH/dzkDymW8D0VP4fbGYEYmPTMBz3nHuBJfzPfqqHuiCtos6ORwCtCJVDXQi31iCUPEDnFkax+5lZ78Wb43HLE6E0sexY7gj4pkI0NM+NWZF87t3HJMcsL/uPxFAGf6EFHuY7a7MLTBtQp1twznUKX8JYtqX5aAkw+pRLOIgU= > > ; > > Message-ID: > > > <[EMAIL PROTECTED]> > > Received: from [61.246.255.2] by > > web8602.mail.in.yahoo.com via HTTP; Wed, 19 Oct 2005 > > 06:28:04 BST > > Date: Wed, 19 Oct 2005 06:28:04 +0100 (BST) > > From: Binildas C <[EMAIL PROTECTED]> > > Subject: Unsubscribe > > To: [EMAIL PROTECTED] > > MIME-Version: 1.0 > > Content-Type: text/plain; charset=iso-8859-1 > > Content-Transfer-Encoding: 8bit > > X-Virus-Checked: Checked by ClamAV on apache.org > > > > Unsubscribe > > > > > > > __ > Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]