Re: [Mav-user] Help - falling into 'jar hell' with Mav and JDOM
Responses inline... I've had a look at changing Maverick to use jdom 1.0, but as I've never used jdom myself, I am unsure what the changes should be and their implications. I've identified the three place in the Maverick code that need altered. #1 should be fine but I need help on #2 and #3. See below for what I've done so far, with some in-line comments. I gleaned most information from changes.txt in the jdom 1.0 distribution. #1 and #3 look good. See notes by #2. #2 org.infohazard.maverick.util.XML.java public static Map getParams(Element node) { ... if (value == null) { /* OLD CODE: Checks for presence of children if no value present * getChildren() now removed from v1.0 if (paramNode.hasChildren()) value = paramNode.getChildren(); else value = paramNode.getTextTrim(); */ /* NEW CODE: Since this method expects what the name/value pair * param nodes should look like (from this methods javadoc), is there * actually any need to check for child elements? */ value = paramNode.getTextTrim(); } Though the javadocs say the that a param should only look like param name= value=/, there has been support for child elements inside a param/ for a while. Not sure about others, but I know I have used this 'feature' many times in the past. With that being the case I would do something like this for #2. List paramChildren = paramNode.getChildren(); if (!paramChildren.isEmpty()) value = paramChildren; else value = paramNode.getTextTrim(); What are the thoughts of updating the jdom dependency of maverick? If there are no objections I will do the updates and do a 2.2.4 release. -- Mike : mike moulton : meltmedia : 1429 north 1st street : phoenix az 85004 : : [EMAIL PROTECTED] : mmoulton66| aim : 602.340.9440 | ofc : 602.432.2568 | cel : 602.340.1003 | fax : : meltmedia.com --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ [INVALID FOOTER]
Re: [Mav-user] Help - falling into 'jar hell' with Mav and JDOM
Regarding #2, I agree with your code changes. This is exactly what I originally had (honest!) but missed the trick with child elements and was trying to avoid the potentially unnecessary List creation. I agree on the List creation, however I don't see a way around it given the API changes. Mike, have you had the chance to test #3 against some of the more esoteric uses of the mav xml file? My personal usage is fairly straightforward, so if other users could give some feedback on this to ensure we don't break anything... #3 only effects the use of the maverick config command (command used to display the mav.xml file; used during development). I see no problems with your code change. Obviously, if all is well, I vote for these changes in a new release. I will let the list know once a release is available. -- Mike : mike moulton : meltmedia : 1429 north 1st street : phoenix az 85004 : : [EMAIL PROTECTED] : mmoulton66| aim : 602.340.9440 | ofc : 602.432.2568 | cel : 602.340.1003 | fax : : meltmedia.com --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ [INVALID FOOTER]
Re: [Mav-user] Use Apache Commons Logging instead of log4j
There have been a few global changes that have been pending for a while. For instance there was the discussion of repackaging everything to net.sf.mav.*. If I'm not mistaken there were a few other changes as well. Maybe now would be an appropriate time to readdress some of the changes including this logging change. I don't see any major problems switching to commons logging, personally I will still use log4j. Thought, Jeff, Scott, Jim? -- mike On Jun 1, 2004, at 6:56 AM, Jon Newton wrote: What is everyone's opinion on changing maverick to use the Apache Commons logging API instead of hardcoding a dependency on log4j. My reason for wanting this would be to cut down on the large number of jar files my project is accumulating.. I'd like to use java.util.logging as much as possible. This would also make maverick even more flexible.. Jon Newton Scan Business Systems 800-906-7226 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149alloc_id66op=click [INVALID FOOTER] smime.p7s Description: S/MIME cryptographic signature
Re: [Mav-user] VOTE: Make Eelco a committer
+1 On Jun 1, 2004, at 2:24 PM, Scott Hernandez wrote: +1, then he can put the link up :) - Original Message - From: Schnitzer, Jeff [EMAIL PROTECTED] I propose making Eelco a committer. I'm +1. --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 [INVALID FOOTER] smime.p7s Description: S/MIME cryptographic signature
Re: [Mav-user] Re: [Mav-cvs] maverick CHANGES.txt,1.34,1.35
On Saturday, October 11, 2003, at 10:47 AM, Schnitzer, Jeff wrote: Woo hoo, someone that wants to put together a real release process and build system! You're my hero :-) I like the maven concept, I just haven't had the time or inclination to climb its learning curve. If you're up for it, I'm +1. I'm in the same boat, I have been much to preoccupied to really dig into maven. I don't think it's a bad thing to offer both build environments. Plus it will somewhat force me, Jeff and the like to finally get our hands wet with maven. My only requirement is that users must be able to check out the project and build it without any extra configuration. Of course, Maven is supposed to help with this. BTW, you mentioned releasing a 2.2.1... but I don't believe there have been any commits (to the core) since 2.2.0. Not much point :-) Regarding changes to the mav core, I have some pending changes to XSLTransform that I talked about earlier. I have yet to commit them as I believe Ted wanted to get the cvs list up and running first. I will commit my changes shortly, unless there is some reason I shouldn't. Ted / Jeff? --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php [INVALID FOOTER]
[Mav-user] Proposed XSLTransform Modification
This is a repost as I sent it yesterday and it never showed up. Sorry if it's a duplicate for anyone. I would like to propose a minor modification to maverick that would allow XSL templates used in a XSLTransform to be loaded from a java.net.URL. Additionally, any template that was loaded from a 'file:' URL could optionally be monitored, to have the cache (if used) updated if and when the monitored file is changed. An example of how the change would effect the maverick.xml file is shown below: command name=index controller class=some.controller.package.Index / view name=success type=domify transform type=xslt path=file:/home/mmoulton/xsl/index.xsl monitored=true/ transform type=xslt path=file:/home/mmoulton/xsl/template.xsl / /view /command In this example the index.xsl would be loaded from the local path of /home/mmoulton/xsl, if this file is modified on the system, then those changes would be reflected in the compiled XSL. Similarly the template.xsl would be loaded from the local filesystem, however changes would not be detected and a maverick config reload / app server restart would be required to reflect any changes. Is this functionally beneficial to maverick as a whole? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]
Re: [Mav-user] PROPOSAL: Add Ted Husted as committer
Welcome Ted :-) Your FormProc enhancements, coupled with opt-formproc sound very promising. I look forward to using it. Your packaging question is a good one, I don't think that has been discussed in the past. Traditionally all new code was packaged under 'org.infohazard.maverick' simply because that is mavericks package. However this has lead to consistency in the api as all current opt packages are 'org.infohazard.maverick.opt'. What do you guys think? Regardless, I think now might be a good time to define some guidelines for optional packages. Whatever comes from this thread I will note and write up a documentation amendment. -- Mike On Tuesday, September 23, 2003, at 03:31 AM, Ted Husted wrote: Thanks for the votes of support =:0) I have a patch pending with FormProc now that I would like to include in our opt-formproc extension. I just left a note for Anthon Eden to see how he felt about it. FormProc caches the original input, and the patch exposes the list so controls can redisplay the erroneous input. The other enhancement I'd like to make to FormProc, and our extension, is bidirectional converters. Right now, I can pass a converter a String like 12/31/2003 and get back a Date (or a validation message). To close the loop, I'd like to pass the converted a Data and get back 12/31/2003, without any additional coding. One point I should bring up is the packaging. Since this is new development, I used net.sf.mav as the package root. I know some of you have looked the code over, but I wanted to make sure this was all right with everyone before committing it. -Ted. Schnitzer, Jeff wrote: Welcome Ted :-) Jeff Schnitzer [EMAIL PROTECTED] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. Get Ready, We're Moving Out!! - http://www.clark04.com --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]
Re: [Mav-user] PROPOSAL: Add Ted Husted as committer
+1 -- mike On Monday, September 22, 2003, at 11:34 AM, Schnitzer, Jeff wrote: I propose adding Ted Husted as a committer to Maverick. His resume precedes him; he's one of the leads of the Struts project and is the author of _Struts in Action_. He has recently offered to contribute and maintain an optional package which integrates Formproc with Maverick. I believe Ted is currently working with Java Maverick with the anticipation of porting a project to Maverick.NET. I'm +1. Jeff --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]
Re: [Mav-user] opt-jxv package in CVS
Gal, opt-jxv is now available on the anonymous cvs servers (it took 24 hours before the changes were reflected in the anon servers). I am looking into providing an alternate beandef configuration to more closely match domify. Regardless the opt-jxv package will allow you to specify the global configname to use, as well as a per view configname. I will let you know if / when I have some questions. Thanks for your help and for a good product. -- Mike On Tuesday, August 5, 2003, at 07:56 AM, Gal Binyamini wrote: Mike, Let me know if you need any help getting JXV to work with Maverick. Particularly I know JXV's default configuration differs from that of Domify in the treatment of collection (JXV inlines element by default) and I think also Maps. The beandef configuration can be overidden to generate views equivalent to those of Domify, so it would be easier to port applications from opt-domify to opt-jxv. You can read about this in the tutorial (Bean Default Configuration section). If you need help with this let me know. By the way, I can't seem to checkout the opt-jxv module... CVS sais cannot find module. I don't think there's a problem with my setup because opt-domify for instance works fine. Any idea what could be causing this? Regards Gal - Original Message - From: Mike Moulton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 9:03 AM Subject: [Mav-user] opt-jxv package in CVS I committed the initial version of an opt-jxv package into CVS. This package provides a new view type implementing JXV (http://jxv.sf.net). JXV is similar to Domify in that it provides a DOM adapted view of your model, however JXV can also provides a SAX source of your model. The friendbook-jxv example isn't fully functional, but should provide enough understanding if you have used Domify in the past. I hope to have the example fully functional soon. I will keep everyone informed of opt-jxv's status, as well as when a package release will be made available. The CVS repository is: opt-jxv -- Mike --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/ direct;at.aspnet_072303_01/01 [INVALID FOOTER] --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/ direct;at.aspnet_072303_01/01 [INVALID FOOTER] --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 [INVALID FOOTER]
Re: [Mav-user] opt-jxv package in CVS
Gal, I will look into why the anon CVS server isn't allowing access to the opt-jxv repo. -- Mike On Tuesday, August 5, 2003, at 07:56 AM, Gal Binyamini wrote: Mike, Let me know if you need any help getting JXV to work with Maverick. Particularly I know JXV's default configuration differs from that of Domify in the treatment of collection (JXV inlines element by default) and I think also Maps. The beandef configuration can be overidden to generate views equivalent to those of Domify, so it would be easier to port applications from opt-domify to opt-jxv. You can read about this in the tutorial (Bean Default Configuration section). If you need help with this let me know. By the way, I can't seem to checkout the opt-jxv module... CVS sais cannot find module. I don't think there's a problem with my setup because opt-domify for instance works fine. Any idea what could be causing this? Regards Gal - Original Message - From: Mike Moulton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 9:03 AM Subject: [Mav-user] opt-jxv package in CVS I committed the initial version of an opt-jxv package into CVS. This package provides a new view type implementing JXV (http://jxv.sf.net). JXV is similar to Domify in that it provides a DOM adapted view of your model, however JXV can also provides a SAX source of your model. The friendbook-jxv example isn't fully functional, but should provide enough understanding if you have used Domify in the past. I hope to have the example fully functional soon. I will keep everyone informed of opt-jxv's status, as well as when a package release will be made available. The CVS repository is: opt-jxv -- Mike --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/ direct;at.aspnet_072303_01/01 [INVALID FOOTER] --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/ direct;at.aspnet_072303_01/01 [INVALID FOOTER] --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 [INVALID FOOTER]
Re: [Mav-user] Login with dynamic redirect
Scenario 2, User types http://host/app/protectedCommand.m?p1=v1p2=v2p3=v3 Same idea, user is redirected to login and then if login is successfull they should be redirected through to initially selected command, only this time there are a number of URL paramters that I wish to have set, Does anyone have a simple way of acheiving this functionality. David, In general I usualy have a 'MasterController' that is extended by 'protectedCommand'. If the master controller determines that 'protectedCommand' requires a login, and the user is not yet logged in, then I re-assemble the url used to access this page, store it in a session value and redirect to the login controller. Upon successful login the login page looks to see if the session value is set, if so it redirects to that page. Another way is to have your login controller look at the referrer, analyze it to see if it came from within your application, if so, save it in the session and redirect to it upon successful login. -- Mike --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 [INVALID FOOTER]
Re: [Mav-user] FW: [Mav-domify] Java XML View 0.4
Jeff, I will take a look at JXV sometime this week. I will keep you informed of the progress on a opt-jxv module. Hopefully JXV will solve some of the problems we were trying to solve in domify. -- Mike Moulton On Tuesday, July 22, 2003, at 06:10 PM, Schnitzer, Jeff wrote: Forwarding this to a better list (the mav-domify list is obsolete and has now been removed). If Gal is actively working on JXV, it may be a better long-term solution than domify (especially with SAX support). Anyone want to take a look? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf OfGal Binyamini Sent:Monday, July 21, 20035:03 PM To: [EMAIL PROTECTED] Subject: [Mav-domify] Java XML View 0.4 I have recently released JXV 0.4, a project which supports features similar to those of Domify. JXV supports a reflective DOM tree (like Domify) as well as SAX output. It also supports reading XML back into objects (although I'm not sure how useful that would be in the context of Maverick). In tests I have performed the SAX mode scales several orders of magnitude better than JXV's and Domify's DOM trees as far as executing XSLT transformation goes. I've spoken to some members of the Domify team some time ago about trying to fit JXV into Maverick and see how it goes. I'm still interested in trying that, if some Maverick developer would like to give it a shot. JXV is available in http://jxv.sourceforge.net if you want to have a look. Regards Gal --- 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/345/0 [INVALID FOOTER]
Re: [Mav-user] [PROPOSAL] Release v2.2.0 of Maverick
Before releasing 2.2 there is a bug I noticed a while ago that doesn't seem to have been fixed. The problem is that the UNFINISHED_CONTENTTYPE isn't explicitly set when maxTransforms=0. This caused problems on some browsers, primarily IE 5.2 for Mac. To fix this I add the following lines to the getNextStep() method in MaverickContext.java. if (this.transformCount == 0) this.getRealResponse().setContentType(UNFINISHED_CONTENTTYPE); These lines were added within the 'if' statement. The new 'if' statement looks as follows. if (this.nextTransform = this.transformCount) { if (this.transformCount == 0) this.getRealResponse().setContentType(UNFINISHED_CONTENTTYPE); this.log.debug(...which is the LastStep); return new LastStep(this); } There is also a patch attached for the version contained in the 2.1.2 release. Note: This may not be the best solution to the problem. -- Mike mav-2.1.2.patch Description: Binary data On Friday, March 21, 2003, at 05:30 PM, Schnitzer, Jeff wrote: Yes, definitely worthwhile. My own projects use the latest-and-greatest third-party jars with no ill effect. I'll update the ones in CVS. With that change, is everyone comfortable with a 2.2 release? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Robert Leftwich [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 4:07 PM To: [EMAIL PROTECTED] Subject: RE: [Mav-user] Accessing the Command string from the controller - Correction At 10:09 AM 22/03/2003, Schnitzer, Jeff wrote: BTW, I recommend using the CVS copy of Maverick right now - the getParams() method has been renamed to getControllerParams(). I wonder if it is worthwhile updating some (all?) of the libs in the CVS as they are quite old and the newer versions have had significant enhancement:? Has anyone been running Maverick with the latest and greatest jdom, bean-utils, collections and log4j? Any problems? Robert --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER]
Re: [Mav-user] Content-Type and maxTransform=0
I just realized that we can't move the assignFinalContentType call out of the XSLTransform as you need to know the final content type specified (if there was one). What about also adding a specific check for this case to the getNextStep() method. Something like: if (this.nextTransform = this.transformCount) { if (this.transformCount == 0) this.getRealResponse().setContentType(UNFINISHED_CONTENTTYPE); this.log.debug(...which is the LastStep); return new LastStep(this); } -- Mike On Tuesday, February 18, 2003, at 03:09 PM, Mike Moulton wrote: Jeff, A while back I noticed that if you specify a maxTransform=0 the content type is not set. I patched my version but never submitted anything to ya as I forgot. Now I'm upgrading to the latest mav and have re-encountered the problem. The problem lies @ line 189-193 in MaverickContext.java if (this.nextTransform = this.transformCount) { this.log.debug(...which is the LastStep); return new LastStep(this); } When maxTransforms is set to 0 this block is executed without ever executing a XSLTransform object first. Right now the content type is set in two places within the nested Step class in XSLTransform. It seems to me that the problem can be solved if we move the 'assignFinalContentType()' calls out of the XSLTransform class and into the getNextStep() method in MaverickContext. Do you see any problems with doing this? Do you want me to make the changes and submit the patch? -- Mike --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]
Re: [Mav-user] additional configuration for commands
Jeff, I have no problem with that. -- Mike On Wednesday, February 12, 2003, at 12:10 PM, Schnitzer, Jeff wrote: Ah, right now there is just one set of params and each place that defines params (controller, view, transform) just adds to the pile. Perhaps different behavior is desirable. It would be easy enough to split up the params collection into three separate collections. This would change the ControllerContext interface so that instead of setParam() it would have setControllerParam(), setViewParam(), setTransformParam(), etc. Does this seem like a good idea to everyone? Jeff -Original Message- From: Taavi Tiirik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 5:18 AM To: [EMAIL PROTECTED] Subject: [Mav-user] additional configuration for commands Please enlighten me :-) I would like to specify some additional configuration parameters for my maverick commands in maverick.xml. Something like this is what I came up with: command name=orgunit controller class=ee.tvi.eris.ctl.orgunit.Orgunit param name=required-roles value=role1/ /controller ... /command This required-roles specifies that user must be authenticated and have role1 assigned to his/her account. Now this works but if I use views of type=redirect then this required-roles becomes an url parameter. Ie. if I define input view for this command like this: view name=input type=redirect path=orgunit-search.m/ then request to orgunit.m is redirected to: orgunit-search.m?required-roles=role1 I do not need this required-roles to go along with the redirect. Is there a better way to specify configuration parameters for a command. I do not want to have any additional config files, etc. with best wishes, Taavi --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com [INVALID FOOTER] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]
[Mav-user] Opt-fop and Content-Disposition header
I started playing with opt-fop for use on an upcoming project and I had a couple comments / questions I would like to ask. First I would like to thank all those involved in producing opt-fop, I think is a very valuable tool. From my quick over of the source I notice that the content type is specified based on the fop render type, however there doesn't seem to be any support for setting a Content-Disposition header. I'm sure there are many cases where the browser will automatically launch an app for the given content type, however for my use I need the browser to prompt the user to save the file with a suggested filename. Currently on browsers that don't have a handler for the supplied content type the file is saved as the name of the command executed, 'friendsPdf.m' in the case of the friendbook-fop example. Is there need by others to do the same thing? If so how should it be handled? I was thinking that we could supply a param to the transform with a filename keyword, or possibly adding an attribute to the transform tag for the filename. What about dynamically producing the filename in the controller; how could this be handled cleanly? -- Mike Moulton [EMAIL PROTECTED] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Mav-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mav-user Archives are available at http://www.mail-archive.com/
Re: [Mav-user] Opt-fop and Content-Disposition header
Jim, Thanks for the quick response, I should of realized that I can set the header from my controllers. However this made me think about times when there is no controller present. For cases like these, I think the aformentioned solution of adding the content-type and filename attributes is perfect. I also agree that if the controller sets the content-disposition header then that should take presedent over anything in the mav config. -Mike On 7/22/02 9:04 AM, jim moore [EMAIL PROTECTED] wrote: Right now it is possible to set the content-dispostion header directly from the controller. You can get the Response from the ControllerContext and then just call response.setHeader() on it. Even when the repsonse is wrapped, the setHeader() calls are passed through to the real underlying response. I think this is pretty straightforward and intuitive, so I don't think there is really a need to change it (though I am open to hearing other thoughts on this). If people still think its worthwhile to have this defined in maverick.xml, I have a couple of ideas. We could add two optional attributes to the fop transform node: filename and content-type. Filename is pretty self-explanatory. Content-type would take either inline (which would be the default) and attachment. Together these two would produce a content-disposition header something like: Content-disposition: attachment; filename=myfile.pdf So you would have a node that looked something like: transform type=fop output=pdf content-type=attachment filename=myfile.pdf/ Even if we add this, I still think the controller should take precedence. Since it runs before the transform, opt-fop could check for the presence of the content-disposition header. It would only set it if it didn't find it. Does this make sense? What are everyone's thoughts? Do you think setting the header from the controller is sufficient, or should we add these params to the transform node? --jim --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Mav-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mav-user Archives are available at http://www.mail-archive.com/
Re: [Mav-user] so quiet
+2 -Mike On 5/30/02 3:00 PM, Scott Hernandez [EMAIL PROTECTED] wrote: +1 - Original Message - From: Jeff Schnitzer [EMAIL PROTECTED] I've been thinking a bit about a little paradigm shift; instead of passing all the http objects into the Controller.perform(), I would pass a MaverickContext (or something like that) object which has methods to obtain all the basic data. In addition, it would have a setModel() and possibly a setParam() method so that there is now an additional way of passing data into views/transforms. Basically, the idea of a Param maps pretty well into every view type I can think of, so it might be nice to be able to set them programmatically from controllers. [snip] Does anyone think this worthwhile? [snip] ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Mav-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mav-user ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Mav-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mav-user