Re: [Resin-interest] Resin 4.0 with Apache 2.2
On the same version of Resin and Apache (Resin 4.0.7 behind Apache 2.2), if I use Location /abc SetHandler caucho-request /Location This works fine forn any URI starting with abc including /abc , /abc/ ,/abc/xx.jsp , /abc/d/e/f.jsp The only difference I can see is that I don't use /ResinConfigServer/ but /CauchoHost/ in my httpd.conf. You can also evaluate the use of /LocationMatch/ in place of /Location/ Andrea On 4/09/10 9:17 PM, Matthew Serrano wrote: have been running Resin 4.0.7 behind Apache 2.2. I recently deployed a war file (abc.war) and Apache gives me a 404: The requested URL /abc was not found on this server. My ROOT application mostly works fine except for my WordPress blog which has the same issue as this abc.war. I explicitly configured httpd.conf to add a mapping for my blog (/blog/*) and my war (/abc/*) but Apache will only server subfolders explicitly mapped in the httpd.conf file (e.g. the * does not seem to indicate serve all file and subfolders). I have worked around this by configuring several Location tags in httpd.conf as demonstrated below. Is this an issue with my configuration or Resin? I am running on Debian 5 x86_64, Java 6, Resin 4.0.7. httpd.conf # # mod_caucho Resin Configuration # LoadModule caucho_module /usr/lib/apache2/modules/mod_caucho.so ResinConfigServer localhost 6800 CauchoConfigCacheDirectory /tmp #CauchoStatus yes Location /abc/* SetHandler caucho-request /Location Location /abc/*/* SetHandler caucho-request /Location Location /abc/*/*/* SetHandler caucho-request /Location Location /abc/*/*/*/* SetHandler caucho-request /Location Location /blog/* SetHandler caucho-request /Location Location /blog/p/*/*/*/* SetHandler caucho-request /Location Location /blog/p/*/*/* SetHandler caucho-request /Location Location /blog/p/*/* SetHandler caucho-request /Location Location /blog/p/* SetHandler caucho-request /Location Location /blog/feed/* SetHandler caucho-request /Location Location /blog/comments/feed/* SetHandler caucho-request /Location ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] how to avoid resin.xml change detection
Hi, I have an resin.xml with several cluster defined. Every time I change resin.xml to add a virtual host in one of the clusters resin detected that resin.xml is changed and it restarts all the clusters. (resin 4.0.7) Is it possibile to avoid resin.xml change detection to manually restart only one of the clusters? Is it possible to avoid the problem splitting resin.xml into several files and use resin:import? thanks Andrea ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] apache mod_caucho bug in 4.0.x (including 4.0.9)
On 2/08/10 4:36 PM, Andrea Sodomaco wrote: Hi, in jsp files out.flush() does not work correctly if resin 4.0.x is used with apache 2.2 and mod_caucho: nothing is sent to the browser until the page ends. Running resin http server (without apache) the behavior is correct and the response is sent to the browser when out.flush() is called. Also running apache2.2 + resin 3.1.x the behavior is correct. Thanks in advance Andrea Hi, One additional information. If I connect to resin 4.0.9 using an apache instance that have mod_caucho 3.1.10 installed the problem persists. So I guess that something changed in the way resin sends response to apache and not in the mod_caucho itself. Can be this behaviour considered a bug? I now that mod_caucho is not considered a priority form resin developers but is there any chance that this will be fixed in future releases? Thank you. Andrea ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] apache mod_caucho bug in 4.0.x (including 4.0.9)
Hi, in jsp files out.flush() does not work correctly if resin 4.0.x is used with apache 2.2 and mod_caucho: nothing is sent to the browser until the page ends. Running resin http server (without apache) the behavior is correct and the response is sent to the browser when out.flush() is called. Also running apache2.2 + resin 3.1.x the behavior is correct. Thanks in advance Andrea ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] in Resin 4.0.7 HtttpServletRequest needs to an instance of CauchoRequest
Hi! To obtain some URI manipulation I implemented an instance of javax.servlet.http.HttpServletRequest. public class MultiLingueHSR implements HttpServletRequest { HttpServletRequest httpServletRequest=null; public MultiLingueHSR(HttpServletRequest httpServletRequest) { this.httpServletRequest = httpServletRequest; // custom code... } public String getRequestURI() { return // return custom values ; } //all the other methos are implemented like these... public Object getAttribute(String arg0) { return httpServletRequest.getAttribute(arg0); } public String getAuthType() { return httpServletRequest.getAuthType(); } public String getCharacterEncoding() { return httpServletRequest.getCharacterEncoding(); } public int getContentLength() { return httpServletRequest.getContentLength(); } public String getContentType() { return httpServletRequest.getContentType(); } public String getContextPath() { return httpServletRequest.getContextPath(); } ... } Then I used this in a filter in the following way public void doFilter(ServletRequest request, ServletResponse response, FilterChain nextFilter) throws ServletException, IOException { MultiLingueHSR mlHSR=new MultiLingueHSR(req); mlHSR.getRequestDispatcher(mlHSR.getRequestURI()).include(mlHSR,response); } This code worked fine in resin 3.0 and 3.1 but on resin 4.0.7 I get this exception java.lang.ClassCastException: it.sodomaco.turcom.lingue.MultiLingueHSR cannot be cast to com.caucho.server.http.CauchoRequest it.sodomaco.turcom.lingue.MultiLingueHSR cannot be cast to com.caucho.server.http.CauchoRequest com.caucho.server.http.CauchoRequestWrapper.getCauchoRequest(CauchoRequestWrapper.java:790) com.caucho.server.http.CauchoRequestWrapper.getSessionId(CauchoRequestWrapper.java:476) com.caucho.server.http.AbstractCauchoRequest.finishRequest(AbstractCauchoRequest.java:588) com.caucho.server.webapp.IncludeRequest.finishRequest(IncludeRequest.java:365) com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:342) it.sodomaco.turcom.MainFilter.doFilter(MainFilter.java:107) Any ideas or suggestions? Is this beaviour to be considered a bug of resin? thank you in advance Andrea ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Why Apache?
I like very mych Resin as app. server. but if we talk about http servers I think apache is more reliable, more documented, more flexible and faster. e.g. LocationMatch \.gif$ Header set Cache-Control post-check=36000,pre-check=99 /LocationMatch Scott Ferguson wrote: On Mar 10, 2009, at 10:19 AM, Daniel J. Doughty wrote: Some of my developers prefer how Apache logs activity. Can you give some more details? The Apache /server-status or the log output or something else? Some of that logging might be straightforward to add to Resin. -- Scott Aaron Freeman wrote: After watching a few of these threads about people using mod_caucho with Apache, it dawned on me to ask an open-ended question: Why use Apache at all? I am sure there are good reasons for it out there, so I am just curious what the use-case is for using Apache plus Resin instead of using just Resin? ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] SSL - Different cert per virtual host?
it can be done also with one IP but using different ports. It is inpossible to use Name Virtual hosts on same socket (this is a https limit not a resin or apache limit) Riccardo Cohen wrote: yes but it can't be the same IP. your serveur must have several IP, one for each certificate. Mattias Jiderhamn wrote: Hi, I want to know if it is possible to set up Resin to use multiple SSL certificates on the same server, each used for a different (virtual) host? That is, I want the same Resin instance to correspond both to foo.com with its SSL certificate and bar.com with its SSL certificate (on the same port). Is that possible? How? /Mattias ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] R: How to set default/global response encoding? + forms encoding
I think that your suggestion resolves only a part of the problem. %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8%\ How to set globally the pageEncoding to UTF-8? I have another problem how to set resin parsing of forms POST to UTF-8? I notice that resin 3.0.23 has problems when a browser POSTs data in UTF-8 encoding so I need a filter that sets this for each request. request.setAttribute(caucho.form.character.encoding,UTF-8); Is this correct? Is any documqntation about this metter? Thanks. Andrea Sodomaco Andrea Sodomaco Consulenze Informatiche Via Giacometti, 4 - 34146 TRIESTE Tel.: 040 281648 / 338 3565702 - Fax: 040 46069349 www.sodomaco.it -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Yong Bakos Inviato: mercoledì 27 giugno 2007 18.28 A: General Discussion for the Resin application server Oggetto: Re: [Resin-interest] How to set default/global response encoding? Hans, don't declare it manually in every jsp -- just once in your header portion of your view/jsp templates, which would typically be included in each individual jsp. On Jun 27, 2007, at 8:59 AM, Hans Loeblich wrote: I need to know if there is any way to make UTF-8 my default charset encoding. Do I really have to set the page contentType at the top of every jsp? It currently defaults to ISO-8559-1 if I do not explicitly set it. Thank you, Hans Loeblich ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] R: What happens if you *don't* call super.init(...)?
super.init(config) calls init(config) in javax.servlet.GenericServlet public void init(ServletConfig config) throws ServletException { _config = config; log(init); init(); } If the call is missing, methods like getInitParameter, getServletName, etc. do not work as well as logging methods. But, I think, there is not serious consequences. There could be some problems if your servlet calls getSelvletConfig to do any clean up job. I think is a better practice to override init() method and not init(ServletConfig config) method. public void init() throws ServletException { sc = getSelvletConfig().getServletContext() ; try { env = (Context) new InitialContext().lookup(java:comp/env); ... Or even better public void init() throws ServletException { sc = getServletContext() ; . . . In init() method super().init() can be omitted safely. Andrea Sodomaco Andrea Sodomaco Consulenze Informatiche Via Giacometti, 4 - 34146 TRIESTE Tel.: 040 281648 / 338 3565702 - Fax: 040 46069349 www.sodomaco.it -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di John Steel Inviato: martedì 24 aprile 2007 17.05 A: resin-interest@caucho.com Oggetto: [Resin-interest] What happens if you *don't* call super.init(...)? Just found (and corrected) a probable howler in a pretty busy servlet: public void init(ServletConfig config) throws ServletException { super.init(config); sc = config.getServletContext(); try { env = (Context) new InitialContext().lookup(java:comp/env); pool = (javax.sql.DataSource) env.lookup(System.getProperty(app.dbid)); } catch (NamingException e) { e.printStackTrace(); } Locale.setDefault(Locale.ENGLISH); logConfPath = sc.getRealPath()+WEB-INF/log/log.properties; } The super.init() line was missing. We didn't notice because it was serving correctly, but have seen a gradual slowdown over a few days usually cured by a restart. Could the missing line have caused it? If not, what bad side effects could we have expected please? -- -- http://www.phonewebcam.com [EMAIL PROTECTED] ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] R: R: [Fwd: httpd.sh stop]
Using the shutdown-wait-max directive, things change. Whit this line shutdown-wait-max120/shutdown-wait-max in web.xml the request is completed also after resin is stoped. Andrea Sodomaco Andrea Sodomaco Consulenze Informatiche Via Giacometti, 4 - 34146 TRIESTE Tel.: 040 281648 / 338 3565702 - Fax: 040 46069349 www.sodomaco.it http://www.sodomaco.it/ -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Busch, Steffen Inviato: lunedì 23 aprile 2007 9.08 A: General Discussion for the Resin application server Oggetto: Re: [Resin-interest] R: [Fwd: httpd.sh stop] There is also a configuration directive, how long resin will wait for requests to finish: http://www.caucho.com/resin-3.0/config/webapp.xtp#shutdown-wait-max -Ursprüngliche Nachricht- Von: Andrea Sodomaco [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 21. April 2007 11:03 An: 'General Discussion for the Resin application server' Betreff: [Resin-interest] R: [Fwd: httpd.sh stop] The answer is no. I simply did a test. The following jsp does not complete the request if resin is stoped. beginbr % Thread.sleep(60L*1000L); % end Andrea Sodomaco Andrea Sodomaco Consulenze Informatiche Via Giacometti, 4 - 34146 TRIESTE Tel.: 040 281648 / 338 3565702 - Fax: 040 46069349 www.sodomaco.it http://www.sodomaco.it/ Original Message Subject:[Resin-interest] httpd.sh stop Date: Thu, 19 Apr 2007 00:40:16 -0500 From: Martin Crundall mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Reply-To: General Discussion for the Resin application server mailto:resin-interest@caucho.com resin-interest@caucho.com To: General Discussion for the Resin application server mailto:resin-interest@caucho.com resin-interest@caucho.com when httpd.sh stop is executed (resin 3.0.19) does resin finish dealing with all pending requests before shutting down? thanks, martin ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] R: [Fwd: httpd.sh stop]
The answer is no. I simply did a test. The following jsp does not complete the request if resin is stoped. beginbr % Thread.sleep(60L*1000L); % end Andrea Sodomaco Andrea Sodomaco Consulenze Informatiche Via Giacometti, 4 - 34146 TRIESTE Tel.: 040 281648 / 338 3565702 - Fax: 040 46069349 www.sodomaco.it http://www.sodomaco.it/ Original Message Subject:[Resin-interest] httpd.sh stop Date: Thu, 19 Apr 2007 00:40:16 -0500 From: Martin Crundall mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Reply-To: General Discussion for the Resin application server mailto:resin-interest@caucho.com resin-interest@caucho.com To: General Discussion for the Resin application server mailto:resin-interest@caucho.com resin-interest@caucho.com when httpd.sh stop is executed (resin 3.0.19) does resin finish dealing with all pending requests before shutting down? thanks, martin ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] R: Issues with Resin and apache
I used resin 3.0.14 and apache with different version of mod_caucho. Now that your apache is working well with mod_caucho from 3.0.21, you can re-install 3.0.14 without mod_caucho and it should work fine with apche+mod_coucho version 3.0.21. Andrea Sodomaco www.sodomaco.it -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di THEON COMPUTER CORPORATION Inviato: lunedì 13 novembre 2006 4.24 A: resin-interest@caucho.com Oggetto: [Resin-interest] Issues with Resin and apache I'm assuming this is the right place to get questions answered about issues with Resin, so here it goes: I'm running Resin 3.0.21 compiled mod_caucho.so and I've set the LoadModule parameter in my apache httpd.conf file. I have a java based application running and when I first start resin and get into my application all is well. But, as soon as I close my browser window and try to get into my application I get the following error: /error/HTTP_UNAUTHORIZED.html.var was not found on this server. _ Resin-3.0.14 (built Tue, 05 Jul 2005 11:03:36 PDT) At that point I have to restart Resin and then it works again until I close my browser window. Now, I do realize that it says Resin-3.0.14 on the line above. This is because the application that I'm running comes pre-packaged with Resin 3.0.14 but I've had one hell of a time compiling mod_caucho.so with resin 3.0.14, so I downloaded resin 3.0.21 and I was able to successfully compile under Apache 2.0.54. I did read somewhere on the Resin site that Resin 3.0.14 has had issues compiling with apache 2.0.54. If the issue is due to the fact that the mod_cacho.so is compiled under a different resin version that the one I'm using it with, I completely understand. I'll go back to the application vendor and ask them to bundle their app with Resin 3.0.21. On the other hand, I'm able to run my application all day long when I use the resin on port 8600. So, this issue seems to be revolving around Resin in conjuction with apache and it probably is the different version of the mod_caucho.so file. Your help on this issue is appreciated. Thanks. ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] log level configuration bug in resin 3.0.21?
Hi, I configured a custom log: log name=it.sodomaco.mab level=all path=${server.root}/log/maball.log/ running the following code Logger log = Logger.getLogger(it.sodomaco.mab); log.log(java.util.logging.Level.FINER,finer); log.log(java.util.logging.Level.INFO,info); the result is [2006/09/21 16:58:29.623] info [2006/09/21 17:00:26.598] info [2006/09/21 17:00:47.234] info [2006/09/21 17:00:48.306] info I also notice that in the default resin.conf of 3.0.21 the configuration is log name= level=all path=stdout: timestamp=[%H:%M:%S.%s] / but only info,warning e servere messages appears not fine or finer. Resin 3.0.21 Java build 1.5.0_04-b05 Thanks Andrea Sodomaco www.sodomaco.it ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest