Re: Sticky servlet
Kamil Burzynski wrote: I would like to create one of my servlets to be 'sticky': to be sure that Tomcat will never try to remove this servlet from memory. Is load-on-startup enough? I know that it will start my servlet as soon as tomcat starts, but will tomcat ever try to remove such servlet? Why do you want such a solution? Even if Tomcat will unload your servlet for some reason, it will load it again with first user request directed to this servlet. Have you considered using ServletContextListener? Maybe it will suit you better? E.g. if there will be 1 month of inactivity, or so much requests arrive that out-of-memory will happen OOM will kill entire Tomcat anyway. -- Mikolaj Rydzewski [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: Question about JNDI + Connection Pool + Mysql (Tomcat 6)
Fredy Provoste wrote: Hi again, i've been deployed a webapp called libreria in Tomcat 6, i tried to configure a mysql connection pool, so in the path libreria . . META-INF/context.xml put the lines Context path=/libreria docBase=libreria debug=5 privileged=true reloadable=true You should not use path attribute in META-INF/context.xml. -- Mikolaj Rydzewski [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: Tomcat status
Hi Andrew, For Tomcat you can use: http://localhost:8080/manager/status Be sure to confugure conf/tomcat-users.xml. Regards, Ognjen Andrew Hole wrote: Could you tell me wich page? On 9/18/07, Bj [EMAIL PROTECTED] wrote: if you're using apache httpd and mod_jk in front of your tomcats, you have a status page with a lot of information. Also bundled with tomcat, you have the manager webapp which has a status page. ... - 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 do you access all sessions from a servlet in tomcat 6.0?
OK, for some reason I've been obsessing about this for a whole day now. If you hold an external reference to a Session then according to my tests the session will still time out as expected but the external reference will be non null. At the very least this means that you may end up with a large number of useless references taking up space in memory. Of course you can always remove an invalid or timed out reference in the sessionDestroyed method of your listener. There are a whole bunch of other issues surrounding this but I'm sure you've sussed them out for yourself already. Anyway, I'll shut up now. Rgds Duncan On 9/19/07, Lyallex [EMAIL PROTECTED] wrote: On 9/18/07, Lyallex [EMAIL PROTECTED] wrote: How about creating a SessionListener class SomeSessionListener implements HttpSessionListener ... Register it in web.xml in the sessionCreated method of your listener get a reference to the new session from the HttpSessionEvent you can now access the getLastAccessedTime(), maybe store the refs in some singleton ... ...er, actually I think this could be a REALLY STUPID idea as I hadn't thought about what happens if you maintain an external reference to a session and the session expires... Investigating now Duncan - 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: Sticky servlet
I see no reason you would need your servlet to stay in memory. As long as it is alive when needed (that is when requests arrive) it's enough. Maybe you problem is that it does much than serving request, like running background thread, send message to people and so on. Then you might simply need to separate the servlet (part that answer a client) from the service object (part that handle various thread). The service object could be started/stopped by a simple servletContextListener and attached to JNDI. The servlet would then request that object from JNDI. If you don't like to use JNDI you can still attach it to application scope. This will be more easy to maintain and more performant than delegating work to another server and add an other row of TCP/IP packets. Kamil Burzynski a écrit : Hello, Please read the other responses to this thread, since they are correct that there is no guarantee. However, the current implementation of TC (3.3-6.0) will not unload a Servlet unless the entire context is reloaded (with a slight exception for JSP pages). But then you are programming against Tomcat itself, in an area where there is no guarantee that it won't change in the future, and it may not work if you try to move to another Servlet container. Yeah, I was afraid of getting such answer, actually ;) In my project it would be enough to code against current version of Tomcat, though I would like a clean solution. So, it seems, that I'll do standalone server and then webapp will connect to it via some protocol (I am not familiar with java world enough to know if any good rpc is there - most probably it is). Thanks for all answers. - 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 do you access all sessions from a servlet in tomcat 6.0?
Just use WeakReference :) Lyallex a écrit : OK, for some reason I've been obsessing about this for a whole day now. If you hold an external reference to a Session then according to my tests the session will still time out as expected but the external reference will be non null. At the very least this means that you may end up with a large number of useless references taking up space in memory. Of course you can always remove an invalid or timed out reference in the sessionDestroyed method of your listener. There are a whole bunch of other issues surrounding this but I'm sure you've sussed them out for yourself already. Anyway, I'll shut up now. Rgds Duncan On 9/19/07, Lyallex [EMAIL PROTECTED] wrote: On 9/18/07, Lyallex [EMAIL PROTECTED] wrote: How about creating a SessionListener class SomeSessionListener implements HttpSessionListener ... Register it in web.xml in the sessionCreated method of your listener get a reference to the new session from the HttpSessionEvent you can now access the getLastAccessedTime(), maybe store the refs in some singleton ... ...er, actually I think this could be a REALLY STUPID idea as I hadn't thought about what happens if you maintain an external reference to a session and the session expires... Investigating now Duncan - 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[2]: Sticky servlet
Hello, I see no reason you would need your servlet to stay in memory. As long as it is alive when needed (that is when requests arrive) it's enough. Maybe you problem is that it does much than serving request, like running background thread, send message to people and so on. Then you Exactly. I am using some external API which is receiving endless data stream (namely stock price changes), and have to be running 24h, every day. Running a background thread or something like this would do for me. Answering mere HTTP requests is not enough. might simply need to separate the servlet (part that answer a client) from the service object (part that handle various thread). The service Yes, I was considering running some 'background' daemon for that. object could be started/stopped by a simple servletContextListener and attached to JNDI. The servlet would then request that object from JNDI. I have no knowledge (yet) in servletContextListener and JNDI yet (and this may be the sole reason why I am asking such questions instead of just using it), but from your mail I reckon, that it will just be the solution for me. I have to google for this now. If you don't like to use JNDI you can still attach it to application scope. I dont know yet if I like JNDI ;) This will be more easy to maintain and more performant than delegating work to another server and add an other row of TCP/IP packets. Yeah, I was concerned about performance and complexity of my alternative solution (separate executable + tcp socket + custom protocol or at least some rpc which would use a lot of xml). Kamil Burzynski a écrit : Hello, Please read the other responses to this thread, since they are correct that there is no guarantee. However, the current implementation of TC (3.3-6.0) will not unload a Servlet unless the entire context is reloaded (with a slight exception for JSP pages). But then you are programming against Tomcat itself, in an area where there is no guarantee that it won't change in the future, and it may not work if you try to move to another Servlet container. Yeah, I was afraid of getting such answer, actually ;) In my project it would be enough to code against current version of Tomcat, though I would like a clean solution. So, it seems, that I'll do standalone server and then webapp will connect to it via some protocol (I am not familiar with java world enough to know if any good rpc is there - most probably it is). Thanks for all answers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards from Kamil Burzynski - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Filter on j_security_check or Alternate way
Hi, I have implemented form based security on web app using JDBCRealm in server.xml file. It has been implemented. Now i want to use some pre-req before accessing any page in secure area say (faces/secure/main.xhtml). My index page redirect to faces/secure/main.xhtml where it ask for login and then the page is shown. I want to interpret the request after the login and before main.xhtml. I have read different topics and it is not possible to implement Filter on j_security_check (not sure for tomcat 5.5+). Is there any way to implement on it or there is any alternate that i can interpret the request? (security constraint on /faces/secure/*) I have used an alternate index - faces/secure/redirect.jsp - login (by tomcat) and then faces/secure/redirect.jsp - faces/secure/main.xhtml (redirecting to this page from redirect page). I implemented the FILTER on redirect.jsp. It is invoking but i am not liking the method. so any possible thing i can do? cheer, ..alee -- Muhammad Ali http://techboard.wordpress.com Software Engineer - E2ESP muhammadaliamin(at)gmail(dot)com
Re: How do you access all sessions from a servlet in tomcat 6.0?
Thanks for all the feedback on this. ___ Gary Johnstone Engineering IT Cummins Turbo Technologies Ltd +44 1484 440532 Lyallex [EMAIL PROTECTED] m To Tomcat Users List 19/09/2007 10:38 users@tomcat.apache.org cc Please respond to Subject Tomcat Users Re: How do you access all sessions List from a servlet in tomcat 6.0? [EMAIL PROTECTED] che.org OK, for some reason I've been obsessing about this for a whole day now. If you hold an external reference to a Session then according to my tests the session will still time out as expected but the external reference will be non null. At the very least this means that you may end up with a large number of useless references taking up space in memory. Of course you can always remove an invalid or timed out reference in the sessionDestroyed method of your listener. There are a whole bunch of other issues surrounding this but I'm sure you've sussed them out for yourself already. Anyway, I'll shut up now. Rgds Duncan On 9/19/07, Lyallex [EMAIL PROTECTED] wrote: On 9/18/07, Lyallex [EMAIL PROTECTED] wrote: How about creating a SessionListener class SomeSessionListener implements HttpSessionListener ... Register it in web.xml in the sessionCreated method of your listener get a reference to the new session from the HttpSessionEvent you can now access the getLastAccessedTime(), maybe store the refs in some singleton ... ...er, actually I think this could be a REALLY STUPID idea as I hadn't thought about what happens if you maintain an external reference to a session and the session expires... Investigating now Duncan - 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 e-mail transmission and any attachments to it are intended solely for the use of the individual or entity to whom it is addressed and may contain confidential and privileged information. If you are not the intended recipient, your use, forwarding, printing, storing, disseminating, distribution, or copying of this communication is prohibited. If you received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. - 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: Filter on j_security_check or Alternate way
Filters are not invoked on j_security_check If you need to do something special on login - you will need to store some state in the session. (Like session variable called didInitializeSession) Then the filter can check for the existence of a request.getUserPrincipal() session.getAttribute(didInitializeSession) to see if you need to do any special setup work. -Tim alee amin wrote: Hi, I have implemented form based security on web app using JDBCRealm in server.xml file. It has been implemented. Now i want to use some pre-req before accessing any page in secure area say (faces/secure/main.xhtml). My index page redirect to faces/secure/main.xhtml where it ask for login and then the page is shown. I want to interpret the request after the login and before main.xhtml. I have read different topics and it is not possible to implement Filter on j_security_check (not sure for tomcat 5.5+). Is there any way to implement on it or there is any alternate that i can interpret the request? (security constraint on /faces/secure/*) I have used an alternate index - faces/secure/redirect.jsp - login (by tomcat) and then faces/secure/redirect.jsp - faces/secure/main.xhtml (redirecting to this page from redirect page). I implemented the FILTER on redirect.jsp. It is invoking but i am not liking the method. - 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: Filter on j_security_check or Alternate way
yeah i can get info from getPrincipal() but where should i put that code to retrieve the info? where should i save the state in session? at login page? no - then after login the secured page is going to open - i need to save something or process something before it. -alee On 9/19/07, Tim Funk [EMAIL PROTECTED] wrote: Filters are not invoked on j_security_check If you need to do something special on login - you will need to store some state in the session. (Like session variable called didInitializeSession) Then the filter can check for the existence of a request.getUserPrincipal() session.getAttribute(didInitializeSession) to see if you need to do any special setup work. -Tim alee amin wrote: Hi, I have implemented form based security on web app using JDBCRealm in server.xml file. It has been implemented. Now i want to use some pre-req before accessing any page in secure area say (faces/secure/main.xhtml). My index page redirect to faces/secure/main.xhtml where it ask for login and then the page is shown. I want to interpret the request after the login and before main.xhtml. I have read different topics and it is not possible to implement Filter on j_security_check (not sure for tomcat 5.5+). Is there any way to implement on it or there is any alternate that i can interpret the request? (security constraint on /faces/secure/*) I have used an alternate index - faces/secure/redirect.jsp - login (by tomcat) and then faces/secure/redirect.jsp - faces/secure/main.xhtml (redirecting to this page from redirect page). I implemented the FILTER on redirect.jsp. It is invoking but i am not liking the method. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Muhammad Ali http://techboard.wordpress.com Software Engineer - E2ESP muhammadaliamin(at)gmail(dot)com
Tomcat integration with Sun ONE web server
Hi All, I installed/configured Tomcat 6.0.13 version on Solaris SPARC server. Also I installed Sun ONE web server 6.1 (Called currently as Sun Java System Web Server). I want to integrate Sun ONE with Tomcat. I'm new to the web servers and their configuration. I heard that Sun ONE /Apache will be integrated with Tomcat for load balancing. How should I proceed for configuring Sun ONE or Tomcat integration with Sun ONE? Which will be better and stable Apache with Tomcat or Sun ONE with Tomcat?. Please guide me if I'm wrong. Thanks in advance. Jagadeesh Tata.
Re: mod_jk and Apache httpd 2.2 [RESOLVED ; still have questions]
Christopher Schultz wrote: Rainer Jung wrote: 2. Is is okay to have connection_pool_size=1 for my workers? The docs suggest to me that it /must be/ set to 1 if I'm using prefork MPM. OK, I see, that our wording is still not clear. What we try to tell the users: I think I get it. Basically, the best practice is to leave this setting to the default (when using Apache httpd) unless there's some kind of problem. Is that about it? Yes. The only thing one can do is to decrease the value from the default. For prefork, there is no useful value smaller than the default 1, for worker there could be, but the implications of decreasing are dificult to understand. worker.worker3.connection_pool_timeout=60 OK. Maybe a little short. 600 (10 minutes) should be OK as well. It would be good to adjust connectionTimeout in the Tomcat AJP connector to the same value (multiplied by 1000, because it's milliseconds there). We proudly present the new docs page http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html. 60 seconds ought to be enough for a localhost connection to pick up the phone, no? If a web user has to wait 60 seconds, they're going to hit RELOAD anyway. This is not a reply timeout. This timeout means: if mod_jk detects a backend connection, which was not used during the last XXX seconds, then shut it down. mod_jk uses persistent backend connections, we don't want to open a backend connection for each new request. But of course load is increasing and decreasing, so if you have more backend connections than you need for a long time, it would be OK, to shut them down (each backend connections needs a separate thread inside tomcat, even if there are no requests handled). Regards, Rainer - 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: Filter on j_security_check or Alternate way
Map a filter to your JSF servlet (faces/*). In that filter check that user principal is not null. If it's not null, do your initialization stuff if not yet done. When it's done, store that state information in session. Here that's how we check and upgrade user profile informations upon login. If you need to do something *before user type in credential infos*, but only when *login is required*, you will have to do it from inside the JSP that does render the login form alee amin a écrit : yeah i can get info from getPrincipal() but where should i put that code to retrieve the info? where should i save the state in session? at login page? no - then after login the secured page is going to open - i need to save something or process something before it. -alee On 9/19/07, Tim Funk [EMAIL PROTECTED] wrote: Filters are not invoked on j_security_check If you need to do something special on login - you will need to store some state in the session. (Like session variable called didInitializeSession) Then the filter can check for the existence of a request.getUserPrincipal() session.getAttribute(didInitializeSession) to see if you need to do any special setup work. -Tim alee amin wrote: Hi, I have implemented form based security on web app using JDBCRealm in server.xml file. It has been implemented. Now i want to use some pre-req before accessing any page in secure area say (faces/secure/main.xhtml). My index page redirect to faces/secure/main.xhtml where it ask for login and then the page is shown. I want to interpret the request after the login and before main.xhtml. I have read different topics and it is not possible to implement Filter on j_security_check (not sure for tomcat 5.5+). Is there any way to implement on it or there is any alternate that i can interpret the request? (security constraint on /faces/secure/*) I have used an alternate index - faces/secure/redirect.jsp - login (by tomcat) and then faces/secure/redirect.jsp - faces/secure/main.xhtml (redirecting to this page from redirect page). I implemented the FILTER on redirect.jsp. It is invoking but i am not liking the method. - 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 integration with Sun ONE web server
Hi Jagadeesh, first: integration here means, that you are fronting Tomcat with an additional web server. YXou don't need to do this, because Tomcat also is a web server. But there are common reasons to do it, like security, separation of static content, and application routing (few web servers take the requests for a lot of webapps and forward them to a complex system of servlet containers) etc. The Tomcat project has a sub project tomcat connectors (sometimes called JK or mod_jk), which produces plugins for common web servers. Those plugins enable the web servers to forward requests to Tomcat. The forwarding is done via TCP/IP and a special protocol called AJP/1.3 or ajp13 is used. Tomcat knows how to handle this protocol out of the box. In the default server.xml configuration file of Tomccat there is already an entry for an ajp13 connector, which uses a different port than the usual http connector. The plugins exist for Apache httpd 1.3/2.0/2.2, for the Sun web server and for Microsoft IIS. Which web server you choose depends on several decisions, most of them independant from the plugin. The plugin has the best integration for Apache httpd, but also works for IIS and Sun web server. Sun web server has the fewest users. Tomcat itself doesn't care about the type of web server fronting it. For Solaris we build binaries for the plugins for httpd and for the Sun web server. You can download those under http://tomcat.apache.org/download-connectors.cgi (look for Binary releases and then solaris and then jk-1.2.25). The docs for the plugins are under: http://tomcat.apache.org/connectors-doc/ Regards, Rainer Tata, Jagadeesh wrote: Hi All, I installed/configured Tomcat 6.0.13 version on Solaris SPARC server. Also I installed Sun ONE web server 6.1 (Called currently as Sun Java System Web Server). I want to integrate Sun ONE with Tomcat. I'm new to the web servers and their configuration. I heard that Sun ONE /Apache will be integrated with Tomcat for load balancing. How should I proceed for configuring Sun ONE or Tomcat integration with Sun ONE? Which will be better and stable Apache with Tomcat or Sun ONE with Tomcat?. Please guide me if I'm wrong. Thanks in advance. Jagadeesh Tata. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6.0.14 - Admin-Webapplication
Hello, I searched your FAQ and the web for informations about my problem but I don´t found any. We want to switch our production from Tomcat 5.028 to Tomcat 6.0.14. Therefor we need among other things the admin-webapplication. On your website I only find a admin-webapplication for Tomcat 5.5. This version I don´t get running on Tomcat 6.0.14. Is there a possibility to run a admin-webapplication (to configure Datasources etc.) on Tomcat 6.0.14? Thanx for help! Kind regards Jens
Re: Tomcat 6.0.14 - Admin-Webapplication
Hello, http://www.nabble.com/Tomcat-6-Admin-Application-tf4475389.html Fuchs, Jens a écrit : Hello, I searched your FAQ and the web for informations about my problem but I don´t found any. We want to switch our production from Tomcat 5.028 to Tomcat 6.0.14. Therefor we need among other things the admin-webapplication. On your website I only find a admin-webapplication for Tomcat 5.5. This version I don´t get running on Tomcat 6.0.14. Is there a possibility to run a admin-webapplication (to configure Datasources etc.) on Tomcat 6.0.14? Thanx for help! Kind regards Jens - 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: problem with https and apache+httpd+tomcat [SOLVED]
Hi Christian, thanks for your feedback. Good to know the reason and that the theory works, at least if SSL is explicitely activated in the vhost. mod_jk gets the ssl info froom an apache httpd internal environment variable. It looks like this wasn't set by your configuration. In case one offloads ssl to an appliance, one can still configure mod_jk inside Apache to think it's SSL. Regards, Rainer Christian Andersson wrote: Hi Rainer, and thanks for trying to help me. I had been trying most of what you wrote, and it still looked like it was tomcat, but there was one thing that struck me while doing all these tests/changes mod_jk transfers the knowledge of the hostname and port used in Apache htpd to the AJP connector, so that self referring URLs can be produced correctly. Comparing my virtualhost definition VirtualHost *:443 ServerName demo.mydomain JkMount /* worker1 /VirtualHost with one provided with the installation for squirrelmail (php based) I did some changes to my virtualhost IfModule mod_ssl.c VirtualHost *:443 ServerName demo.mydomain JkMount /* worker1 SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW SSLCertificateFile /etc/pki/tls/certs/localhost.crt SSLCertificateKeyFile /etc/pki/tls/private/localhost.key /VirtualHost /IfModule and Voila, now it works... apparently https WAS working without all of this SSL parameters, but mod_jk sent the wrong information to the server. so even if your suggestions on what to check did not leave me to an answer, your message still helped :-) - 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: unknown protocol: httpg
Hi David; Ok , It works well with the second solution, I put the globus library in the common/lib directory of Tomcat . Thanks a lot Nicolas David Delbecq a écrit: Hello Nicolas, java.net.URL is trying to instanciate a handler for protocol httpg and fails. Looking at your code, i suppose org.globus.axis.util.Util.registerTransport() is supposed to add an handler. This works find in standalone application, but in J2EE environment the URL class can not see classes inside your webapp (see tomcat classloader documentation on website for explanations) and as such can not instanciate them. I recommend you try using the following URL form: new URL(URL context, String spec, URLStreamHandler handler) and you provide a URLStreamHandler for globus. Another, but ugly, solution is to put globus classes inside system classloader. En l'instant précis du 18/09/07 14:42, DEMESY Nicolas s'exprimait en ces termes: Hi, I would like to contact httpg servers with a servlet host on a tomcat server and I have an error : java.net.MalformedURLException: unknown protocol: httpg at java.net.URL.init(URL.java:395) at java.net.URL.init(URL.java:283) when I do : SimpleProvider p = new SimpleProvider(); p.deployTransport(httpg, new SimpleTargetedChain(new org.globus.axis.transport.GSIHTTPSender())); org.globus.axis.util.Util.registerTransport(); new java.net.URL(httpg,srm-server, 1234, /srm); It seems that the httpg registration is not done ... I use a Tomcat 5 server, ideas? Thanks, Nicolas - 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 do you access all sessions from a servlet in tomcat 6.0?
On 9/19/07, David Delbecq [EMAIL PROTECTED] wrote: Just use WeakReference :) Er, well that's OK, the WeakReference referant object (the session) is null after gc but now I have a WeakReference object lurking in my Map as opposed to the HttpSession object previously so I'm not really gaining anything. Probably best to remove the K, V pair when the session is destroyed. Anyway, I'll shut up now. I wish. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Download problem with IE6, IIS 6.0, SSL, Tomcat 6.0.13 and connector 1.2.25 (last in date) on Windows Server 2k3
Hello, I have the following configuration : - A Tomcat 6.0.13 serving any file running on port 8080 - A IIS 6.0 frontend server, on port 80/443 (for SSL) which use the Jp connector 1.2.25 as a gateway to Tomcat, on Windows Server 2003 The connector serves all that is in /myProject path without any restriction on file type. It works pretty well in both case (IIS - Tomcat, or Tomcat without IIS). However, the application do have a struct action which serves up file stored in database, via Hibernate. In such case, when the file is large (I would say at least 10KiB), Internet Explorer 6 fails downloading with this message : Internet Explorer cannot download dwl.do?id=19 from localhost. The connection with the server was reset This fails only when I'm using the IIS url (https://localhost/foo/dwl.do?id=19) : when I'm calling directly the Tomcat webserver, it works without any problem. Before looking for a solution on the web, I tried to view the log of the connector : I do not have a single log file in C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log, despise the fact I setted level on debug both in a file located in the same directory than isapi_redirect, and in registry. My search was not successful, as I found no real clues about my problem. I did not try with another browser (like Firefox) as the web project must work with IE6. Additionnaly, I have a few questions regarding my problem : 1. How do we enable the logs? The isapi_redirect.properties and the registry points to : log_file=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\jakarta.log log_level=debug The file is never created. I did not try without spaces. 2. Is there a limit in size between IIS and Tomcat? Some of the result in my search spoke about a 8192 bytes limits, other about a pool size limit? Honestly, Baldurien - 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: Question about JNDI + Connection Pool + Mysql (Tomcat 6)
From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] Subject: Re: Question about JNDI + Connection Pool + Mysql (Tomcat 6) Context path=/libreria docBase=libreria debug=5 privileged=true reloadable=true You should not use path attribute in META-INF/context.xml. Nor docBase, for that matter. But removing those is not likely to solve the OP's problem, although it's always good to get the obvious errors cleaned up. - 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]
Why Net use ... does not work with WebDAV servlet
Hi, I am trying to develop a simple distributed file system using WebDAV servlet on Tomact application server. while I can successfully browse the WebDAV enabled directory via IE or FireFox, issuing net use p: http://lp:port/Dav; results in The network name can not be found error message so drive P: can not be created. whereas this net use command can be executed successfully in Apache web server. I do appreciate your comments and tips. regards /shahab - Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
Re: Download problem with IE6, IIS 6.0, SSL, Tomcat 6.0.13 and connector 1.2.25 (last in date) on Windows Server 2k3
to make sure its not tomcat timing out what is disableUploadTimeout in your connector set to? M-- - Original Message - From: Baldurien [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, September 19, 2007 9:16 AM Subject: Download problem with IE6, IIS 6.0, SSL, Tomcat 6.0.13 and connector 1.2.25 (last in date) on Windows Server 2k3 Hello, I have the following configuration : - A Tomcat 6.0.13 serving any file running on port 8080 - A IIS 6.0 frontend server, on port 80/443 (for SSL) which use the Jp connector 1.2.25 as a gateway to Tomcat, on Windows Server 2003 The connector serves all that is in /myProject path without any restriction on file type. It works pretty well in both case (IIS - Tomcat, or Tomcat without IIS). However, the application do have a struct action which serves up file stored in database, via Hibernate. In such case, when the file is large (I would say at least 10KiB), Internet Explorer 6 fails downloading with this message : Internet Explorer cannot download dwl.do?id=19 from localhost. The connection with the server was reset This fails only when I'm using the IIS url (https://localhost/foo/dwl.do?id=19) : when I'm calling directly the Tomcat webserver, it works without any problem. Before looking for a solution on the web, I tried to view the log of the connector : I do not have a single log file in C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log, despise the fact I setted level on debug both in a file located in the same directory than isapi_redirect, and in registry. My search was not successful, as I found no real clues about my problem. I did not try with another browser (like Firefox) as the web project must work with IE6. Additionnaly, I have a few questions regarding my problem : 1. How do we enable the logs? The isapi_redirect.properties and the registry points to : log_file=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\jakarta.log log_level=debug The file is never created. I did not try without spaces. 2. Is there a limit in size between IIS and Tomcat? Some of the result in my search spoke about a 8192 bytes limits, other about a pool size limit? Honestly, Baldurien - 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: Download problem with IE6, IIS 6.0, SSL, Tomcat 6.0.13 and connector 1.2.25 (last in date) on Windows Server 2k3
If you are refering to the Connector / in the server.xml file, it is set up to the default (false). Below is the part of the configuration that define it : !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / Additionnaly, I tried without SSL, and its fails too. Please tell me if you need some configuration file. Martin Gainty wrote: to make sure its not tomcat timing out what is disableUploadTimeout in your connector set to? M-- - Original Message - From: Baldurien [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, September 19, 2007 9:16 AM Subject: Download problem with IE6, IIS 6.0, SSL, Tomcat 6.0.13 and connector 1.2.25 (last in date) on Windows Server 2k3 Hello, I have the following configuration : - A Tomcat 6.0.13 serving any file running on port 8080 - A IIS 6.0 frontend server, on port 80/443 (for SSL) which use the Jp connector 1.2.25 as a gateway to Tomcat, on Windows Server 2003 The connector serves all that is in /myProject path without any restriction on file type. It works pretty well in both case (IIS - Tomcat, or Tomcat without IIS). However, the application do have a struct action which serves up file stored in database, via Hibernate. In such case, when the file is large (I would say at least 10KiB), Internet Explorer 6 fails downloading with this message : Internet Explorer cannot download dwl.do?id=19 from localhost. The connection with the server was reset This fails only when I'm using the IIS url (https://localhost/foo/dwl.do?id=19) : when I'm calling directly the Tomcat webserver, it works without any problem. Before looking for a solution on the web, I tried to view the log of the connector : I do not have a single log file in C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log, despise the fact I setted level on debug both in a file located in the same directory than isapi_redirect, and in registry. My search was not successful, as I found no real clues about my problem. I did not try with another browser (like Firefox) as the web project must work with IE6. Additionnaly, I have a few questions regarding my problem : 1. How do we enable the logs? The isapi_redirect.properties and the registry points to : log_file=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\jakarta.log log_level=debug The file is never created. I did not try without spaces. 2. Is there a limit in size between IIS and Tomcat? Some of the result in my search spoke about a 8192 bytes limits, other about a pool size limit? Honestly, Baldurien - 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] - 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 do you access all sessions from a servlet in tomcat 6.0?
Gary, I'm not sure how much time was spent discussing alternatives as apposed to the question of if getting access to all sessions would work. You originally talked about tracking for concurrent license checking... We currently do this type of thing - and more, like abstracting the session from the http session so the http session can time out and return resources without actually losing the user session, concurrent connections versus concurrent users, etc. Furthermore we have multiple servers running the same app so that simply holding the information locally in the VM is not sufficient. We handle tracking all of this stuff via the database. Thus the distributed nature of our app and the precise lifecycle of the HttpSession are not so important. The downside to all this is that you have to be careful how you track activity via the db. How/when do you log activity? How do you write your connection-checking queries so you don't have performance issues? How/when do you cache stuff locally to help improve performance? How do you efficiently write logs for usage tracking? Using the DB works but it does take some tuning (as we found out ;-). Brian ---Original Message- --From: [EMAIL PROTECTED] --[mailto:[EMAIL PROTECTED] --Sent: Wednesday, September 19, 2007 5:05 AM --To: Tomcat Users List --Subject: Re: How do you access all sessions from a servlet --in tomcat 6.0? -- -- --Thanks for all the feedback on this. -- --___ -- --Gary Johnstone --Engineering IT --Cummins Turbo Technologies Ltd --+44 1484 440532 -- -- -- -- -- -- -- -- -- Lyallex -- -- [EMAIL PROTECTED] -- -- m -- To -- Tomcat Users List -- -- 19/09/2007 10:38 --users@tomcat.apache.org -- -- cc -- -- -- Please respond to -- Subject -- Tomcat Users Re: How do you access --all sessions -- List from a servlet in --tomcat 6.0? -- [EMAIL PROTECTED] -- -- che.org -- -- -- -- -- -- -- -- -- -- -- -- -- --OK, for some reason I've been obsessing about this for a --whole day now. -- --If you hold an external reference to a Session then --according to my tests the session will still time out as --expected but the external reference will be non null. At the --very least this means that you may end up with a large --number of useless references taking up space in memory. Of --course you can always remove an invalid or timed out --reference in the sessionDestroyed method of your listener. -- --There are a whole bunch of other issues surrounding this but --I'm sure you've sussed them out for yourself already. -- --Anyway, I'll shut up now. -- --Rgds --Duncan -- -- --On 9/19/07, Lyallex [EMAIL PROTECTED] wrote: -- On 9/18/07, Lyallex [EMAIL PROTECTED] wrote: -- How about creating a SessionListener -- -- class SomeSessionListener implements HttpSessionListener ... -- -- Register it in web.xml -- -- in the sessionCreated method of your listener get a --reference to the -- new session from the HttpSessionEvent you can now access the -- getLastAccessedTime(), maybe store the refs in some singleton ... -- -- ...er, actually I think this could be a REALLY STUPID idea --as I hadn't -- thought about what happens if you maintain an external --reference to a -- session and the session expires... -- -- Investigating now -- -- Duncan -- -- --- --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 e-mail transmission and any attachments to it are --intended solely for the use of the individual or entity to --whom it is addressed and may contain confidential and --privileged information. If you are not the intended --recipient, your use, forwarding, printing, storing, --disseminating, distribution, or copying of this --communication is prohibited. If you received this --communication
RE: Why Net use ... does not work with WebDAV servlet
From: shahab [mailto:[EMAIL PROTECTED] I am trying to develop a simple distributed file system using WebDAV servlet on Tomact application server. while I can successfully browse the WebDAV enabled directory via IE or FireFox, issuing net use p: http://lp:port/Dav; results in The network name can not be found error message so drive P: can not be created. whereas this net use command can be executed successfully in Apache web server. The WebDAV redirector built into Windows uses a different codebase from the one built into Internet Explorer. It also doesn't match the WebDAV spec in a number of unpleasant ways. I assume the httpd developers (assuming this is what you mean by Apache web server) have managed to find a workaround which is not in Tomcat's WebDAV servlet. Have you looked at Jakarta Slide? It contains a more complete WebDAV implementation than Tomcat's own servlet, and may get round the problem. It also includes pluggable storage modules; you may find that much of your distributed file system work has been done for you. - Peter - 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: Question about JNDI + Connection Pool + Mysql (Tomcat 6)
Date sent: Wed, 19 Sep 2007 00:26:04 -0400 From: Fredy Provoste [EMAIL PROTECTED] Subject:Question about JNDI + Connection Pool + Mysql (Tomcat 6) To: Tomcat User List users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org Hi again, i've been deployed a webapp called libreria in Tomcat 6, i tried to configure a mysql connection pool, so in the path libreria . . META-INF/context.xml put the lines Context path=/libreria docBase=libreria debug=5 privileged=true reloadable=true Resource name=jdbc/basededatos auth=Container type= com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource factory=com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory driverClassName=com.mysql.jdbc.Driver username=usuarioweb password=usuarioweb url=jdbc:mysql://localhost:3306/prueba1?autoReconnect=true/ /Context in the path libreria . WEB-INF/web.xml the lines to use the JNDI resource resource-ref description Pool a la Base de Datos /description res-ref-name jdbc/basededatos /res-ref-name res-type com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource /res-type res-auth Container /res-auth /resource-ref so trying using JSTL, and pure JSP to access the pool, i get the next message ERROR java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES) seems like tomcat ignores my user i've created in mysql server (I verify the connection through dreamweaver conection feature and it works) That error is from mysql server and it doesn't mean that the password that was used was YES it just means that a password was used. The password that was used will not be logged. Make sure you have an account on mysql server as [EMAIL PROTECTED] which is different than usuarioweb@'%' Test it by loggin in from local machine. -Steve O. thanks for any help Fredy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Comet
Hi there, I'm trying to get in touch with anyone that has had success in getting the comet chat example working on tomcat 6.0.14. Saman Notice - The information in this e-mail is confidential and may be legally privileged. It is intended solely for the recipient(s) named above. If you have received this message in error, or are not a named recipient, please notify the sender immediately at + 1 (604) 685-7619 and please delete this e-mail message from your computer. Thank you. - 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: Download problem with IE6, IIS 6.0, SSL, Tomcat 6.0.13 and connector 1.2.25 (last in date) on Windows Server 2k3
Here is more information : - I tried with firefox using IIS, and it fails too. - I've done the following test : I made 10 files of different size (512 bytes, 1024, 2048, ...) then I uploaded them : On IIS (tested with Fx, and IE): 1. When the file is less or equals 16KiB, upload works. 2. When the file is bigger than 32KiB, upload fails. On Tomcat directly (only testable with IE): 1. Works in any case After uploading the biggest files, I tried to download them : 1. It works for = 16KiB 2. It fails for 32KiB You seemed to think that it might be |disableUploadTimeout (which is set to false by default), so I tried ||disableUploadTimeout=true, restarted the Tomcat service, and it did not resolve the problem. | Martin Gainty wrote: to make sure its not tomcat timing out what is disableUploadTimeout in your connector set to? M-- - Original Message - From: Baldurien [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, September 19, 2007 9:16 AM Subject: Download problem with IE6, IIS 6.0, SSL, Tomcat 6.0.13 and connector 1.2.25 (last in date) on Windows Server 2k3 Hello, I have the following configuration : - A Tomcat 6.0.13 serving any file running on port 8080 - A IIS 6.0 frontend server, on port 80/443 (for SSL) which use the Jp connector 1.2.25 as a gateway to Tomcat, on Windows Server 2003 The connector serves all that is in /myProject path without any restriction on file type. It works pretty well in both case (IIS - Tomcat, or Tomcat without IIS). However, the application do have a struct action which serves up file stored in database, via Hibernate. In such case, when the file is large (I would say at least 10KiB), Internet Explorer 6 fails downloading with this message : Internet Explorer cannot download dwl.do?id=19 from localhost. The connection with the server was reset This fails only when I'm using the IIS url (https://localhost/foo/dwl.do?id=19) : when I'm calling directly the Tomcat webserver, it works without any problem. Before looking for a solution on the web, I tried to view the log of the connector : I do not have a single log file in C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log, despise the fact I setted level on debug both in a file located in the same directory than isapi_redirect, and in registry. My search was not successful, as I found no real clues about my problem. I did not try with another browser (like Firefox) as the web project must work with IE6. Additionnaly, I have a few questions regarding my problem : 1. How do we enable the logs? The isapi_redirect.properties and the registry points to : log_file=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\jakarta.log log_level=debug The file is never created. I did not try without spaces. 2. Is there a limit in size between IIS and Tomcat? Some of the result in my search spoke about a 8192 bytes limits, other about a pool size limit? Honestly, Baldurien - 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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HELP -- need to get Basic Authentication working (.htaccess) with Apache/Tomcat 5 to prevent access
I need to figure out a way to 'gate' access in a broad sense to the overall website on a test server. The site is all JSP, using Apache and Tomcat, but .htaccess doesn't work, as it appears that Apache hands off to Tomcat prior to doing the .htaccess check. Does anyone have a solution to this? This is only for a test server, so general access is limited. So I just want users upon first accessing the site to have to enter a username/password as a basic authentication to view the site... I need to get this done quickly, if it's possible. thanks, Kim :-)
Re: HELP -- need to get Basic Authentication working (.htaccess) with Apache/Tomcat 5 to prevent access
http://www.apache-ssl.org/ M-- - Original Message - From: Kim Albee [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 19, 2007 2:22 PM Subject: HELP -- need to get Basic Authentication working (.htaccess) with Apache/Tomcat 5 to prevent access I need to figure out a way to 'gate' access in a broad sense to the overall website on a test server. The site is all JSP, using Apache and Tomcat, but .htaccess doesn't work, as it appears that Apache hands off to Tomcat prior to doing the .htaccess check. Does anyone have a solution to this? This is only for a test server, so general access is limited. So I just want users upon first accessing the site to have to enter a username/password as a basic authentication to view the site... I need to get this done quickly, if it's possible. thanks, Kim :-) - 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: HELP -- need to get Basic Authentication working (.htaccess) with Apache/Tomcat 5 to prevent access
M - I'm confused. we don't need SSL at all here... ??? clarification? thanks, Kim :-) On 9/19/00, Martin Gainty [EMAIL PROTECTED] wrote: http://www.apache-ssl.org/ M-- - Original Message - From: Kim Albee [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 19, 2007 2:22 PM Subject: HELP -- need to get Basic Authentication working (.htaccess) with Apache/Tomcat 5 to prevent access I need to figure out a way to 'gate' access in a broad sense to the overall website on a test server. The site is all JSP, using Apache and Tomcat, but .htaccess doesn't work, as it appears that Apache hands off to Tomcat prior to doing the .htaccess check. Does anyone have a solution to this? This is only for a test server, so general access is limited. So I just want users upon first accessing the site to have to enter a username/password as a basic authentication to view the site... I need to get this done quickly, if it's possible. thanks, Kim :-) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help with tomcat
all of a sudden i can't access the server ' when i start it from within eclipse it doesn't report anything but can't acess from IE neither from inside eclipse as run at server / tomcat 5.5 eclipse 3.3 it worked great for half a year and now ... when i shutted the server now i got this message : ERROR: JDWP Unable to get JNI 1.2 environment, jvm-GetEnv() return code = -2 [util.c,L765] JDWP exit error JVMTI_ERROR_INTERNAL(113): any idea guys ? - 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: HELP -- need to get Basic Authentication working (.htaccess) with Apache/Tomcat 5 to prevent access
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kim, Kim Albee wrote: I'm confused. we don't need SSL at all here... ??? clarification? Confusion is par for the course with responses from Martin. Since mod_jk (I assume you're using mod_jk) maps URIs to Tomcat, your mapping will occur before Apache httpd consults the filesystem to see if there's anything like an .htaccess file in there. I think you'll have to do this at the top-level of your virtual host within httpd.conf (or wherever you define your virtual/non-virtual host). You might not be able to do it in an .htaccess file at all. Are you able to modify your own Apache configuration? If not, you may have to ask your system administrator to do it for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG8Xex9CaO5/Lv0PARArCXAJ48pOaeMSNtWT+vTrn9EM8/srdI9wCeIb67 2Sd2VUeO1I42F4Z2YTj9Uyo= =Ir3N -END PGP SIGNATURE- - 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 - static mirroring
--- Hassan Schroeder [EMAIL PROTECTED] wrote: On 9/15/07, Dola Woolfe [EMAIL PROTECTED] wrote: I have built a website with Tomcat, but all the pages are essentially static, as there are no forms, etc. I used JSP because I have libraries that produce HTML. Now I want to move the pages to a webhost that doesn't support JSP so basically I need to convert my pages to static. Batch-rename all your .jsp files to .html, mass search-and-replace all the internal links appropriately, and configure Tomcat to process .html files as JSPs. Then wget the site and you're set. :-) HTH, -- Hassan Schroeder [EMAIL PROTECTED] Sounds like a great idea. How do I configure Tomcat to process .html files as .jsp? (Please be specific if you can.) Many thanks in advance! Dola Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session uniqueness
Is there a way to enforce that a given username can only have one valid session at a time? -- Dale Nesbitt - 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 - static mirroring
On 9/19/07, Dola Woolfe [EMAIL PROTECTED] wrote: How do I configure Tomcat to process .html files as .jsp? Add this to the web.xml of the relevant Context: servlet-mapping servlet-namejsp/servlet-name url-pattern*.html/url-pattern /servlet-mapping That's it :-) HTH! -- Hassan Schroeder [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]
Tomcat Website
Hi, all, My apologies if this isn't the right mailing list to report this, but It's been about 10 days since tomcat 5.5.25 is released, yet the apache tomcat home page still shows the latest tomcat as 5.5.23 (http://tomcat.apache.org/index.html) Anybody going to update that page? Regards, Timothy Wonil Lee Java Developer Koorong Books email: timothyl +at+ koorong.com direct ph: (+612) 9857 4448 direct fax: (+612) 9857 6648 http://timundergod.blogspot.com/ http://www.google.com/reader/shared/16849249410805339619 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
changing the default application
Hi! How can I change the default application from the tomcat ROOT/index.jsp page to an application installed in $CATALINA_HOME/Catalina/localhost/app.xml? I found the default application in web.xml and changed it from servlet-mapping servlet-namedefault/servlet-name url-pattern//url-pattern /servlet-mapping to servlet-mapping servlet-namedefault/servlet-name url-pattern/tomcat/url-pattern /servlet-mapping For the web application I defined (in $CATALINA_HOME/Cataline/localhost/app.xml): Context path=/ docBase=/opt/app debug=0 reloadable=false Logger className=org.apache.catalina.logger.FileLogger prefix=mywebapp. suffix=.log timestamp=true/ /Context but after restarting tomcat it seemd not to have any effect: calling http://server:8080/tomcat did just not work and give back an error 404 - resource not available. http://server:8080/ did work, but returned the tomcat default page. My own webapp was not reachable at all. Any idea what I am missing? -- Thomas - 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: Session uniqueness
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dale, Dale Nesbitt wrote: Is there a way to enforce that a given username can only have one valid session at a time? Yes, but I'd imagine the question you're really asking is is there an /easy/ way to enforce... or, perhaps a standard way. The answer to both of these is no. You basically have to roll your own login-restriction mechanism. This question has been asked several times on the list. Try looking around the archives for the past discussions... we usually tell people that it's possible but a real PITA to do. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG8c3b9CaO5/Lv0PARAk1bAJ9op5VN0JXry9RqxRGCbwcX3vAFMgCdHNzo 1ReqqD7hqFXk/xIHP2hvxyU= =IqOL -END PGP SIGNATURE- - 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: changing the default application
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Schweikle Subject: changing the default application How can I change the default application from the tomcat ROOT/index.jsp page to an application installed in $CATALINA_HOME/Catalina/localhost/app.xml? Name your application ROOT - that's your only choice. If you use a Context element in conf/Catalina/[host]/ROOT.xml, store your app outside of the Host's appBase directory and use the docBase attribute to point to it. I found the default application in web.xml and changed it from servlet-mapping servlet-namedefault/servlet-name url-pattern//url-pattern /servlet-mapping You're confused. That's the default _servlet_, not the default webapp. That servlet is needed to deliver all static content. Change it back to the way you found it and leave it alone. For the web application I defined (in $CATALINA_HOME/Cataline/localhost/app.xml): Context path=/ The path attribute is not allowed in this instance; the file containing the Context element must be named ROOT.xml for it to be treated as the default webapp. Any idea what I am missing? Lots - see the above. - 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: HELP -- need to get Basic Authentication working (.htaccess) with Apache/Tomcat 5 to prevent access
Confusing Chris- what happens when there is no .htaccess to place your RewriteRules? M-- - Original Message - From: Bill Barker [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, September 19, 2007 9:28 PM Subject: Re: HELP -- need to get Basic Authentication working (.htaccess) with Apache/Tomcat 5 to prevent access Christopher Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kim, Kim Albee wrote: I'm confused. we don't need SSL at all here... ??? clarification? Confusion is par for the course with responses from Martin. Since mod_jk (I assume you're using mod_jk) maps URIs to Tomcat, your mapping will occur before Apache httpd consults the filesystem to see if there's anything like an .htaccess file in there. Yes, mod_jk for Apache 2.x with tell Apache to skip checking the directory for .htaccess once it has found a match. And, since .htaccess is just another file to Tomcat, if you have mappings like: JkMount /myapp/* worker1 then Tomcat will happily serve the file to anybody that requests it :). I think that you can get it to work with mod_proxy_ajp if you put your ProxyPass statements in a Directory block, but I haven't tried it. You can place RewriteRules in .htaccess, so I imagine that that will always work. I think you'll have to do this at the top-level of your virtual host within httpd.conf (or wherever you define your virtual/non-virtual host). You might not be able to do it in an .htaccess file at all. Are you able to modify your own Apache configuration? If not, you may have to ask your system administrator to do it for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG8Xex9CaO5/Lv0PARArCXAJ48pOaeMSNtWT+vTrn9EM8/srdI9wCeIb67 2Sd2VUeO1I42F4Z2YTj9Uyo= =Ir3N -END PGP SIGNATURE- - 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] - 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: AccessControlException with Embedded Tomcat 5.5.23
I appreciate your response Chuck. I'm using ant to build and execute my system. I wasn't able to figure out how to set the java.security.manager and java.security.policy args in my ant target. I assumed that it was ant's jvmarg but that option didn't work. I finally realized that the ant permissions flags could be set. This got me a long way towards a solution. Within my ant target for executing my system my permissions were specified as follows: permissions grant class=java.util.PropertyPermission name=* actions=read,write/ grant class=javax.management.MBeanTrustPermission actions=register/ /permissions The PropertyPermission covered my program's need to set system properties and the MBean permission avoided my initial set of problems AccessControlException. Unfortunately, using this approach resulted in a new problem. I now received a NoClassDefFoundError. More specifically I received java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator I definitely have the appropriate jar file in my lib directory and the lib directory is definitely in the path that the ant target uses. I'm guessing that there is another permission I must set to include the 3rd party jars but I'm not sure which permission. Any suggestions? Thanks in advance, SD = From Caldarale, Charles R [EMAIL PROTECTED] Subject RE: AccessControlException with Embedded Tomcat 5.5.23 Date Tue, 18 Sep 2007 20:11:18 GMT From: S D [mailto:[EMAIL PROTECTED] Subject: AccessControlException with Embedded Tomcat 5.5.23 1. How do I enforce the use of the catalina.policy file with embedded Tomcat? You need to set the following _two_ system properties: -Djava.security.manager -Djava.security.policy=$CATALINA_BASE/conf/catalina.policy Sorry, can't answer your second question. - Chuck