Re: [Mav-user] Multiple conditional ${wrapped}?
Indeed, the solution presented below is best, because then the browser will just cache the entire .js file. However, I've had problems using the XML shortcut for empty tags in this particular case, so always do script src=.../script Cheers, doug On Sep 1, 2004, at 4:49 PM, jim moore wrote: Why not just put all the javascript functions in a .js file and then just include that in the pages: script language=javascript src=functions.js/ --jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cyrille Bonnet Sent: Wednesday, September 01, 2004 10:07 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Multiple conditional ${wrapped}? Hi Maverick users, I have a simple problem. Of course, I'd like a simple solution :-) We use a header JSP across many JSP pages. On some of those JSP pages, we have Javascript functions available (inside the head tag), but not on all pages. We use the ${wrapped} and Maverick transformation to replace the body content on our pages. But we can't have multiple ${wrapped} in one page, so we can't use Maverick transform to replace the Javascript functions when needed. Ideally, we would have something like that in the header JSP: head c:out value=${wrapped} escapeXml=false/ -- transform this to Javascript functions -- /head body c:out value=${wrapped} escapeXml=false/ -- transform that to body content -- /body At the moment, we have the choice of several (unsatisfying) workarounds: * have all Javascript functions in all pages, * create a custom header for each set of Javascript functions Any pointer would be appreciated. Cyrille. --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click [INVALID FOOTER] --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click [INVALID FOOTER] --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click [INVALID FOOTER]
Re: [Mav-user] a new view
Hmmm...I don't want to rain on any parades, but I'm just wondering why you didn't want to use Velocity, as it accomplishes the same thing and it's already written and well-supported? --doug --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click [INVALID FOOTER]
Re: [Mav-user] Eclipse, log4j, etc.
The problem may not be directly with the BeanUtils class, but rather a class it imports. For all of our installations, we have the following commons jars in every webapp's WEB-INF/lib directory: commons-beanutils commons-collections commons-lang commons-logging Actually, that's a bit of a lie. For lang, collections, and logging, we put them in Tomcat's common/lib directory so that they don't have to be everywhere. rant This is the big problem with using anything in Jakarta commons IMHO: using anything requires using almost everything. Since that's the case, they need to just package it as one big jar, because the parts aren't really separable from the whole. And the Velocity team is actually introducing more dependency on commons in the next release, much to my dismay. /rant --doug On Feb 10, 2004, at 4:14 AM, Todd O'Bryan wrote: I put commons-beanutils.jar into the WEB-INF/lib directory, and I still get what's copied below from the webpage. Is my installation possessed or something? Todd --- HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic ationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java: 2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java: 193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process Connection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.java:666) at java.lang.Thread.run(Thread.java:552) root cause java.lang.NoClassDefFoundError: org/apache/commons/beanutils/BeanUtils at org.infohazard.maverick.ctl.ThrowawayBean2.go(ThrowawayBean2.java:39) at org.infohazard.maverick.ctl.Throwaway2.go(Throwaway2.java:48) at org.infohazard.maverick.flow.ThrowawayControllerAdapter.go(ThrowawayCon trollerAdapter.java:58) at org.infohazard.maverick.flow.CommandBase.go(CommandBase.java:44) at org.infohazard.maverick.Dispatcher.service(Dispatcher.java:237) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic ationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terChain.java:193) at
Re: [Mav-user] Eclipse, log4j, etc.
AFAICS, Tomcat (at least 4.1.18) has its own commons-beanutils.jar in its server/lib. It could conflict with the one you added to Tomcat classpath. The jars in Tomcat's server/lib directory are not visible from webapps. However, the jars in common/lib and shared/lib are. --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn [INVALID FOOTER]
Re: [Mav-user] Default page like index.m
Hmmm. I have the following in my web.xml and it works just fine: welcome-file-list welcome-fileindex.vm/welcome-file /welcome-file-list *.vm is mapped to the VelocityLayoutServlet in my webapp's web.xml. I would expect a specification of 'index.m' to work as well, since it's just running the servlet that's mapped to '*.m'. And after all, '*.jsp' is just a mapping to the JspServlet in the master web.xml in the Tomcat configuration. So, in Tomcat (at least 4.1.24), I think setting the welcome file list in web.xml appropriately should work. How can you set up the default page to work like index.jsp would without a browser redirect? Travis --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]
Re: [Mav-user] How to suppress Velocity Transforms?
I think that's a Velocity thing and not a Maverick thing. Try this in your template: $response.setContentType('text/plain') -dk On Sunday, August 24, 2003, at 03:49 PM, Dan Finkelstein wrote: Hi -- I know this is a really dumb question, esp considering that I've been using and relying on Maverick for over 1 1/2 years, but here goes anyway... Maverick transforms my Velocity templates (the .vm files) and these are displayed without any problem. What I want to do is, in one particular place, is to apply the Velocity transform, and then return it as a text/plain file instead of html. In, maverick.xml, the section looks like: command name=RemoteAccess controller class=blah.controllers.admin.RemoteAccess/ view name=success content-type=text/plain path=admin/remoteAccessResponse.vm/ /command When I run RemoteAccess.m, it is identified to the browser as html Any ideas? Thanks a lot, Dan --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 [INVALID FOOTER] --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 [INVALID FOOTER]