Re: Jasper compilation of included files
On Friday 15 October 2004 13:52, Dave Minter wrote: > I'm trying to get Jasper to pre-compile my JSP pages. I've got an Ant > task (swiped from the manual) kicking this off, and it works pretty > well up to a point. However... > > This application has a number of pages that are built out of JSP > fragments. Something like this: [snipped] > Obviously file B isn't valid on its own - it has an undefined label > "s". On the other hand, A is entirely valid. > > I can't figure out a way to tell Jasper (via the Ant task) NOT to try > to compile B.jsp on its own, without making B unavailable as an > include to A. I've given JSP segments (fragments) a .jspf extension and that does the trick for me. See the spec JSP.1.1.8. Michael -- Michael Schuerig Nothing is as brilliantly adaptive mailto:[EMAIL PROTECTED] as selective stupidity. http://www.schuerig.de/michael/--A.O. Rorty, The Deceptive Self - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Character encoding in XML tag files?
First things first, I'm using Tomcat 5.5.1. I'm moving some code from a JSP document to tag files. All of the files are in XML format. The head of one of my tag files looks like this http://java.sun.com/JSP/Page";> I'm precompiling the file with this ant target So far, all is working. Problems start, when the file contains characters or constants such as 'Ü' and ' '. These result in errors like this An error occurred at line: 47 in the jsp file: /WEB-INF/tags/veranstaltung.tagx Generated servlet error: Invalid character constant The tag file is indeed encoded as ISO-8859-1. Alternatively, I tried UTF-8, with the declarations changed, too. The result was the same. And now for the weird part: This doesn't compile Ü This either Ü But this does Ü And so does this Ü So, there have to be 3 whitespace characters after the umlaut to make it pass through jasper. =:-O Michael -- Michael Schuerig Those people who smile a lot mailto:[EMAIL PROTECTED] Watch the eyes http://www.schuerig.de/michael/--Ani DiFranco, Outta Me, Onto You - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Character encoding in XML tag files?
On Thursday 30 September 2004 02:01, Ben Souther wrote: > I've had similar problems on FedoraCore. > Setting the LANG evironment variable to: > en_US.iso885915 > took care of it. My normal locale is somewhat involved LANG=POSIX [EMAIL PROTECTED] [EMAIL PROTECTED] LC_TIME="POSIX" LC_COLLATE="POSIX" [EMAIL PROTECTED] LC_MESSAGES="POSIX" [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] LC_ALL= But I just tried with [EMAIL PROTECTED] and the result was the same as before. Thanks for the hint nonetheless, I'd never have thought of that. Michael -- Michael Schuerig All good people read good books mailto:[EMAIL PROTECTED]Now your conscience is clear http://www.schuerig.de/michael/ --Tanita Tikaram, Twist In My Sobriety - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Example of MBean for own component?
I'm looking for a simple example of how to add managability through JMX to a webapp. The Tomcat docs aren't helping me, unfortunately. I understand that Tomcat supports Commons Modeler for generating model MBeans. What I don't see is how to register those MBeans. Do I have to do this programmatically in a listener or valve? Can I do it declaratively in a configuration file? Michael -- Michael Schuerig Those who call the shots mailto:[EMAIL PROTECTED] Are never in the line of fire http://www.schuerig.de/michael/ --Ani DiFranco, Not So Soft - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Running HSQLDB in-process?
I'm trying to run HSQLDB in in-process mode in a web application. For this I've added a resource definition to the context file: No problem so far. But there is a problem, when HSQLDB tries to open the database and can't find it: java.sql.SQLException: Database does not exists: file:/WEB-INF/db/verzeichnisdb Now, what I need is some hook where I can resolve this to an absolute path. Unfortunately, what looks like an ordinary file-URL isn't one. That is, AFAICT, it wouldn't help to resolve this to a jndi-URL (I think that's what Tomcat does). If my understanding is correct, I need an absolute file-URL as HSQLDB interprets the URL scheme to decide how to access the database (server, file in-process, in-memory). As a last resort, I could run HSQLDB as a server and be done with it. But as only my single web app is using the DB there's no independent reason to do this. Michael -- Michael Schuerig Not only does lightning not strike mailto:[EMAIL PROTECTED] twice, it usually doesn't strike once. http://www.schuerig.de/michael/ --Salman Rushdie, Fury - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running HSQLDB in-process?
On Monday 25 October 2004 18:52, Peter Rossbach wrote: > I think you can used ${catalina.base} or other system env variables > inside server.xml and context.xml > for an absolute path information. Only problem with this handling is, > don't save your server.xml oder context.xml > with the admin application. Ah, good to know! I was unaware that Tomcat substitute properties in context.xml. I dumped the properties in my servlet (an axis-based web service, actually) and there doesn't seem to be a suitable property available. But as I'm using Spring and Log4j anyway, I noticed that org.springframework.web.util.Log4jWebConfigurer in conjunction with org.springframework.web.util.Log4jConfigListener sets an appropriate property. It needs some declarations in web.xml: webAppRootKey mywebservice.root log4jConfigLocation /WEB-INF/log4j.properties Then, in context.xml It's not pretty, rather fragile, really, as it depends on the right order of evaluation. The url attribute must be evaluated after mywebservice.root is already set. > Tipp: use a db resource path outside your application, than deployer > can delete all > files without you lose the data! ;-) Thanks for reminding me. In this case it's okay to lose the data as it's read-only reference data. Michael -- Michael Schuerig The usual excuse for our most unspeakable mailto:[EMAIL PROTECTED] public acts is that they are necessary. http://www.schuerig.de/michael/ --Judith N. Shklar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running HSQLDB in-process?
On Monday 25 October 2004 21:59, Michael Schuerig wrote: > Ah, good to know! I was unaware that Tomcat substitute properties in > context.xml. I dumped the properties in my servlet (an axis-based web > service, actually) and there doesn't seem to be a suitable property > available. But as I'm using Spring and Log4j anyway, I noticed that > > org.springframework.web.util.Log4jWebConfigurer in conjunction with > org.springframework.web.util.Log4jConfigListener > > sets an appropriate property. [snip] > It's not pretty, rather fragile, really, as it depends on the right > order of evaluation. The url attribute must be evaluated after > mywebservice.root is already set. Indeed, it's not pretty and it doesn't work :-( Tomcat keeps its Properties global, not per application instance. Thus, when I tried this method yesterday it worked I had another instance of my webapp running in the same Tomcat process before. Therefore the mywebservice.root property was already set. Then, when I reloaded the webapp, the existing property is substituted for the variable in context.xml. Alas, when the web app is started for the first time, the property is not set. Michael -- Michael Schuerig Not only does lightning not strike mailto:[EMAIL PROTECTED] twice, it usually doesn't strike once. http://www.schuerig.de/michael/ --Salman Rushdie, Fury - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Remote debugging a web app with Eclipse?
I've tried to remote debug a web app with Eclipse, but didn't make the first hurdle. Apparently, Eclipse can't connect to Tomcat's JVM. I'm using Tomcat 5.5.1, J2SE 5.0 and Eclipse 3.1M3. I take it, that in some way I need to tell the JVM that it's running in debug mode and what port it ought to listen on. All I found out, though, is that there's a deprecated -Xdebug option. Is there a short tutorial somewhere on remote debugging? Michael -- Michael Schuerig Failures to use one's frontal lobes mailto:[EMAIL PROTECTED]can result in the loss of them. http://www.schuerig.de/michael/ --William H. Calvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Remote debugging a web app with Eclipse?
On Sunday 14 November 2004 17:16, George Sexton wrote: > Here is a wrapper that I use to start tomcat for remote debugging > with Eclipse. Note that the indented CATALINA_OPTS is actually one > long line in the batch file. Thanks! that was easier than I expected. I'm starting Tomcat from an ant file like this: Michael -- Michael Schuerig Face reality and stare it down mailto:[EMAIL PROTECTED]--Jethro Tull, Silver River Turning http://www.schuerig.de/michael/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Removing a webapp that crashed on startup?
During development I sometimes have the case that my webapp crashes on startup. If that happens, I stop Tomcat, remove from CATALINA_BASE everything that's related to my app, and start Tomcat again. Simply removing the rogue app from the Manager doesn't work, it raises an exception: "Encountered exception LifecycleException: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myapp] has not been started" Is there a way to remove an undead webapp without stopping and restarting Tomcat? Michael -- Michael Schuerig Those people who smile a lot mailto:[EMAIL PROTECTED] Watch the eyes http://www.schuerig.de/michael/--Ani DiFranco, Outta Me, Onto You - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing a webapp that crashed on startup?
On Tuesday 30 November 2004 17:09, Shapira, Yoav wrote: > What manager command are you trying? The manager's stop command is > not the one to use here, since as it says the context was never > started. But depending on when in the startup the context crashed, > the manager's undeploy command might be useful to you. I see I haven't been specific enough. What I meant is that I tried to undeploy a crashed app from the manager's web UI. I get the same result when I try to undeploy using the undeploy ant task. Michael -- Michael Schuerig Thinking is trying to make up mailto:[EMAIL PROTECTED]for a gap in one's education. http://www.schuerig.de/michael/ --Gilbert Ryle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5 character encoding problem
Hello! I've tried my luck with Tomcat 5.5 and found that it behaves different than 5.0.27 does as regards character encoding. Somehow the conversion from ISO-8859-1 to UTF-8 doesn't work as it should. This may well be due to a misconfiguration. See below for the JSP document and the two different output pages generated. It looks as if Tomcat 5.5 applies the ISO-8859-1 to UTF-8 conversion twice. I'm editing the JSP document with Eclipse 3.1M1 and the text file encoding is set to ISO-8859-1. I'm still pretty new to servlets, JSP, and Tomcat, so I might be overlooking something rather obvious. Michael test.jspx: >>> http://www.w3.org/1999/xhtml"; xmlns:jsp="http://java.sun.com/JSP/Page"; xmlns:c="http://java.sun.com/jsp/jstl/core"; xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"; lang='de' > http://www.w3.org/TR/xhtml-basic/xhtml1-strict.dtd"; /> Test à à à à à à " " >>> With Tomcat 5.5 (wrong) http://localhost:8080/myapp/test.jspx: >>> http://www.w3.org/TR/xhtml-basic/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; lang="de">Test ÃÂàÃÂàÃÂàÃÂàÃÂàÃÂà"ÃÂÃÂ" >>> With Tomcat 5.0.27 (correct) http://localhost:8080/myapp/test.jspx: >>> http://www.w3.org/TR/xhtml-basic/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; lang="de">Test àààààà"ÃÂ" >>> -- Michael SchuerigI was blessed with a birth and a death and mailto:[EMAIL PROTECTED] I guess I just want some say in between http://www.schuerig.de/michael/ --Ani DiFranco, Talk To Me Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5: installing outside webapps via Ant task doesn't seem to work
With the change from Tomcat 5.0.27 to 5.5 the behavior of installing an app outside of $CATALINA_HOME/webapps using the Ant deploy task doesn't seem to work. Well, at least not for me. Tomcat 5.0.27 just created a context configuration file in $CATALINA_HOME/conf/Catalina/localhost, pointing to my build directory, ~/workspace/tomtest/build In contrast, Tomcat 5.5 copies the contents of ~/workspace/tomtest/build to $CATALINE_HOME/webapps/tomtest and no context configuration file is created in $CATALINA_HOME/conf/Catalina/localhost. I'm still pretty new to servlets, JSP, and Tomcat, so I might be overlooking something rather obvious. Michael >>> >>> -- Michael Schuerig Failures to use one's frontal lobes mailto:[EMAIL PROTECTED]can result in the loss of them. http://www.schuerig.de/michael/ --William H. Calvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5: installing outside webapps via Ant task doesn't seem to work
On Thursday 02 September 2004 22:43, Remy Maucherat wrote: > On Thu, 2 Sep 2004 21:56:36 +0200, Michael Schuerig <[EMAIL PROTECTED]> wrote: [Ant deploy task copies webapps] > Yes, this particular case will work like that now, in order to > simplify quite a bit the deployer (generating a trivial xml file to > reference the context would work, but might not contain what you > expect, which is why Tomcat copies your webappp). For now, I > recommend giving a xml file to Tomcat if you want to point to an > external context. Just to make sure I understand you correctly. You mean I create a context file like this copy it to $CATALINA_HOME/conf/Catalina/localhost/tomtest.xml and wait for Tomcat to pick it up? Or do you mean an Ant target like this? It doesn't work, though, as one of war, localWar, or tag is required. When I give a localWar, it is copied to $CATALINE_HOME/webapps, but not really used (and not needed) as the docBase entry in the context config file points somewhere else. Michael -- Michael Schuerig Failures to use one's frontal lobes mailto:[EMAIL PROTECTED]can result in the loss of them. http://www.schuerig.de/michael/ --William H. Calvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5: installing outside webapps via Ant task doesn't seem to work
On Thursday 02 September 2004 23:41, Remy Maucherat wrote: > On Thu, 2 Sep 2004 23:27:59 +0200, Michael Schuerig <[EMAIL PROTECTED]> wrote: > >>description="Install application to servlet container"> > > > username="${manager.username}" > > password="${manager.password}" > > path="/${app.name}" > > config="file://${etc}/context-local.xml" /> > > > > > > It doesn't work, though, as one of war, localWar, or tag is > > required. When I give a localWar, it is copied to > > $CATALINE_HOME/webapps, but not really used (and not needed) as the > > docBase entry in the context config file points somewhere else. > > It seems there's an annoying test left somewhere. Maybe in the Ant > task itself, or it could also be a leftover check in the manager > servlet. Yes, there's a check in jakarta-tomcat-5.5.0-src/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/DeployTask.java lines 145-149 if ((war == null) && (localWar == null) && (tag == null)) { throw new BuildException ("Must specify either 'war', 'localWar', or 'tag' attribute"); } The manager servlet itself works with a context config file and a context path (not optional in this case!). Michael -- Michael Schuerig The more it stays the same, mailto:[EMAIL PROTECTED]The less it changes! http://www.schuerig.de/michael/ --Spinal Tap, The Majesty of Rock - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat5 using jsvc in a chroot jail
On Thursday 02 September 2004 23:42, [EMAIL PROTECTED] wrote: > I am trying to configure tomcat 5.0.27 to run using jsvc in a chroot > jail. I found these two publications helpful Jason Brittain, Ian F. Darwin Tomcat: The Definitive Guide Chapter 6: Tomcat Security http://www.oreilly.com/catalog/tomcat/chapter/ch06.pdf Chroot Unix Services http://www.csnc.ch/static/download/tools/Chrooting_Applications_CSNC_V2.0.pdf There are several tools, such as jailer, jailtool, and makejail. In my case, it helped that the former two support Debian packages. I haven't tried to get jsvc to work. Michael -- Michael Schuerig There is no matrix, mailto:[EMAIL PROTECTED]only reality. http://www.schuerig.de/michael/ --Lawrence Fishburn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Security: per app policy, app root relative FilePermissions?
(1) When using a SecurityManager, all permissions are managed globally in two senses. They're granted in a single policy file, conf/catalina.policy and they pertain to all installed webapps. (2) FilePermission can't be relative to the root of a particular webapp. That is my current understanding. If I'm wrong, where can I learn more? Michael -- Michael Schuerig Face reality and stare it down mailto:[EMAIL PROTECTED]--Jethro Tull, Silver River Turning http://www.schuerig.de/michael/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDT-Compiler character encoding
I've tried the following for combinations of settings, where jspx denotes the encoding declared and used in my jspx document, jsp-javaEncoding is declared in conf/web.xml, and jasper-out is the relevant line in the generated xxx_jspx.java. (1) jspx: ISO-8859-1 jsp-javaEncoding: not explicitly set jasper-out: out.write("\täöüÃ<84>Ã<96>Ã<9C>Ã<9F>\n"); (2) jspx: UTF-8 jsp-javaEncoding: not explicitly set jasper-out: out.write("\täöüÃ<84>Ã<96>Ã<9C>Ã<9F>\n"); (3) jspx: ISO-8859-1 jsp-javaEncoding: ISO-8859-1 jasper-out: out.write("\täöüÄÖÜß\n"); (4) jspx: UTF-8 jsp-javaEncoding: ISO-8859-1 jasper-out: out.write("\täöüÄÖÜß\n"); Only (3) and (4) appear correctly in the browser as "äöüÄÖÜß" (german umlauts). I don't think setting the javaEncoding should be necessary here, but I may well be misunderstanding something. Without any javaEncoding given, jasper produces UTF-8 encoded java source code and the JDT compiler supposedly accepts UTF-8 as its default input encoding. I haven't verified the latter. There seem to be two possible causes for the incorrect output the JDT compiler doesn't behave as advertised, i.e., it does not take UTF-8 as default input encoding. *Or* the JDT compiler produces character output in UTF-8 which is latter erroneously treated as ISO-8859-1. Michael -- Michael Schuerig Contests between male toads over females are mailto:[EMAIL PROTECTED] often settled by the depth of the croak. http://www.schuerig.de/michael/--John Maynard Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDT-Compiler character encoding
On Wednesday 08 September 2004 16:07, Michael Schuerig wrote: > There seem to be two possible causes for the incorrect output > > the JDT compiler doesn't behave as advertised, i.e., it does not take > UTF-8 as default input encoding. *Or* the JDT compiler produces > character output in UTF-8 which is latter erroneously treated as > ISO-8859-1. Precompiled with Ant javac, encoding="UTF-8": java: out.write("\n\nTEST\n \n\täöüÃ<84>Ã<96>Ã<9C>Ã<9F>\n\t\n\t"); decompiled class: out.write("\n\nTEST\n \n\t\344\366\374\304\326\334\337\n\t\n\t"); Server compiled (without javaEncoding set in web.xml): java: out.write("\täöüÃ<84>Ã<96>Ã<9C>Ã<9F>\n"); decompiled class: out.write("\t\303\u20AC\303\266\303\u0152\303\204\303\226\303\234\303\237\n"); Server compiled (with javaEncoding ISO-8859-1 set in web.xml): java: out.write("\täöüÄÖÜß\n"); decompiled class: out.write("\t\344\366\374\304\326\334\337\n"); Something's amiss here. Apparently, by default the JDT compiler does not take UTF-8 input correctly, rather it seems to expect ISO-8859-1. Now, is this a bug or am I misunderstanding something? Michael -- Michael Schuerig Nothing is as brilliantly adaptive mailto:[EMAIL PROTECTED] as selective stupidity. http://www.schuerig.de/michael/--A.O. Rorty, The Deceptive Self - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP on-server compilation: classpath problem?
When I deploy a JSP document with Tomcat 5.5.1 without precompiling, I get an error message when accessing the corresponding web page. >>>> org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 32 in the jsp file: /test.jspx Generated servlet error: org.apache.jsp.tag.web.selection_tagx cannot be resolved or is not a type An error occurred at line: 32 in the jsp file: /test.jspx Generated servlet error: org.apache.jsp.tag.web.selection_tagx cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) org.apache.jasper.compiler.Compiler.compile(Compiler.java:259) org.apache.jasper.compiler.Compiler.compile(Compiler.java:247) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:544) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >>>> I can precompile the document without a problem. If I don't precompile, the jasper compiler does everything it's supposed to do. The following files all exist $CATALINA_HOME/work/Catalina/localhost/myapp/org/apache/jsp/test_jspx.java $CATALINA_HOME/work/Catalina/localhost/myapp/org/apache/jsp/tag/web/selection_tagx.java $CATALINA_HOME/work/Catalina/localhost/myapp/org/apache/jsp/tag/web/selection_tagx.class For some reason, the JDTCompiler doesn't find the compiled selection_tagx.class. Michael -- Michael SchuerigThis is not a false alarm mailto:[EMAIL PROTECTED] This is not a test http://www.schuerig.de/michael/ --Rush, Red Tide - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 5.5.1: *.tag-files not working?!
On Thursday 09 September 2004 21:17, Yann Cebron wrote: > Hi, > > I deployed my applications on TC5.5.1 and can't get any *.tag-files > working anymore. > My applications run fine on 5.0.28, tried w/ nightly build 20040908 - > still no luck. I'm having the same problem with 5.5.1 on Linux (see Subject: "JSP on-server compilation: classpath problem?", no replies, unfortunately). I don't have a solution, only a workaround. For me it works to precompile JSP documents before deploying. See the excerpt from my build.xml below Michael -- Michael Schuerig Nothing is as brilliantly adaptive mailto:[EMAIL PROTECTED] as selective stupidity. http://www.schuerig.de/michael/--A.O. Rorty, The Deceptive Self - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TC 5.5.1 and Cactus?
Has anyone managed to get Cactus to work with Tomcat 5.5.1 on JDK 1.5RC? I always get stuck with java.lang.ClassFormatError: Invalid index 0 in LocalVariableTable in class file org/apache/cactus/util/log/LogAspect LogAspect is indeed an aspect compiled by AspectJ, which doesn't support JDK 1.5, yet. I was under the impression that nonetheless aspects compile to ordinary bytecode, but in this case something seems to have gone awry. In effect, I'm not sure, if it's currently possible to use Cactus with Tomcat. If it is, I'd appreciate it highly, if someone tells me how it can be done. Michael -- Michael Schuerig Airtight arguments have mailto:[EMAIL PROTECTED]vacuous conclusions. http://www.schuerig.de/michael/ --A.O. Rorty, Explaining Emotions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 5.5.1 and Cactus?
On Monday 13 September 2004 15:11, Shapira, Yoav wrote: > It's possible to use Cactus with Tomcat 4.x and 5.0.x. I haven't > tried 5.5 with Cactus yet. If I were you, I'd try to make Cactus and > Tomcat 5.5 work together first, without any aspects, and then add > those later if you want. I do get Cactus to work with Tomcat 5.0.27 (JDK 1.4.2), no problem there. It doesn't work with Tomcat 5.5.1. There, presumably the problem is caused by the "requiremended" JDK 5 (or whatever it's called today). I'm not using aspects in my own code. As far as I understand it, which isn't very far at all, the aspect stuff comes as a mandatory part of Cactus, thus I can't try without it. I don't think there's anything wrong with Tomcat 5.5.x in this regard. I had only hoped that people on this list may have encountered and possibly solved the same problem before. On the Cactus list apparently nobody and judging from bug reports, people have noticed the problem, but there's been no further comment from anyone. Michael -- Michael Schuerig Those people who smile a lot mailto:[EMAIL PROTECTED] Watch the eyes http://www.schuerig.de/michael/--Ani DiFranco, Outta Me, Onto You - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat & threads
On Friday 10 December 2004 19:11, Robert Harper wrote: > I am not familiar with Doug Lea or any of his opinions. He's the author of the book "Concurrent Programming in Java" (Addison-Wesley) and the concurrency library that has in J2SDK 5 become java.util.concurrent. > I do not have > direct control of the threading of the RMI communication. The RMI > method calls are asynchronous and I have to wait for the return > message before I can produce the display content. I have not gone too > deep into JMS to make it event driven yet. This would be my next > change after I get basic functionality. I haven't had to deal with the kind of problem myself, but maybe the following articles are helpful when you consider using JMS. http://www-106.ibm.com/developerworks/webservices/library/ws-tip-altdesign1/ http://www.javaranch.com/newsletter/200403/AsynchronousProcessingFromServlets.html Michael -- Michael Schuerig Nothing is as brilliantly adaptive mailto:[EMAIL PROTECTED] as selective stupidity. http://www.schuerig.de/michael/--A.O. Rorty, The Deceptive Self - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Making a webapp JMX-manageable?
I would like to make a simple web application manageable. Right now I'm at a loss how to do this. My problem is not so much JMX itself, but rather how to integrate into Tomcat. Some sample code would be very helpful. Michael -- Michael Schuerig The more it stays the same, mailto:[EMAIL PROTECTED]The less it changes! http://www.schuerig.de/michael/ --Spinal Tap, The Majesty of Rock - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making a webapp JMX-manageable?
On Monday 03 January 2005 00:31, Patrick Lacson wrote: > Here's a link to sample code for integrating tomcat 5.5.4 > > http://lacson.name/archives/2004/12/how_to_embed_to.html Patrick, thanks for your link. I don't currently intend to embed Tomcat, just make an app running within Tomcat manageable. The latter I figured out, among other things, through an out-of-band discussion with Peter Rossbach. I can't offer a completely general solution, though. I'm using the Spring framework (http://www.springframework.org) and had a look at the JMX support classes that are currently in the CVS sandbox directory. I found that, amazingly, with their help I could expose attributes and operations of my app to JMX without writing any code. All that is required are some declarations in the application context file (applicationContext.xml). Create an MBeanServer registered as a bean MyDomain Wrap an MBean adapter around my repositorymanager bean (not shown), which is a completely ordinary java object. In this case, public methods are exposed as attributes/operations. Alternatively, metadata can be used. Create a connector listening, by default, on service:jmx:jmxmp://localhost:9876 (this requires jmxremote_optional.jar) Maybe this was of interest to anyone... Michael -- Michael SchuerigThis is not a false alarm mailto:[EMAIL PROTECTED] This is not a test http://www.schuerig.de/michael/ --Rush, Red Tide - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]