RE: pause after tomcat startup script runs?
Is it not possible to do a direct to a textfile ? catalina.bat output.txt hope this helps. Dennis -Original Message- From: Torgeir Veimo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 11:20 AM To: [EMAIL PROTECTED] Subject: pause after tomcat startup script runs? Is it possible to insert a "pause" command into the tomcat startup script, so that any exceptions that occur that prevents catalina from starting are readable? I tried putting pause into the catalina.bat file, but it didn't work. -- - Torgeir
RE: unsetting bean w/ session scope
what about creating a instance of the class of the bean. so st like : Name tempClass = new Name(); then call all the setters on the existing bean with the getters on the bean. name.setXXX(tempClass.getXXX()); ... and so on.. afterwards set tempClass back to null : tempClass=null, so it can be gc-ed. better write a globalset/get for your class, then you can use : name.setAll(tempClass.getAll()); hope this helps greetz Dennis -Original Message- From: Kris Gonzalez [mailto:[EMAIL PROTECTED]] Sent: Monday, April 02, 2001 8:22 AM To: [EMAIL PROTECTED] Subject: unsetting bean w/ session scope i use a bean with session scope in all of my JSPs in a particular app i'm working on by using the following: jsp:useBean id="name" class="Name" scope="session"/ however, i've need to reset this particular bean at some point...i tried this by running the following: name = new Name(); this did not work...is there any workaround to restore a bean w/ session scope back to it's original state? thanks!
RE: I don't get it...
John, Don't really know what you mean. But a class (.class-file) is all you need, you don't *need* the .java and recompile that. All you had to do was to address the actual bean in the jar (as I thought you could now do). WORA does work... :) Well, it worked for you anyway.. ;-) Byebye Dennis -Original Message- From: John Towell [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 6:00 PM To: '[EMAIL PROTECTED]' Subject: RE: I don't get it... Dennis Thanks for your answer. In this case I had the liberty of having the .java file which I could bring in and recompile - but what if it had been a proprietary bean class? ... so much for write once- run anywhere ... heh John -Original Message- From: Dennis Meerveld To: '[EMAIL PROTECTED]' Sent: 3/30/01 12:52 AM Subject: RE: I don't get it... Hi, I'm fairly new to Tomcat, but by bringing in a Bean class, do you mean addressing it in a JSP ? If so, be sure your %@ page import = "oracle.sqlj.runtime.Oracle" % is specified. If you're running it as a servlet, verify the import statement is included. Hope this helps.. :) Dennis -Original Message- From: John Towell [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 6:43 PM To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: I don't get it... I bring in a Bean class that imports an oracle class that's not on my tomcat server, so I get a: 'Class oracle.sqlj.runtime.Oracle not found in import.' error OK - so I bring in the appropriate jar file and put it in $TOMCAT_HOME/lib and restart tomcat. I look at messages and tomcat has reported the classpath as including the newly added jar files. But when I rerun the Bean class, I'm still getting the same 'not found in import' error. If tomcat knows the jar file is there, how can it not be finding the imported class file? What am I missing here? Thanks - John
RE: Tomcat installation problems
Ok, JAVA_HOME : is set ok I guess. But why do it twice ? TOMCAT_HOME : tomcat_home ? I use the startup.bat file in the \bin directory, this sets it for you. But if you don't use this startup-file, you are correct in doing this manually. Have you rebooted since you adjusted your autoexec.bat ? (silly question, but you never know...) Furthermore, are you on NT ? Then you have to set in the Environment (Windowskey+pause or My Computer, rightclick, properties, environment. Autoexec.bat won't matter much in NT.. ;) Hope this helps.. but.. something's fuzzy, did you follow the installation routines in tomcat_ug.html ? It can be found in your \tomcatdir\doc\uguide .. I used this guide and was up and running in less than 10 minutes.. Good luck, Dennis -Original Message- From: hanan khader [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 11:51 AM To: [EMAIL PROTECTED] Subject: Tomcat installation problems Hi all ... I have some errors in installing the tomcat. but let me know first, is this true or not : 1-edit the tomcat.bat , add this before any other statement : set JAVA_HOME=C:\JDK1.3 (my java installation directory) 2-edit the autoexec.bat as follows : set JAVA_HOME=C:\JDK1.3 set TOMCAT_HOME=C:\Tomcat(which includes the bin,lib,...etc directories) am I in need to modify my CLASSPATH var, it is already set to : CLASSPATH=.;%classpath% is there anything should be deleted or any other thing should be added. I think that I have aproblem because the console tells me when I type : tomcat, the following msg : can't find the servlet.jar, check ur TOMCAT_HOME var. and when I want to c my value for the variable by this statement : echo %TOMCAT_HOME% , it gives me the msg : ECHO is on, what does that mean, does it mean that the variable has not been added and defined or what, while when I type echo %path% it gives me my path... Where could be the error ? PLease help Hanan Khader _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
RE: Tomcat installation
hi are you sure the port you are running on is 9090 ? try it with just http://localhost/admin or http://localhost:9090/admin assuming tomcat is correctly installed and it is running (is necessary in order to get to the admin) this shouldn't be a problem. good luck Dennis P.S. Just to test a servlet, you can access them by http://localhost:port/examples/servlet/HelloWorldServlet -Original Message- From: Sonia Sh [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 2:35 PM To: Tomcat-User@Jakarta. Ap Subject: Tomcat installation Dear group I went thru the documentation given for installation of Tomcat and I also went thru Apache Web server installation. Now I have got Apache server 1.3.12, Jserve1.1.2, SDK2.0 installed on my comp now when i start apache server and try to open administer page http://localhost:9090 it gives page not available error... Actually I need to install this for servlet development. And I am running out of deadline for an assignment submission. I need to finish installation by today and test atleast one sample servlet. Please help me. Regards and Thnax Sonia
RE: Tomcat installation
Hi Sonia, Last thing you could try.. http://localhost:8040 This should normally (if you didn't change the port settings in the .conf-file) bring up the tomcat-homepage from where you can run some examples. To verify whether or not tomcat is actually running, check for a dos-window that kinda looks like this : 2001-03-30 03:11:41 - ContextManager: Adding context Ctx( /examples ) 2001-03-30 03:11:41 - ContextManager: Adding context Ctx( /dennis ) 2001-03-30 03:11:41 - ContextManager: Adding context Ctx( /admin ) Starting tomcat. Check logs/tomcat.log for error messages 2001-03-30 03:11:41 - ContextManager: Adding context Ctx( ) 2001-03-30 03:11:41 - ContextManager: Adding context Ctx( /test ) 2001-03-30 03:11:42 - PoolTcpConnector: Starting HttpConnectionHandler on 8040 2001-03-30 03:11:42 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 How do you start your Tomcat ? By issuing the startup.bat in the \bin-directory ? This should automatically bring up the forementioned dos-window. Maybe it'll help if I told you how I did my installs : I first installed JDK 1.3 (from Sun or IBM, doesn't really matter for now) Then I installed Apache (for the webserver-part). Start Apache and test if it works : http://localhost If your port 80 is occupied by another service (personal webserver or anything..) change the \conf\httpd.conf so that port points to 8040 (or antoher unused TCP port) After that I installed Tomcat 3.2.1., Now I copied ApacheModuleJServ.dll to apache-root\modules. In the tomcat-root\conf copy the tomcat_apache.conf to my_ta.conf change the httpd.conf in apache-root\conf, add : include drive:\tomcat-root\conf\my_ta.conf (e.g. include d:\tomcat\conf\my_ta.conf) check whether these variables exist and/or are correct : JAVA_HOME=drive:\jdk13-root (d:\jdk1.3) TOMCAT_HOME=drive:\tomcat-root (d:\tomcat) ok.. maybe you have to restart now.. (never a bad practice.. :) ) then.. open a dos-box.. go to the bin directory of your tomcat. e.g. cd d:\tomcat\bin now type : startup another dos-box should open and the stuff should be running.. (ah.. be sure apache is running as well.) good luck Dennis -Original Message- From: Sonia Sh [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 3:17 PM To: Tomcat-User@Jakarta. Ap Subject: Tomcat installation Hi Dennis I tried using http://localhost/admin or http://localhost:9090/admin but none of these seem to work. Further the link for testing the servlet also dint work out Cud it be possible that my Tomcat dint get get installed properly? Sonia
EJB Access Bean in Tomcat-jsp
Hi, I have created an CMP-EJB in VA for Java 3.5. For this EJB I created an access bean for usage in a JSP-page. This JSP-page is running in Tomcat. I already added the jars (so for my accessbean and ejb-related stuff) to the \lib-dir. All classes are found, no problems there. But I do get an error when I run the following in my jsp : %@ page import = "DennisCMPTest.OracleAccessBean" % // the accessbean % OracleAccessBean oracc = null; try { oracc = new OracleAccessBean(...); .. }... The error I get : Internal Servlet Error: javax.servlet.ServletException: com.ibm.rmi.ClientRequest: method invoke()Lcom/ibm/rmi/ClientResponse; not found at java.lang.Throwable.(Throwable.java:96) at java.lang.Exception.(Exception.java:44) at javax.servlet.ServletException.(ServletException.java:161) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:498) Root cause: java.lang.NoSuchMethodError: com.ibm.rmi.ClientRequest: method invoke()Lcom/ibm/rmi/ClientResponse; not found at com.ibm.CORBA.iiop.ClientDelegate.invoke(Unknown Source) at com.ibm.CORBA.iiop.InitialNamingClient.resolve(Unknown Source) at com.ibm.CORBA.iiop.InitialNamingClient.cachedInitialReferences(Unknown Source) at com.ibm.CORBA.iiop.InitialNamingClient.resolve_initial_references(Unknown Source) at com.ibm.CORBA.iiop.ORB.resolve_initial_references(Unknown Source) at com.ibm.ejs.ns.jndi.CNInitialContextFactory.initRootContext(CNInitialContext Factory.java:428) at com.ibm.ejs.ns.jndi.CNInitialContextFactory.getInitialContext(CNInitialConte xtFactory.java:212) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:669) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.(InitialContext.java:199) at com.ibm.ivj.ejb.runtime.AbstractAccessBean.getInitContext(AbstractAccessBean .java:312) at com.ibm.ivj.ejb.runtime.AbstractAccessBean.getGlobalHome(AbstractAccessBean. java:190) at com.ibm.ivj.ejb.runtime.AbstractAccessBean.getHome(AbstractAccessBean.java:2 07) at DennisCMPTest.OracleAccessBean.ejbHome(OracleAccessBean.java:105) at DennisCMPTest.OracleAccessBean.(OracleAccessBean.java:53) at jsp._0002fjsp_0002faccessbean_0002ejspaccessbean_jsp_0._jspService(_0002fjsp _0002faccessbean_0002ejspaccessbean_jsp_0.java:79) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:498) This is very strange (to me) since I inspected the com.ibm.rmi.ClientRequest-class and it *does* have an invoke()-method. Can anyone help me with this ? Or just give me some pointers as to what might be going wrong ? Thanx for any help !! kind regards Dennis Meerveld Technical Consultant COGNICASE Benelux (Nat Systems) mailto:[EMAIL PROTECTED] P.S. Is there a
RE: How to use a Bean
Hi, First of all. Change the set/getPropetry to set/getProperty. Then you'll get an error page saying no information can be found about the property *. Now, %@ page import = "testing.TestBean" % html head/head jsp:useBean id="TestData" class="testing.TestBean" / jsp:setProperty name="TestData" property="firstName" value="Dennis"/ jsp:getProperty name="TestData" property="firstName" / body FirstName is: jsp:getProperty name="TestData" property="firstName" / /body /html This will work. Greetz Denniz -Original Message- From: Chris Andreou [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 2:29 AM To: '[EMAIL PROTECTED]' Subject: How to use a Bean I am using JDK1.3 Tomcat 3.3 on Windows Nt platform. The problem I have is tomcat does not load the bean. It does load Java Api classes. I have the following bean: package testing; import java.io.*; public class TestBean implements Serializable { private String FirstName = null; public TestBean() {} // Public Accesssors public void setfirstName(String str) { FirstName = str; } // get Public Accessors public String getfirstName() {return FirstName;} }// end of the class and I am trying to access the property firstName through the string. I copied the package testing.TestBean unde WEB-INF directory of my context. I don't get an ClassNotFound error, but the value from the bean does not display either. The simple code I an using is : %@ page language ="java" contentType="text/html;charset=WINDOWS-1252"% html head/head jsp:useBean id="TestData" class="testing.TestBean" / jsp:setPropetry name="TestData" property="*" / jsp:getPropetry name="TestData" property="*" / body FirstName is: jsp:getProperty name="TestData" property="firstName" / /body /html Please, any help would be appreciated! Thanks in advance Chris
RE: EJB Access Bean in Tomcat-jsp
I know, but Tomcat is not used as the container (Websphere is..). It is only a place where the JSP(with the accessbean) is running. Isn't an accessbean cut out for this purpose ? To *access* an EJB running in a container elsewhere ? Correct me if I'm wrong, please. Any other thoughts are always appreciated ! regards, Dennis -Original Message- From: Valeriy Molyakov [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 4:20 PM To: [EMAIL PROTECTED] Subject: Re: EJB Access Bean in Tomcat-jsp As far as I know - Tomcat is not container for EJB ! - Original Message - From: "Dennis Meerveld" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 29, 2001 4:54 PM Subject: EJB Access Bean in Tomcat-jsp Hi, I have created an CMP-EJB in VA for Java 3.5. For this EJB I created an access bean for usage in a JSP-page. This JSP-page is running in Tomcat. I already added the jars (so for my accessbean and ejb-related stuff) to the \lib-dir. All classes are found, no problems there. But I do get an error when I run the following in my jsp : %@ page import = "DennisCMPTest.OracleAccessBean" % // the accessbean % OracleAccessBean oracc = null; try { oracc = new OracleAccessBean(...); .. }... The error I get : Internal Servlet Error: javax.servlet.ServletException: com.ibm.rmi.ClientRequest: method invoke()Lcom/ibm/rmi/ClientResponse; not found at java.lang.Throwable.(Throwable.java:96) at java.lang.Exception.(Exception.java:44) at javax.servlet.ServletException.(ServletException.java:161) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:498) Root cause: java.lang.NoSuchMethodError: com.ibm.rmi.ClientRequest: method invoke()Lcom/ibm/rmi/ClientResponse; not found at com.ibm.CORBA.iiop.ClientDelegate.invoke(Unknown Source) at com.ibm.CORBA.iiop.InitialNamingClient.resolve(Unknown Source) at com.ibm.CORBA.iiop.InitialNamingClient.cachedInitialReferences(Unknown Source) at com.ibm.CORBA.iiop.InitialNamingClient.resolve_initial_references(Unknown Source) at com.ibm.CORBA.iiop.ORB.resolve_initial_references(Unknown Source) at com.ibm.ejs.ns.jndi.CNInitialContextFactory.initRootContext(CNInitialContext Factory.java:428) at com.ibm.ejs.ns.jndi.CNInitialContextFactory.getInitialContext(CNInitialConte xtFactory.java:212) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:669) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.(InitialContext.java:199) at com.ibm.ivj.ejb.runtime.AbstractAccessBean.getInitContext(AbstractAccessBean .java:312) at com.ibm.ivj.ejb.runtime.AbstractAccessBean.getGlobalHome(AbstractAccessBean. java:190) at com.ibm.ivj.ejb.runtime.AbstractAccessBean.getHome(AbstractAccessBean.java:2 07) at DennisCMPTest.OracleAccessBean.ejbHome(OracleAccessBean.java:105) at DennisCMPTest.OracleAccessBean.(OracleAccessBean.java:53) at jsp._0002fjsp_0002faccessbean_0002ejspaccessbean_jsp_0._jspService(_0002fjsp _0002faccessbean_0002ejspaccessbean_jsp_0.java:79) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool
RE: I don't get it...
Hi, I'm fairly new to Tomcat, but by bringing in a Bean class, do you mean addressing it in a JSP ? If so, be sure your %@ page import = "oracle.sqlj.runtime.Oracle" % is specified. If you're running it as a servlet, verify the import statement is included. Hope this helps.. :) Dennis -Original Message- From: John Towell [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 6:43 PM To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: I don't get it... I bring in a Bean class that imports an oracle class that's not on my tomcat server, so I get a: 'Class oracle.sqlj.runtime.Oracle not found in import.' error OK - so I bring in the appropriate jar file and put it in $TOMCAT_HOME/lib and restart tomcat. I look at messages and tomcat has reported the classpath as including the newly added jar files. But when I rerun the Bean class, I'm still getting the same 'not found in import' error. If tomcat knows the jar file is there, how can it not be finding the imported class file? What am I missing here? Thanks - John
RE: EJB Access Bean in Tomcat-jsp
Hi Simon, Thanks for your help ! I use the AccessBean in my to access the EJB running in a WebSphere-container. And yes, this is via jndi. But the jndi-classes (com.ibm.jndi.*) are already in the WebSphere TestEnvironment (from VA for Java) .jar I created and put in the \lib dir. So Tomcat should have no problems locating them, right ? I'll check the mail-archive concerning these jndi-locations nevertheless, who knows what I might be doing wrong.. I gather the second part of your answer is for the actual connection to the remote EJB-container ? Thanks again. But does the fact that I haven't explicitly set those properties yet cause the 'invoke()'- error that is my initial area of concern ? Much obliged, Dennis -Original Message- From: Oldeboershuis, Simon [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 9:09 AM To: [EMAIL PROTECTED] Subject: Re: EJB Access Bean in Tomcat-jsp Hi Dennis, you probably access the EJB Bean via jndi? The correct jndi classes have to be in the classpath by putting them in right directory of your webapp. See the mail archive for more info on the right spot for jndi classes and at least the following properties have to be set: # if you use rmi only java.naming.factory.initial com.sun.jndi.rmi.registry.RegistryContextFactory java.naming.provider.urlrmi://host:port java.naming.factory.url.pkgs The values depend on your EJB-Server. so long! simon