RE: [Mav-user] Multiple conditional ${wrapped}?

2004-09-01 Thread Schnitzer, Jeff
From Cyrille Bonnet
 
 Hi Jim,
 
 script language=javascript src=functions1.js/
 
 For page1
 
 And:
 
 script language=javascript src=functions2.js/
 
 For page2.
 
 (indications on wether to include functions1.js or functions2.js would
be
 included in maverick.xml as a transform)


There are a few ways of doing this.  

Option #1:  Specify a param in maverick.xml

view path=foo.jsp
transform path=trim.jsp
param name=scriptfile value=function2.js/
/transform
/view

And then in your trim.jsp:

script language=javascript src=${scriptfile}/


Option #2:  Pass the value from the view jsp to the transform jsp.

Since the view JSP is executed before the transform JSP, you can set
request attributes which are then available when the transform is
executed.  Look at how title is passed from welcome.jsp to trim.jsp in
the friendbook-jsp example.

In your foo.jsp:

c:set var=scriptfile scope=requestfunction2.js/c:set

And then in your trim.jsp:

script language=javascript src=${scriptfile}/


This provides a reasonable way to pass big blocks of text around.  If
you wanted to, you could use c:set to define the entire block of
javascript.  But it's usually good practice to separate out javascript
functions into separate .js files anyways because the browser will cache
it, making each response smaller.

Jeff


---
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_idP47alloc_id808op=click
[INVALID FOOTER]


RE: [Mav-user] opt-freemarker

2004-08-27 Thread Schnitzer, Jeff
 From: [EMAIL PROTECTED] [mailto:mav-user-
 [EMAIL PROTECTED] On Behalf Of Eelco Hillenius
 
 So, I hereby vote +1 for write access for Ed Ward.
 
 What about the other developers?

I'm +1.

(I just got back from a long vacation, it'll take me a while to catch up
on these threads)

Jeff


---
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_idP47alloc_id808op=click
[INVALID FOOTER]


RE: [Mav-user] VOTE: Make Eelco a committer

2004-06-04 Thread Schnitzer, Jeff
Motion carried, Eelco you should now be enabled :-)

Jeff

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:mav-user-
 [EMAIL PROTECTED] On Behalf Of Eelco Hillenius
 Sent: Thursday, June 03, 2004 2:52 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] VOTE: Make Eelco a committer
 
 Cheers people.
 
 Could someone give me a note when I have the rights?
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of jim moore
 Sent: woensdag 2 juni 2004 11:52
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] VOTE: Make Eelco a committer
 
 
 +1
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
  Mike Moulton
  Sent: Wednesday, June 02, 2004 12:07 AM
  To: [EMAIL PROTECTED]
  Subject: 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]
 
 
 
 
 ---
 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]
 
 
 
 ---
 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]



---
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]


[Mav-user] VOTE: Make Eelco a committer

2004-06-01 Thread Schnitzer, Jeff
I propose making Eelco a committer.

I'm +1.

Jeff

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:mav-user-
 [EMAIL PROTECTED] On Behalf Of Eelco Hillenius
 Sent: Tuesday, June 01, 2004 11:58 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] Use Apache Commons Logging instead of log4j
 
 If you'd give me commit rights I would be happy to do the dirty work ;)
 
 Eelco (sf id eelco12)
 
 - Original Message -
 From: Schnitzer, Jeff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, June 01, 2004 8:33 PM
 Subject: RE: [Mav-user] Use Apache Commons Logging instead of log4j
 
 
 +1 on moving to commons-logging
 -1 on moving to JDK1.4 logging
 
 What problems are there running Maverick on JDK1.3?  The only tricky
 thing is making sure you have an XML parser since it isn't builtin.
 
 The only thing preventing a move from log4j to commons-logging was the
 absence of anyone who actually wanted to use it that way (as opposed to
 a bunch of people, including myself, who just think it might be a good
 idea).  We try to follow the XP YAGNI principle, which is why Maverick
 is as simple as it is.
 
 It sounds like we now have a customer for that change.
 
 Do we have a volunteer to do the conversion?
 
 Jeff
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:mav-user-
  [EMAIL PROTECTED] On Behalf Of Scott Hernandez
  Sent: Tuesday, June 01, 2004 11:11 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [Mav-user] Use Apache Commons Logging instead of log4j
 
  Sure. +1 to changing package names and moving to commons logging, or
 java
  1.4 logging (I think we may have some problems running on 1.3 anyway,
 or
  was
  it just some of our dependencies...).
 
  It would probably be good to roll any good questions that have come up
 on
  the list into the faq, and documentation.
 
  We should get a list of changes together, but patches are always
 welcome.
  :)
 
  - Original Message -
  From: Mike Moulton [EMAIL PROTECTED]
 
 
  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?
 
 
 
 
  ---
  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_id=3149alloc_id=8166op=click
  [INVALID FOOTER]
 
 
 
 ---
 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_id66op=ick
 [INVALID FOOTER]
 
 
 
 ---
 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_id=3149alloc_id=8166op=click
 [INVALID FOOTER]



---
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]


RE: [Mav-user] using static xml files with domify

2004-03-25 Thread Schnitzer, Jeff
You don't even need Domify for this - use a trivial view and have your
controller pass one of the following as the model:

* A string containing the XML
* a java.io.Reader which will return the text XML
* a javax.xml.transform.Source
* an org.w3c.dom.Node (if you've parsed it yourself manually)

If you're pulling XML from files on the filesystem, java.io.Reader is
probably your best bet.

Jeff 



 -Original Message-
 From: Ted Malong [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 25, 2004 11:44 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] using static xml files with domify
 
 Hello,
 
 I'm new to Maverick (and admittedly relatively new to
 Java). I apologize in advance for the newbie question.
 
 I'm building a demo app with Maverick/Domify that uses
 static XML files. I noticed in the friendbook sample
 that static XML files are hardcoded into maverick.xml,
 but my app needs to dynamically specify the proper
 file to use. My controller will figure out which file
 to use from the request or by checking the last
 modified date. My question: once the controller knows
 which static XML file to use, what's the most
 efficient way to pass that on to the XSL stylesheet?
 
 The mail archives seem to hint at a number of
 different solutions, but obviously I haven't found one
 that works yet.
 
 Thanks.
 
 -Ted
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.
 http://taxes.yahoo.com/filing.html
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 [INVALID FOOTER]



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70alloc_id638op=click
[INVALID FOOTER]


RE: [Mav-user] transforms - beginner questions

2004-02-10 Thread Schnitzer, Jeff
Sorry, I just got back from a lengthy vacation (I miss Bali already!).
Answers below:

 From: Aidan Mark Humphreys [mailto:[EMAIL PROTECTED]
 
 Just beginning to work with Mav - and struggling slightly.
 
 Taking this as my example,
 
 view name=success path=raw.jsp
   transform path=hot.jsp/
 /view
 
 do I understand document transforms correctly?
 
 The view raw.jsp is configured to have a transform step.  If
 this view is selected by the controller,  raw.jsp is executed
 and its output placed in an application context attribute
 called wrapper. The exact name can be set in maveric.xml' s
 configuration section for the DocumentFiewFactory class, but by
 default it is wrapper.
 
 Hot.jsp must contain an action or a JSTL tag to retrieve the
 contents of the wrapper attribute and embed it in some
 appropriate way.
 
 The cooked result is then returned to the browser.
 
 Is this how it works?


Yes, that is how it works, but the default attribute is named wrapped.


 2nd Question:
 
 is it possible to have more than one transform step in a
 document transform? Something like:
 
 view name=success path=raw.jsp
   transform/
   pathhot.jsp/path
   pathhoter.jsp/path
   pathhotest.jsp/path
   /transform
 /view
 
 I think I read in Rod Johnson's book that it is possible in the
 case of XSLT transforms. Is there an example of this somewhere?


Yes, just use multiple transform elements like this:

view name=success path=raw.jsp
  transform path=hot.jsp/
  transform path=hotter.jsp/
  transform path=hottest.jsp/
/view


Look in the friendbook-domify example application.  It's in the
opt-domify package.




---
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] Pluggable ControllerFactory (again).

2004-02-10 Thread Schnitzer, Jeff
 From: [EMAIL PROTECTED]
 
 I had a look in the mailing list archives on the discussions
 of support for pluggable ControllerFactory-implementations.
 I'm wondering what the status on this is. Will Maverick, at
 some point, support user defined ControllerFactories? It
 would seem natural, given the flexibility given for other
 factory types within Maverick. Basically, I want to supply
 a factory that asks a PicoContainer to get the controller
 for me (without having to modify the Maverick source code).

If you're volunteering to investigate the approach :-)

Maverick evolves in an as-you-need-it kind of way.  If you have a
specific need, try to fit it into the framework - the code is very
simple and easy to understand.

I suggest kicking off the discussion by defining a set of requirements
or maybe an interface or two that you would like to see satisified.

Jeff 


---
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] Understanding View configuration

2004-02-10 Thread Schnitzer, Jeff
 From: Aidan Mark Humphreys [mailto:[EMAIL PROTECTED]
 
 Another 2 simple questions (in case anyone feels like answering
 :).

No problem :-)

 This snippet is taken from the domify friend book example.
 
   views
   view id=loginRequired path=loginRequired.jsp
   transform path=trimOutside.jsp/
   /view
   /views
 
   command name=changePassword
   controller class=...ChangePassword/
 
   view ref=loginRequired/
 
   view name=success
   transform path=changePassword.xsl/
   transform path=inside.xsl/
   /view
   /command
 
 How should  one interpret the nameless view reference in  the
 command changePassword? Does it act like a default tag in a
 switch statement - ie if the controller returns a value not
 assoicated with a view name (anything but success in this
 case), use the referenced view?


The ref is a special case.  See the documentation for the config
schema:

http://mav.sourceforge.net/maverick-manual.html#N105F4

If there is no name, it defaults to the value of ref.

If you only have a single view, you can leave off the name entirely and
that view will be rendered no matter what you return from the
controller.


 2nd question - in this example ...
 
   command name=loginSubmit
   controller class=...LoginSubmit /
 
   view name=success type=redirect/
 
   view name=error path=loginFailed.jsp
   transform path=trimOutside.jsp/
   /view
   /command
 
 What is the target of the success redirect view? Redirect to
 where?

The redirect view can either look for a path in the static config
(missing in the above example) or it can take the destination from the
controller dynamically (through the model).  Take a look at the javadocs
for RedirectViewFactory:

http://mav.sourceforge.net/api/org/infohazard/maverick/view/RedirectView
Factory.html


Jeff


---
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] How to set up transformer parameters from model?

2004-01-05 Thread Schnitzer, Jeff
Title: How to set up transformer parameters from model?









Sorry,
I dont understand  why cant you call ControllerContext.setTransformParam()?



Jeff





-Original Message-
From: Eder, Warren CONT
[mailto:[EMAIL PROTECTED] 
Sent: Monday, January 05, 2004
12:00 PM
To: [EMAIL PROTECTED]
Subject: [Mav-user] How to set up
transformer parameters from model?



I
have parameters that I want to pass to the stylesheet to build information
dynamically. In Oracle I use setParam on the XSLProcessor. The
MaverickContext has a setTransformParam but ControllerCTX is not accessable
from my model code.

Is
ther a dynamic way to pass the parameters to the Transformer from the
controller object? 

Warren
Eder 
504-697-3324


Thank
you 










RE: [Mav-user] [OT] How to deal with so called 'Jar Hell'

2004-01-05 Thread Schnitzer, Jeff
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
 This is little off topic, but somebody may already had a similar
problem.
 I have a learning/sample application which is modified friendbook with
 opt-domify and I just added Ibatis DAO and SqlMap. Initialy I have
 deployed it on JBoss-3.2.1-tomcat4.1.24 and it worked fine. A month or
so
 later, I came back to it and tried to deploy it on the latest tomcat
 (5.0.16). I got error messages on Ibatis level. Then, I tried tomcat-
 4.1.29 and got errors on controller (Maverick) level. And, when I
deploy
 the same app back to JBoss-3.2.1 everything works fine.
 All errors are related to XML parsing, I think. Is this a so called
Jar
 Hell and what is the cure?

I'm not sure there is any magical cure, just be careful.  Use the latest
1.4+ JDK so that you don't need to package your own XML parser or JAXP.


The only other advice I really have is to make sure that you understand
the classloader organization of your appserver.  Tomcat and JBoss both
work rather differently.

Jeff


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
[INVALID FOOTER]


RE: [Mav-user] How to set up transformer parameters from model?

2004-01-05 Thread Schnitzer, Jeff
Title: How to set up transformer parameters from model?









Try:



this.getCtx().setTransformParam(string,
string);



http://mav.sourceforge.net/api/org/infohazard/maverick/ctl/Throwaway2.html



3jeff





-Original Message-
From: Eder, Warren CONT
[mailto:[EMAIL PROTECTED] 
Sent: Monday, January 05, 2004
1:54 PM
To: [EMAIL PROTECTED]
Subject: RE: [Mav-user] How to set
up transformer parameters from model?





When I call ControllerContext it tells me
it is private. I guess I could put it in the same package as
MaverickContext but seems there should be another way. The error message
is listed below.











Error(49,10): variable controllerCtx has
private access in class org.infohazard.maverick.ctl.Throwaway2











My cal; looks like












this.controllerCtx.setTransformParam(string, string);





-Original Message-
From: Schnitzer, Jeff
[mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004
15:19
To: [EMAIL PROTECTED]
Subject: RE: [Mav-user] How to set
up transformer parameters from model?

Sorry,
I dont understand  why cant you call
ControllerContext.setTransformParam()?



Jeff





-Original Message-
From: Eder, Warren CONT
[mailto:[EMAIL PROTECTED] 
Sent: Monday, January 05, 2004
12:00 PM
To: [EMAIL PROTECTED]
Subject: [Mav-user] How to set up
transformer parameters from model?



I
have parameters that I want to pass to the stylesheet to build information
dynamically. In Oracle I use setParam on the XSLProcessor. The
MaverickContext has a setTransformParam but ControllerCTX is not accessable
from my model code.

Is
ther a dynamic way to pass the parameters to the Transformer from the
controller object? 

Warren
Eder 
504-697-3324


Thank
you 














RE: [Mav-user] How to handle processing that would have been in Servlet's init routine

2003-12-30 Thread Schnitzer, Jeff
Title: How to handle processing that would have been in Servlet's init routine









Nothing
prevents you from having an Initialize servlet that coexists with your Maverick
application. FWIW, most of my webapps have an Initialize servlet. 



Just create a servlet, give it a
load-on-startup, and dont map anything to it. Implement whatever you
want in the init() method.



3jeff







-Original Message-
From: Eder, Warren CONT
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003
8:47 AM
To: [EMAIL PROTECTED]
Subject: [Mav-user] How to handle
processing that would have been in Servlet's init routine



What
are best pratices in Maverick for handling things that would of been done in a
Servlet's init routine. Specifically I would like to set up connection
pooling for all future Oracle database connections.

Your
suggestions are appreciated. 

Warren
Eder 
504-697-3324











RE: [Mav-user] XSLT Support in Maverick

2003-12-22 Thread Schnitzer, Jeff
I don't quite understand what you're asking.  If you're constructing a
DOM tree yourself in the controller and setting it as the model, a
trivial view type will work fine.  If you want your POJOs converted to
a DOM automagically, look into Domify.  Note that you will want to use
xslt transforms.

As Marcel said, check out the friendbook-domify example in the
opt-domify package.  That may answer your questions.

Jeff

 -Original Message-
 From: Eder, Warren CONT [mailto:[EMAIL PROTECTED]
 Sent: Sunday, December 21, 2003 10:57 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] XSLT Support in Maverick
 
 
 I have for some time trying to get an XSLT transformation to work for
my
 specific application.  I've tryed the trivia view but I'm not
certain
 that this is what I want.  I will describe in more dtail I want the
 application to work.
 
 The model portion will get a DOM tree returned from an application
that
 accesses a database.  I would like through a view to have the DOM tree
 transformed using an .XSL based on the return code (SUCCESS, FAIL,
etc.)
 Using trivial, I have the .XSL file returned as a file instead of
using it
 to perform the transformation.  I am looking for the configuration
 information to make this work.  I am getting familiar with the
Maverick
 system by using a debugger to walk through the processing.
 
 Thanks for any help.
 
 Warren Eder
 504-697-3324
 
 
 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign up for
IBM's
 Free Linux Tutorials.  Learn everything from the bash shell to sys
admin.
 Click now! http://ads.osdn.com/?ad_id78alloc_id371op=ick
 [INVALID FOOTER]



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
[INVALID FOOTER]


RE: [Mav-user] Controllers selecting views

2003-11-11 Thread Schnitzer, Jeff
Sorry about going dark, I'm working on UXO now and it's sucking up
outrageous amounts of my time.  It's fun to get a new game to work on,
but I jumped on board at a crazy moment :-)

Right now the only way for a controller to get config information is to
examine the JDOM config document that it can obtain from the dispatcher.
It's certainly possible to build this facility though.  You just need a
list of names?

A * view should be easy to implement, just tweak
CommandMultipleViews.getView().

Jeff

 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 06, 2003 7:09 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Controllers selecting views
 
 Is it possible for a controller to obtain a list of which Views are
 registered to the instant Command? The use case is that I want the
 controller to select a View by matching it to an input parameter.
 
 A second, but related question, is how one would go about implementing
a
 * feature for Views? Which is to say, if the View requested is not
 available, use the View named * instead. (Like what the Dispatcher
 does when it can't find a Command, but for Views within Commands.) The
 use case is that I have Controllers that look for different standard
 Views, which sometimes all go to one place, but other times do not.
 
 -Ted.
 
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?   SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 [INVALID FOOTER]



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
[INVALID FOOTER]


RE: [Mav-user] Exception on maxTransforms set to x links

2003-11-04 Thread Schnitzer, Jeff
What container and version of xalan?

Jeff

 -Original Message-
 From: Torres, Carlos [AM] [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 4:22 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Exception on maxTransforms set to x links
 
 I started playing with the friendbook-domify example and I'm getting
the
 following exception when I click on the maxTransforms set to 0 or
 maxTransforms set to 1 links:
 org.apache.xml.utils.WrappedRuntimeException: The output format must
have
 a '{http://xml.apache.org/xalan}content-handler' property!
 
 Any ideas?
 
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?   SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 [INVALID FOOTER]



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
[INVALID FOOTER]


RE: [Mav-user] excel

2003-11-04 Thread Schnitzer, Jeff









Put an output-type attribute
on the transform element like this:



view name=foo

 transform path=blah.xsl
output-type=application/vnd.ms-excel/

/view



You can see the various options in the javadocs
for XSLTransformFactory:



http://mav.sourceforge.net/api/org/infohazard/maverick/transform/XSLTransformFactory.html



Jeff





-Original Message-
From: Paul Knepper
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003
10:12 AM
To: [EMAIL PROTECTED]
Subject: [Mav-user] excel





I am using betwixt and domify. I want to reuse the
same controller to either output html (which I already do) and excel.











I added another command which uses a different xsl to format
for comma separated value. But, the output method is text so it just
shows as text in the browser. How do I change the content type so the
browser things the response is application/vnd.ms-excel?











Thanks,





Paul


















RE: [Mav-user] Lost session problem ...again

2003-10-31 Thread Schnitzer, Jeff
AFAIK, the only official way the servlet spec allows to encode a session
id in a URL is this:

a href=%= response.encodeURL(gruopslist.m) %Manage groups/a

See if that works.

Jeff

 -Original Message-
 From: Steve Smith [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 1:44 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Lost session problem ...again
 
 Hi, I started playing with maverick a couple of months
 ago. After some test applications, I decided to use it
 in a project.
 In my pc (win2k, jboss3.2.1_tomcat4.1.24) everything
 works fine. But in a Solaris, I lose the session. I
 use the jsessionid in the URL. Without Maverick, it
 works, but even with the updated version from cvs of
 Maverick, it doesn't. Any suggestion?
 
 Here are some scripts:
 -The failure of Controller to get an attribute from
 the session:
 
 String ust =
 (String)this.getCtx().getRequest().getSession().getAttribute(usrid);
 log.info(--- GroupsList: userid=+ust);
 
   ..always returns userid = null
 
 - maverick.xml:
   views
   view id=grplist path=GroupsList.jsp
   /view
   /views
   commands
   command name=groupslist
   controller class=project.mav.GroupsList/
   view name=loginFailed ref=loginFailed/
   view name=success ref=grplist
   /view
   /command
   /commands
 
 
 - main page:
 % String sessionid = request.getSession().getId(); %
 a class=menu
 href=groupslist.m;jsessionid=%=sessionid%Manage
 groups/a
 
 if i use href=GroupsList.jsp;jsessionid=%sessionid%
 without any use of maverick, it works.
 
 thanks
 stefka
 
 __
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 http://launch.yahoo.com/promos/britneyspears/
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?   SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 [INVALID FOOTER]



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
[INVALID FOOTER]


RE: [Mav-user] RedirectView#go

2003-10-27 Thread Schnitzer, Jeff
The behavior is intended to allow the base path (aka target) to be
specified in the sitemap file, but also allow it to be overridden.

These are the cases:

1) User specified path in maverick.xml and that's it.

2) User specified path in maverick.xml and wants to add parameters by
setting view params.

3) User specified path in maverick.xml and wants to add parameters by
setting a Map as the model

4) User wants to override path in maverick.xml (or didn't specify it in
the first place) and sets a String as the model.  Any view params are
additionally interpreted as parameters to add.

The problem with using toString() on the model is that it would force
the user to explicitly setModel(null) for cases 1  2.

I don't think there is a problem with the original target being added to
itself... I use all of these cases myself.

Jeff


 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 27, 2003 2:37 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] RedirectView#go
 
 On RedirectView, if the model is neither a Map nor a String, should
 model.toString() be used instead? ?
 
 I could make the change, if we that's what we want.
 
 And should we do nothing if the model is null (WARN in the log?), or
 just NPE?
 
 As it stands, in the case of a null model or model!-Map  !-String,
it
 appears that the original target would be added to itself!
 
 
 
 public void go(ViewContext vctx)  throws IOException, ServletException
{
  String result = this.target;
 
  if (vctx.getModel() instanceof Map)
  {
result = this.addQueryParams(result, (Map)vctx.getModel());
  }
  else if (vctx.getModel() instanceof String)
{
   result = (String)vctx.getModel();
}
 
  // Now, a separate step
  result = this.addQueryParams(result, vctx.getViewParams());
 
  // Just in case we need a session id
  result = vctx.getRealResponse().encodeRedirectURL(result);
 
  vctx.getRealResponse().sendRedirect(result);
}
 
 
 
 -Ted.
 
 
 
 
 ---
 This SF.net email is sponsored by: The SF.net Donation Program.
 Do you like what SourceForge.net is doing for the Open
 Source Community?  Make a contribution, and help us add new
 features and functionality. Click here: http://sourceforge.net/donate/
 [INVALID FOOTER]



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
[INVALID FOOTER]


RE: [Mav-user] transformer error

2003-10-27 Thread Schnitzer, Jeff
Looks like the oracle XSL library isn't capable of transforming from a
DOMSource.  Sounds like a lousy implementationof JAXP; I recommend using
the latest Xalan instead.

This useful document explains how to switch, among other things:

http://java.sun.com/xml/jaxp/faq.html

Jeff


 -Original Message-
 From: Paul Knepper [mailto:[EMAIL PROTECTED]
 Sent: Sunday, October 26, 2003 11:09 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] transformer error
 
 maverick Version 2.2.0
 opt-domify Version 2.0.2
 domify 1.0.1
 OC4J 9.0.3
 
 Hello,
 
 I'm trying to run the opt-domify example under OC4J.  The welcome page
 comes up fine.  When I select sign-up I get the following error.  Any
 ideas?
 
 Thanks,
 Paul
 
 10/26/03 8:24 AM fb: Servlet error
 javax.xml.transform.TransformerException: XSL-1101: (Fatal Error)
 DOMSource node as this type not supported.
 at
 oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:725)
 at
 oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:196)
 at

org.infohazard.maverick.transform.XSLTransform$Step.go(XSLTransform.java
:2
 50)
 at

org.infohazard.maverick.opt.view.DomifyViewFactory$DomifyView.go(DomifyV
ie
 wFactory.java:111)
 at

org.infohazard.maverick.flow.ViewWithTransforms.go(ViewWithTransforms.ja
va
 :39)
 at
 org.infohazard.maverick.flow.CommandBase.go(CommandBase.java:57)
 at
 org.infohazard.maverick.Dispatcher.service(Dispatcher.java:237)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for

J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatch
er
 .java:721)
 at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for

J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletReques
tD
 ispatcher.java:306)
 at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for

J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.j
av
 a:767)
 at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
 at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
 at

EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
r.
 java:803)
 at java.lang.Thread.run(Thread.java:534)
 
 
 ---
 This SF.net email is sponsored by: The SF.net Donation Program.
 Do you like what SourceForge.net is doing for the Open
 Source Community?  Make a contribution, and help us add new
 features and functionality. Click here: http://sourceforge.net/donate/
 [INVALID FOOTER]



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
[INVALID FOOTER]


RE: [Mav-user] NoClassDefFoundError: org/infohazard/domify/DOMAdapter

2003-10-24 Thread Schnitzer, Jeff
Looks like you're missing domify.jar.  It needs to be in WEB-INF/lib
along with the maverick jars.

Jeff

 -Original Message-
 From: Paul Knepper [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 24, 2003 1:34 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] NoClassDefFoundError:
org/infohazard/domify/DOMAdapter
 
 [EMAIL PROTECTED] Version 2.2.0
 opt-domify Version 2.0.2
 OC4J 9.0.3
 
 I get the following error when trying integrate opt-domify.
 
 java.lang.NoClassDefFoundError: org/infohazard/domify/DOMAdapter
   at

org.infohazard.maverick.opt.view.DomifyViewFactory.init(DomifyViewFact
or
 y.java:51)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
   at

sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
cc
 essorImpl.java:39)
   at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tr
 uctorAccessorImpl.java:27)
   at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
   at java.lang.Class.newInstance0(Class.java:308)
   at java.lang.Class.newInstance(Class.java:261)
   at

org.infohazard.maverick.flow.MasterFactory.defineViewFactories(MasterFac
to
 ry.java:142)
   at
org.infohazard.maverick.flow.Loader.loadModules(Loader.java:196)
   at
org.infohazard.maverick.flow.Loader.loadDocument(Loader.java:155)
   at org.infohazard.maverick.flow.Loader.init(Loader.java:88)
   at
 org.infohazard.maverick.Dispatcher.reloadConfig(Dispatcher.java:281)
   at org.infohazard.maverick.Dispatcher.init(Dispatcher.java:188)
   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for

J2EE].server.http.HttpApplication.loadServlet(HttpApplication.java:1956)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for

J2EE].server.http.HttpApplication.findServlet(HttpApplication.java:4355)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for

J2EE].server.http.HttpApplication.getRequestDispatcher(HttpApplication.j
av
 a:2484)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for

J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.j
av
 a:617)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
   at

EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
r.
 java:797)
   at java.lang.Thread.run(Thread.java:534)
 
 
 Here is a simple maverick.xml file:
 maverick version=2.0 default-view-type=domify default-transform-
 type=xslt
  modules
   view-factory type=domify
 provider=org.infohazard.maverick.opt.view.DomifyViewFactory/
  /modules
  commands
   command name=test
view path=test.html/
   /command
  /commands
 /maverick
 
 Before I tried to integrate opt-domify I had default view type and
default
 transform of document.  A call to url/test.m worked fine and just
showed
 my static html.  Now it throws the exception shown above.
 
 Thanks,
 Paul
 
 
 ---
 This SF.net email is sponsored by: The SF.net Donation Program.
 Do you like what SourceForge.net is doing for the Open
 Source Community?  Make a contribution, and help us add new
 features and functionality. Click here: http://sourceforge.net/donate/
 [INVALID FOOTER]



---
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
[INVALID FOOTER]


RE: [Mav-user] jsessionid's in redirects

2003-10-15 Thread Schnitzer, Jeff
BTW, another way (which works right now) is to call setModel() with the
full URL (including the sessionid) from your controller.  Redirect views
are smart about that.

Jeff

 -Original Message-
 From: Marcel Kung [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 15, 2003 12:42 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] jsessionid's in redirects
 
 Thanks, I got around it in the meantime by using response.sendRedirect
 with
 the jsessionid included in the URL. It works but not as elegant as
your
 fix.
 Looking forward to the next release.
 
 Cheers,
 Marcel
 
 - Original Message -
 From: Schnitzer, Jeff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, October 16, 2003 7:14 AM
 Subject: RE: [Mav-user] jsessionid's in redirects
 
 
 Ah, redirect views need to call response.encodeRedirectURL().  I've
 fixed this in CVS.  That should solve your problem, sorry 'bout that.
 
 Jeff
 
  -Original Message-
  From: Marcel Kung [mailto:[EMAIL PROTECTED]
  Sent: Sunday, October 12, 2003 8:28 PM
  To: [EMAIL PROTECTED]
  Subject: [Mav-user] jsessionid's in redirects
 
  Hi there,
 
  Is there anyway in the maverick.xml config with redirect views of
the
 form
 
  view name=success type=redirect path=command.m/
 
  to include a dynamic jsessionid as part of the redirected URL. eg.
  command.m;jsessionid=abcdefghijkl.
 
  Currently in my webapp if cookies are turned off - this only occurs
in
  Mozilla strangely enough, IE appears to ignore the cookies disabled
  setting
  for sessionid's -  the session id is missing in my redirects and
 therefore
  the current session's (login name etc) attributes are not available.
 
  Cheers,
  Marcel
 
 
 
  ---
  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]
 
 
 
 ---
 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]
 
 
 
 
 ---
 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]



---
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]


RE: [Mav-user] Re: [Mav-cvs] maverick CHANGES.txt,1.34,1.35

2003-10-11 Thread Schnitzer, Jeff
 From: Ted Husted [mailto:[EMAIL PROTECTED]
 
 Does anyone have any strong negative feelings toward Maven?
 http://maven.apache.org
 
 It's been spreading like Borg lately. I haven't had to use it much
 myself yet, but the handwriting is on the wall, and so I'm reconciling
 myself to the inevitable. :)
 
 If there weren't any objections, I thought I might try setting up the
 appropriate configuration files. This would not disturb anything we
have
 now, only provide an alternative build/documentation mechanism. If we
 like it, we could then keep it and use it for 2.2.1/2.3. Otherwise,
I'll
 retract it.

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.

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 :-)

I like the versioning scheme you described, which is what Orion has been
using for aeons now.  Releases always have increasing version numbers,
but new ones are labeled experimental and after-the-fact some are
labeled stable.  I'm not sure how well sourceforge's system supports
that model, can we just rename releases with -experimental or -stable?

Jeff Schnitzer
[EMAIL PROTECTED]


---
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]


RE: [Mav-user] help understand friendbook-domify example-login()

2003-10-11 Thread Schnitzer, Jeff
DOH!!!

I just realized that I never made a release of opt-domify after the
major revision of the login process in the controllers (released with
maverick 2.2.0).  Same with opt-velocity.  The CVS versions work fine,
of course, but the releases are wrong.

I've just made a release of 2.0.2 of opt-domify.  That should clear up
any confusion.

I'll make a new release of opt-velocity and include the updated version
of velocity-tools.jar.

Sorry 'bout that!  How embarrassing :-)

Jeff


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 10, 2003 9:10 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] help understand friendbook-domify example-login()
 
 Hi,
 
 I am going through the friendbook-domify example and need help
 understanding how login is performed.
 
 this is from maverick.xml:
 
 views
   view id=loginRequired
   transform path=loginRequired.xsl/
   transform path=outside.xsl/
   /view
 
   view id=loginFailed
   transform path=loginFailed.xsl/
   transform path=outside.xsl/
   /view
   /views
 
 ...
   command name=friends
   controller
 class=org.infohazard.friendbook.ctl.Friends/
 
   view ref=loginRequired/
   view ref=loginFailed/
 
   view name=success
   transform path=friends.xsl
   param
name=ActiveUserStyleAttrs
 value=background-color: yellow;/
   /transform
   transform path=inside.xsl/
   /view
   /command
 
 I am going through scanrio when non existing combination
login/password is
 submitted.
 
 Now, controller classes extend on several levels:
 Friends-Protected-Gatekeeper-ControllerAuth-ControllerErrorable
 
 There is a class LoginSubmit that also extends ControllerAuth. Is this
 class used in login process in command 'friends'?
 
 I can not trace trough method calls that protected boolean
login(String
 login, String password) was called and how is failedLogin view chosen.
 
 Thanks,
 
 Shrek
 
 
 
 ---
 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]



---
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]


RE: [Mav-user] relative paths under Maverick...

2003-10-06 Thread Schnitzer, Jeff
Remember that images are loaded by the browser, not Maverick, so
pathnames must be relative to what the browser thinks the root is.

The browser is getting an html page by accessing something like
/yourCmd.m.
If the html page has an img reference to ../images/blah.gif, then the
browser will try to load /../images/blah.gif.

This is a bit of a tricky problem that applies to any MVC webapp
framework.  It gets even trickier if you try to group your commands with
extra path at the beginning.  Two approaches:

Put relative paths in all your templates, images/blah.gif.  This will
look kinda funny with your JSPs in a jsp/ directory, and will cause
trouble if you use html editors.  You can solve this with a symbolic
link jsp/images/ to ../images, or by putting your JSPs at the top level.

Put absolute paths in all your templates, /images/blah.gif.  This will
break editors and cause additional trouble if you are mounting your
webapp anywhere besides the root of the appserver (ie,
http://yourhost/foo/).  You can get around the latter problem in JSP by
crafting your image tags like this:  img src=%=
request.getContextPath() %/images/blah.gif/ but that is insanely
ugly.

This part of the servlet spec isn't very well thought out, IMHO.

I advise using relative paths everywhere.

Jeff

 -Original Message-
 From: Ed Thompson [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 06, 2003 12:25 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] relative paths under Maverick...
 
 I started playing wqith maverick under windows 98.  When I first wrote
 the web app (pre-Maverick)with the following directory struture:
 
 root/
 |---jsp/
 |---images/
 |---styles/
 
 I referenced the images from my jsp (under the jsp directory) like
this:
 
 ../images/imagename.gif
 
 When I refactored the app under win98 Maverick, I had to chnage the
 refernce:
 
 images/imagename.gif
 
 I assumed that is becuase Maverick somehow chnaged the relative path
of
 my jsp to the root?
 
 But then I moved th app to linux, and now even under Maverick I have
to
 chnage the reference back to:
 
 ../images/imagename.gif
 
 What am I missing here?
 
 
 
 
 ---
 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] Proposed XSLTransform Modification

2003-10-06 Thread Schnitzer, Jeff
If you need this, it sounds fine to me.  Probably want to make the
attribute monitor rather than monitored.  

I think we also got a quorum for the package renaming - Ted, want to
kick that off?

Jeff

 -Original Message-
 From: Mike Moulton [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 02, 2003 5:13 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Proposed XSLTransform Modification
 
 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]



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] Enforcing users through maverick

2003-09-29 Thread Schnitzer, Jeff
 From: Travis Reeder [mailto:[EMAIL PROTECTED]
 
 I just finished converting an application to use maverick, but now
when
 people go to the old .jsp version of the page, it errors because it's
 expecting it to go through maverick.  Is there any way to catch this
 other than putting a check into each jsp page?

What do you want to happen when a user directly links to a JSP page?

The usual answer is to block access to the templates using the security
constraints in web.xml.  Either block *.jsp (if you can) or the
directory in which you have put your templates.

It sounds like you already have published links and you're trying to
figure out how to maintain backwards compatibility.  There are a lot of
differing opinions on how to go about doing that, but in your case I
recommend a servlet filter that issues a redirect if you're accessing a
jsp without going through maverick.

Jeff


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] Multiple shunts [1] and more dynamic LanguageShuntFactory [2]

2003-09-25 Thread Schnitzer, Jeff
#1 has to be addressed by a custom ShuntFactory.  You can't have
multiple mode attributes, but the value of a mode attribute can be a
composite:

command name=runQuery
  controller class=org.foo.Query/
  view name=success mode=content:wap
path=wap/en/queryResults.jsp/
  view name=success mode=content:wap,lang:fr
path=wap/fr/queryResults.jsp/
  view name=success mode=content:wap,lang:de
path=wap/de/queryResults.jsp/
  ... etc
/command

It's just a question of how smart you want the ShuntFactory to be.  I'm
not sure it's possible to provide a generic tool in the Maverick package
because everyone will likely want to handle the edge cases (in
particular, the defaulting process) differently.

It's super easy to make a ShuntFactory, so I just figure that anyone who
needs something more sophisticated than LanguageShuntFactory can build
their own custom logic.

Jeff Schnitzer
[EMAIL PROTECTED]


 -Original Message-
 From: Aapo Laakkonen [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 25, 2003 5:16 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Multiple shunts [1] and more dynamic
 LanguageShuntFactory [2]
 
 [1]

http://www.mail-archive.com/[EMAIL PROTECTED]/msg00584.html
 [2]

http://www.mail-archive.com/[EMAIL PROTECTED]/msg00545.html
 
 Has anyone done anything to these? I could do a patch to
 LanguageShuntFactory [2] to have override capability depending on
 Session language attribute.
 
 What should we do to case [1]?
 
 
 
 ---
 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] JSP vs XSLT performance

2003-09-25 Thread Schnitzer, Jeff
 From: Dave Hahn [mailto:[EMAIL PROTECTED]
 
 Has anyone compared performance of a 2-step JSP transformation with a
 similar 2-step XSLT transformation?  Being as JSPs are really servlets
 with a bunch of print and tag start/end calls, it would seem to have
an
 easier task than XSLT transformations.  Is it a wash?

Depends on the transformation.  A simple XSLT which takes SAX events in
and does little more than substitution of certain elements will be
blazingly fast.  A complicated XSLT which has to do a lot of buffering
and recursion could take hours.

In general for web usage, XSLT is not as fast as other templating
technologies.  This may or may not be a problem depending on your
expected traffic.

Jeff Schnitzer
[EMAIL PROTECTED]


---
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

2003-09-23 Thread Schnitzer, Jeff
 From: Mike Moulton [mailto:[EMAIL PROTECTED]
 
 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?

FWIW, I'd like to see everything migrated over to net.sf.mav.*
eventually.  It would be a pretty big PITA though.  Not sure how
worthwhile it would be to move the core.

 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.

How about getting rid of the opt and just have packages like this:

net.sf.mav.formproc.*

?

Jeff


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] I18n/l10n

2003-09-23 Thread Schnitzer, Jeff
 From: Aapo Laakkonen [mailto:[EMAIL PROTECTED]
 
 I would like to know what do you think is the best way to write
 localized messages in web application. I have a few possibilities:
 
 4. Ant task that does the replaces and deploys each
language in it's own dir and then use Maverick's
shunting.

I've been thinking more and more about using XSL at compile-time to
generate Velocity templates which have all the header, navbar, etc type
formatting.  It seems like it would be easy to add an
internationalization step too.  This would probably offer more
flexibility than using ant's substitution mechanism.

Jeff


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


[Mav-user] PROPOSAL: Add Ted Husted as committer

2003-09-22 Thread Schnitzer, Jeff
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]


[Mav-user] RE: Maverick

2003-09-22 Thread Schnitzer, Jeff
Title: Maverick









I
recommend subscribing to the mav-user mailing list:



http://lists.sourceforge.net/lists/listinfo/mav-user



But to answer your question, you want to
use the trivial view type. No need for Domify, which is
designed to take a normal JavaBean and turn it into a DOM tree. With trivial,
just set the DOM as the model and off you go



Jeff







-Original Message-
From: Eder, Warren CONT
[mailto:[EMAIL PROTECTED] 
Sent: Monday, September 22, 2003
11:39 AM
To: Schnitzer, Jeff
Subject: Maverick



I
have been evaluating Maverick as framework for a project to support Navy
Reserve Medical community. I like the technology and the minimilist
approach taken. I am concerned about what happen to Maverick in the next
year or two (not as concerned long term).

My
application will use Oracle XSQL utility which can bring data from the database
in a DOM tree. Would like to pass the DOM tree to a view and have it
transformed using an XSLT stylesheet. I have tried to use Domify to do
this but have to customize it. Is there a way to pass a DOM tree instead
of Domify object that has a reference to the DOM tree.

I
would consider adding a little to make it more forgiving when the configuration
files are not correct and to support the DOM interface.

Your
assistance is appreciated. 

Warren
Eder 
504-697-3324











RE: [Mav-user] RE: Default page like index.m

2003-09-12 Thread Schnitzer, Jeff
 From: Charles N. Harvey III [mailto:[EMAIL PROTECTED]
 
 The ideal solution is the the servlet container would look through
 the config file of the MVC controller you are using.  So, in web.xml
 you would define index.m as the default page.  Then your container
 would look at your maverick.xml file and find the mapping for index.m
 that points to com.mycompany.project.HomeController.  Then you
wouldn't
 have to have an index.jsp/.vm/.html.
 
 I'm not crazy, I realize how difficult that would be for the servlet
 container.  So I would recommend to keep using index files in the top
 level directory that point to the default servlet mapping.

I would think much, much simpler than that would be to have a
force-welcome-page (or somesuch) element in the container web.xml which
can be used instead of the welcome-file-list.

force-welcome-pagewelcome.m/force-welcome-page

Instead of searching for a welcome file, it would just take blah/ and
convert it to blah/welcome.m.

I guess this would be pretty easy to implement with a ServletFilter.

Jeff Schnitzer
[EMAIL PROTECTED]


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] how to get the commands list

2003-09-09 Thread Schnitzer, Jeff
Simply having derived your own dispatcher then yes, your object should still be 
available in the ServletContext.  But what did you override?  Did you override init() 
without calling the superclass method?

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Pierre de Soyres [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 09, 2003 12:39 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] how to get the commands list
 
 I tried to do so, but the object that i get is null.
 I use my own Dispatcher named AdminDispatcher that inherit from maverick
 Dispatcher. Does my Dispatcher should be also available as the
 ServletContext attribute key Dispatcher.MAVERICK_APPLICATION_KEY ?
 
 On Fri, 22 Aug 2003 13:21:28 -0700, Schnitzer, Jeff [EMAIL PROTECTED]
 wrote:
 
  The Dispatcher has a method that obtains the (transformed, if you are
  using that feature) configuration document as a JDOM object.
 
  You can get the Dispatcher from the application attribute context using
  the key Dispatcher.MAVERICK_APPLICATION_KEY.
 
  Document doc = ((Dispatcher)this.getCtx().getServletContext()
  .getAttribute(Dispatcher.MAVERICK_APPLICATION_KEY)).getConfigDocument();
 
  Enjoy :-)
 
  Jeff Schnitzer
  [EMAIL PROTECTED]
 
  -Original Message-
  From: Pierre de Soyres [mailto:[EMAIL PROTECTED]
  Sent: Friday, August 22, 2003 6:41 AM
  To: [EMAIL PROTECTED]
  Subject: [Mav-user] how to get the commands list
 
  hello,
 
  i was wondering if there was any way to, from a Controller, get the
  commands list setted in the maverick.xml config file.
 
  Thanks.
  --
  --
  Pierre de Soyres
  Ingénieur d'études
  e-Manation
 
  14 Bd du Maréchal Juin
  44100 Nantes
 
 
  FRANCE
  Tel: +33 (0)2 40 43 06 11
  Fax: +33 (0)2 40 43 30 02
  --
 
  *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 *-
  Les informations contenues dans ce courrier electronique et dans les
  fichiers
  qui y sont attachees sont confidentielles et peuvent etre protegees
  legalement.
  Elles ne sont adressees qu'au destinataire. L'acces a ce courrier
  electronique
  par toute autre personne n'est pas autorise. Si vous n'etes pas le
  destinataire voulu, toute divulgation, copie ou diffusion de ce
 courrier
  electronique est interdite et peut etre illegale.
  Sauf mention contraire dans le corps du message, la presence de cette
  note
  prouve egalement que ce message electronique a ete verifie par un
  logiciel
  anti-virus.
  *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 *-
  This email and any attached file are confidential and intended solely
  for
  the use of the individual or entity to whom they are addressed.
  Accessing this email by anyone else than the recipient is forbidden and
  may
  be illegal.
  If you received this email by error please notify the system
  administrator.
  This footnote also confirms that this message has been scanned by an
  anti-
  virus
  software.
  *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 *-
 
 
 
 
  ---
  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]
 
 
 
 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 Les informations contenues dans ce courrier electronique et dans les
 fichiers
 qui y sont attachees sont confidentielles et peuvent etre protegees
 legalement.
 Elles ne sont adressees qu'au destinataire. L'acces a ce courrier
 electronique
 par toute autre personne n'est pas autorise. Si vous n'etes pas le
 destinataire voulu, toute divulgation, copie ou diffusion de ce courrier
 electronique est interdite et peut etre illegale.
 Sauf mention contraire dans le corps du message, la presence de cette note
 prouve egalement que ce message electronique a ete verifie par un logiciel
 anti-virus.
 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 This email and any attached file are confidential and intended solely for
 the use of the individual or entity to whom they are addressed.
 Accessing this email by anyone else than the recipient is forbidden and
 may
 be illegal.
 If you received this email by error please notify the system
 administrator.
 This footnote also confirms that this message has been scanned by an anti-
 virus
 software

RE: [Mav-user] Display data using JSP

2003-09-03 Thread Schnitzer, Jeff
The model is placed in (by default) the request attribute collection.
If you want to use embedded JSP scriptlets, the expression is:

%= ((YourModel)request.getAttribute(model)).getClients().getName() %

However, be careful about NullPointerExceptions if part of the chain
breaks down.  Personally I find the JSTL taglibs to be much, much more
pleasant.

If you're feeling adventurous, the JSP2.0 stuff in Tomcat5 is almost
Velocitylike.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Marco Pas [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 03, 2003 10:30 AM
 To: '[EMAIL PROTECTED]'
 Subject: [Mav-user] Display data using JSP
 
 Hi,
 
 i was wondering if it  was possible to display data that has been
 retrieved
 bij controllers/handlers in the following manner:
 
 %=controllername.attribute%
 
 so lets say i have a controller called getClients with attribute Name.
 Can i call %=getClients.name%
 
 What is the most easiest way to display the data ?
 Do i need to use the taglibs as mentioned in the friendbook example ?
 
 Kind Regards,
 Marco
 
 
 ---
 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] Default page like index.m

2003-08-29 Thread Schnitzer, Jeff
 From: Travis Reeder [mailto:[EMAIL PROTECTED]
 
 How can you set up the default page to work like index.jsp would
without
 a browser redirect?

This should probably be a FAQ.  As cheesey as it sounds, create an
index.jsp with the content:

jsp:forward page=welcome.m/

Sun offered us no way to use a servlet as a default page, so it has to
be either a html or a jsp page :-(

Jeff


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] Default page like index.m

2003-08-29 Thread Schnitzer, Jeff
 From: Travis Reeder [mailto:[EMAIL PROTECTED]
 
 Yes, it should be in the FAQ, I think the docs need a lot of work, I'm
 finding myself looking into the friendbooks code a LOT and trying to
 guess what is happening.
 
 I'll keep a list of things I think should be in there, i'm starthing a
 brand new project and i'll list the things that I'm going through to
get
 it rolling.

That would be great.

I've added this question to the FAQ in CVS, and will roll out a new set
of docs to the website soon.

Jeff


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] forwarding to a global view without having to have it in command

2003-08-29 Thread Schnitzer, Jeff
 From: Travis Reeder [mailto:[EMAIL PROTECTED]
 
 I noticed in the friendbook example that almost every command has
 
 view name=loginRequired ref=loginRequired/
   view name=loginFailed ref=loginFailed/
 
 Is there anyway to forward to those in the code without having to have
 them in all the commands?

This comes up every so often (hey, another FAQ).  The short answer is
that Maverick 1.0 used to make all global views implicitly available
from all commands, and it caused a lot of user mistakes.  So after some
discussion we changed this behavior.  If you are trying to make your
config file a bit more terse, I suggest using an XSLT transform on the
config file (with the configTransform init-param).

Here's the last time it came up:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg00295.html

Jeff Schnitzer
[EMAIL PROTECTED]


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] forwarding to a global view without having to have it in command

2003-08-29 Thread Schnitzer, Jeff
 From: Travis Reeder [mailto:[EMAIL PROTECTED]
 
 Hmm, kind of a pain.  I'll have 4 views per command.  ex: nosite,
 noaccess, loginRequired, success.

In that case, I strongly suggest using a simple XSLT transform on your
config file.  This facility provides you the flexibility of essentially
defining your own format.

 Don't the benefits of having the global views outway the mistakes that
 few users might make?

As one of the people who answers support questions to this mailing list,
the tradeoff was a no-brainer :-)  Actually, I found that I ended up
making mistakes a few times myself, and that cinched it. 

 If you have multiple views and one does not have a name, does that one
 get named success?

No.  This will be flagged as an error condition.  If you have multiple
views, they must all have names.

Jeff


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] Can you access the model in the trim / transform?

2003-08-29 Thread Schnitzer, Jeff
 From: Travis Reeder [mailto:[EMAIL PROTECTED]
 Subject: [Mav-user] Can you access the model in the trim / transform?
 
 If not, how can you get at variables in the transform?

What kind of transform?

In document transforms (JSP, Velocity, etc) then the model is available
in the same place it usually is (the request attributes).  In XSLT
transforms, the model is only available if it was provided as part of
the input.

Jeff


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] friendbook.war example that uses velocity

2003-08-27 Thread Schnitzer, Jeff
Eh?  The complete WAR file is in
opt-velocity/dist/friendbook-velocity.war.

Compilation is a little odd, because it expects to find the maverick.jar
in ../maverick/build/maverick.jar, which is where the core build process
leaves the jar.  Of course this won't be the case if you just download
the packages.  We should probably make the opt- packages self-contained,
even if this means checking the latest maverick.jar into all of their
CVS trees.

For now (assuming you unpacked maverick into ../maverick), just copy
dist/maverick.jar into build/maverick.jar.  Then you should be able to
compile opt-velocity.

Sorry.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: James [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 25, 2003 11:51 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] friendbook.war example that uses velocity
 
 I am having a bit of a problem creating the velocity
 version of the frienbook.war.
 
 I went to the directory executed ant.  I seem to be
 starting the build from the wrong directory.
 
 How do I create velocity example?
 
 Why isn't there an already complete WAR file in the
 op-velocity distribution?
 
 Jim
 
 
 ---
 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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] How to suppress Velocity Transforms?

2003-08-25 Thread Schnitzer, Jeff
It should be possible to call $response.setContentType() anywhere near
the top of the template.  Without Maverick transforms (which can change
the output flow considerably), this works the same way that JSP works:

.  The servlet container provides a buffer of some size into which
output is written.

.  When the buffer becomes full, it is committed and flushed to the
output stream; all output after that is sent directly to the output
stream.

.  Until the buffer is committed, any changes can be made to the http
response headers, but afterwards it's illegal - the headers have already
been written.

The standard JSP (and Velocity) pattern is to set the content-type in
the template itself.  For XSLT this is not really an option, so an
output-type attribute on the maverick config node is used.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Johan Lundberg [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 25, 2003 11:27 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] How to suppress Velocity Transforms?
 
 Hi Dan
 
 Jeff told me about the following trick some time ago. I needed to get
the
 SVG plugin to understand that SVG content was coming instead of html.
 Below
 is the first line of my velocity template:
 
 $response.setContentType(image/svg+xml)?xml version=1.0?
 the rest of my SVG document...
 
 /johan
 - Original Message -
 From: Dan Finkelstein [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Sunday, August 24, 2003 10:49 PM
 Subject: [Mav-user] How to suppress Velocity Transforms?
 
 
  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]


---
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]


RE: [Mav-user] how to get the commands list

2003-08-22 Thread Schnitzer, Jeff
The Dispatcher has a method that obtains the (transformed, if you are using that 
feature) configuration document as a JDOM object.

You can get the Dispatcher from the application attribute context using the key 
Dispatcher.MAVERICK_APPLICATION_KEY.

Document doc = 
((Dispatcher)this.getCtx().getServletContext().getAttribute(Dispatcher.MAVERICK_APPLICATION_KEY)).getConfigDocument();

Enjoy :-)

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Pierre de Soyres [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 22, 2003 6:41 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] how to get the commands list
 
 hello,
 
 i was wondering if there was any way to, from a Controller, get the
 commands list setted in the maverick.xml config file.
 
 Thanks.
 --
 --
 Pierre de Soyres
 Ingénieur d'études
 e-Manation
 
 14 Bd du Maréchal Juin
 44100 Nantes
 
 
 FRANCE
 Tel: +33 (0)2 40 43 06 11
 Fax: +33 (0)2 40 43 30 02
 --
 
 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 Les informations contenues dans ce courrier electronique et dans les
 fichiers
 qui y sont attachees sont confidentielles et peuvent etre protegees
 legalement.
 Elles ne sont adressees qu'au destinataire. L'acces a ce courrier
 electronique
 par toute autre personne n'est pas autorise. Si vous n'etes pas le
 destinataire voulu, toute divulgation, copie ou diffusion de ce courrier
 electronique est interdite et peut etre illegale.
 Sauf mention contraire dans le corps du message, la presence de cette note
 prouve egalement que ce message electronique a ete verifie par un logiciel
 anti-virus.
 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 This email and any attached file are confidential and intended solely for
 the use of the individual or entity to whom they are addressed.
 Accessing this email by anyone else than the recipient is forbidden and
 may
 be illegal.
 If you received this email by error please notify the system
 administrator.
 This footnote also confirms that this message has been scanned by an anti-
 virus
 software.
 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 
 
 
 
 ---
 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]


RE: [Mav-user] Architecture

2003-08-14 Thread Schnitzer, Jeff
Hmmm, not a lot in the way of diagrams.  It's pretty simple though.
These bits of the manual provide a basic intro:

http://mav.sourceforge.net/maverick-manual.html#N10071
http://mav.sourceforge.net/maverick-manual.html#N101E8

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Vikas Hazrati [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 08, 2003 12:37 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Architecture
 
 Hi,
 
 I am pretty interested to evaluate a MVC framework which we could
extend
 and use in our projects. Presently I am evaluating Struts and webwork.
 Does Maverick has any architecture documents like a uml model etc
which
 can let me know more about the architecture. Any help on this and
other
 related documents would be highly appreciated.
 
 Thanks,
 Vikas Hazrati | SOLUTIONS INC
 
 
 
 
 ---
 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] RE: default value for Accept-Language?

2003-08-14 Thread Schnitzer, Jeff
Title: RE: default value for Accept-Language?









Fixed
in CVS. Thanks for the report!



Jeff Schnitzer

[EMAIL PROTECTED]





-Original Message-
From: Thompson, Kris
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003
10:11 AM
To: Mav-User (E-mail)
Subject: [Mav-user] RE: default
value for Accept-Language?



Sorry, hit the return key by accident and it sent before I
was done 

This line of code, String wholeHeader = request.getHeader(Accept-Language).toLowerCase(); is the problem, it blows
a NullPointer because the value is null because there isn't a value for Accept-Language

Still, nice framework 

Kris Thompson 


-Original
Message- 
 From:  Thompson, Kris 
 Sent: Thursday,
August 14, 2003 11:09 AM 
 To: Mav-User
(E-mail) 
 Subject: default value for Accept-Language? 


 I
have a suggestion if the browser does not provide an 

Accept-Language variable then give a default value which 

would be better then the 500 error I get. 
 

This probably never happens for the majority if not all 

browser out there but I ran into this will trying to create a 

JMeter script to load test Maverick. I was able to fix the 

issue by adding an Http Header Manager to JMeter. 
 

The mod would be made in LanguageShuntFactory.getView in the 

first line of code... 
 
 
 










RE: [Mav-user] ModelLifetime.discard() issue

2003-08-14 Thread Schnitzer, Jeff
 From: Trebor Carpenter [mailto:[EMAIL PROTECTED]
 
 Hi,

Hi!

 I'm using maverick 2.2.0 and running into a small inconsistency in
 behavior. My controllers generally derive from FormBeanUser, and my
 formBeans all implement ModelLifetime. The problem I'm seeing is that
if
 I do a forward (using a null view type) from one controller to
another,
 the second controller's formBean gets discard() called twice and the
 first controller's formBean does not get discard() called at all.
 
 I'm not sure what additional details would be useful to troubleshoot
 this.

Do you have the reuseMaverickContext flag turned on?  I can see how
this would cause trouble with null views.

The basic logic (in CommandBase) is:

try
{
execute the controller
get the model from the context and store in local variable
execute the view
}
finally
{
call model.discard()
}

This works fine as long as the forward (and maverick context recycling)
occurs during view processing because we've already gotten a hold of the
model before the recursion.  However, when the forward occurs in the
controller (as with a null view), we're doomed - the model gets replaced
in the context before we can get a reference.

I'm not sure there is a good solution to this problem.  Why do you need
reuseMaverickContext to be turned on?  I've never really liked this
flag.

 Incidentally, this is my third project using Maverick. I have a very
 small framework of classes that tie together Maverick, Formproc,
TopLink
 and I use Velocity for the view layer. Initially I had a very
difficult
 time persuading my colleagues that this was the way to go for us
(we've
 never heard of it. jsp is standard! struts is standard!) But since
then
 two of them have also used it and are now full converts raving to me
how
 much they love Maverick and love Velocity. Obviously not the right
 combination for all problems but near perfect in our case. Thanks for
a
 great framework!

Thanks, we love hearing this stuff :)

Jeff Schnitzer
[EMAIL PROTECTED]


---
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] Controller Pipeline

2003-08-14 Thread Schnitzer, Jeff









I need to update that documentation 
the Context will only be reused if the reuseMaverickContext init-param
to the dispatcher is set to true.



Jeff Schnitzer

[EMAIL PROTECTED]





-Original Message-
From: Sandeep Dath
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003
10:53 AM
To: [EMAIL PROTECTED]
Subject: [Mav-user] Controller
Pipeline





I recall some discussion regarding creating
a controller pipeline a while back, with the context being propagated from one
controller to the next. Is this doable in Maverick today? RTFM suggestions
apart, the B5 in Appendix B of the FAQ had something to say about this. But it
was very minimalistic. Very. ;-)











Thanks,











Sandeep












[Mav-user] FW: Maverick, Mike Burba on MDA, Gregor Kiczales on AOP, Hibernate, AspectJ, TMC Performance Study

2003-08-10 Thread Schnitzer, Jeff
Title: TheServerSide.com Newsletter #16








Hey,
this is cool!



-Original Message-
From: TheServerSide Connection
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003
12:26 PM
To: Jeff Schnitzer
Subject: Maverick, Mike Burba on
MDA, Gregor Kiczales on AOP, Hibernate, AspectJ, TMC Performance Study






 
  
  August 5, 2003
  
  
  Newsletter Circulation: 130 000+
  
  
  No. 16
  
 










 
  
  This
  newsletter sponsored in part by Rational 
  
 
 
  
  Get A Robust
  Collection of New Developer Resources - FREE Sign-up
  early! Do you want to stay on top of the latest technology? Then sign up to
  receive the latest developer PowerPack from IBM Rational software. Get a
  robust collection of resources  market-leading evaluation software,
  technical articles, extensive artifact libraries, webinars, expert
  presentations, reference posters, and software demos. Explore your technical
  interests. Click Here 
  
 








In This Issue 











New Articles 
o Introduction
to Maverick 

Tech Talks
o Mike Burba on Model Driven
Architecture 
o Gregor Kiczales on Aspect Oriented Programming 

New Public Review Chapters
o Hibernate In Action:
Understanding object/relational persistence 

Sample Chapters  Book Review
o AspectJ In Action: Syntax
Basics, Authentication  Authorization 
o Dion Almaer Reviews AspectJ In Action 

The Middleware Company Case Studies
o TMC Releases Performance
Case Study Results 

Key J2EE Industry News Headlines 
Some key headlines: 
o Red Hat bundles BEA, joins ObjectWeb to work on OpenEJB, JOnAS 
o BEA dev2dev Releases AOP System for WebLogic 

This newsletter is transmitted twice a month. It is
printer-friendly and available online











New Articles













Introduction
to Maverick 





By Kris Thompson 





In this
introductory article, Kris Thompson looks at Maverick, a lightweight, simple to
use web presentation framework based on the MVC design principle. Kris goes
through the features of Maverick, examines the maverick.xml file, and walks you
through the 4 types of Controllers using code samples. He also looks at
optional features in Maverick such as support for Velocity and Domify. 








Tech
Talks













Mike Burba -
Compuware 





Topic: Model Driven
Architecture and the Productivity Case Study 






Mike
discusses Model Driven Architecture (MDA), how it compares to traditional
development approaches, and outlines the benefits it offers to developers and
architects. He examines what the MDA development process looks like, how
mappings occur from the Platform Independent Model (PIM) to the Platform
Specific Model (PSM), and looks at the patterns-based development approach,
which is a part of MDA. He also highlights the productivity case study
conducted by TMC and discusses the results. 





Gregor
Kiczales - Lead PARC team that developed AOP and AspectJ 





Topic: Aspect Oriented
Programming (AOP) 






Gregor
looks at the history of AOP, its current state, and the current challenges it
faces moving forward. He discusses the meaning of crosscutting structure, the
standardization of AOP in the Java language, how AOP and OOP fit together, and
addresses syntactical issues surrounding AOP. He looks at the current state of
AspectJ, advises people on where they can go to learn more about AOP and
predicts the impact AOP will have on software development. 













New Public Review
Chapters













Hibernate In
Action: Understanding object/relational persistence 





By Christian Bauer  Gavin King 





TheServerSide
is pleased to announce that it will be hosting a public review process for
'Hibernate In Action' (Manning), by Christian Bauer and Gavin King. The first
chapter, 'Understanding object/relational persistence', introduces
object/relational mapping (ORM) and compares it to other persistence
mechanisms, such as self-made persistence layers and object databases. 














Sample Chapters 
Book Review













AspectJ In
Action: Syntax Basics, Authentication  Authorization; Book Review by Dion
Almaer 





AspectJ
In Action (Manning), by Ramnivas Laddad, which was publicly reviewed on
TheServerSide recently, has hit the shelves. Manning would like to thank TSS
members for all their valuable feedback during the review process. As a token
of their appreciation, they have provided two sample chapters for download from
the finished book: Syntax Basics and Authentication  Authorization. 

Download
Sample Chapters 

Dion Almaer has written a review of AspectJ
In Action. In it, he discusses the importance of the book for developers and
how it validates AspectJ as a very real technology through various examples. He
examines the sections on monitoring techniques, policy enforcement, pooling and
caching, and advanced topics such as AOP design patterns and idioms. 

Read Dion's Review
of AspectJ In Action 














The Middleware Company
Case Studies













TMC Releases
Performance Case Study 

RE: [Mav-user] FW: Maverick, Mike Burba on MDA, Gregor Kiczales on AOP, Hibernate, AspectJ, TMC Performance Study

2003-08-09 Thread Schnitzer, Jeff
Title: Message









Thanks a lot guys! We feel the love :-)



Jeff Schnitzer

[EMAIL PROTECTED]









-Original Message-
From: Dion Almaer
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003
5:33 PM
To: [EMAIL PROTECTED]
Subject: RE: [Mav-user] FW:
Maverick, Mike Burba on MDA, Gregor Kiczales on AOP, Hibernate, AspectJ, TMC
Performance Study





It was a pleasure working with Kris on
getting an article on Maverick on TSS (I am a personal fan).











If anyone has any other ideas other
coverage of Maverick (maybe a hard core article), please let me
know.











Also, Jeff, we need to brainstorm on that
interview we talked about :)











I echo the good job guys
sentiment.











Dion











ps. If you look at the thread on TSS, you
see many people giving their support.





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Thompson, Kris
Sent: Tuesday, August 05, 2003
4:41 PM
To: [EMAIL PROTECTED]
Subject: RE: [Mav-user] FW:
Maverick, Mike Burba on MDA, Gregor Kiczales on AOP, Hibernate, AspectJ, TMC
Performance Study





I did it because I was VERY impressed with
the work that you guys have done. Great job guys!











Kris Thompson





www-frameworks-boulder.org
















RE: [Mav-user] maverick.xml pre XSLT transform

2003-07-31 Thread Schnitzer, Jeff
Use the configTransform init-param when configuring the dispatcher in
your web.xml:

http://mav.sourceforge.net/maverick-manual.html#N100CB

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Pierre de Soyres [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 31, 2003 1:12 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] maverick.xml pre XSLT transform
 
 hello,
 
 I would like to know how to pre-transform using XSLT my maverick.xml
in
 order to make my action commands constructed dynamicly
 
 thanks
 
 Pierre
 

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 Les informations contenues dans ce courrier electronique et dans les
 fichiers
 qui y sont attachees sont confidentielles et peuvent etre protegees
 legalement.
 Elles ne sont adressees qu'au destinataire. L'acces a ce courrier
 electronique
 par toute autre personne n'est pas autorise. Si vous n'etes pas le
 destinataire voulu, toute divulgation, copie ou diffusion de ce
courrier
 electronique est interdite et peut etre illegale.
 Sauf mention contraire dans le corps du message, la presence de cette
note
 prouve egalement que ce message electronique a ete verifie par un
logiciel
 anti-virus.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 This email and any attached file are confidential and intended solely
for
 the use of the individual or entity to whom they are addressed.
 Accessing this email by anyone else than the recipient is forbidden
and
 may
 be illegal.
 If you received this email by error please notify the system
 administrator.
 This footnote also confirms that this message has been scanned by an
anti-
 virus
 software.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
 
 
 
 
 ---
 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]


[Mav-user] PROPOSAL: Add Mike Moulton as committer

2003-07-31 Thread Schnitzer, Jeff
I propose adding Mike Moulton as committer.  Mike is a longtime user of
Maverick, has helped out in the past, and is even responsible for our
snazzy logo.  He's most recently written an opt-jxv package.

I'm +1

Jeff


---
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] mav context reference

2003-07-25 Thread Schnitzer, Jeff
Two reasons:

1.  Objects of the controller class are instantiated by calling
Class.newInstance(), which calls a default no-argument constructor.

2.  The interface for Throwaway-type controllers is deliberately the
same for Singleton-type controllers, so it's not possible to pass
request-specific data into the constructor.

Why would you need such behavior?

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Valeri Sarantchouk [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 25, 2003 8:25 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] mav context reference
 
 Hi all!
 
 A (silly) question:
 
 Why with ThrowawayFormBeanUser maverich context (and subsecuently
 HttpServletRequest object) is not available when the controller object
 is created, but becomes available later in the controller life when
 makeFormBean() method is called?
 
 Thanks,
 
 Valeri
 
 ---
 
 
 
 
 
 
 ---
 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] this is a quiet list...is maverick really as good as u guys say?

2003-07-24 Thread Schnitzer, Jeff
 From: Butt, Dudley [mailto:[EMAIL PROTECTED]
 
 I'm looking at using either WW or Struts...got anything to help me?
 

What are you looking for?  I would recommend examining the sample
applications and seeing if you like the structure (format of the config
file, etc).  If you're feeling adventurous, create a spike solution in
each of the three frameworks.  If you're feeling really adventurous,
take a look at the framework code itself.  They all do basically the
same thing - which one does it the way you like?

I used both WW and Struts before I gave up and started yet another
webapp framework out of frustration.  Many of the people using Maverick
followed a similar path.  

I wouldn't let the quiet list discourage you.  Maverick is a very mature
framework; rather than figuring out how to add new kitchen sinks to the
project, we've deliberately decided to keep its scope limited to MVC
logic.  I would hesitate to call any piece of software done, but
Maverick hasn't needed to change much lately.

Jeff Schnitzer
[EMAIL PROTECTED]


---
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]


[Mav-user] FW: [Mav-domify] Java XML View 0.4

2003-07-22 Thread Schnitzer, Jeff









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 Of Gal Binyamini
Sent: Monday, July
 21, 2003 5: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










RE: [Mav-user] Sitemesh or view transforms?

2003-07-10 Thread Schnitzer, Jeff
I don't know, but my guess is that for any sophisticated application the
bottleneck will be elsewhere (DB calls, synchronization of shared
resources, etc).

I've been thinking of a new approach to applying navigation bars and
titles.Rather than compose the whole page dynamically at runtime
I've been thinking of using the fact that Velocity has a very
XML-friendly syntax; it's easy to embed Velocity instructions in an XML
document.

This would seem to make it easy to use XSL to apply all the headers and
navigation to XML/velocity pages at build-time, resulting in complete
velocity pages which need only be executed in linear fashion at runtime.
This would offer the most flexibility and the best performance, at the
cost of additional build-time complexity.

Somebody suggested something like this a long time ago on velocity-user,
but I haven't heard of anyone actually implementing it.

Does anyone have any experience doing this?

Thanks,
Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: DEO Kedar [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:00 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Sitemesh or view transforms?
 
 Hi,
 
 All of the pages im my application have top menu navigation, and side
 navigation bars, which are seperate pages. I want to know if there is
any
 performance metrics available of using maverick view transformation,
and
 using Sitemesh to assemble the page. If no metrics, at least any
thoughts
 on this?
 
 The menus and side navigation are role based, so there will be lot of
 logic going into building these side and top nav views.
 
 Thanks,
 Deo
 
 
 
 ---
 This SF.Net email sponsored by: Parasoft
 Error proof Web apps, automate testing  more.
 Download  eval WebKing and get a free book.
 www.parasoft.com/bulletproofapps
 [INVALID FOOTER]



---
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing  more.
Download  eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
[INVALID FOOTER]


RE: [Mav-user] forwarding in an action/command

2003-07-07 Thread Schnitzer, Jeff
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
 Is the best way to forward to do this:
 
 this.getCtx().getResponse().sendRedirect(unitDetails.m?id= +
unitKey);
 
 ?

That would be a redirect, not a forward... and it's not the best way to
do a redirect either :-)

If you want to do a redirect, that is one way - but you'll need to use
the null view type because you are issuing the redirect from the
controller.

A (usually) better way to perform a redirect is to use the redirect
view type.  From the controller call:

this.getCtx().setModel(unitDetails.m);
this.getCtx().setViewParam(id, unitKey);

Or you could just put the entire URL in the model, Maverick will figure
it out.  Also, you can specify the base part of the url as a path=
attribute in the maverick config file.


For a forward, you probably want to use a null view type and use the
servlet RequestDispatcher mechanism.  It goes something like this:

RequestDispatcher disp =
this.getCtx().getRequest().getRequestDispatcher(blah.m);
disp.forward(this.getCtx().getRequest(), this.getCtx().getResponse());


You could also do the forward using the document view type, but it
gets harder to dynamically choose the path you want to go to.

Does this help?

Jeff Schnitzer
[EMAIL PROTECTED]


---
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/psa0016ave/direct;at.asp_061203_01/01
[INVALID FOOTER]


RE: RE: [Mav-user] forwarding in an action/command

2003-07-07 Thread Schnitzer, Jeff
This is what you would use for a null view type:

command name=blah
  controller class=blah.Blah/
  view type=null/
/command

Every view type interprets the model and params differently.  The null
view does nothing at all - it expects that the controller will have
manually handled the response itself.  The redirect view type interprets
the model (if it is a String) as the URL to redirect to, and any params
as request parameters for the URL.

This is different than say the document or domify view types, which do
completely different things with the model (document puts it in the
request attributes, domify converts it to a DOM tree to be handed off to
the first transform step).  Each of the view types are pluggable
modules; you could write exotic view types that did just about anything
with the model and viewparams.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 07, 2003 6:01 PM
 To: [EMAIL PROTECTED]
 Subject: RE: RE: [Mav-user] forwarding in an action/command
 
 Ok, so how do you do a null view type?
 
 so setModel will basically redirect to another model ?
 
 Travis
 
  Original Message 
 From: Schnitzer, Jeff [EMAIL PROTECTED]
 Sent: 2003-07-07
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] forwarding in an action/command
 
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
  Is the best way to forward to do this:
 
  this.getCtx().getResponse().sendRedirect(unitDetails.m?id= +
 unitKey);
 
  ?
 
 That would be a redirect, not a forward... and it's not the best way
to
 do a redirect either :-)
 
 If you want to do a redirect, that is one way - but you'll need to use
 the null view type because you are issuing the redirect from the
 controller.
 
 A (usually) better way to perform a redirect is to use the redirect
 view type.  From the controller call:
 
 this.getCtx().setModel(unitDetails.m);
 this.getCtx().setViewParam(id, unitKey);
 
 Or you could just put the entire URL in the model, Maverick will
figure
 it out.  Also, you can specify the base part of the url as a path=
 attribute in the maverick config file.
 
 
 For a forward, you probably want to use a null view type and use the
 servlet RequestDispatcher mechanism.  It goes something like this:
 
 RequestDispatcher disp =
 this.getCtx().getRequest().getRequestDispatcher(blah.m);
 disp.forward(this.getCtx().getRequest(), this.getCtx().getResponse());
 
 
 You could also do the forward using the document view type, but it
 gets harder to dynamically choose the path you want to go to.
 
 Does this help?
 
 Jeff Schnitzer
 [EMAIL PROTECTED]
 
 
 ---
 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/psa0016ave/direct;at.asp_061203_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/psa0016ave/direct;at.asp_061203_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/psa0016ave/direct;at.asp_061203_01/01
[INVALID FOOTER]


RE: [Mav-user] FormBeanUser and setModel usage

2003-07-03 Thread Schnitzer, Jeff
 From: DEO Kedar [mailto:[EMAIL PROTECTED]
 
 Hi,
 I was going through the sample example friends-jsp-fbu, and the
question
 that comes to my mind is when should I use the FormBean and when
should I
 use the cctx.setModel(someModel), it seems like I have an option to
use
 both. What kind of requirements dictate the usage of one over the
other?

In general, you probably don't need to call setModel().  Ignore it for
now.  Eventually you will run into a situation where you need to provide
different models to different views, and then you will be glad to have
that method :-)

 Second, is it not possible to define the formbean for a controller
from
 the maverick.xml config file rather than overriding the makeFormBean
 method? (I am not sure if the question makes sense)

Easy.  Create a new controller base class, derived from FormBeanUser.
Override the init() method to check for the configuration element you
want to use and then get its Class.  Then override makeFormBean() so
that it always returns a newInstance() of that class.  Now derive all
your controllers from this new base class.

This makes it easy to have a config like this:

controller class=blah.YourFormBeanUser form=blah.SomeForm/

Make sense?

The reason this isn't a standard part of FormBeanUser is that it seems
somewhat questionably useful to me.  My controller code needs to know
the type of the form object, so why place this value in two different
files (the controller java and the maverick config file)?

(sorry, I don't know the answers to your other questions)

Jeff Schnitzer
[EMAIL PROTECTED]


---
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/psa0016ave/direct;at.asp_061203_01/01
[INVALID FOOTER]


RE: [Mav-user] Reload command in web.xml

2003-07-02 Thread Schnitzer, Jeff
 From: Marcel Kung [mailto:[EMAIL PROTECTED]
 
 The reload.m idea works but the documentation does not make this
technique
 obvious (actually the documentation doesn't make very much obvious at
all
 :-)

Documentation patches are eagerly accepted :-)

Jeff Schnitzer
[EMAIL PROTECTED]


---
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/psa0016ave/direct;at.asp_061203_01/01
[INVALID FOOTER]


RE: RE: [Mav-user] Transforms and how they are implemented

2003-06-24 Thread Schnitzer, Jeff
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
 I am wondering if there could be a different type of wrapper for
content,
 instead of transforms, so that it could just act the same as jsp
includes.
 
 Like same idea as the friendbook type transform, but stream everything
 out.
 
 Ex:
 view name=success path=edit.jsp
 include path=trimInside.jsp/
 /view
 
 Then it would treat that trim like an include instead of a transform?

You can already do this quite easily like this:

view name=success path=trimInside.jsp
param name=body value=edit.jsp/
/view

This way you have a trimInside.jsp that looks something like this:

html
  body
 ...blah header blah...
 ...blah navbar blah...

 jsp:include page=%= request.getAttribute(body) %
flush=true/
  /body
/html

This will work just fine and eliminate the buffering overhead.  However,
it puts some serious limitations on how the body can interact with the
trim because now the trim is being executed _before_ the body.  One of
the nice things about having the body execute first is that it can set
up parameters in the request attributes that affect behavior of trim
execution, such as specifying a title for the page.  This is hard to do
with the include-based operation above.

Of course to get really complicated, I'd be surprised if struts-tiles
didn't work with Maverick.

BTW, this is one area in which XSL *really* shines, at least as far as
flexibility is concerned.  Performance might be an issue depending on
the operations, unfortunately :-(

Jeff Schnitzer
[EMAIL PROTECTED]


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
[INVALID FOOTER]


RE: RE: [Mav-user] Question about model in transforms

2003-06-24 Thread Schnitzer, Jeff
Assuming you're using XSL, just copy the entire input source somewhere
in the output document.

xsl:template match=/
  blah
moreblah.../moreblah
originalblah
  xsl:copy-of select=/*/
/originalblah
  /blah
/xsl:template

My XSL is a little rusty, but that is the basic idea.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Sunday, June 22, 2003 2:06 PM
 To: [EMAIL PROTECTED]
 Subject: RE: RE: [Mav-user] Question about model in transforms
 
 How would i explicitly pass it?  Sorry, i'm a total newbie to Mav.  So
far
 I'm loving it though!
 
 Travis
 
 
 
  Original Message 
 From: Schnitzer, Jeff [EMAIL PROTECTED]
 Sent: 2003-06-21
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] Question about model in transforms
 
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
  Is it possible to access the model in a transform, like in the
 friendbook
  example, could i access the model in the trim?
 
 Right now, the answer is not consistently.  If you're using document
 views (and transforms) it's pretty easy, but if you're using XSLT the
 data is not available (unless you explicitly pass it through).
 
 I'm not really sure how to make it available, either.  I don't think
 it's possible to set the model as a param, and trying to combine the
 original model into the input XML for the transform steps sounds
 perilous.
 
 I'm open to suggestions, but it seems to me like your best bet is to
 explicitly pass the original model through.
 
 Jeff Schnitzer
 [EMAIL PROTECTED]
 
 
 ---
 This SF.Net email is sponsored by: INetU
 Attention Web Developers  Consultants: Become An INetU Hosting
Partner.
 Refer Dedicated Servers. We Manage Them. You Get 10% Monthly
Commission!
 INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
 [INVALID FOOTER]
 
 
 
 
 ---
 This SF.Net email is sponsored by: INetU
 Attention Web Developers  Consultants: Become An INetU Hosting
Partner.
 Refer Dedicated Servers. We Manage Them. You Get 10% Monthly
Commission!
 INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
 [INVALID FOOTER]



---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
[INVALID FOOTER]


RE: [Mav-user] Best Practices Please

2003-06-21 Thread Schnitzer, Jeff









Release made :-)



For the dispatching issue  a couple
solutions immediately present themselves to mind. 



Im not quite sure why what I was
saying earlier wouldnt work - you could return the name of a view which
is a document view which forwards to another Maverick command. Just like forwarding to a JSP except
that the path would be nextCommand.m or
whatever. This might be awkward if
the next command could be any of the possible commands, but if youre
adventurous you can simplify the configuration aspect of this by using an XSL
on the maverick.xml. 



Alternatively, you could perform the
forward from the controller yourself using RequestDispatcher,
as Eelco described. To do this you would want to use the null
view type for the master command invocation.



Do either of these solutions meet your needs? If not, I believe you could very easily
create a custom view type which takes the name of the view and forwards to a
new command with the same name.



BTW, when doing this, mind the new reuseMaverickContext init-param
on the Dispatcher.



Jeff Schnitzer

[EMAIL PROTECTED]



-Original Message-
From: Eelco Hillenius
[mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 21, 2003 1:14 AM
To: [EMAIL PROTECTED]
Subject: Re: [Mav-user] Best
Practices Please





Issue1: It's probably best to have a
new release out, but I am not involved in this project. So... Jeff? For the
time being I can send you the code and/or the compiled jar to your personal
email if you want.











Issue3: Have you tried using the
requestDispatcher directly? That should work.











Eelco







- Original Message - 





From: David
Cruwys 





To: [EMAIL PROTECTED] 





Sent: Saturday,
June 21, 2003 9:17 AM





Subject: RE:
[Mav-user] Best Practices Please











 Issue1: Hmmm, I remember fixing a bug related to
this. Try using the CVS version of
Maverick and let me know if it fixes the problem. The FormBeanUser 











I can't get CVS downloads
to work from my system, I've tried a few times before with some Jakarta
projects and have had no luck, is there another way of getting the latest
source release for Maverick in a ZIP.





 Issue3: The friendbook example shows you how to
redirect to the correct page after logging in when you went to a deep link
without authenticating first. 

 You
couldmake the redirect a forward instead if you want to. In either case it goes to a different
controller. Perhaps I am
misunderstanding your question?



I think there is a
misunderstanding here.



In the middle of
processing a controller, I may wish to end without returning a View id.
instead, I might wan't to invoke a totally different controller based on some
logic.



An example may clarify,
(though this is not exactly what I'm after but you should get the idea)



the following URLs would
call 3 differnt commands.



 http://server/app/runCmd1.m



 http://server/app/runCmd2.m



 http://server/app/runCmd3.m





each comand does what
ever and returns a view string.



I would like to do
something simmilar to the following





 http://server/app/runBusinessLogic.m

which would do its thing
(business process)and return the view that needs to be displayed



or





 http://server/app/runBusinessLogic.m?foward=runCmd1

 http://server/app/runBusinessLogic.m?foward=runCmd2

 http://server/app/runBusinessLogic.m?foward=runCmd3

which would also do its
(business process) but instead of returning a view string, it would execute
another command (as stated in the foward key) and that command would return
what ever view it wants.





Cheers Dave










RE: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a

2003-06-09 Thread zz-Schnitzer, Jeff
+1

I'm all for pressing forward.

Jeff

 -Original Message-
 From: jim moore [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2003 9:59 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a
 
 Is there any compelling reason to remain backwards compatible? It
seems
 lame
 that we have to give up configurably logging to work with both
versions.
 Maybe we should just patch it completely (i.e. with logging) for the
most
 recent version and do a new release.
 
 People that want the older version can use the previous version of
opt-fop
 but I feel that the release version should be targeted to work with
the
 most
 recent version of fop.
 
 --jim
 
 - Original Message -
 From: Eelco Hillenius [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 09, 2003 12:46 PM
 Subject: [Mav-user] maverick-opt-fop with fop-0.20.5rc3a
 
 
  Hi all,
 
  When using the latest version of FOP (which is the only version that
 behaves
  really well with my system) I came across some API changes that
breaks
  FopTransform from maverick-opt-fop.
 
  1. Options are now only supported for command line operations;
  2. The Avalon logger now must be set with 'driver.setLogger(log)'
 instead
 of
  'MessageHandler.setScreenLogger(log)'.
 
  I do not think 'options' is supported in any other way now; I could
not
 find
  any docs about it (though I didn't search the mailing list. As it
not
 really
  encouraged anyway, imho it's best to just discard it.
 
  I've included a path that works with both the older (4) and the
5rc3a
  versions of FOP. I do not set a logger though (but have the 5rc3a
 version
 as
  a comment), as one of the methods breaks one of the versions. If not
 set,
  the default (screen-) logger will be used.
 
  Eelco
 
 
 
 
 ---
 This SF.net email is sponsored by:  Etnus, makers of TotalView, The
best
 thread debugger on the planet. Designed with thread debugging features
 you've never dreamed of, try TotalView 6 free at www.etnus.com.
 [INVALID FOOTER]



---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
[INVALID FOOTER]


RE: [Mav-user] attributes in the request

2003-06-06 Thread Schnitzer, Jeff
Title: attributes in the request









Im
not sure quite what your question is. If your controllers extend
ThrowawayBean2 (as opposed to FormBeanUser), then the bean properties of your
controller will be populated from the request attributes before the perform()
method is executed. After execution, the controller object itself becomes the
model, but this can be easily overridden by calling ControllerContext.setModel().



Jeff Schnitzer

[EMAIL PROTECTED]





-Original Message-
From: Thompson, Kris
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2003 8:34
AM
To: [EMAIL PROTECTED]
Subject: [Mav-user] attributes in
the request



From
looking at the friendbook example and the Maverick code it appears that all
items that anything that extends ThrowawayBean2 will have that objects
attributes placed in the request?

Thanks


Kris
Thompson 
www-frameworks-boulder.org











RE: [Mav-user] Jelly Integration

2003-04-03 Thread Schnitzer, Jeff
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 
 As for an example... I don't think a port of friendbook would be
helpfull
 in
 this case. Maybe we should think of something else that shows the
Jelly
 trick. Jeff (and others): would you agree with this?

I'm fine with however you want to approach it.

Jeff


---
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
[INVALID FOOTER]


RE: [Mav-user] Hibernate questions

2003-04-02 Thread Schnitzer, Jeff
Here is one solution that I posted to the Hibernate wiki:

http://hibernate.bluemars.net/43.html

I think they changed the configuration mechanism since I wrote that, so
you may have to adjust it slightly.

Jeff

 -Original Message-
 From: Simen Brekken [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 10:40 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] Hibernate questions
 
 I am still a bit unclear on what the best approach to this might be,
if
 anyone has any examples I'd be very grateful
 
 - Original Message -
 From: Schnitzer, Jeff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 12:55 AM
 Subject: RE: [Mav-user] Hibernate questions
 
 
  From: Simen Brekken [mailto:[EMAIL PROTECTED]
 
  I was wondering if there's anyway of performing the expensive
 Hibernate
  initialization steps (init datastores, setup factories) somewhere
 other
  than
  perform using a ThrowAway controller.
 
 Create an Initialize servlet that is load-on-startup'd before
everything
 else.  You can store datastores, factories, etc in the application
 attribute context or just as static members of the Initialize servlet.
 
  Also, what's the benefit of using a ThrowAway over a singleton
 controller?
 
 I think this is really just a question of taste.  For many simple
 applications, the ThrowawayBean controllers are an easy way to build a
 lot of program logic with a single class.  However, when you find that
 you have a common form used in different commands, the inheritance
chain
 this requires tends to get ugly.  It is often more convenient to use a
 FormBeanUser style of controller in this case.
 
 In CVS right now there are two versions of friendbook-jsp, one which
has
 ThrowawayBean2 controllers and one which has FormBeanUser controllers.
 
 Personally my preference has been to use ThrowawayFormBeanUser as a
base
 controller class - it provides the best of both worlds, IMHO.
 
 Jeff Schnitzer
 [EMAIL PROTECTED]
 
 
 ---
 This SF.net email is sponsored by:
 The Definitive IT and Networking Event. Be There!
 NetWorld+Interop Las Vegas 2003 -- Register today!
 http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
 [INVALID FOOTER]
 
 
 
 ---
 This SF.net email is sponsored by: ValueWeb:
 Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
 No other company gives more support or power for your dedicated server
 http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
 [INVALID FOOTER]



---
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
[INVALID FOOTER]


RE: [Mav-user] reusable controllers and session objects

2003-04-01 Thread Schnitzer, Jeff
 From: Valeri Sarantchouk [mailto:[EMAIL PROTECTED]
 
 But what about old good servlets? My simple tests comparing
 chains of JavaBeans with analogous servlet filters shows
 filters more performant.

I'm not sure what you mean by this - JavaBeans vs filters?

 If I can take more of your time, what do you think about
 multi-action controllers? For cases of related but small
 in processing weight actions, it's might be appropriate to
 invoke a single (static) method instead of a class based
 on the url query parameters. Is ControllerSingleton /
 FormBeanUser everything we would possible want for
 multi-action controllers?

You certainly can do this with ControllerSingleton - but why?  Is it
really that hard to have lots of individual classes, one for each
action?  What do you hope to gain?

I find that lots of little classes is far more convenient than few
big classes, especially with several engineers and version control.
YMMV though.

Jeff Schnitzer
[EMAIL PROTECTED]


---
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
[INVALID FOOTER]


RE: [Mav-user] View references

2003-03-31 Thread Schnitzer, Jeff
Title: Message









Maverick 1.0 worked this way  global
views did not need to be explicitly referenced in the commands. This resulted
in several questions a month on the mailing list from newbies trying to figure
out why their application didnt work when they did this:



command name=blah

 controller class=blah.Blah/

 view path=blah.jsp/

/command



People get used to leaving the view name
off when there is only one view listed, even if you need to be able to
reference one of the globals. I even found myself making this mistake a few
times. After some debate, we changed this behavior in Maverick 2.0, and since
then this problem has not come up again.



Im -1 on changing this behavior.
Its not that much more typing. If you really want to minimize the config
file, the transformation facility offers a much more elegant solution.



Jeff Schnitzer

[EMAIL PROTECTED]





-Original Message-
From: Taavi Tiirik
[mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 3:45
AM
To: [EMAIL PROTECTED]
Subject: Re: [Mav-user] View
references





Simen,











This is my maverick.xsl file that adds a view named
authentication to every protected command.











command name=...
protected=true





 ...





/command











But yes, i think it would make sense to modify view lookup
code to search from amongst global view definitions as well. Would it break
anything?











with best wishes,





Taavi













- Original Message - 





From: jim moore 





To: [EMAIL PROTECTED] 





Sent: Sunday, March 30,
2003 9:30 PM





Subject: RE: [Mav-user]
View references











if you want behavior where the global
views are referenced by all commands, you can use a transformation on
maverick.xml. if specified, maverick will run maverick.xml through an xsl
before loading it. This xsl could easily copy all global views for you under
each command. actually--this has come up so often on this list that someone may
have already written an xsl to do this.











--jim














RE: [Mav-user] Hibernate questions

2003-03-25 Thread Schnitzer, Jeff
 From: Simen Brekken [mailto:[EMAIL PROTECTED]
 
 I was wondering if there's anyway of performing the expensive
Hibernate
 initialization steps (init datastores, setup factories) somewhere
other
 than
 perform using a ThrowAway controller.

Create an Initialize servlet that is load-on-startup'd before everything
else.  You can store datastores, factories, etc in the application
attribute context or just as static members of the Initialize servlet.

 Also, what's the benefit of using a ThrowAway over a singleton
controller?

I think this is really just a question of taste.  For many simple
applications, the ThrowawayBean controllers are an easy way to build a
lot of program logic with a single class.  However, when you find that
you have a common form used in different commands, the inheritance chain
this requires tends to get ugly.  It is often more convenient to use a
FormBeanUser style of controller in this case.

In CVS right now there are two versions of friendbook-jsp, one which has
ThrowawayBean2 controllers and one which has FormBeanUser controllers.

Personally my preference has been to use ThrowawayFormBeanUser as a base
controller class - it provides the best of both worlds, IMHO.

Jeff Schnitzer
[EMAIL PROTECTED]


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
[INVALID FOOTER]


RE: [Mav-user] Directory heirarchy when using Shunts Modes

2003-03-25 Thread Schnitzer, Jeff
Interesting problem.  Are you on a unix system?  One solution would be
to create a symlink in the directory with your vm files:

en - .

This would allow Dreamweaver to resolve the references in the
filesystem.

That is a pretty akward.  It's difficult to use static tools like
Dreamweaver to edit dynamic web applications because requests to
commands (and thus the vm files) are converted with the additional path,
but requests for image files are not.

Another possible solution to this problem (the one I recommend if you
want to preserve your directory structure) is to build a servlet filter
that munges the paths for image (and css) paths.  The filter would
handle all requests for /includes/* and /images/*, check the
Accept-Language header (just like the Shunt), and prepend /en or /jp
before passing the request down the chain.

Jeff Schnitzer
[EMAIL PROTECTED]


 -Original Message-
 From: Scott Chun [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 25, 2003 7:25 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] Directory heirarchy when using Shunts  Modes
 
 I tried the code below. I can see the images at runtime, but not
during
 design
 time. If I change the paths to see it at design time, then I can't see
the
 images during runtime.
 
 head
   titleTest Page/title
   meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
 /
   link href=en/includes/screen_styles.css rel=stylesheet
 type=text/css
 media=screen/
   link href=en/includes/print_styles.css rel=stylesheet
 type=text/css
 media=print/
 /head
 ...
 table width=100% border=0 cellspacing=0 cellpadding=0
 class=box1
   tr
 td width=30 nowrapa href=http://www.lds.org;
target=_topimg
 src=en/images/nav-small_christus.gif alt=The  Church of Jesus
Christ of
 Latter-day Saints border=0 width=30 height=20/a/td
 td width=100% nowrapa class=anchorHeader
 href=http://www.lds.org;
 title=The Church of Jesus Christ of Latter-day Saints
target=_topThe
 Church
 of nobrJesus Christ/nobr of nobrLatter-day/nobr
Saints/a/td
 td align=rightimg border=0 src=en/images/spacer.gif
width=8
 height=20/td
 td align=right nowrap valign=middle/td
   /tr
 /table
 
 Should I be using a transform to change the relative paths that
 Dreamweaver
 needs at design time to full paths that the browser needs at runtime?
 Maybe this
 is overkill, but I could use an XSLT to modify my Maverick.xml to
include
 a
 default transform for all views that have *.vm files. This transform
would
 change all the paths in the *.vm file to full paths.
 
 Please tell me that there's a better (and easier) way! :-)
 
 Thanks,
 Scott
 
  [EMAIL PROTECTED] 03/24/03 04:08PM 
 Can you show an example of your vm files?  I'm taking a wild guess at
 what you're trying to do here.
 
 Server-side includes will work with relative paths, however
client-side
 includes won't.  If you have a command something.m which includes a
 snippet of HTML like this:
 
 img src=images/foo.gif/
 
 Then the browser is going to try to load the file /include/foo.gif -
 it has no idea how things are really structured on the backend.  Your
 Japanese vm file needs to have a full path:
 
 img src=jp/images/foo.gif/
 
 Does that explain the problem you're having?
 
 Jeff Schnitzer
 [EMAIL PROTECTED]
 
 
  -Original Message-
  From: Scott Chun [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 21, 2003 9:12 PM
  To: [EMAIL PROTECTED]
  Subject: [Mav-user] Directory heirarchy when using Shunts  Modes
 
  I am using Velocity + Maverick and Dreamweaver to create the *.vm
 files.
 
  I first developed my *.vm files in English. To better organize my
 files, I
  create various subdirectories for images and includes. Then I added
 the
  org.infohazard.maverick.shunt.LanguageShuntFactory and created
 resources
  for
  mode=jp (Japanese). I placed the en  jp files under:
 
  context-/en/*.vm
 ||--/images/*.gif
 |   |--/brand_tabs/*.gif
 |   |--/inactive_tabs/*.gif
 ||--/includes/*.css
 |---/jp-/*.vm
  |--/images/*.gif
  |  |--/brand_tabs/*.gif
  |  |--/inactive_tabs/*.gif
  |--/includes/*.css
 
  Everything works fine during design time, but as expected, not when
I
  deployed.
  The *.vm files did not see the files in the images and includes
  subdirectories.
 
 
  Is there any way to make this directory structure work when I
deploy?
 
  As usual, thanks.
 
  Scott
 
 
 


 --
  
  This message may contain confidential information, and is intended
 only
  for the use of the individual(s) to whom it is addressed.
 
 
 


 ==
  
 
 
 
  ---
  This SF.net email is sponsored 

Content-type and transforms (was RE: [Mav-user] [PROPOSAL] Release v2.2.0 of Maverick)

2003-03-24 Thread Schnitzer, Jeff
I would hate to require content-type to be explicitly set on each step.
And without some input from the view or transform code, it's impossible
for the Maverick core to choose a sensible default.

For example, the output of a DomifyView should always be text/xml, but
the output of a DocumentView is probably going to be text/html or
text/plain.  The output of an XSLTransform is usually text/xml, unless
it is the last node in an unhalted chain, in which case it is probably
text/html.

Right now DocumentViews and DocumentTransforms have a way of passing the
content-type - they call getResponse().setContentType().  For different
binding types (in particular, the SAX mechanism) there is not currently
any way of passing this information - so it seems that we should add it
to the TransformStep interface.

Yes, this changes the existing API a little, but I haven't thought of a
better way of making this work such that the default is right 90% of the
time.  I'm certainly open to other ideas, of course.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: jim moore [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 6:57 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] [PROPOSAL] Release v2.2.0 of Maverick
 
 Just as an alternate, maybe it might make sense to use an attributes
in
 maverick.xml on views and transforms to support this. Something like
 
 controller class=com.foo.FooController
 view name=success content-type=text/xml
 transform type=xslt content-type=text/xml/
 transform type=fop content-type=application/pdf/
  /view
 /controller
 
 Maverick can be responsible for reading and applying these attributes
and
 then the existing transforms and views won't need to be modified at
all.
 If
 the attribute is missing, maverick can just behave as it does
currently.
 
 --jim
 
 - Original Message -
 From: Schnitzer, Jeff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, March 23, 2003 4:44 PM
 Subject: RE: [Mav-user] [PROPOSAL] Release v2.2.0 of Maverick
 
 
 Good point.  In fact, it seems to me that the contract between
transform
 steps is currently insufficient - each step should probably make an
 attempt to communicate to the subsequent step what the appropriate
 content type is.  That way no matter what type of transform you have,
 halting should provide the appropriate content-type.
 
 I'll try adding a setOutputType() method to the TransformStep
 interface.  Calling it will be recommended but optional.  At the
moment
 I imagine that only the LastStep will do anything with it.
 
 Jeff Schnitzer
 [EMAIL PROTECTED]
 
  -Original Message-
  From: Mike Moulton [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 21, 2003 5:28 PM
  To: [EMAIL PROTECTED]
  Subject: 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
 
 
 
 ---
 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: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] Directory heirarchy when using Shunts Modes

2003-03-24 Thread Schnitzer, Jeff
Can you show an example of your vm files?  I'm taking a wild guess at
what you're trying to do here.

Server-side includes will work with relative paths, however client-side
includes won't.  If you have a command something.m which includes a
snippet of HTML like this:

img src=images/foo.gif/

Then the browser is going to try to load the file /include/foo.gif -
it has no idea how things are really structured on the backend.  Your
Japanese vm file needs to have a full path:

img src=jp/images/foo.gif/

Does that explain the problem you're having?

Jeff Schnitzer
[EMAIL PROTECTED]


 -Original Message-
 From: Scott Chun [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 21, 2003 9:12 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Directory heirarchy when using Shunts  Modes
 
 I am using Velocity + Maverick and Dreamweaver to create the *.vm
files.
 
 I first developed my *.vm files in English. To better organize my
files, I
 create various subdirectories for images and includes. Then I added
the
 org.infohazard.maverick.shunt.LanguageShuntFactory and created
resources
 for
 mode=jp (Japanese). I placed the en  jp files under:
 
 context-/en/*.vm
||--/images/*.gif
|   |--/brand_tabs/*.gif
|   |--/inactive_tabs/*.gif
||--/includes/*.css
|---/jp-/*.vm
 |--/images/*.gif
 |  |--/brand_tabs/*.gif
 |  |--/inactive_tabs/*.gif
 |--/includes/*.css
 
 Everything works fine during design time, but as expected, not when I
 deployed.
 The *.vm files did not see the files in the images and includes
 subdirectories.
 
 
 Is there any way to make this directory structure work when I deploy?
 
 As usual, thanks.
 
 Scott
 
 


--
 
 This message may contain confidential information, and is intended
only
 for the use of the individual(s) to whom it is addressed.
 
 


==
 
 
 
 
 ---
 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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] A virtual url space?

2003-03-24 Thread Schnitzer, Jeff
Wouldn't this best be done as a Servlet Filter?  It seems like it would
be pretty easy to parse up the request string, morph it into a
traditional request, and pass it on... no need to modify Maverick's
Dispatcher.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Kevin O'Neill [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 22, 2003 6:08 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] A virtual url space?
 
 The thing I love most about cocoon is the ability to have a virtual
url
 space that allows for urls like /app/users/kevin/edit.html rather than
he
 more traditional /app/users/edit.xxx?user=kevin.
 
 Is maverick able to do the former. If not is anyone else interested in
 adding a dispatcher subclass that allows this?
 
 -k.
 
 --
 If you don't test then your code is only a collection of bugs which
 apparently behave like a working program.
 
 Website: http://www.rocketred.com.au/blogs/kevin/
 
 
 
 
 ---
 This SF.net email is sponsored by:
 The Definitive IT and Networking Event. Be There!
 NetWorld+Interop Las Vegas 2003 -- Register today!
 http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
 [INVALID FOOTER]



---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
[INVALID FOOTER]


RE: [Mav-user] [PROPOSAL] Release v2.2.0 of Maverick

2003-03-23 Thread Schnitzer, Jeff
Good point.  In fact, it seems to me that the contract between transform
steps is currently insufficient - each step should probably make an
attempt to communicate to the subsequent step what the appropriate
content type is.  That way no matter what type of transform you have,
halting should provide the appropriate content-type.

I'll try adding a setOutputType() method to the TransformStep
interface.  Calling it will be recommended but optional.  At the moment
I imagine that only the LastStep will do anything with it.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Mike Moulton [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 21, 2003 5:28 PM
 To: [EMAIL PROTECTED]
 Subject: 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



---
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]


[Mav-user] [PROPOSAL] Release v2.2.0 of Maverick

2003-03-21 Thread Schnitzer, Jeff
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] Defining a common view in the sitemap

2003-03-20 Thread Schnitzer, Jeff
Are you familiar with XSLT?

Maverick allows you to define an XSLT template that will be used to
transform the config file prior to loading it.  This means, effectively,
that the config file format can be anything you want.  Look in the
documentation for the configTransform init-param to the Dispatcher
servlet.

It would be fairly trivial to use this mechanism so that snippets like
this:

command name=blah protected=true
  ...
/command

Automatically get converted into:

command name=blah
  view name=DENIED path=.../
  ...
/command

It's been a little while for me but I think the template would look
something like this:

xsl:template match=[EMAIL PROTECTED]'true']
  command
xsl:copy-of select=@*|*/
view name=DENIED path=yourpath.jsp/
  /command
/xsl:template

Someone might want to correct me (or provide a better template - there
are several ways of accomplishing this in XSLT).

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Jozsa Kristof [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 20, 2003 5:13 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Defining a common view in the sitemap
 
 Hi there,
 
 I'm not sure whether this question got asked already.. please bear
with me
 if it had. Is it possible to define a custom view for *every* maverick
 command (or for a couple of ones) with the same output? Eg. I
implemented
 my
 own ProtectedController, which has a default output called 'DENIED',
and I
 guess it'd be *much* easier to define this view for all my commands
than
 adding it one by one. It'd also shorten maverick.xml quite much..
 
 Can you guys show me some easy way to get through this problem?
 
 tia,
 dyn
 
 --
 .Digital.Yearning.for.Networked.Assassination.and.Xenocide
 
 
 ---
 This SF.net email is sponsored by: Tablet PC.
 Does your code think in ink? You could win a Tablet PC.
 Get a free Tablet PC hat just for playing. What are you waiting for?
 http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
 [INVALID FOOTER]



---
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a Tablet PC.
Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
[INVALID FOOTER]


RE: [Mav-user] Multiple shunts

2003-03-19 Thread Schnitzer, Jeff
The Maverick distribution includes an example LanguageShunt and a
trivial sample application that uses it.

The shunt mechanism can accommodate composition, but you will have to
build the composite yourself.  ShuntFactory implementations are very
easy to build.  Since everyone's defaulting logic will likely be
different, I didn't try to put a composite in the distribution.

Jeff

 -Original Message-
 From: Scott Chun [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 19, 2003 3:07 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Multiple shunts
 
 Is it possible to use more than one shunt per Maverick app (i.e. one
for
 language and another for browser type)? If yes:
 
 1) How do I declare it in the Maverick configuration file
 2) How do I define the modes
 
 Thanks!
 


--
 
 This message may contain confidential information, and is intended
only
 for the use of the individual(s) to whom it is addressed.
 
 


==
 
 
 
 
 ---
 This SF.net email is sponsored by: Does your code think in ink?
 You could win a Tablet PC. Get a free Tablet PC hat just for playing.
 What are you waiting for?
 http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
 [INVALID FOOTER]



---
This SF.net email is sponsored by: Does your code think in ink?
You could win a Tablet PC. Get a free Tablet PC hat just for playing.
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
[INVALID FOOTER]


RE: [Mav-user] Maverick vs Webwork vs Struts

2003-03-18 Thread Schnitzer, Jeff
Obviously I'm biased, but I'll throw in my $0.02:

I used Struts and WebWork prior to starting Maverick with Scott.  I
found both frameworks to be fairly frustrating for various reasons (YMMV
- also, my knowledge of both is about a year old at this point).

Struts seems to be far too complicated for what it does.  There is a
large amount of API and a truly vast quantity of code behind it, yet I
can't really figure out why.  It didn't work with the version of Orion I
was using at the time, and when I went through the Struts code to debug
it I found crazy bits of kruft like a reimplementation of
ResourceBundle.  The config file format is pretty nonintuitive and
inflexible, especially with regards to how the model is defined (you
can't return an arbitrary model from your code).  Overall it just felt
ill-conceived.  I suppose a lot of credit is due to Struts for setting
the basic pattern of an MVC web framework, but it needs a complete
redesign (which is what I consider Maverick to be).

WebWork is a bit more svelte, but peculiar in many ways.  It has this
idea of a ValueStack which is novel but causes a lot of trouble if you
want to use standard templating tools like JSTL or Velocity.  WebWork
was designed around its own JSP tag library and it takes some pretty
sophisticated adapter code to get away from that.  In the beginning, the
WebWork team was very antagonistic towards XML config files so all
configuration was done with properties files; they later added a crude
XML config you could use instead, but it was (and probably still is)
pretty primitive.  Unfortunately, WebWork has gotten progressively more
wacky to the point where I can barely understand the logic of the stock
Jive skin (which uses WW).

The main points for Maverick, IMHO:

. Simplicity - it's a lot easier to come up to speed on than Struts or
WebWork.

. View independence - Velocity support in Struts is not bad these days,
but by and large both Struts and WebWork are still very JSP-oriented.
Maverick was created from the beginning to be used with XSL, Velocity,
and JSP... or any other templating technology you can think of.

. Transformation pipelines - most of the benefits of Cocoon2 without,
uh, Cocoon2 :-)  Featurewise, this is probably the most dramatic
difference between Maverick and the others.  Near as I can tell there is
nothing like this in Struts or WebWork and it is an incredibly useful
feature.

. Shunting - cool way of internationalizing (or adding browser-specific
behavior to) your application

The main points for Struts, IMHO:

. A very large user base and a very active mailing list.  You can buy
books about Struts (and with its complexity, you may very well need to).

. Kitchen sink is included.  I personally prefer a best of breed
approach and can't see why anyone would want, for instance, a database
connection pool thrown in with their MVC framework when almost every
appserver provides one, but your tastes may vary.

The main points for WebWork, IMHO:

. I don't really see any.  Maybe it has tight integration with the rest
of the OpenSymphony suite, but I doubt there is anything that could not
easily be reproduced with Maverick.


This description may be coming on a little strong, but I'm willing to
sustain the debate :-)

Jeff Schnitzer
[EMAIL PROTECTED]

 
 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 1:49 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] Maverick vs Webwork vs Struts
 
 Hi,
 
 That depends very much on your own taste. I have done several projects
in
 Struts and Maverick and personally I like Maverick best. Some of my
 collegues however favour Struts. The difference between Struts and
 Maverick
 is that Struts - IMHO - tries to be a framework that does everything
you
 can
 imagine in a webapp for you, whereas Maverick is a lightweight
framework
 that provides the basic MVC functionality (but does this excellent).
With
 Struts (and webwork for that matter) you get a load of custom tags, a
way
 of
 handling input etc. Maverick just provides a solid core.
 
 Now, here's why I favour Maverick:
 1. I like the transform pipes. I *hate* working with Struts/Tiles. I
would
 not say it's bad stuff, but working with seperate parts (even files)
of
 configuration really gets me bored. Moreover the transform idea of
 Maverick
 gives you a very powerfull and flexible tool to do the same stuff that
 Tiles
 does.
 2. I never liked the struts forms (more configuration). I like the
open
 idea
 of Maverick that gives you the freedom to do it how you think is
 appropriate
 for the situation. You want do it the Struts way? That's okay. But you
can
 do it several ways as well.
 3. And here's maybe the strongest Maverick pro: it's darn flexible.
The
 framework is solid and easy to understand. And extending the framework
is
 very easy as well. Samples how to do this are included.
 
 This said, I have to admit that some collegues like Struts better as
it
 gives you 

RE: [Mav-user] Newbie: Velocity + Maverick question

2003-03-13 Thread Schnitzer, Jeff
This is the friendbook-velocity example?  I'm afraid you can't just take
a webapp and move all the templates around.  There are various relative
and absolute paths encoded in the templates and the maverick config
file.  Moving around the files will break things.

If you want to reference files with a path like
/prototypes/uiprototype2, you need to design your webapp around those
paths.  This is not a Maverick issue, it's a J2EE (and web) issue
regarding the way that paths are resolved in WAR files.

If you're new to J2EE development, I strongly recommend that you start
with well-established design approaches - build your application as a
WAR file and deploy it that way.  Start by putting all templates at the
root of the WAR instead of building a hierarchy.  Don't try to create an
expanded directory structure in JBoss.

The ant buildfile for friendbook-velocity should be good to start with.

Jeff Schnitzer
[EMAIL PROTECTED]


 -Original Message-
 From: Scott Chun [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2003 1:19 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] Newbie: Velocity + Maverick question
 
 That took care of finding welcome but now I get the following:
 
 14:11:29,288 INFO  [jbossweb]  Velocity  [error] ResourceManager :
unable
 to
 find resource 'loginForm.vm' in any resource loader.
 14:11:29,288 INFO  [jbossweb]  Velocity  [error] #parse(): cannot find
 template
 'loginForm.vm', called from template /prototypes/uiprototype2/welcome.
 vm at (15, 1)
 14:11:29,298 INFO  [jbossweb]  Velocity   [info] ResourceManager :
found
 /prototypes/uiprototype2/trimOutside.vm with loader
 org.apache.velocity.tools
 .view.servlet.WebappLoader
 14:11:29,298 INFO  [jbossweb]  Velocity   [warn]
 org.apache.velocity.runtime.exception.ReferenceException: reference :
 template =
 /prototypes/uiprotot
 ype2/trimOutside.vm [line 2,column 9] : $Id is not a valid reference.
 14:11:29,308 INFO  [jbossweb]  Velocity   [warn]
 org.apache.velocity.runtime.exception.ReferenceException: reference :
 template =
 /prototypes/uiprotot
 ype2/trimOutside.vm [line 3,column 9] : $Source is not a valid
reference.
 
 This application is just the opt-velocity example.
 
 Thanks again.
 Scott
 
  [EMAIL PROTECTED] 03/13/03 12:55PM 
 My guess is that the content of your default.jsp is this:
 
 jsp:forward page=welcome.m/
 
 This is a relative path, so the full path to default.jsp will be
 prepended to the welcome.m.  Since you have no command
 prototypes/uiprototype2/welcome, you get 404.
 
 Try using an absolute path:
 
 jsp:forward page=/welcome.m/
 
 Jeff Schnitzer
 [EMAIL PROTECTED]
 
  -Original Message-
  From: Scott Chun [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 13, 2003 10:42 AM
  To: [EMAIL PROTECTED]
  Subject: RE: [Mav-user] Newbie: Velocity + Maverick question
 
  when I try
  http://localhost:8080/myproject/prototypes/uiprototype2/default.jsp
I
  get:
 
  HTTP ERROR: 404 There is no such command
  prototypes/uiprototype2/welcome.
  RequestURI=/myproject/prototypes/uiprototype2/default.jsp
 
   [EMAIL PROTECTED] 03/12/03 12:51PM 
  I'm sorry, I don't understand your question.
 
  Class files in myproject.war/WEB-INF/classes will automatically be
 found
  in your application's classpath.  A class foo.Blah should be in the
 file
  WEB-INF/classes/foo/Blah.class.
 
  VM files (and JSP files, HTML files, etc) in the WAR will
 automatically
  be found at the path relative to the WAR.  The path
  /yourcontext/prototype/uiprototype/yourfile.vm will be loaded from
  myproject.war/prototype/uiprototype/yourfile.vm.
 
  Are you getting some sort of error?
 
  Jeff Schnitzer
  [EMAIL PROTECTED]
 
   -Original Message-
   From: Scott Chun [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, March 12, 2003 10:56 AM
   To: [EMAIL PROTECTED]
   Subject: RE: [Mav-user] Newbie: Velocity + Maverick question
  
   Thanks for the fix, but I'm still at a loss as to how to tell
 velocity
  and
   maverick where the class and vm files are.
  
[EMAIL PROTECTED] 03/11/03 07:35PM 
   You misspelled WEB-INF (note the dash, and if on a unix-based OS,
 the
   case is sensitive).
  
   Jeff
  
-Original Message-
From: Scott Chun [mailto:[EMAIL PROTECTED]
Sent: Friday, March 07, 2003 2:33 PM
To: [EMAIL PROTECTED]
Subject: [Mav-user] Newbie: Velocity + Maverick question
   
I'm working on a prototype to learn Vellocity and Maverick. I
what
  to
deploy my
test app to JBoss as follows:
   
1)
  JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\lib
jdom.jar
maverick.jar
velocity-dep-1.3.1-r2.jar
velocity-tools-view-0.6.jar
   
2) I modified my web.xml to include the Maverick and Velocity
   servlets.
   
3) My prototype jsp file (same as the friendbook-velocity
example)
  is
   in:
   
  
 

JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot
   ot
ype
   
4) My templates are 

RE: [Mav-user] Newbie: Velocity + Maverick question

2003-03-11 Thread Schnitzer, Jeff
You misspelled WEB-INF (note the dash, and if on a unix-based OS, the
case is sensitive).

Jeff

 -Original Message-
 From: Scott Chun [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 07, 2003 2:33 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Newbie: Velocity + Maverick question
 
 I'm working on a prototype to learn Vellocity and Maverick. I what to
 deploy my
 test app to JBoss as follows:
 
 1) JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\lib
   jdom.jar
   maverick.jar
   velocity-dep-1.3.1-r2.jar
   velocity-tools-view-0.6.jar
 
 2) I modified my web.xml to include the Maverick and Velocity
servlets.
 
 3) My prototype jsp file (same as the friendbook-velocity example) is
in:

JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot
ot
 ype
 
 4) My templates are in

JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot
ot
 ype\templates
 
 5) My class files are in:

JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\classes\
or
 g\myproject\prototypes\uiprototype
 
 6) The Maverick.xml file is in:
 JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\
 
 How do I tell Maverick and Velocity where to find the class and vm
files?
 
 Thanks in advance!
 Scott
 
 
 
 


--
 
 This message may contain confidential information, and is intended
only
 for the use of the individual(s) to whom it is addressed.
 
 


==
 
 
 
 
 ---
 This SF.net email is sponsored by: Etnus, makers of TotalView, The
 debugger
 for complex code. Debugging C/C++ programs can leave you feeling lost
and
 disoriented. TotalView can help you find your way. Available on major
UNIX
 and Linux platforms. Try it free. www.etnus.com
 [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] bugfix ControllerFactory

2003-03-11 Thread Schnitzer, Jeff
Ah, of course.  I'll apply the patch tonight.  Thanks!

Jeff Schnitzer
[EMAIL PROTECTED]
(back from the fireworks festival in Tultepec, Mexico, with all my limbs
and sensory organs intact!)


 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 11, 2003 9:33 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] bugfix ControllerFactory
 
 Hi,
 
 In ControllerFactory this code:
 
   if (cls.isAssignableFrom(ControllerSingleton.class))
 
 never has a useable result. Because of this, init(Element) is never
called
 for classes that implement ControllerSingleton.
 
 A more useable variant is:
 
   if (ControllerSingleton.class.isAssignableFrom(cls))
 
 You can find a path attached.
 
 
 Eelco Hillenius


---
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] EntityResolver for XML

2003-03-05 Thread Schnitzer, Jeff
You can specify an entity resolver by redefining the xsl transform
module.  Look at the javadocs for XSLTransformFactory:

http://mav.sourceforge.net/api/org/infohazard/maverick/transform/XSLTran
sformFactory.html

(just put that snippet of xml in the modules section)

I'm not sure this has been thoroughly tested, so let me know if you have
any trouble.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Tim Bardzil [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 12:20 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] EntityResolver for XML
 
 I was wondering if its possible to specify an EntityResolver for an
XML
 document that's going through an XSLT transform.  I need to map the
 publicID of the DOCTYPE declaration to a local file on my PC so the
 server doesn't try to pull it from the web.  I do this in other parts
of
 my application using the Apache XML Catalog Resolver.
 
 Thanks,
 Tim Bardzil
 
 
 
 ---
 This SF.net email is sponsored by: Etnus, makers of TotalView, The
 debugger
 for complex code. Debugging C/C++ programs can leave you feeling lost
and
 disoriented. TotalView can help you find your way. Available on major
UNIX
 and Linux platforms. Try it free. www.etnus.com
 [INVALID FOOTER]



---
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
[INVALID FOOTER]


RE: [Mav-user] Newbie: deploying friendbook-velocity to JBoss+Jetty

2003-02-28 Thread Schnitzer, Jeff
This is pretty much exactly my development environment.  What problems
are you having?

Jeff

 -Original Message-
 From: Scott Chun [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 26, 2003 6:06 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Newbie: deploying friendbook-velocity to
JBoss+Jetty
 
 I'm new to Maverick and am trying to learn via the example included in
 opt-Velocity.  Has anyone successfully deployed Maverick, Velocity and
the
 friendbook-velocity example to JBos 3.0.4 running Jetty? If yes, I'd
 appreciate
 some guidance.
 
 -Scott


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] Help Problem deploying Maverick (friend.jsp) to Orion

2003-02-28 Thread Schnitzer, Jeff








Something is wrong with Orion. Sun
changed the schema of the jsp tag library definition file (tld) between JSP 1.1
and JSP 1.2. Specifically, the 1.1 tagclass was renamed to
tag-class.



The c.tld file inside friendbook (taken
from JSTL) has the correct DOCTYPE declaration for JSP1.2. However, Orion
appears to be ignoring this and validating against the 1.1 dtd.



I used to love Orion, but frankly I think
theyre losing it. Try a more recent version?



Jeff





-Original Message-
From: Rogers, Bob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday,
 February 26, 2003 9:25 AM
To: [EMAIL PROTECTED]
Cc: Rogers, Bob
Subject: [Mav-user] Help Problem
deploying Maverick (friend.jsp) to Orion



Hello



Sorry to bother you all, but I'm just reading about Maverick
(and am very excited about it and its philosophy), but I am having trouble
running the examples on the Orion app server (v1.5.2).

I've installed and run under both Window and Unix without
success, although the output is somewhat different - see below.







Under Windows 2000





The output the browser returns is: 



500 Internal Server Error

java.lang.RuntimeException: Error
instantiating XML parser: Missing 'tagclass' in tag definition

 at
javax.servlet.jsp.tagext.TagLibraryInfo.init(TagLibraryInfo.java:42)

 at
com.evermind[Orion/1.5.2 (build
10460)].server.http.TagLibraryArchive.init(Unknown Source)

 at
com.evermind[Orion/1.5.2 (build
10460)].server.http.TagLibraryArchive._jj(Unknown Source)

 at
com.evermind[Orion/1.5.2 (build 10460)]._jnb._cnc(Unknown Source)

 at
com.evermind[Orion/1.5.2 (build 10460)]._ah._cnc(Unknown Source)

 at
com.evermind[Orion/1.5.2 (build 10460)]._rj._xec(Unknown Source)

 at
com.evermind[Orion/1.5.2 (build 10460)]._rj._bb(Unknown Source)

 at
com.evermind[Orion/1.5.2 (build 10460)].server.http.JSPPage._bb(Unknown Source)

 at
com.evermind[Orion/1.5.2 (build 10460)]._ah._bfe(Unknown Source)

 at
com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source)

 



and the last portion of the log4j output reads:



...

11:51:33,455 DEBUG
[MasterFactory] Creating view of type document

11:51:33,455 DEBUG
[DispatchedViewFactory] Creating DispatchedView with path: friends.jsp

11:51:33,455 DEBUG
[MasterFactory] Creating transform of type document

11:51:33,455 DEBUG
[DocumentTransform] Created DocumentTransform with wrapped name
wrapped and path trimInside.jsp

11:51:33,455 INFO
[Dispatcher] Finished configuration load

11:51:33,605 DEBUG
[Dispatcher] Command servlet path is: /welcome.m

11:51:33,605 DEBUG
[Dispatcher] Command context path is: /fb

11:51:33,605 DEBUG
[Dispatcher] Servicing command: welcome

11:51:33,615 DEBUG
[CommandBase] Switching to view: NO CONTROLLER DEFINED

11:51:33,615 DEBUG
[MaverickContext] Set 1 transform(s), of which 1 will be executed

11:51:33,615 DEBUG
[MaverickContext] Creating transform step 0

11:51:33,625 DEBUG
[DispatchedViewFactory] Including welcome.jsp

11:51:33,625 DEBUG
[AbstractTransformStep] Getting fake response

11:51:33,635 DEBUG
[FakeHttpServletResponse] Creating fake response, original buffer size is 2048





Under Unix

-

the output the browser returns is: 



 Page
cannot be displayed



and the last portion of the log4j output reads:



...

11:46:14,024 DEBUG [MasterFactory]
Creating view of type document

11:46:14,025 DEBUG
[DispatchedViewFactory] Creating DispatchedView with path: friends.jsp

11:46:14,025 DEBUG [MasterFactory]
Creating transform of type document

11:46:14,025 DEBUG
[DocumentTransform] Created DocumentTransform with wrapped name
wrapped and path trimInside.jsp

11:46:14,029 INFO [Dispatcher]
Finished configuration load



Any ideas would be greatly appreciated. 



Thanks, Bob














RE: [Mav-user] Newbie: Default transforming *.html/*.jsp or whatever

2003-02-28 Thread Schnitzer, Jeff
Pretty cool!  It's amazing what you can do with filters :-)

Jeff

 -Original Message-
 From: Jonas Van Poucke [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 26, 2003 12:57 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Newbie: Default transforming *.html/*.jsp or
whatever
 
 I tried using a filter. But Maverick is very good at doing
 transformations (XSLT and Velocity).
 To put it in another way: I can do a transformation transparantly by
 pointing to an url...
 So, what I would like to do, is actually processing *all* requests
(also
 to external HTML sources) and include them in my pages with *my*
 look-and-feel.
 
 Thanks to you guys (Eelco Hillenius + Jeff Schnitzer), I tried the
 following successfully:
 I made a servlet filter that redirects to a maverick command, lets
call
 it HTML2M.m (m!).
 All *.html request are mapped to that filter. The filter takes the
 address and appends it as
 a parameter to the maverick command:
 public void doFilter(ServletRequest request, ServletResponse
 response, FilterChain filterChain) {
 //... maverickCommand set previously to HTML2M.m ...
 
 try {
 HttpServletRequest req = (HttpServletRequest) request;
 HttpServletResponse res = (HttpServletResponse) response;
 res.sendRedirect(
 req.getContextPath() + / + maverickCommand +
 ?target= +
 req.getRequestURL().toString());
 } catch (IOException ex) {
 //...
 }
 
 //... chain filter ...
 }
 
 So I can do the following:
 1. Type some url in my browser, say http://localhost/MyPage.html
 2. This is filtered and forwarded to the maverick command as
http://localhost/HTML2M.m?target=http://localhost/MyPage.html
 3. A view is selected and precessed normally: i can take the $target
and
 include it in my page
 (I used JSTL c:import but plan to move to jakarta scrape). Lets call
 this page WrapURL.jps
 4. Process this result further (transformations) in maverick:
 command name=HTML2M
 view type=document path=WrapURL.jsp
 !--transform  type=xslt path=StripHTML.xsl/--
 /view
 /command
 The transform could be used to select parts of the HTML in step3, or
to
 strip out styling stuff, or whatever. I could also use the XML
features
 of JSTL but I do not want to do that. I prefer Maverick for obvious
 reasons ;-)
 
 
 Hm.  Why not create a Filter to do that?  It seems more natural
 than
 trying to use Maverick.
 
 Jeff
 
  -Original Message-
  Hi,
  I have a question on doing the following:
  1. If a command exists in maverick, execute it
  2. If it does not exist, e.g. for MyPage.html then do:
 a. Load theat page (DocumentView)
 b. perform any default transformation
(e.g. like stripping out any attributes on some tag, using
 XSLT)
 c. Show the transformed document.
 
  It seems that two things are missing:
  1. Reading in any *.extension command
  2. Views need a path attribute, but something like path=.
(taking
  the command as a path) does not work.
 
 
 
 
 ---
 This SF.net email is sponsored by: Scholarships for Techies!
 Can't afford IT training? All 2003 ictp students receive scholarships.
 Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
 www.ictp.com/training/sourceforge.asp
 [INVALID FOOTER]


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


RE: [Mav-user] Newbie: Default transforming *.html/*.jsp or whatever

2003-02-25 Thread Schnitzer, Jeff
Hm.  Why not create a Filter to do that?  It seems more natural than
trying to use Maverick.

Jeff

 -Original Message-
 From: Jonas Van Poucke [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 24, 2003 8:19 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Newbie: Default transforming *.html/*.jsp or
whatever
 
 Hi,
 I have a question on doing the following:
 1. If a command exists in maverick, execute it
 2. If it does not exist, e.g. for MyPage.html then do:
a. Load theat page (DocumentView)
b. perform any default transformation
   (e.g. like stripping out any attributes on some tag, using XSLT)
c. Show the transformed document.
 
 It seems that two things are missing:
 1. Reading in any *.extension command
 2. Views need a path attribute, but something like path=. (taking
 the command as a path) does not work.
 
 To summarize, I would need something like:
 commands
 command name=*.html
 view name=success type=document path=.
 transform type=xslt
path=DoSomethingWithHTML.xsl/
 /view
 /command
 /commands
 
 Is there something to support this already? Do I need to create my own
 View? Or modify DispathedViewFactory? Any help welcome!
 
 Jonas Van Poucke
 Actonomy
 
 
 
 
 ---
 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] Model doesn't get initialized?

2003-02-20 Thread Schnitzer, Jeff
Yep, that's exactly right.  The JavaBeans spec says that for a property
nameOfBeer, the setter is:

public void setNameOfBeer(String value)

and the getter is:

public String getNameOfBeer()

The case matters.  However, some templating languages (like Velocity)
will compensate for you (JSTL doesn't).

It gets a little weirder.  If you have a boolean value, say lightBeer,
there are two possible getters:

public boolean getLightBeer()
public boolean isLightBeer()

Since it's possible to have both of those methods on a class, one of
them takes precedence over the other (I don't remember which offhand).

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Stephan Visser [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 20, 2003 11:05 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [Mav-user] Model doesn't get initialized?
 
 So, if I understand you correctly, I should expect the following
 behaviour:
 
 I have a controller class Foo with a String Name and in a JSP that
gets
 activated as a view I have to use $model.name (with lowercase name
i.s.o.
 Name as defined in the class) ??
 
 If the JavaBean specs (which I'm sorry I'm not familiar with) state
this
 behaviour as standard I't fine by me. Still, I find it pretty
confusing...
 
 Stephan.
 
 -Original Message-
 From: Vladimir Yusseem [mailto:[EMAIL PROTECTED]]
 Sent: donderdag 20 februari 2003 19:49
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] Model doesn't get initialized?
 
 
 Also Java seemed to be case sensetive ... :-).
 
 - Original Message -
 From: Eelco Hillenius [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, February 20, 2003 8:53 AM
 Subject: RE: [Mav-user] Model doesn't get initialized?
 
 
  Do you know about the JavaBean spec? This is pretty standard Java
 stuff...
 
  Eelco
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Stephan
Visser
  Sent: donderdag 20 februari 2003 12:54
  To: '[EMAIL PROTECTED]'
  Subject: RE: [Mav-user] Model doesn't get initialized?
 
 
  Ok.. I got a bit further now (it actually works) but I am still
 confused...
 
  I did the following to my example-code:
 
  - Renamed Perform() to perform() (wh!!)
  - Added to the perform method:
 
this.setName(this.getCtx().getRequest().getParameter(first_name));
 
  Now, I discovered that in my class I actually have a private String
Name
  (mind the capital N!)
 
  From the JSP I can get to the value through c:out
 value=${model.name}/
  and NOT through c:out value=${model.Name}/. is that
behaviour I
  should expect?
 
  Anyway, it works now and for the time being I'll just keep all my
fields
  lowercase to not get mixed up with the $model references from the
 JSP's
 
  Stephan.
 
  -Original Message-
  From: Catalin Constantin [mailto:[EMAIL PROTECTED]]
  Sent: donderdag 20 februari 2003 12:09
  To: [EMAIL PROTECTED]
  Subject: Re: [Mav-user] Model doesn't get initialized?
 
 
  try
  c:out value=${model.name} / in the .jsp file
 
  Catalin
 
  - Original Message -
  From: Stephan Visser
  To: '[EMAIL PROTECTED]'
  Sent: Thursday, February 20, 2003 1:02 PM
  Subject: [Mav-user] Model doesn't get initialized?
 
 
  Hi there!
 
  I am trying to create a simple example application, using the
friendbook
 as
  an example. The framework seems to work fine, including LOG4J. I do
have
 a
  lot of problems when I try to get a controller to work. I have
something
  like this:
 
  package com.maverick.controllers;
  import org.infohazard.maverick.ctl.ThrowawayBean2;
 
  public class TestController extends ThrowawayBean2
  {
private String name;
 
public String getname() { return this.name; }
public void setname(String s) { this.name = s; }
 
public String Perform()
{
  return success;
}
  }
 
  In the maverick.xml I have something like this:
 
  command name=submitname
controller class=com.maverick.controllers.TestController /
view name=success path=testform.jsp/
  /command
 
  In my testform.jsp I try to read the value from the model like so:
 
  c:out value=${model.test} /
 
  ...and now for the weird part (and also my question)
 
  NOTHING comes out of the model! Am I overseeing something or doing
 something
  wrong?? I spent an entire evening trying to figure out how to get
this
 to
  work, no success. I even tried to explicitly fill the model in the
  controller using the setModel method nothing happens I have
  absolutely no clue ... can anybody help me?
 
  Thanks in advance!
 
  Stephan.
 
 
  ---
  This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
  The most comprehensive and flexible code editor you can use.
  Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day
Trial.
  www.slickedit.com/sourceforge
  [INVALID FOOTER]
 
 
 
  ---
  This SF.net email is sponsored by: SlickEdit Inc. 

RE: [Mav-user] Strange NullPointerException

2003-02-19 Thread Schnitzer, Jeff
This happens when the previous step (or view) never called
HttpServletResponse.getOutputStream() or getWriter().  I believe I
recently checked in a patch that prints a better error message in this
case.

Maybe the jsp page is misnamed?  I would normally expect that to cause
getRequestDispatcher() to return null, but it would explain the problem.
What container/version are you using?

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Tim Bardzil [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 19, 2003 1:46 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Strange NullPointerException
 
 I am a newbie to Maverick.  I wrote a simple webapp to produce a PDF
 from a JSP page using Docbook XML - XSL:FO (w/ XSLT) - PDF (w/ FOP).
 This is working fine but now I'm trying to integrate Maverick into our
 existing webapp.  I'm pretty sure I have everything set up the same
but
 when I try to run in in the existing webapp I'm getting a strange
 NullPointerException:
 
 java.lang.NullPointerException
   at

org.infohazard.maverick.util.FakeHttpServletResponse.getOutputAsReader(F
ak
 eHttpServletResponse.java:67)
   at

org.infohazard.maverick.transform.XSLTransform$Step.done(XSLTransform.ja
va
 :186)
   at

org.infohazard.maverick.view.DispatchedViewFactory$DispatchedView.go(Dis
pa
 tchedViewFactory.java:106)
   at
 org.infohazard.maverick.view.DocumentView.go(DocumentView.java:52)
   at

org.infohazard.maverick.flow.ViewWithTransforms.go(ViewWithTransforms.ja
va
 :39)
   at
org.infohazard.maverick.flow.CommandBase.go(CommandBase.java:50)
   at
org.infohazard.maverick.Dispatcher.service(Dispatcher.java:179)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
 
 Any ideas??
 
 Thanks,
 Tim
 
 
 
 
 ---
 This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
 The most comprehensive and flexible code editor you can use.
 Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
 www.slickedit.com/sourceforge
 [INVALID FOOTER]


---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
[INVALID FOOTER]



RE: [Mav-user] Updates to maverick

2003-02-19 Thread Schnitzer, Jeff
The separated param collections and the absolute config path features
are checked in.  Take a look.

I'll get to the remaining issues soon.

Jeff

 From: Schnitzer, Jeff [EMAIL PROTECTED]
 
 Separating the three different param collections (controller, view,
 transform).
 
 Allowing file:, http:, ftp: in the maverick config file (and config
 transform) path.  Need to check to see if I can detect absolute vs
 relative URLs just by creating a URL and checking for
 MalformedURLException.  Oterhwise just explicit checks for those
strings
 will work.

 Review John-Mason's controller chaining code and figuring out how this
 can be morphed into a pluggable Controller framework.
 
 Adding a link to Roman's Tiers sample.
 
 Sorry about the lag.  Both work and life switched into high-gear at
the
 same time.
 
 Jeff Schnitzer
 [EMAIL PROTECTED]


---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
[INVALID FOOTER]



RE: [Mav-user] Client side XSL transformation

2003-02-18 Thread Schnitzer, Jeff
 From: toby cabot [mailto:[EMAIL PROTECTED]]
 
 Does Maverick need to support client-side XSLT explicitly?  I'm doing
 it now, using the current Maverick.  You just need a server-side XSLT
 that applies the stylesheet processing instruction to the XML before
 sending it to the browser.  The client-side XSLT's and CSS's can be
 served statically.

I agree.  This should be easy to do with the existing Maverick.  With a
browser-detecting shunt, you could have a command that looks like this:

command name=foo
  view mode=clientXSLCapable path=foo.xml
transform path=addProcessingInstruction.xsl
  param name=whichXSL value=completeTransformation.xsl/
/transform
  /view
  view mode=notClientXSLCapable path=foo.xml
transform path=serverCompleteTransformation.xsl/
  /view
/command

This syntax isn't bad, but if you want to make it more elegant you can
always transform the config file.

 I like Maverick because it's very elegant so I'd prefer to avoid
 adding features to the framework where they can be handled by
 application code.  If you'd like I can package up an example that
 works with today's Maverick and IE6/Moz.

+1

:-)
Jeff Schnitzer
[EMAIL PROTECTED]


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]



RE: [Mav-user] JDom

2003-02-14 Thread Schnitzer, Jeff
Just to emphasize this point - during normal request processing, JDOM is
not used, so there is no performance issue.  JDOM is only used to load
the configuration file at startup (or during the reload command).

Jeff

 -Original Message-
 From: Scott Hernandez [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, February 14, 2003 8:07 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] JDom
 
 
 Yep. JDom is just used to the load the config file. Not as 
 the default processor for any other transformations or xml operations.
 
 
   I'd like not to use JDom
 
  JDom is tightly integrated with Maverick. I didn't write 
 the original
 code,
  but the code that I've read looks like it uses JDom very 
 effectively. 
  As
 far
  as Maverick is concerned, I don't think you'd see any significant 
  performance gain by going to SAX or some other parsing technology.
 
 
 ---
 This SF.NET email is sponsored by: FREE  SSL Guide from 
 Thawte are you planning your Web Server Security? Click here 
 to get a FREE Thawte SSL guide and find the answers to all 
 your  SSL security issues. 
 http://ads.sourceforge.net/cgi- bin/redirect.pl?thaw0026en
 
 [INVALID FOOTER]
 
 


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
[INVALID FOOTER]



RE: [Mav-user] additional configuration for commands

2003-02-12 Thread Schnitzer, Jeff
The problem just brought up was that the redirect view interprets params
as actual request parameters to append to the URL.  Setting parameters
to the controller inadvertently causes them to show up in a redirect.

That seems like a compelling reason for separate namespaces.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Shackelford, John-Mason
[mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 12, 2003 11:23 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [Mav-user] additional configuration for commands
 
 Jeff,
 
  It would be easy enough to split up the params collection
  into three separate collections.
 
 I'd be interested in hearing more about why we'd want these separate
since
 seperating them adds complexity to the API. If we need the sperate
names
 spaces, great. If not, why bother?
 
 
 John-Mason Shackelford
 
 Software Developer
 Pearson Educational Measurement - eMeasurement Group
 
 2510 North Dodge St.
 Iowa City, IA 52245
 ph. 319-354-9200x6214
 [EMAIL PROTECTED]
 http://etest.ncspearson.com
 
 


**
 **
 This email may contain confidential material.
 If you were not an intended recipient,
 Please notify the sender and delete all copies.
 We may monitor email to and from our network.


**
 **
 
 
 ---
 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] server side redirects for commands

2003-02-11 Thread Schnitzer, Jeff
While supporting the concept is important, I'm not personally convinced
*yet* that controller chaining has enormous merit.  So far I haven't
seen a compelling need for it in my work.  Certainly in the case of the
friendbook logout, a redirect is fully appropriate in order to preserve
the browser's ability to bookmark links.  

Even if you wanted to provide a more sophisticated bye page instead of
just sending the user back to the welcome page, it seems to me that
you're best off putting the controller logic in the Logout class and
forwarding to a normal bye view.

But I'm open to different views - John-Mason Shackelford seems to be
putting a lot of effort into the subject, and I'm curious to know how
that goes :)

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 11, 2003 1:31 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] server side redirects for commands
 
 Thanks for pointing that out Jeff,
 
 You are right about the difference between redirects and forwards
 ofcourse,
 and now that I took a closer look at the code, I understand the flow.
I
 was
 just looking at the friendbook example and thought that using
redirects
 was
 the way to link commands in Maverik fashion. Maybe it's a good idea to
 adjust the friendbook example, so that the differences in usage
(redirect/
 forward) become clear. This is currently in the friendbook example:
 
 command name=logout
 controller class=org.infohazard.friendbook.ctl.Logout/
 view name=loginRequired ref=loginRequired/
 view name=loginFailed ref=loginFailed/
 view name=success type=redirect path=welcome.m/
 /command
 
 Instead something like this would clearify things:
 
 command name=logout
 controller class=org.infohazard.friendbook.ctl.Logout/
 view name=loginRequired ref=loginRequired/
 view name=loginFailed ref=loginFailed/
 
 !-- use a redirect (HTTP 302 response)
 parameters set in the ControllerContext will be made
available
 to the view in the form of request parameters
 Note that only string parameters will make sense
 --
 view name=success type=redirect path=welcome.m/
 
 !-- if you want to do a forward (server side) you can use
 
 view name=success type=document path=welcome.m/
 
 instead. Using this will save you a client server
roundtrip,
 and
 you can use arbitrary objects as request parameters,
 and you will have access to the model set by the last
 command).
 Note that if you access the model , and that model is a
 command,
 you create a dependency of commands and loose
 the freedom freely linking commands without them knowing
about
 each other. If you use parameters in the ControllerContext,
 or you use a common command-neutral model, you just have a
 'contract-like' dependency.
 --
 
 /command
 
 I understand that you can do neat stuff with inheritance. On the other
 hand,
 I think it is nice to make commands (potentially) work together
without
 requiring them to use a common base class. A contract (command
requires
 certain variables to be available) couples loosely. But, hey... the
nice
 thing about Maverik is that you can decide yourself!
 
 Thanks for the quick response,
 
 Eelco Hillenius
 
 
 - Original Message -
 From: Schnitzer, Jeff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, February 11, 2003 2:24 AM
 Subject: RE: [Mav-user] server side redirects for commands
 
 
 The word you are looking for is a forward, not a redirect.
 Redirects are inherently client-side phenomenon; they are the result
of
 an HTTP 302 response.
 
 Inside the server, you forward from one request to another.  In fact,
 this is how Maverick executes JSPs (or other documents) - using the
 forward mechanism.
 
 Try this:
 
 view name=simpleReport type=document path=showSimpleReport.m/
 
 This chains the first command to the second.  Any params are
persisted
 across the invocation... and if you're careful about your controller
 base class, you can get access to the model as well.
 
 Jeff Schnitzer
 [EMAIL PROTECTED]
 
  -Original Message-
  From: Eelco Hillenius [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 10, 2003 2:40 PM
  To: [EMAIL PROTECTED]
  Subject: [Mav-user] server side redirects for commands
 
  Hi all,
 
  Say, I have got a view like:
  view name=simpleReport type=redirect
path=showSimpleReport.m/
 (I
  use
  .m for Maverik commands). The current version of Maverik does a
normal
  redirect (response.sendRedirect). Imho it would be great if Maverik
 would
  recognize that it is about to redirect to another Maverik command,
and
  instead of doing a real redirect, call that other command. And
instead
 of
  making a string copy of the objects in the context (stored like
  getCtx().setParam(blah, obj)) to request parameters, make (or keep)
 the
  objects available in their original form.
 
  I have got

RE: [Mav-user] maverick and tomcat 4.1.18 combo, security issue

2003-02-10 Thread Schnitzer, Jeff
In Tomcat (and probably most other web containers) JSPs are handled by a
servlet that is mapped to *.jsp.  During shutdown, this JSPServlet is
just one more servlet to shut down - although it should be one of the
last ones.

Here is a set of conditions that I suspect will reproduce this problem
(keep in mind I'm just speculating):

1) A request is made to a maverick application.  The hypothetical
controller takes a long time to execute, doing lots of calculation or
database queries or whatnot.
2) Sysadmin shuts down Tomcat.  All servlets are unregistered (including
the JSPServlet) but existing threads are allowed to complete.
3) The controller completes and then forwards to the JSP for rendering.
4) Since there is no JSPServlet, the JSP is handled as a simple static
file.

It may be that static content is also handled by a servlet - in which
case the race condition is when the controller finishes its perform()
after the JSPServlet is unregistered but before the static servlet is
unregistered.  I'm not familiar enough with Tomcat internals to know.

I really don't think there is much you can do about the problem.  It's a
Tomcat issue, and there is nothing that Maverick can do to get around
it.  You will have the same problem with Struts or WebWork or even
straight JSPs that perform forwards.

If you're really worried about it, I suggest posting a bug report to the
Tomcat lists.  The ideal shutdown process would be:

1) Stop taking new requests
2) Wait for all processor threads to finish executing
3) Start destroying servlets

I don't think this is what Tomcat currently does.

Jeff Schnitzer
[EMAIL PROTECTED]



 -Original Message-
 From: Taavi Tiirik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 07, 2003 5:19 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] maverick and tomcat 4.1.18 combo, security issue
 
 Hello,
 
 I am running tomcat 4.1.18 on winxp system using catalina run
 and I happened to stop tomcat (by pressing crtl-c) when there
 was an request to maveric command that has not been finished
 processing yet. As the result of this, tomcat serves source of my
 decorator jsp page.
 
 I was not quite able to repeat this trick, but it seems like a
 security issue. Well, it may be the case that stopping tomcat
 using ctrl-c is the reason of this. What do you think?
 
 My maveric command is simple:
 
 command name=index
 controller class=Index/
 view name=success path=index.jsp
 transform path=decorator.jsp/
 /view
 /command
 
 
 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:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
[INVALID FOOTER]



RE: [Mav-user] server side redirects for commands

2003-02-10 Thread Schnitzer, Jeff
The word you are looking for is a forward, not a redirect.
Redirects are inherently client-side phenomenon; they are the result of
an HTTP 302 response.

Inside the server, you forward from one request to another.  In fact,
this is how Maverick executes JSPs (or other documents) - using the
forward mechanism.

Try this:

view name=simpleReport type=document path=showSimpleReport.m/

This chains the first command to the second.  Any params are persisted
across the invocation... and if you're careful about your controller
base class, you can get access to the model as well.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 10, 2003 2:40 PM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] server side redirects for commands
 
 Hi all,
 
 Say, I have got a view like:
 view name=simpleReport type=redirect path=showSimpleReport.m/
(I
 use
 .m for Maverik commands). The current version of Maverik does a normal
 redirect (response.sendRedirect). Imho it would be great if Maverik
would
 recognize that it is about to redirect to another Maverik command, and
 instead of doing a real redirect, call that other command. And instead
of
 making a string copy of the objects in the context (stored like
 getCtx().setParam(blah, obj)) to request parameters, make (or keep)
the
 objects available in their original form.
 
 I have got the case that I want to do a redirect to another command.
For
 this other command I have some object (which is not of type string!)
 available in my first/ calling command. Right now the only way that I
can
 expose arbitrary objects from the first command to the second command
is
 by
 using session objects (or something similar), which is not *that*
handy.
 
 Besides my own little problem (I already implemented the workaround),
I
 think doing a 'server side' redirect is better because it saves a
 client-server roundtrip. Better because it it more efficient, and
because
 it
 does not expose variables meant for internal use (which is allways the
 case
 if command1 calls command2?).
 
 Well, what do you all think?
 
 Cheers,
 
 Eelco Hillenius
 
 
 
 ---
 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:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
[INVALID FOOTER]



RE: [Mav-user] Tiers - sample J2EE application

2003-02-03 Thread Schnitzer, Jeff
In principle, I'm fine with putting this next to the Punk Image Gallery
link (or creating a section in the manual for samples).  But... what is
it?  Without actually installing it or going through all the source, it
would be nice to have some idea of what to expect.  Can you provide a
description of what the application does on the home page?

Thanks,
Jeff

 -Original Message-
 From: Roman Petrov [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 5:30 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] Tiers - sample J2EE application
 
 Domain romanpetrov.com will be unavailable during 1-2 days due to my
 hoster problems.
 Tiers temporarily available on http://poma119.valuehost.ru/tiers/
 
 Could you add link to http://romanpetrov.com/tiers/ to the maverick
 manual?
 
 
 ---
 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:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
[INVALID FOOTER]



RE: [Mav-user] stuck w/ iPlanet

2003-01-23 Thread Schnitzer, Jeff
No, just HEAD.  There haven't been any major refactorings to the
maverick core in quite a while; the current CVS tree is fine.  The only
major change is in the sample app - the friendbook login process has
been completely rewritten.

Sorry, I probably should have mentioned the checkin.

Jeff

 -Original Message-
 From: Shackelford, John-Mason
[mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 23, 2003 6:48 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [Mav-user] stuck w/ iPlanet
 
 Jeff,
 
 Is there a build tagged in CVS with this fix?
 
 John-Mason Shackelford
 
 Software Developer
 NCS Pearson - Measurement Services
 2510 North Dodge St.
 Iowa City, IA 52245
 319-354-9200x6214
 [EMAIL PROTECTED]
 
 
 
 -Original Message-
 From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 21, 2003 4:28 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [Mav-user] stuck w/ iPlanet
 
 
 Examining the javadocs for ServletContext.getRequestDispatcher(), it
looks
 like it is a spec requirement that all paths passed to that methods
must
 begin with '/'.  Maverick should probably take care of this ensuring
this
 all the time.
 
 Mea culpa - I'll fix it tonight.  Thanks for bringing it up :-)
 
 Jeff Schnitzer
 [EMAIL PROTECTED]
 
  -Original Message-
  From: Shackelford, John-Mason [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 21, 2003 6:46 AM
  To: '[EMAIL PROTECTED]'
  Subject: RE: [Mav-user] stuck w/ iPlanet
 
  Jeff,
 
  Thanks for the tip. iPlanet does appear to have a problem with
 relative
  paths.
 
  Would you be willing to consider applying a patch to Maverick that
 would
  allow the user to set a flag in maverick.xml that would force the
  dispatcher to absolutize paths? This would be make Maverick iPlanet
  compatible without
  requiring the user to comb through their maverick.xml file and code
  looking
  for relative paths.
 
  If you wouldn't be opposed to the idea, I'll get a patch to you.
 
  Thanks,
 
  John-Mason Shackelford
 
  Software Developer
  NCS Pearson - Measurement Services
  2510 North Dodge St.
  Iowa City, IA 52245
  319-354-9200x6214
  [EMAIL PROTECTED]
 
 
 
  -Original Message-
  From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 14, 2003 5:40 PM
  To: [EMAIL PROTECTED]
  Cc: Lane, Brad
  Subject: RE: [Mav-user] stuck w/ iPlanet
 
 
  Just a thought, but have you tried path=/mav/helloWorld.html (with
 the
  leading '/')?  Maybe iPlanet has strange ideas about mapping the
paths
 of
  relative urls.
 
  Another bit of information that would help in debugging is to create
a
  controller (or a servlet or whatever) that displays the results of
  ServletRequest.getRealPath(mav/helloWorld.jsp).  It would be nice
to
  know where iPlanet is looking.
 
  Actually, probably better than getRealPath() would be to call
  getResource() and print the URL.
 
  Jeff
 
 


 **
  **
  This email may contain confidential material.
  If you were not an intended recipient,
  Please notify the sender and delete all copies.
  We may monitor email to and from our network.
 


 **
  **
 
 
  ---
  This SF.net email is sponsored by: Scholarships for Techies! Can't
  afford IT training? All 2003 ictp students receive scholarships. Get
  hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
  www.ictp.com/training/sourceforge.asp
  [INVALID FOOTER]
 
 
 
 ---
 This SF.net email is sponsored by: Scholarships for Techies! Can't
afford
 IT
 training? All 2003 ictp students receive scholarships. Get hands-on
 training
 in Microsoft, Cisco, Sun, Linux/UNIX, and more.
 www.ictp.com/training/sourceforge.asp
 [INVALID FOOTER]
 
 
 ---
 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:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
[INVALID FOOTER]



RE: [Mav-user] A Controller with Integrated FormProc features

2003-01-06 Thread Schnitzer, Jeff
Sure, that could work - but why not simply set up an additional
sourceforge project?  We would be happy to link to it in the
documentation and on the Maverick website navbar.

I've been working on a rewrite of the Punk Image Gallery since the
existing code is quite dated (it is still based on Maverick 1.x).  I'm
planning on moving it to a separate SF project.  Plugins make a lot of
sense to put in the Maverick CVS, but big sample apps probably deserve
their own SF project - they're more likely to take on a life of their
own that way.

BTW, I am also really interested in a small and simple threaded forum
system.  I have a few applications for which Jive is just far far too
heavy.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: David Cuthill [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 06, 2003 11:45 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Mav-user] A Controller with Integrated FormProc features
 
 Hi Zed,
 
 I for one, would be interested in perusing the full source to your
 webapp. In a few weeks I will be starting a new project for which I
have
 already specified components similar to yours: Maverick, Hibernate and
 some heavy form validation (FormProc?).
 
 Perhaps Jeff and the guys could set up a '3rd party' CVS branch, where
 submissions such as yours can be published, which enhances the project
 whilst keeping the core code branch clean and lightweight?
 
 David Cuthill
 
 
 Zed A. Shaw wrote:
  Hi folks,
 
  I've been playing with several different web application frameworks,
and
  decided to spend some time writing up a real simple little threaded
  discussion board in Maverick.  I also managed to write a fairly
complete
  base controller which integrates with FormProc to give you
  semi-automated form validation.  I thought I'd send it to the list
to
  see what people think.  I've attached the maverick.xml and the
  SuperController.java files for people to look at.  I also threw in
one
  of the derived controllers to show how it is used. The entire
threaded
  discussion forum is much to large to put in an e-mail, but I may
throw
  it up on a website somewhere if people are interested in it as a
  learning project.
 
  Anyway, Maverick is really cool.  Thanks for the good work.  Have
you
  guys thought of hooking up some XDoclet stuff like struts and
webwork
  have done?
 
 
 

 
  package com.zedshaw.mavforum.control;
 
  import com.zedshaw.mavforum.data.*;
  import cirrus.hibernate.*;
  import org.infohazard.maverick.ctl.*;
  import org.infohazard.maverick.flow.*;
  import java.util.*;
  import org.formproc.*;
  import org.formproc.servlet.*;
  import org.apache.commons.beanutils.BeanUtils;
  import org.apache.commons.logging.LogFactory;
  import org.apache.commons.logging.Log;
 
  /**
   *  Description of the Class
   *
   *@author zedshaw
   *@createdDecember 16, 2002
   */
  public class ForumList extends SuperController {
 
  /**
   *  Description of the Method
   *
   *@param  controllerNode   Description of the Parameter
   *@exception  ConfigException  Description of the Exception
   */
  public void init(org.jdom.Element controllerNode) throws
 ConfigException {
  // we only do this in the ForumController so that it is
done
 once
  super.init(controllerNode);
  HibernateManager.init();
  }
 
 
  /**
   *  A logger for printing out messages.
   */
  private static Log log = LogFactory.getLog(ForumList.class);
 
 
  /**
   *  Constructor for the ForumController object
   */
  public ForumList() {
  super();
  }
 
 
  /**
   *  Description of the Method
   *
   *@param  ctxDescription of the Parameter
   *@param  formResult Description of the Parameter
   *@param  formModel  Description of the Parameter
   *@returnDescription of the Return Value
   *@exception  Exception  Description of the Exception
   */
  public String perform(ControllerContext ctx, FormResult
formResult,
 Map formModel) throws Exception {
 
  // get the forums and set them up as the model
  Session sess = HibernateManager.getSession(ctx);
  boolean hasErrorr = false;
 
  // clear out the currentForum
 
ctx.getRequest().getSession().setAttribute(currentForum,
 null);
 
  try {
  List forums = sess.find(from forums in class
Forum);
  ctx.setModel(forums);
  } catch (Exception e) {
  ctx.setParam(errorReason, Problem listing all
the
 forums.);
  e.printStackTrace();
  hasErrorr = true;
  } finally {
  sess.disconnect();
  }
 
  return hasErrorr ? ERROR : SUCCESS;
  }
 
  }
 
 
 
 

RE: [Mav-user] A Controller with Integrated FormProc features

2003-01-06 Thread Schnitzer, Jeff
 From: Zed A. Shaw [mailto:[EMAIL PROTECTED]]
 
 Have you
 guys thought of hooking up some XDoclet stuff like struts and webwork
 have done?

I haven't personally.  I like XDoclet and I use it for my EJBs but I'm
not sure it makes so much sense for a web sitemap.  When I want to
figure out what is going on in a Maverick app when a command is
executed, I open the sitemap and look at the configuration of the
command.  Going the other direction would be confusing to me, especially
because many different commands often use the same controller.

Jeff


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]



RE: [Mav-user] prevent jsps from being called directly

2002-12-20 Thread Schnitzer, Jeff
The standard security options in web.xml work fine.  The security rules
only apply to incoming requests, not to internal forwards, so Maverick
still works.

You can try blocking access to *.jsp, or you can put all your JSPs under
a directory and block access to that directory.

Here's a page that describes the web.xml settings:

http://www.onjava.com/pub/a/onjava/2001/08/06/webform.html

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Shackelford, John-Mason [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 7:25 AM
 To: '[EMAIL PROTECTED]'
 Subject: [Mav-user] prevent jsps from being called directly
 
 Is there a way to set up my web app so that JSP cannot be called
directly
 but are only rendered as views via Maverick's dispatcher?
 
 It seems like between the web.xml file and perhaps an additional
servlet
 one
 ought to be able to do this, but I've not thought it through. I
started by
 thinking I could write a jsp tag that would forward a incoming
requests to
 page where no model was set in the request, but this seems messy--
 especially
 in an app that has many JSPs.
 
 What techniques are others using?
 
 
 John-Mason Shackelford
 
 Software Developer
 NCS Pearson - Measurement Services
 2510 North Dodge St.
 Iowa City, IA 52245
 319-354-9200x6214
 [EMAIL PROTECTED]
 
 


**
 **
 This email may contain confidential material.
 If you were not an intended recipient,
 Please notify the sender and delete all copies.
 We may monitor email to and from our network.


**
 **
 
 
 ---
 This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
 Time is running out!  Thinkgeek.com has the coolest gifts for
 your favorite geek.   Let your fingers do the typing.   Visit Now.
 T H I N K G E E K . C O Mhttp://www.thinkgeek.com/sf/
 [INVALID FOOTER]



---
This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
Time is running out!  Thinkgeek.com has the coolest gifts for
your favorite geek.   Let your fingers do the typing.   Visit Now.
T H I N K G E E K . C O Mhttp://www.thinkgeek.com/sf/
[INVALID FOOTER]



  1   2   >