different context on different ports, but one tomcat
Hi! anybody has idea what should i do, when i would like the following to happen: I have ONE instance of Tomcat with 3 different webapps (context) instance#1: accept connection only on port 80 from anywhere instance#2: accept connections only on https port from anywhere instance#3 accept connections on port 7080 but only from localhost this is possible in tomcat? firstly only with tomcat, no firewall or apache! if it is not possible, that any tricks appropiated :) thx Saby
Re: How to get tomcat to decode %26
Hi try apache commons package, Stringutils somewhere. It has a lot of encode decode function already. 2008/1/10, Mark Thomas <[EMAIL PROTECTED]>: > > Vackar wrote: > > Hi, > > > > Does anyone know how to get tomcat to interpret %26 as an ampersand > > character (&) > > It does. > > Mark > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: jsp modifications not visible after tomcat restart?
hi sometimes, delete /work dir at catalina_home helps, but i have the same problems sometimes. Something like the server doesnot recognize, that tha file changed and need recompile. regards Szabi 2007/10/2, loredana loredana <[EMAIL PROTECTED]>: > > I remember something like this happened to me a couple of years back > but don't remember how I solved it. I run a tomcat 6 and I have a jsp file > within an application. I remember that if I do a modification in a jsp file > I don't have to restart tomcat, it's enough to copy the jsp file in the > webapps/appfolder/ and refresh in browser. well that doesn't work for me. > Even worse, I can even restart tomcat and the modifications in the jsp are > still not visible. The only way I can see the modification is if I rename > the file. So if have an index.jsp, I modify something in it...refresh the > browser...nothing. I go and rename the index.jsp in index2.jsp then i will > see the modifications. What can cause this behaviour? I thought it's the > browser cache but it's not..cleaned it, even restarted broswer and still > nothing. the only way I can see the modifications is if I rename the file. > Anybody had a similar problem? > > > > > > > > Got a little couch potato? > Check out fun summer activities for kids. > > http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: How to specify a default context?
Hi maybe try this, in server.xml, in tomcat6 after this, every request at http://host will served by the context you specified here. No any changes neccessary, as i remember. regards Szabi 2007/9/30, Caldarale, Charles R <[EMAIL PROTECTED]>: > > > From: Ken Bowen [mailto:[EMAIL PROTECTED] > > Subject: Re: How to specify a default context? > > > > Since I plan to use http://tuckey.org/urlrewrite/ to > > rewrite URLs, and since "/" will rewrite to "/myapp/", > > then the request htpp://myhost/ will ending up causing > > myapp to handle the request. > > Yes, using a filter or valve to forward or redirect requests to the > desired URI should work. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Tomcat clustering
HI! Have you tryed Terracotta for clustering? I find some days ago, and its very easy and simple to cluster tomcats. as i remember its free. regards, sZabi 2007/10/1, Daniel M Garland <[EMAIL PROTECTED]>: > > Hey > > The mcastDropTime attribute controls how long a node waits without a > response from a peer before considering it dead. Careful though, I tried > setting this to be much lower than the default and had all sorts of > problems with nodes adding / disappearing all the time; I wonder what > sorts of values members of this list use as a bare minimum? > > Andrew Hole wrote: > > In cluster of two nodes, which the parameter that I need to configure > > (or to decrease the value) for a node knows immediately that the other > > is down? With this configuration a node waits some time. > > > > > className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" > >doClusterLog="true" > > clusterLogName="clusterlog" > > > > manager.className="org.apache.catalina.cluster.session.DeltaManager" > >manager.expireSessionsOnShutdown="false" > >manager.notifyListenersOnReplication="false" > > manager.notifySessionListenersOnReplication="false" > > manager.sendAllSessions="false" > > manager.sendAllSessionsSize="500" > > manager.sendAllSessionsWaitTime="20"> > >> > > className="org.apache.catalina.cluster.mcast.McastService" > > mcastAddr="228.0.0.4" > >mcastBindAddress="127.0.0.1" > > mcastClusterDomain="d10" > > mcastPort="45564" > > mcastFrequency="1000" > > mcastDropTime="3" > > > recoveryCounter="10" > > recoveryEnabled="true" > > recoverySleepTime="5000"/> > >> > > className="org.apache.catalina.cluster.tcp.ReplicationListener" > > tcpListenAddress="auto" > >tcpListenPort="9016" > > tcpSelectorTimeout="100" > > tcpThreadCount="6"/> > >> > > className="org.apache.catalina.cluster.tcp.ReplicationTransmitter" > > replicationMode="fastasyncqueue" > > recoverTimeout="5000" > > recoverCounter="6" > > doTransmitterProcessingStats="true" > >doProcessingStats="true" > > doWaitAckStats="true" > >queueTimeWait="true" > > queueDoStats="true" > > queueCheckLock="true" > > ackTimeout="15000" > > waitForAck="true" > > keepAliveTimeout="8" > > keepAliveMaxRequestCount="-1"/> > >> className="org.apache.catalina.cluster.tcp.ReplicationValve" > > > > > filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;" > > primaryIndicator="true" /> > >> className="org.apache.catalina.cluster.session.JvmRouteBinderValve" > > enabled="true" /> > >> className="org.apache.catalina.cluster.session.ClusterSessionListener" > > /> > >> className=" > org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener" > > /> > >> className="org.apache.catalina.cluster.deploy.FarmWarDeployer" > > tempDir="${catalina.base > }/war-temp" > > > > deployDir="${catalina.base}/war-deploy/" > > > > watchDir="${catalina.base}/war-listen/" > >watchEnabled="true"/> > > > > > > > > Thanks a lot > > > > - > > To start a new topic, e-mail: users@tomcat.apache.org > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > __ > > This email has been scanned by the MessageLabs Email Security System. > > For more information please visit http://www.messagelabs.com/email > > __ > > > > ___
Re: Making the Tomcat 6 Comet Example (ChatServlet) Work
HI! i cannot get use this example too. but my big mistake was that i put the webapp library the catalina.jar! the project need catalina.jar for comet stuff, but you cannot deploy it in your webapp. maybe check that.. If i removed i could use comet stuff. (but not the demo:) ) I connected to comet with xmlhttprequest, but data arrived when server timeouted. But i saw the begin, read, write events on the server regards, Szabi 2007/7/5, Dominique Fotso <[EMAIL PROTECTED]>: Hello: I have installed tomcat 6.0.13 on my windows xp machine, and I cannot get the chat example to work. I have switched the connector to the NIO http connector. I do not see any trace on the console. After I go past the login page, I get to the post page but typing something on the message box just gets me nowhere. I have been reading a message on a mailing list about this same problem ( http://www.nabble.com/Comet-example-Tomcat-6-not-working.-t3957585.html ) and I changed just post.jsp to have an openWindow javascript function. So far I don't get anything. Is there anything else I should be changing or anything I am missing? Any help is appreciated. Dominique
anybody has javascript code example for using tomcat comet ?
Hi! Has anybody got any workable code sample i javascript for use tomcat comet? - I tryed with pure xmlhttprequest, watching for state ready, but i got data after it has timeouted on server... - dojo.cometd is not usable, its need bayeux protocol - dojo.io.bind, i cannot make it could someone please send me an example? thank you regards Szabi
Re: Is it possible to introduce new authentication method without modifying tomcat?
Hi! its an options, i use sometime. Create a filter. a class likes this. public class AuthenticationFilter implements Filter { private static Logger log = Logger.getLogger(AuthenticationFilter.class); public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { add in web.xml this: myAuthfilter poker.web.filters.AuthenticationFilter LoginURL /login DeniedURL /denied.jsp myAuthfilter /* you can map a filter to an url-pattern, in this example everything. in the filter you have the request and response as well. you could create a response here, so its not get called the servlet, or anything you called, because the filter dont let. Or you can say to the filter to countine the processing, (when authenticated) read about this on google for details. i like this because its so simple, and so fast. regards, sZabi 2007/6/7, Andrei Tchijov <[EMAIL PROTECTED]>: Hi, I want to be able to add my own authentication method (login-config/ auth-method) as one of possible choices. Is it possible to do so without re-compiling tomcat? Ideally, I would love to be able to achieve my goal by changing server.xml file (and adding some jars with my custom code to tomcat). Before any one suggested that I should write custom Realm: I think it will not work for me. My authentication method require access to ALL information available from HTTP Request (not just user name/password) also in some situations, access to HTTP Response is required as well. It looks like this method: protected abstract boolean authenticate(Request request,Response response,LoginConfig config) throws IOException; or AuthenticatorBase class is the best place to be. Your comments will be highly appreciated, Andrei Tchijov - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat comet, not working...
Hi again! i find these httpservletrequest.setAttribute("org.apache.tomcat.comet",Boolean.TRUE); httpservletrequest.setAttribute("org.apache.tomcat.comet.support",Boolean.TRUE); its seems, that you should set these values by hand somewhere, otherwise it will be NOT processed as Comet request. Is it right? Where should i put these? regards, Szabi 2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>: as a client I use http://people.apache.org/~fhanik/cometgui.jar The client automatically translates \n into CRLF for the HTTP protocol To do what you need to do, do this 0. java -jar cometgui.jar 1. Click "Connect" 2. Click "Submit" 3. Erase the headers, make sure the next text looks like this: 10 test data test 1 omit the XML tags of course, then click "Submit" again. The source code for the app is inside, it is very basic, Filip Peter Warren wrote: > Filip, could you post some client code that sends two separate messages > to the server on the same output stream and generates both a begin event > and then a subsequent read event. > > Thanks, > Peter > (I'm the guy who started the "comet read event" thread. I never heard > back after you asked me which connector I was using, and I'm still > struggling with it.) > > Filip Hanik - Dev Lists wrote: > >> you don't really have to do that much, here is mine >> >> package org.hanik.comet.test; >> >> >> import java.io.IOException; >> import java.io.InputStream; >> import javax.servlet.ServletException; >> import javax.servlet.http.HttpServlet; >> >> import org.apache.catalina.CometEvent; >> import org.apache.catalina.CometProcessor; >> >> >> >> public class TestCometServlet extends HttpServlet implements >> CometProcessor { >> public void event(CometEvent event) >>throws IOException, ServletException { >>System.out.println("Received an event:"+event); >>event.setTimeout(5000); >>if (event.getEventType() == CometEvent.EventType.END || >>event.getEventType() == CometEvent.EventType.ERROR ) { >>event.close(); >>} else if (event.getEventType() == CometEvent.EventType.READ) { >>InputStream is = >> event.getHttpServletRequest().getInputStream(); >>byte[] buf = new byte[512]; >>do { >>int n = is.read(buf); //can throw an IOException >>if (n > 0) { >>System.out.println("Read " + n + " bytes: " + new >> String(buf, 0, n) + " for session: " + >> event.getHttpServletRequest().getSession(true).getId()); >>} else if (n < 0) { >>event.close(); >>return; >>} >>} while (is.available() > 0); >> >>} >>} >> } >> >> >> >> Szabolcs Márton wrote: >> >>> i will send later, i cant ftp from here. >>> any other ideas? >>> >>> i would like if somebody, who made this cometprocessor worked describe >>> the things what have to do. I already done what is in tomcat docs >>> (advanced NIO) >>> >>> regards, >>> Saby >>> >>> 2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>: >>> >>>> send us a link to your test WAR file, and I can give it a shot, looks >>>> good to me. >>>> >>>> Filip >>>> >>>> Márton Szabolcs wrote: >>>> >>>>> Hi! >>>>> >>>>> i set my connector like this. >>>>> it should be correct, isnt it? >>>>> >>>>> >>>> >>>> protocol="org.apache.coyote.http11.Http11NioProtocol" >>>> >>>>> maxThreads="150" connectionTimeout="2" >>>>> redirectPort="8443" /> >>>>> >>>>> >>>>> CometSampleServlet >>>>> sample.CometSampleServlet >>>>> >>>>> >>>>> CometSampleServlet >>>>> /CometSampleServlet >>>>> >>>>> >>>>> public class CometSampleServlet >>>>> extends HttpServlet implements CometProcessor { >>>>> >>>>> protected ArrayList connections = >>>>> new ArrayList(); >>>>> protected MessageSender sender = null; >>
Re: tomcat comet, not working...
Filip, i tryed and i got the same again: "The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL)." I could access this servlet in a normal way, like explorer and http://localhost:8080/cometd/cometddd or i could accept only something like dojo.io ? (i suppose maybe i have to access a different way, but its make no sense. The dojo, or ajax, makes the same request as the browser made...) what is your tomcat settings? do you make anything change, or just installed and no modifications made? is any extra lib necessary for the webapp ? i feel like this as one little settings somewhere missing. Its drive me crazy... :( if i specify an ftp server access for you, could you upload your tomcat, and your web app source if it isn't protected, (n)either you dont mind? I compare with mine. thanks, Szabi 2007/5/29, Peter Warren <[EMAIL PROTECTED]>: Filip, could you post some client code that sends two separate messages to the server on the same output stream and generates both a begin event and then a subsequent read event. Thanks, Peter (I'm the guy who started the "comet read event" thread. I never heard back after you asked me which connector I was using, and I'm still struggling with it.) Filip Hanik - Dev Lists wrote: > you don't really have to do that much, here is mine > > package org.hanik.comet.test; > > > import java.io.IOException; > import java.io.InputStream; > import javax.servlet.ServletException; > import javax.servlet.http.HttpServlet; > > import org.apache.catalina.CometEvent; > import org.apache.catalina.CometProcessor; > > > > public class TestCometServlet extends HttpServlet implements > CometProcessor { > public void event(CometEvent event) >throws IOException, ServletException { >System.out.println("Received an event:"+event); >event.setTimeout(5000); >if (event.getEventType() == CometEvent.EventType.END || >event.getEventType() == CometEvent.EventType.ERROR ) { >event.close(); >} else if (event.getEventType() == CometEvent.EventType.READ) { >InputStream is = > event.getHttpServletRequest().getInputStream(); >byte[] buf = new byte[512]; >do { >int n = is.read(buf); //can throw an IOException >if (n > 0) { >System.out.println("Read " + n + " bytes: " + new > String(buf, 0, n) + " for session: " + > event.getHttpServletRequest().getSession(true).getId()); > } else if (n < 0) { >event.close(); >return; >} >} while (is.available() > 0); > >} >} > } > > > > Szabolcs Márton wrote: >> i will send later, i cant ftp from here. >> any other ideas? >> >> i would like if somebody, who made this cometprocessor worked describe >> the things what have to do. I already done what is in tomcat docs >> (advanced NIO) >> >> regards, >> Saby >> >> 2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>: >>> send us a link to your test WAR file, and I can give it a shot, looks >>> good to me. >>> >>> Filip >>> >>> Márton Szabolcs wrote: >>> > Hi! >>> > >>> > i set my connector like this. >>> > it should be correct, isnt it? >>> > >>> > >> protocol="org.apache.coyote.http11.Http11NioProtocol" >>> > maxThreads="150" connectionTimeout="2" >>> > redirectPort="8443" /> >>> > >>> > >>> > CometSampleServlet >>> > sample.CometSampleServlet >>> > >>> > >>> > CometSampleServlet >>> > /CometSampleServlet >>> > >>> > >>> > public class CometSampleServlet >>> > extends HttpServlet implements CometProcessor { >>> > >>> > protected ArrayList connections = >>> > new ArrayList(); >>> > protected MessageSender sender = null; >>> > >>> > /** >>> > */ >>> > public void event(CometEvent event) throws IOException, >>> ServletException { >>> > HttpServletRequest request = event.getHttpServletRequest(); >>> > >>> > >>> > >>> > but my service method still invoked >>> > is any settings should take? >>> > >
Re: tomcat comet, not working...
i will send later, i cant ftp from here. any other ideas? i would like if somebody, who made this cometprocessor worked describe the things what have to do. I already done what is in tomcat docs (advanced NIO) regards, Saby 2007/5/29, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>: send us a link to your test WAR file, and I can give it a shot, looks good to me. Filip Márton Szabolcs wrote: > Hi! > > i set my connector like this. > it should be correct, isnt it? > > maxThreads="150" connectionTimeout="2" > redirectPort="8443" /> > > > CometSampleServlet > sample.CometSampleServlet > > > CometSampleServlet > /CometSampleServlet > > > public class CometSampleServlet > extends HttpServlet implements CometProcessor { > > protected ArrayList connections = > new ArrayList(); > protected MessageSender sender = null; > > /** > */ > public void event(CometEvent event) throws IOException, ServletException { > HttpServletRequest request = event.getHttpServletRequest(); > > > > but my service method still invoked > is any settings should take? > > > this example from: > http://journal.mycom.co.jp/special/2007/tomcat6/014.html > (its japanese, but you could see in the black text areas) > > regards, > Szabi > > 35% kedvezmény a Partvonal Kiadó köteteire - hogy minden olvasó kézhez kapja a maga könyvét. > http://ad.adverticum.net/b/cl,1,6022,172067,232579/click.prm > > > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Connection pool
maybe you need some settings at the web.xml as weel? (just guess) regards, Szabi 2007/5/29, Ligade, Shailesh (Contr) (Mission Systems) <[EMAIL PROTECTED]>: Greetings, I am running Tomcat 5.x, and I have many webapps deployed and working under tomcat. I want my connection pool to be used from any application. When I modify server.xml in conf directory to add my connection, listed below: factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@158.114.68.201:1521:CSAPPDB username ROAM_USER password ngit1234 . And I get following error: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at org.apache.naming.NamingContext.lookup(NamingContext.java:769) [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at org.apache.naming.NamingContext.lookup(NamingContext.java:152) [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at com.intraspect.reports.CustomerReport.getVBCSDBConnection(Unknown Source) [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) [May 29, 2007 7:47:06 AM (http-80-Processor4_214)]: at java.lang.reflect.Method.invoke(Method.java:585) Any idea, what I am doing wrong? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]