Re: no ojdbc14 in java.library.path, Help I'm stuck trying to write this servlet!
i have multiple webapps connecting to oracle within the same tomcat instance. removing ojdbc14.jar from all the webapps WEB-INF/lib and keeping only one copy of ojdbc14.jar in common/lib works for me on tomcat 5. if you are connecting via oci drivers, make sure that your LD_LIBRARY_PATH points to your oracle home. i've added the following in my catalina.sh startup file: export ORACLE_BASE=/usr/local/oracle export ORACLE_HOME=$ORACLE_BASE/product/9.2.0 export ORACLE_TERM=xterm export NLS_LANG=AMERICAN; export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/lib :/ lib:/usr/lib:/usr/local/lib if you're using thin drivers, this should not be required. apu On Wed, 18 Feb 2004 12:59:41 -0500 blais [EMAIL PROTECTED] wrote: Hey All. I've been trying to write a servlet that uses a jdbc driver to connect to a remote Oracle server. I've manage to compile my own standalone app to connect to the DB. I included the ojdbc14.jar in my classpath and everything seemed to work fine. I can't seem to get the same code to work in a servlet with tomcat 5, and I'm pretty sure it's because tomcat does not know where ojdbc14.jar is. I've put it in server/lib and /bin and common/lib, but to no avail. Using the web tool, I've added the ojdbc14.jar file with multiple paths and i've still got nothing. Any help would be appreciates. I'm running this on Linux with tomcat 5, Oracle 9i and apache 1.3.29. Regards, Jeremie -- You live and learn. At any rate, you live. - 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]
Re: no ojdbc14 in java.library.path, Help I'm stuck trying to write this servlet!
i did not have to add any database connections under the tomcat web admin tool. catalina.properties remains the same. is there a stack trace with an exception in any logs? (ClassNotFound or any other such exceptions) could you also describe what symptoms you are seeing? does the app hang or does it return an error or are you not seeing database updates apu On Wed, 18 Feb 2004 13:46:21 -0500 blais [EMAIL PROTECTED] wrote: Thanks Apu, I am using the thin client and it's still not working. I've put ojdbc14 in common/lib and still nothing. Did you have to add a database connection under the tomcat web administration tool ? And if you did, did you include a path to your ojdbc.jar file? I'm also wondering if maybe the catalina.properties file should be changed or if it should stay the same. Kind Regards, Jeremie Apu Shah wrote: i have multiple webapps connecting to oracle within the same tomcat instance. removing ojdbc14.jar from all the webapps WEB-INF/lib and keeping only one copy of ojdbc14.jar in common/lib works for me on tomcat 5. if you are connecting via oci drivers, make sure that your LD_LIBRARY_PATH points to your oracle home. i've added the following in my catalina.sh startup file: export ORACLE_BASE=/usr/local/oracle export ORACLE_HOME=$ORACLE_BASE/product/9.2.0 export ORACLE_TERM=xterm export NLS_LANG=AMERICAN; export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/ lib:/ lib:/usr/lib:/usr/local/lib if you're using thin drivers, this should not be required. apu On Wed, 18 Feb 2004 12:59:41 -0500 blais [EMAIL PROTECTED] wrote: Hey All. I've been trying to write a servlet that uses a jdbc driver to connect to a remote Oracle server. I've manage to compile my own standalone app to connect to the DB. I included the ojdbc14.jar in my classpathand everything seemed to work fine. I can't seem to get the same codeto work in a servlet with tomcat 5, and I'm pretty sure it's becausetomcat does not know where ojdbc14.jar is. I've put it in server/liband /bin and common/lib, but to no avail. Using the web tool, I'veadded the ojdbc14.jar file with multiple paths and i've still gotnothing. Any help would be appreciates. I'm running this on Linux with tomcat 5, Oracle 9i and apache 1.3.29. Regards, Jeremie -- You live and learn. At any rate, you live. --- --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] - 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]
Re: no ojdbc14 in java.library.path, Help I'm stuck trying to write this servlet!
by doing a system.loadlibrary, you are using the native drivers. this call should not be needed at all if you are using the thin driver, which is a pure java (type 4) driver. you should be able to connect to the database using the thin driver in the following way Driver d = (Driver)Class.forName(oracle.jdbc.OracleDriver).newInstance(); DriverManager.registerDriver(d) ; String connectionStr = jdbc:oracle:thin:@192.168.0.25:1521:oradb java.sql.Connection conn = DriverManager.getConnection(connectionStr,user,pass) that's it. no loadLibrary call should be needed at all. apu On Wed, 18 Feb 2004 16:14:25 -0500 blais [EMAIL PROTECTED] wrote: Thanks again Apu. Here is my core dump since i've removed the database configuration from the web admin tool. HTTP Status 500 - - --- *type* Exception report *message* *description* _The server encountered an internal error () that prevented it from fulfilling this request._ *exception* javax.servlet.ServletException: Servlet execution threw an exception filters.ExampleFilter.doFilter(ExampleFilter.java:149) *root cause* java.lang.UnsatisfiedLinkError: no ojdbc14 in java.library.path java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) java.lang.Runtime.loadLibrary0(Runtime.java:788) java.lang.System.loadLibrary(System.java:834) HelloWorldExample.doGet(HelloWorldExample.java:65) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) filters.ExampleFilter.doFilter(ExampleFilter.java:149) *note* _The full stack trace of the root cause is available in the Tomcat logs._ Note that this is going through apache. The java command which is causing this error is *System.loadLibrary(ojdbc14)*. in my servlet. Apparently if this call works, then registering an Oracle driver with *DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); *will also work. When this error is received, nothing hangs at all. Thanks again for your help Apu, you're god send! Cheers, -jeremie Apu Shah wrote: i did not have to add any database connections under the tomcat web admin tool. catalina.properties remains the same. is there a stack trace with an exception in any logs? (ClassNotFound or any other such exceptions) could you also describe what symptoms you are seeing? does the app hang or does it return an error or are you not seeing database updates apu On Wed, 18 Feb 2004 13:46:21 -0500 blais [EMAIL PROTECTED] wrote: Thanks Apu, I am using the thin client and it's still not working. I've put ojdbc14 in common/lib and still nothing. Did you have to add a database connection under the tomcat web administration tool ? And ifyou did, did you include a path to your ojdbc.jar file? I'm also wondering if maybe the catalina.properties file should be changed or if it should stay the same. Kind Regards, Jeremie Apu Shah wrote: i have multiple webapps connecting to oracle within the same tomcat instance. removing ojdbc14.jar from all the webapps WEB-INF/lib and keeping only one copy of ojdbc14.jar in common/lib works for me on tomcat 5. if you are connecting via oci drivers, make sure that your LD_LIBRARY_PATH points to your oracle home. i've added the followingin my catalina.sh startup file: export ORACLE_BASE=/usr/local/oracle export ORACLE_HOME=$ORACLE_BASE/product/9.2.0 export ORACLE_TERM=xterm export NLS_LANG=AMERICAN; export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/jdb c/lib:/ lib:/usr/lib:/usr/local/lib if you're using thin drivers, this should not be required. apu On Wed, 18 Feb 2004 12:59:41 -0500 blais [EMAIL PROTECTED] wrote: Hey All. I've been trying to write a servlet that uses a jdbc driver to connect to a remote Oracle server. I've manage to compile my own standaloneapp to connect to the DB. I included the ojdbc14.jar in my classpathand everything seemed to work fine. I can't seem to get the same codeto work in a servlet with tomcat 5, and I'm pretty sureit's becausetomcat does not know where ojdbc14.jar is. I've put itin server/liband /bin and common/lib, but to no avail. Using theweb tool, I'veadded the ojdbc14.jar file with multiple paths andi've still gotnothing. Any help would be appreciates. I'm running this on Linux with tomcat 5, Oracle 9i and apache 1.3.29. Regards, Jeremie -- You live and learn. At any rate, you live. - -- --To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: Workaround for JK Bug
i was wondering what the state of the checked in code is for mod_jk. the last tag on jk was 1.2.5 after which (i assume) there have been several checkins. would you recommend pushing out a cvs built mod_jk to production (probably unsafe, right) or should we wait for the next tagged, jakarta-blessed, deemed stable mod_jk? (i guess i answered my question... any thoughts, gut-feelings, recommendations anyone?) apu On Fri, February 13, 2004 1at 1:03 am, Chris Pennock wrote: I have recently encountered a bug in the interaction between mod_jk and Tomcat. In brief, Tomcat does not get the POST data from mod_jk following failover from one Tomacat node to another. Also, here is a link to the bug in Apache's Bugzilla: http://issues.apache.org/bugzilla/show_bug.cgi?id=24882 It's should be fixed in CVS. Try pulling the latest code and see if it fixes it for you and post your results in the bug, the developers would love to hear about it. -Dave - 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]
worker.list, worker.x.lb
according to the docs (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.ht ml): balanced_workers is a comma separated list of workers that the load balancer need to manage. These workers should not appear in the worker.list property. most other documents on the web describing configuration of load balancing do not adhere to this. even i have been under the impression that i should be doing something like this: worker.list=app1,app2,applb worker.app1.port=7009 worker.app1.host=192.168.0.140 worker.app1.type=ajp13 worker.app1.lbfactor=5 worker.app2.port=7009 worker.app2.host=192.168.0.141 worker.app2.type=ajp13 worker.app2.lbfactor=5 worker.applb.type=lb worker.applb.balanced_workers=app1,app2 i just need re-assurance that the above configuration is incorrect (wonder how it behaves.. anyone know?) and the configuration below is correct: worker.list=applb # don't list workers here! worker.app1.port=7009 worker.app1.host=192.168.0.140 worker.app1.type=ajp13 worker.app1.lbfactor=5 worker.app2.port=7009 worker.app2.host=192.168.0.141 worker.app2.type=ajp13 worker.app2.lbfactor=5 worker.applb.type=lb worker.applb.balanced_workers=app1,app2 thanks. sorry for the trouble... apu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Tomcat5 session replication.
i found that replacing tcpListenAddress=auto with tcpListenAddress=IP and mcastBindAddress=IP works better with multi-homed machines. apu On Wed, 11 Feb 2004 17:58:59 -0500 Rick Szeto [EMAIL PROTECTED] wrote: Sorry, my bad... Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=FilipsCluster debug=10 serviceclass=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.1.2.3 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000 tcpThreadCount=2 tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 printToScreen=true expireSessionsOnShutdown=false useDirtyFlag=false replicationMode=synchronous / Valve className=org.apache.catalina.cluster.tcp.ReplicationValve debug=9 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.tx t;/ Thanks again, Rick Szeto -Original Message- From: Rick Szeto [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 5:55 PM To: tomcat Subject: Problem with Tomcat5 session replication. Hi all, I am having quite a bit of trouble getting the sessions from one node in the cluster to the other nodes of the cluster. The multicast is working fine as I can see that each of the nodes can recognize when a new node is brought up as well as when they are removed. No where in the logs are there mention of sessions being replicated and/or errors encounter while trying to do so. I have Apache in front doing URL rewriting and forwarded via proxy so the client does not know the difference. I have pasted the relevant snippets from the server.xml, which are identical on both nodes. I am running Tomcat 5.0.18 with one node running on Windows XP and the other node on RH 9.0(which should not make any difference). I guess that what I am hoping for is someone can look at my replication config and tell me that I did something stupid. I rather have that happen then not being able to get the sessions replicated. =) ps. Out of curiousity, I have been unable to find any documentation on the JDBCManager, reference here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html Thanks in advance, Rick Szeto - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Tomcat5 session replication.
also make sure that the web.xml for the webapp has the distributable / element and all session vars are serializable. apu On Wed, 11 Feb 2004 15:13:39 -0800 Filip Hanik \(lists\) [EMAIL PROTECTED] wrote: on RH 9 you must also set, export LD_ASSUME_KERNEL=2.4 Filip -Original Message- From: Rick Szeto [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 2:55 PM To: tomcat Subject: Problem with Tomcat5 session replication. Hi all, I am having quite a bit of trouble getting the sessions from one node in the cluster to the other nodes of the cluster. The multicast is working fine as I can see that each of the nodes can recognize when a new node is brought up as well as when they are removed. No where in the logs are there mention of sessions being replicated and/or errors encounter while trying to do so. I have Apache in front doing URL rewriting and forwarded via proxy so the client does not know the difference. I have pasted the relevant snippets from the server.xml, which are identical on both nodes. I am running Tomcat 5.0.18 with one node running on Windows XP and the other node on RH 9.0(which should not make any difference). I guess that what I am hoping for is someone can look at my replication config and tell me that I did something stupid. I rather have that happen then not being able to get the sessions replicated. =) ps. Out of curiousity, I have been unable to find any documentation on the JDBCManager, reference here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html Thanks in advance, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 - 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]
Re: Tomcat Loads Deleted Context?
delete the context file (if present) from $TOMCAT_HOME/conf/{ENGINE}/{HOST}/ On Wed, 4 Feb 2004 10:39:30 -0600 (CST) Milt Epstein [EMAIL PROTECTED] wrote: On Wed, 4 Feb 2004, Yansheng Lin wrote: Hi, I am having a weird problem. It seems that Tomcat is trying to deploy a deleted project. The deleted project was outside of ${tomcat_home}/ dir. And I already I commented out the context for that project. I also deleted the work/ dir, but the problem persists. The generated /work/Catalina/localhost/deleted/ dir doesn't have any class files except SESSIONS.ser and tldCache.ser. I suspect tomcat is installing web applications based on some sort of cache. What do you mean by commented out the context for that project? Where/in what file did you do that? Here is the console output when deploying tomcat: Feb 4, 2004 8:14:19 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Web\ApacheGroup\Tomcat\conf\Catalina\localhost\deleted.xml Does this file still exist? If so, that could be your problem. (That is the context configuration file for the deleted webapp.) (deleted is the name of your webapp? Or did you just fill that in as a placeholder?) log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. I was wondering if this is a bug? I am using tomcat-5.0.18. Thanks! --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Milt Epstein Research Programmer Integration and Software Engineering (ISE) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] - 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]
[OT] 5.0.18
sorry for this off-topic question, it's meant for any tomcat developers reading this list currently, there is a tagged version of 5.0.18alpha. this has the fix for RequestGroup/RequestGroupInfo memory leaks and some additional clustering functionality (thanks filip!) this is primarily the reason i upgraded. i want to push this out to production but my co-workers feel that it's alpha software and by definition buggy, unstable and not optimized. i've shown them the benchmarks run against 5.0.18alpha and they all seem fine but they are not convinced due to the alpha tag on the release. my question is, when will 5.0.18 be tagged and released as final? is there a fixed date for release or is it just based on popular consensus? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jspexception in admin webapp
wondering if anyone has seen this while running the admin webapp from tomcat 5.0.16? running the admin webapp, when clicking on the Service (Catalina) link in the left side frame, i get the following stack trace: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Define tag cannot set a null value org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon textImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte xtImpl.java:800) admin.service.service_jsp._jspService(service_jsp.java:840) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.ja va:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestP rocessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause javax.servlet.jsp.JspException: Define tag cannot set a null value org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) admin.service.service_jsp._jspService(service_jsp.java:235) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.ja va:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestP rocessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs. in the tomcat logs: 2004-01-20 12:13:52 StandardContext[/admin]action: Entered TreeControlTestAction:perform() 2004-01-20 12:13:52 StandardContext[/admin]action: tree param is null 2004-01-20 12:13:52 StandardContext[/admin]action: Select event on Standalone:type=Service,serviceName=Catalina 2004-01-20 12:13:52 ApplicationDispatcher[/admin] Servlet.service() for servlet admin.service.service_jsp threw exception javax.servlet.jsp.JspException: Define tag cannot set a null value at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) at admin.service.service_jsp._jspService(service_jsp.java:235) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) snip my Service element from web.xml looks like: Service name=Catalina Connector port=8008 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true !-- Restrict access -- Valve className=org.apache.catalina.valves.RemoteAddrValve allow=localhost,127.0.0.1,192.168.0.*,192.168.100.*/ /Connector Connector address=192.168.100.152 port=8009 redirectPort=8443 debug=0 enableLookups=false protocol=AJP/1.3 / Engine name=Standalone defaultHost=192.168.100.152 debug=0 jvmRoute=app4 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Host name=192.168.100.152 debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=ValidationCluster debug=32 serviceclass=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.1.2.4 mcastPort=45566 msgFrequency=500 mcastFrequency=500 mcastDropTime=3000 tcpThreadCount=10 tcpListenAddress=192.168.100.152 tcpListenPort=4001 tcpSelectorTimeout=100 printToScreen=true expireSessionsOnShutdown=false useDirtyFlag=true replicationMode=pooled managerClassName=org.apache.catalina.cluster.session.SimpleTcpReplicat ionManager / Valve
Re: jspexception in admin webapp
thanks ben, i checked that before posting the message. mine is reproducible under netscape 7, firebird .7 (linux) and netscape 7, firebird .7, ie 6 (windoze). further, this is not due to clicking save or going back or any such user action, it happens as soon as i click the Service (Catalina) link. On Tue, 20 Jan 2004 14:29:25 -0500 Ben Souther [EMAIL PROTECTED] wrote: http://issues.apache.org/bugzilla/show_bug.cgi?id=24086 Take a look at this bug and see if the conditions are similar or the same. On Tuesday 20 January 2004 02:22 pm, Apu Shah wrote: wondering if anyone has seen this while running the admin webapp from tomcat 5.0.16? running the admin webapp, when clicking on the Service (Catalina) link in the left side frame, i get the following stack trace: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Define tag cannot set a null value org.apache.jasper.runtime.PageContextImpl.doHandlePageException(Pag eCon textImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageC onte xtImpl.java:800) admin.service.service_jsp._jspService(service_jsp.java:840) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java: 133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.action.RequestProcessor.doForward(RequestProcesso r.ja va:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(Requ estP rocessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor. java :279) org.apache.struts.action.ActionServlet.process(ActionServlet.ja va:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java :507) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause javax.servlet.jsp.JspException: Define tag cannot set a null value org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java :272) admin.service.service_jsp._jspService(service_jsp.java:235) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java: 133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.action.RequestProcessor.doForward(RequestProcesso r.ja va:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(Requ estP rocessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor. java :279) org.apache.struts.action.ActionServlet.process(ActionServlet.ja va:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java :507) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs. in the tomcat logs: 2004-01-20 12:13:52 StandardContext[/admin]action: Entered TreeControlTestAction:perform() 2004-01-20 12:13:52 StandardContext[/admin]action: tree param is null 2004-01-20 12:13:52 StandardContext[/admin]action: Select event on Standalone:type=Service,serviceName=Catalina 2004-01-20 12:13:52 ApplicationDispatcher[/admin] Servlet.service() for servlet admin.service.service_jsp threw exception javax.servlet.jsp.JspException: Define tag cannot set a null value at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) at admin.service.service_jsp._jspService(service_jsp.java:235) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) snip my Service element from web.xml looks like: Service name=Catalina Connector port=8008 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true !-- Restrict access -- Valve className=org.apache.catalina.valves.RemoteAddrValve allow=localhost,127.0.0.1,192.168.0.*,192.168.100.* / /Connector Connector address=192.168.100.152 port=8009 redirectPort=8443 debug=0 enableLookups=false protocol=AJP/1.3 / Engine name=Standalone defaultHost=192.168.100.152 debug=0 jvmRoute=app4 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Host name=192.168.100.152 debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Cluster className
maxProcessors vs maxThreads
there seems to be some confusion about whether to use maxThreads or maxProcessors and the effect on tomcat. futher it is not clear from the docs which one to use and whether they have an effect on the protocol used by the connector. could someone please clarify this... using tomcat 5.0.16: the JK2 AJP connector (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/ajp.html) docs doesn't list any directive like maxProcessors or maxThreads. the HTTP connector does (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html) list a maxThreads directive. 1. is maxProcessors deprecated? 2. does maxProcessors and/or maxThreads apply to the AJP connector? 3. if i do set maxProcessors/maxThreads does the total number of maxThreads/maxProcessors across all tomcat instances in a load balanced setup need to equal/less than/greater than the apache serverlimit? example: - 2 apache servers with serverlimit 1024 each = total server limit = 2048 - 4 tomcat instances. - should maxProcessors be set to 2048/4 = 512 or less than/greater than that? 4. similiar questions as 12 for maxSpareThreads/maxIdleProcessors and minSpareThreads/minIdleProcessors. 5. does acceptCount work for both HTTP and AJP connectors? thanks in advance for clarifications. here is the ajp connector element in my server.xml !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector address=192.168.100.152 port=8009 redirectPort=8443 debug=0 enableLookups=false protocol=AJP/1.3 / do i set maxThreads, maxSpareThreads, minSpareThreads, acceptCount or maxProcessors, maxIdleProcessors, minIdleProcessors, acceptCount? apu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maxProcessors vs maxThreads
thanks yoav, i noticed that but then does that mean that there is no method to specify max threads/processors for the coyote ajp connector? that sounds a bit strange how does tomcat behave with the ajp connector? does it indefinitely spawn threads to handle requests until it bombs out of memory? or is there behaviour as specified by the acceptcount/max processors for the http connector buried in the code of the ajp connector that can't be modified? thanks in advance. Howdy, there seems to be some confusion about whether to use maxThreads or maxProcessors and the effect on tomcat. futher it is not clear from the docs which one to use and whether they have an effect on the protocol used by the connector. Read the documentation carefully. The Coyote (HTTP) connector for Tomcat 5 supports parameters for max threads, spare threads, and other settings. The Coyote (HTTP) connector for tomcat 4 supports maxProcessors, minProcessors, and other settings. Anything not listed on these pages is not supported, meaning Coyote in Tomcat 5 does NOT support maxProcessors and Coyote in tomcat 4 does NOT support max threads. The AJP connector in tomcat 5, as its documentation states, does not support either max threads or maxProcessors. The docs lay it all out. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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]
RE: maxProcessors vs maxThreads
thanks yoav. this begs another question... under what circumstances would one choose to use the ajp connector? i am assuming it's probably a more compact and efficient protocol compared to http (not sure about that). in any case, if one never needs to access tomcat directly from a browser (tomcat is always hidden behind apache on an internal network not accessible from the outside) what parameters should i use to judge whether to use http or ajp connectors? it seems like http is better (due to the fact that you can customize settings like maxThreads) but i was always under the impression that ajp should be preferred over http (i guess i was wrong) any thoughts on this? Howdy, thanks yoav, i noticed that but then does that mean that there is no method to specify max threads/processors for the coyote ajp connector? that sounds a bit strange If it's not documented, then there's no configurable way to do it. Of course, you can always subclass/extend a connector just like any other tomcat element to add the behavior you want. how does tomcat behave with the ajp connector? does it indefinitely spawn threads to handle requests until it bombs out of memory? or is there behaviour as specified by the acceptcount/max processors for the http connector buried in the code of the ajp connector that can't be modified? I don't use the AJP connector, so I can't answer that one, but the code is open for you to inspect at your leisure... Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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]
Re: maxProcessors vs maxThreads
thanks much remy. i was looking for configuring maxThreads for the ajp connector with jk2. anyways, do you know what the default value for maxThreads is for channelSocket? (it's not in the docs) what are the defaults for the other options? or where can i find them? backLog tcpNoDelay soTimeout soLinger serverTimeout again, thanks. this was exactly what i was looking for. ps: you know if you specify maxProcessors or maxThreads in the ajp Connector element, tomcat starts up fine, without any warnings. as a suggestion, (i don't know how beneficial), but it would probably be nice if a message gets printed in the log (with debug=0) stating that the values will be ignored and should be set in jk2.properties. For AJP, you're supposed to use the jk2.properties file. This is all in the JK docs, with the native connector docs. Some select parameters from jk2.properties could be set on the Connector element, but it seemed better to use only one configuration file for AJP, and I removed them from the documentation. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - 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]
Re: Tomcat replication Unable to receive message through TCP channel
check the dates on both machines. i think (filip please clarify if i'm wrong) if one machine is out of sync with the other by an interval equal or greater than the session timeout, the sessions will expire on the receiving end. Ok I really have no idea why this ain't working. Same clustering version on both cluster. The first one works A1.. the second invalidates all my sessions Only difference between the two clusters are that the 2nd one is a multi-ip server (3 adresses on the same eth). But the hostname is pointing to the main eth0 address. any idea? Jean-Philippe Bélanger CGI Filip Hanik wrote: yikes :) I fixed this one two days ago, download 5.0.18 and let me know if the problem persists. Filip - 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]
maxProcessors vs maxThreads
using tomcat 5.0.16 the JK2 AJP connector (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/ajp.html) docs doesn't list any directive like maxProcessors or maxThreads. the HTTP connector does (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html) list a maxThreads directive. 1. is maxProcessors deprecated? 2. does maxProcessors and/or maxThreads apply to the AJP connector? 3. if i do set maxProcessors/maxThreads does the total number of maxThreads/maxProcessors across all tomcat instances in a load balanced setup need to equal/less than/greater than the apache serverlimit? example: - 2 apache servers with serverlimit 1024 each = total server limit = 2048 - 4 tomcat instances. - should maxProcessors be set to 2048/4 = 512 or less than/greater than that? 4. similiar questions as 12 for maxSpareThreads/maxIdleProcessors and minSpareThreads/minIdleProcessors. 5. does acceptCount work for both HTTP and AJP connectors? thanks in advance for clarifications. here is the ajp connector element in my server.xml !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector address=192.168.100.152 port=8009 redirectPort=8443 debug=0 enableLookups=false protocol=AJP/1.3 / do i set maxThreads, maxSpareThreads, minSpareThreads, acceptCount or maxProcessors, maxIdleProcessors, minIdleProcessors, acceptCount? apu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RTFM
also make sure you have crossContext=true in your respective Context directives in server.xml On Wed, 14 Jan 2004 17:40:33 -0800 Jerry Ford [EMAIL PROTECTED] wrote: Okay, from this detailed description---which sounds to me like it should work---here's my SWAG (silly wild-ass guess): After your response.sendRedirect() in the servlett, do you, um, well, include an explicit return statement? Jerry Jerald Powel wrote: OK, what I am trying to do is simple in theory. I have loaded in the browser an app - app1/. From a servlet in app1 I want to simply redirect to another app (app2 - different context) - to be loaded in the same browser window. By which means I forward I'm not fussed. Currently I am using RequestDispatcher or response.sendRedirect from a servlet in app1. But in the window, app2 appeqars to be loading in the address bar, but app1 is in fact loaded but with broken image links/error messages etc. So it appears to looking in the right place...just for the wrong things! I have checked docBase for each context in server.xml - they are fine. Each app runs fine if loaded from new windows, but when I try to link the two togethertrouble. Any thoughts please? I am ready to throw in the towel! G. Justin Ruthenbeck [EMAIL PROTECTED] wrote: It'd difficult from your poast to figure out what you're trying to accomplish. The phrase forward control from one context to another is quite ambiguous: * Are you trying to create a response that includes output from resources from multiple contexts? * While using one app, do you want to direct the user to pages in a different app? * Are you talking client side or server side? * Can you give us the scenario you're addressing? Often people ask questions that aren't phrased properly, so it's important to understand exactly what you're trying to do before going off and suggesting one of a hundred different possible answers. justin BTW: I would suggest trying not to be guilty of stiring interest any more. It's not looked fondly upon by those who can most help you. Your previous post was not answered because it was ambiguous, so it'd be best to include copious information from the beginning (so you don't have to wait so long for a reply or cause subject pollution). At 04:45 PM 1/14/2004, you wrote: Both! The answer to my query may well lie in my ignorance and I was willing ot accept this, hence the subject title. But I am guilty of hoping it stired more of an interest than a previous post onthe same topic, with different subject (no replies)...and I still dont have the answer! I guess it just shows how much perceptions can vary with Email. I read your first paragraph and formed the impression that the subjectwas designed to generate additional interest and to work to prioritizeyour request for help. -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 5:33 PM To: Tomcat Users List Subject: RE: RTFM in traditional fashion, the subject was related to the contents of bodyof the email. George Sexton wrote:I generally don't think it is required to resort to things like this to get our attention. -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 3:11 PM To: Tomcat Users List Subject: RTFM Hi, Now I have your attention, will someone tell me if it is possible to forward control (either by JSP or Servlet) from one contextto another, in the same browser window? i.e: - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - 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]
no contexts, several webapps, autoDeploy, different loggers?
i have a server.xml configured with the following Host element: Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Host name=192.168.100.152 debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/manager debug=0 privileged=true docBase=/usr/local/tomcat5/server/webapps/manager Realm className=org.apache.catalina.realm.MemoryRealm / /Context Context path=/admin debug=0 privileged=true docBase=/usr/local/tomcat5/server/webapps/admin Realm className=org.apache.catalina.realm.MemoryRealm / /Context /Host when tomcat starts up, it deploys all the webapps found in appBase. it uses the global logger defined catalina_log.xxx.txt... is it possible, using the DefaultContext or otherwise to have individual loggers for each auto-deployed *without* adding a Context path=webapp1 Logger prefix=webapp1. suffix=.log / /Context in server.xml? is there something like DefaultContext Logger prefix=$auto-deploy-webapp suffix=.log / /DefaultContext or conceptually similiar way to achieve this result? i do not want to add the individual Context entries into server.xml thanks in advance for any pointers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RTFM
yes, you are right. i was thinking of server side forwarding RequestDispatcher rd = getServletConfig().getServletContext().getRequestDispatcher(/app1); rd.forward(req,resp); On Wed, 14 Jan 2004 20:48:03 -0500 Ben Souther [EMAIL PROTECTED] wrote: There is no need to set crossContext to true if you are doing this with response.sendRedirect as you are just telling the browser to hit a different URL. On Wednesday 14 January 2004 08:50 pm, you wrote: also make sure you have crossContext=true in your respective Context directives in server.xml On Wed, 14 Jan 2004 17:40:33 -0800 Jerry Ford [EMAIL PROTECTED] wrote: Okay, from this detailed description---which sounds to me like it should work---here's my SWAG (silly wild-ass guess): After your response.sendRedirect() in the servlett, do you, um, well, include an explicit return statement? Jerry Jerald Powel wrote: OK, what I am trying to do is simple in theory. I have loaded in the browser an app - app1/. From a servlet in app1 I want to simply redirect to another app (app2 - different context) - to be loaded in the same browser window. By which means I forward I'm not fussed. Currently I am using RequestDispatcher or response.sendRedirect from a servlet in app1. But in the window, app2 appeqars to be loading in the address bar, but app1 is in fact loaded but with broken image links/error messages etc. So it appears to looking in the right place...just for the wrong things! I have checked docBase for each context in server.xml - they are fine. Each app runs fine if loaded from new windows, but when I try to link the two togethertrouble. Any thoughts please? I am ready to throw in the towel! G. Justin Ruthenbeck [EMAIL PROTECTED] wrote: It'd difficult from your poast to figure out what you're trying to accomplish. The phrase forward control from one context to another is quite ambiguous: * Are you trying to create a response that includes output from resources from multiple contexts? * While using one app, do you want to direct the user to pages in a different app? * Are you talking client side or server side? * Can you give us the scenario you're addressing? Often people ask questions that aren't phrased properly, so it's important to understand exactly what you're trying to do before going off and suggesting one of a hundred different possible answers. justin BTW: I would suggest trying not to be guilty of stiring interest any more. It's not looked fondly upon by those who can most help you. Your previous post was not answered because it was ambiguous, so it'd be best to include copious information from the beginning (so you don't have to wait so long for a reply or cause subject pollution). At 04:45 PM 1/14/2004, you wrote: Both! The answer to my query may well lie in my ignorance and I waswilling ot accept this, hence the subject title. But I am guilty ofhoping it stired more of an interest than a previous post onthe same topic, with different subject (no replies)...and I still dont have the answer! I guess it just shows how much perceptions can vary with Email. I read your first paragraph and formed the impression that the subjectwas designed to generate additional interest and to work to prioritizeyour request for help. -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 5:33 PM To: Tomcat Users List Subject: RE: RTFM in traditional fashion, the subject was related to the contents of bodyof the email. George Sexton wrote:I generally don't think it is required to resort to things like this to get our attention. -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 3:11 PM To: Tomcat Users List Subject: RTFM Hi, Now I have your attention, will someone tell me if it is possible to forward control (either by JSP or Servlet) from one contextto another, in the same browser window? i.e: - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5 not replicating sessions?
i used the backported session clustering in tomcat 4. i am currently in the process of upgrading to tomcat 5. in my new environment with tomcat 5, i see from the logs that my webapp (/stats) is enabled for session replication (the web.xml has the distributable / element): Jan 12, 2004 5:49:46 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 12, 2004 5:49:46 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.16 Jan 12, 2004 5:49:46 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Jan 12, 2004 5:49:46 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Starting clustering manager...:/stats Jan 12, 2004 5:49:49 PM org.apache.catalina.cluster.session.SimpleTcpReplicationManager log INFO: Starting clustering manager...:/stats [INFO] ManagerBase - -Manager[/stats], skipping state transfer. No members active in cluster group. i also see that sessions are being persisted: Jan 12, 2004 5:50:05 PM org.apache.catalina.cluster.session.SimpleTcpReplicationManager log INFO: storing attribute 'org.apache.struts.action.LOCALE' with value 'en_US' Jan 12, 2004 5:50:05 PM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=53 ms for 1 requests (53ms). however i do not see any replication occuring. if i take down this instance, the other instance does not have a copy of the session. also when the second instance starts up, i get: [INFO] ManagerBase - -Manager[/stats], skipping state transfer. No members active in cluster group. here are the settings (server.xml) Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=AppServerCluster debug=10 printToScreen=true saveOnRestart=false maxActiveSessions=-1 minIdleSwap=-1 maxIdelSwap=-1 maxIdelBackup=-1 pathname=null printSessionInfo=true checkInterval=10 expireSessionOnShutdown=false serviceclass=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.1.2.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=5000 tcpListenAddress=192.168.100.53 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=2 tcpKeepAliveTime=-1 synchronousReplication=true useDirtyFlag=true / Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ (identical to those on the other tomcat instance, only change being the ip address) the machines are dual homed but since i explicitly set the ip addresses, shouldn't they connect to each other? any ideas would be greatly appreciated. i bumped up logging to 32, but there were still no error messages in the logs. where should i start looking? i thank you for your guidance. thanks much and sorry for the trouble. apu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
requestdispatcher.include, flush bugs
could someone please point me to where i can log bugs for tomcat? i have tried the code below on different configurations with no avail, i still see the problem, which makes me feel that it is a legitimate bug. i am assuming that it would not be appropriate to post on tomcat-dev (?) please advise. once more i request anyone of you to please verify that this is a legitimate bug (if even one other person sees it, i will be convinced that it is a legitimate bug), i have tried it without succes. any help would be greatly appreciated. tia, apu i was wondering if anyone else has had problems with RequestDispatcher.include() and flush() or is it just me? (see below) i request someone to please deploy the code and see if it works at all, or whether it's a setup/configuration thing from my end, though i don't think so since all my other jsp/servlets are running fine. or whether i am completely off the ball when it comes to implementing the concept. - i tried using the following code over http and it still didn't work. any ideas would be appreciated. tia, apu - i am using tomcat 4.0.3, apache 2.0.34 over ssl with the warp connector. i have set the connector allowChunking to false. the problem that i see is that after i use getRequestDispatcher(page).include(req,resp) and flush the resp.out, the page does not get flushed to the browser. essentially i am trying to simulate a please wait page while my server does something that takes a longish time. am i missing something? i have explicitly flushed the buffer (using both resp.flushBuffer() and out.flush()), set autoFlush=true, made allowChunking=false anything else i can try or is this a legitimate bug? or does it have something to do with ssl? i haven't tried this without ssl here is sample code to illustrate CODE START = import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class test extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { // Set content type, et all resp.setContentType(text/html); // Include waitpage, flush response. String waitPage = /wait.jsp; getServletContext().getRequestDispatcher(waitPage).include(req,resp); resp.getWriter().flush(); log(Flushed + waitPage,null); // Sleep for a minute. The client browser should be viewing the // wait page by now. try { Thread.currentThread().sleep(60*1000); } catch(InterruptedException ie) { log(test,ie); } // Ok, we're ready to show the next page. Send a redirect. PrintWriter out = resp.getWriter(); String uri = http://www.cnn.com;; out.println(meta http-equiv=\Refresh\ content=\0; url= + uri +\); out.flush(); log(Sent refresh to + uri,null); } // Logging, for illustrative purposes only. public void log(String msg, Throwable t) { StringBuffer buf = new StringBuffer(); buf.append(this.getClass().getName()); buf.append( ); buf.append(msg); ServletContext ctx = this.getServletConfig().getServletContext(); if(t != null) ctx.log(buf.toString(),t); else ctx.log(buf.toString()); } } CODE END = wait.jsp can be any jsp page, for example %@page language=java autoFlush=true% waiting. i see the logs showing me that the wait page has been flushed. : 2002-06-25 12:52:07 jsp: init 2002-06-25 12:52:14 test Flushed wait page /wait.jsp 2002-06-25 12:52:47 test Sent refresh to http://www.cnn.com but the browser never renders the wait page, instead it just waits for a minute, and refreshes to www.cnn.com. i tried with different user agents (netscape 6.2, mozilla 1.0 on linux and ie 6 on xp) to eliminate the browser from the picture. tia. apu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
please wait page?
i was wondering if anyone else has had problems with RequestDispatcher.include() and flush() or is it just me? (see below) i request someone to please deploy the code and see if it works at all, or whether it's a setup/configuration thing from my end, though i don't think so since all my other jsp/servlets are running fine. or whether i am completely off the ball when it comes to implementing the concept. or alternatively, does anyone have any other ideas for a please wait page? the requirement is that the page displaying the wait is a jsp, it's served out of a front controller. would not like to inline all the code of the wait page into controller (can't anyways, right? jsp needs to execute somewhere...) the code below illustrates the concept i am trying to achieve. (this code works in iplanet) apu i tried using the following code over http and it still didn't work. any ideas would be appreciated. tia, apu i am using tomcat 4.0.3, apache 2.0.34 over ssl with the warp connector. i have set the connector allowChunking to false. the problem that i see is that after i use getRequestDispatcher(page).include(req,resp) and flush the resp.out, the page does not get flushed to the browser. essentially i am trying to simulate a please wait page while my server does something that takes a longish time. am i missing something? i have explicitly flushed the buffer (using both resp.flushBuffer() and out.flush()), set autoFlush=true, made allowChunking=false anything else i can try or is this a legitimate bug? or does it have something to do with ssl? i haven't tried this without ssl here is sample code to illustrate CODE START = import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class test extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { // Set content type, et all resp.setContentType(text/html); // Include waitpage, flush response. String waitPage = /wait.jsp; getServletContext().getRequestDispatcher(waitPage).include(req,resp); resp.getWriter().flush(); log(Flushed + waitPage,null); // Sleep for a minute. The client browser should be viewing the // wait page by now. try { Thread.currentThread().sleep(60*1000); } catch(InterruptedException ie) { log(test,ie); } // Ok, we're ready to show the next page. Send a redirect. PrintWriter out = resp.getWriter(); String uri = http://www.cnn.com;; out.println(meta http-equiv=\Refresh\ content=\0; url= + uri +\); out.flush(); log(Sent refresh to + uri,null); } // Logging, for illustrative purposes only. public void log(String msg, Throwable t) { StringBuffer buf = new StringBuffer(); buf.append(this.getClass().getName()); buf.append( ); buf.append(msg); ServletContext ctx = this.getServletConfig().getServletContext(); if(t != null) ctx.log(buf.toString(),t); else ctx.log(buf.toString()); } } CODE END = wait.jsp can be any jsp page, for example %@page language=java autoFlush=true% waiting. i see the logs showing me that the wait page has been flushed. : 2002-06-25 12:52:07 jsp: init 2002-06-25 12:52:14 test Flushed wait page /wait.jsp 2002-06-25 12:52:47 test Sent refresh to http://www.cnn.com but the browser never renders the wait page, instead it just waits for a minute, and refreshes to www.cnn.com. i tried with different user agents (netscape 6.2, mozilla 1.0 on linux and ie 6 on xp) to eliminate the browser from the picture. tia. apu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]