RE: [Mav-user] a new view

2004-09-20 Thread Schnitzer, Jeff
Velocity documents are "mostly" xml-safe.  There are a couple bothersome
issues like relational operators < > and the occasional use of quotes.

Velocity produces text that must be parsed to perform XSLT transforms.
This new approach starts immediately with SAX events.  Unlike a
hypothetical "saxify", it doesn't require fully navigating the source
object graph.  Cool.

The downside is that it introduces yet another templating language
syntax.  What about borrowing the syntax of XSLT?  Presumably your web
developers are already using XSLT to handle the outgoing sax events, it
would be nice if they could leverage their existing knowledge.

Jeff


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:mav-user-
> [EMAIL PROTECTED] On Behalf Of Peter Blakeley
> Sent: Friday, August 27, 2004 2:59 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Mav-user] a new view
> 
> Velocity does not care what type of file it just parses text the input
> and out put file can be anything you want  xml, xhtml, html, htm, jsp,
> txt, vm, css, xslt .
> You can do everything xslt can do and much more in a far more concise
way
> 
> cheers pb..
> 
> Eelco Hillenius wrote:
> 
> >because that would not give him valid XML source files.
> >
> >- Original Message -
> >From: "Doug Kirk" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, August 27, 2004 8:48 PM
> >Subject: Re: [Mav-user] a new view
> >
> >
> >
> >
> >>Hmmm...I don't want to rain on any parades, but I'm just wondering
why
> >>you didn't want to use Velocity, as it accomplishes the same thing
and
> >>it's already written and well-supported?
> >>
> >>
>

--
> 
> Peter Blakeley - Attain Consultants - mobile: 0427-723-814
> 
> SECURITY
> Virus-Protection, Firewalls, Auditing, Upgrades, Repairs,
Troubleshooting
> 
> NETWORK
> Windows 2000, XP, Design, Setup, Management, Troubleshooting
> 
> INTERNET
> Web site design, Java programming, JEE2, JSP, Servlets, RMI, EJB, XML,
> Workflow, Accounting, Web Services
> 
> [ attainconsult.com ]
> [ coolcat.com.au ]
> 
> "Why open source? because I prefer to surf the wave to the beach
rather
> than swim all the way in."
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement
on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> [INVALID FOOTER]



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
[INVALID FOOTER]


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

2004-09-01 Thread Schnitzer, Jeff
>From Cyrille Bonnet
> 
> Hi Jim,
> 
> 
> 
> For page1
> 
> And:
> 
> 
> 
> 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







And then in your trim.jsp:




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:

function2.js

And then in your trim.jsp:




This provides a reasonable way to pass big blocks of text around.  If
you wanted to, you could use  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_idP47&alloc_id808&op=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_idP47&alloc_id808&op=click
[INVALID FOOTER]


RE: [Mav-user] Site permissions and release plan

2004-06-07 Thread Schnitzer, Jeff
I've reset the permissions on all the web content files.

I can't think of any other changes... feel free to propose a release.

Thanks!

Jeff

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:mav-user-
> [EMAIL PROTECTED] On Behalf Of Eelco Hillenius
> Sent: Monday, June 07, 2004 2:57 PM
> To: [EMAIL PROTECTED]
> Subject: [Mav-user] Site permissions and release plan
> 
> Hi all,
> 
> I just commited the proposed changes to replace Log4J with Commons
> Logging.
> 
> Jeff, could you change the rights on the site documents (index.html
and
> maverick-manual.html)? They are only writeable for the owner... and
that's
> you 8)
> 
> All:
> any additional changes/ fixes I should make? Any ideas for a release
(like
> version nbr, when, etc.) - I'm okay with preparing it.
> 
> Eelcow
> 
> 
> 
> 
> ---
> This SF.Net email is sponsored by: GNOME Foundation
> Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
> GNOME Users and Developers European Conference, 28-30th June in Norway
> http://2004/guadec.org
> [INVALID FOOTER]



---
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
[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=3149&alloc_id=8166&op=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_id149&alloc_id66&op=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=3149&alloc_id=8166&op=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] Use Apache Commons Logging instead of log4j

2004-06-01 Thread Schnitzer, Jeff
+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=3149&alloc_id=8166&op=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_id149&alloc_id66&op=click
[INVALID FOOTER]


RE: [Mav-user] PHP

2004-05-25 Thread Schnitzer, Jeff









His controllers build java objects which
become the model to be hand off to the view layer.  How would you hand java
objects to php pages?  Any MVC webapp framework will have this problem.  You
could serialize out the java objects to the filesystem as XML and read that
into the PHP pages, but that is a colossal hack.

 

You could use Ambivalence to rebuild the
business logic in PHP, or you can rewrite your PHP templates as JSP (or
Velocity), but either way you probably need to change something.  These
technologies are more or less immiscible at the level of granularity you are
looking for.

 

3jeff

 

 



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Lee McColl
Sent: Tuesday, May 25, 2004 11:21
AM
To: [EMAIL PROTECTED]
Subject: [Mav-user] PHP

 



Hi all,





 





I've recently teamed up with an applications developer to
offer my web development skills and am currently picking apart his
software.  He currently has a nifty Java based server app which displays
information through Maverick and Velocity.  I believe there are lines
in his Maverick Web.xml that read -





 






  velocityViewer
  net.nt.frontend.servlets.VelocityViewer
  10
 





 





It is these lines that I am assuming allow his Java server
app to send properties and results to his Velocity pages.





 





Anyway, what I want to do, if it is at all possible, is to
change his system so that it sends the information to and through PHP
pages.  I'm happy to continue using Maverick if I can, but seeing as the
system I built that bolts onto his software uses PHP, I would like to
exchange all the .vm pages to also use the same PHP classes.  Make
sense?  (I babble).





 





How can I do this?  And if it's not possible with
Maverick, what system can I use?





 





I originally thought Ambivalence was made for this, but
having read the manual for it, it now seems more like a PHP templating system
to seperate PHP code from the presentation, much like Maverick seperates Java
from presentation But I've already built the PHP templating system using
other means.





 





Please please help,





 





Lee












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=1470&alloc_id=3638&op=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_id70&alloc_id638&op=click
[INVALID FOOTER]


RE: [Mav-user] Redirect within context?

2004-03-09 Thread Schnitzer, Jeff
You can specify the redirect destination dynamically from your
controller by calling ControllerCtx.setModel().  Take a look at the
javadocs for RedirectViewFactory.

Jeff

> -Original Message-
> From: James A. Hillyerd [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 06, 2004 4:56 PM
> To: [EMAIL PROTECTED]
> Subject: [Mav-user] Redirect within context?
> 
> First off: Hi.  I'm just getting started with Mav, and am really
liking
> what I see so far.  I've been using struts for a couple years now, and
> really don't enjoy all the hoops it makes me jump through.
> 
> I'm looking for a way to do redirects within my application's context.
> I am using redirects in certain places where I want the user to have
the
> correct URL for the page (so they can bookmark it or hit reload).
> Redirecting to "command.m" seems to work, until I have a command name
> with a / in it, which I am kinda used to doing in struts to group
> related commands/actions.
> 
> Is there a better method?  I'd rather not hard code the context name
> into my maverick.xml file.
> 
> Thanks.
> 
> -james
> 
> --
> James A. Hillyerd <[EMAIL PROTECTED]>
> Java Software Engineer - ActiveRain.com
> 
> 
> ---
> 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=1470&alloc_id=3638&op=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_id70&alloc_id638&op=click
[INVALID FOOTER]


RE: [Mav-user] "Smart" mapping to commands

2004-03-09 Thread Schnitzer, Jeff
Have you considered using a servlet filter?

Jeff

> -Original Message-
> From: Bart Bloemers [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 29, 2004 3:01 PM
> To: [EMAIL PROTECTED]
> Subject: [Mav-user] "Smart" mapping to commands
> 
> maverick users,
> 
> i have used maverick for almost 2 years. first one thank you for all
the
> good work and sharing the knowledge.
> till now i have always defined all pages/commands in the config file.
> many pages have the same structure(commands). So the transformation of
> this
> config file is a great option.
> But if there's p.e. a new department or a new page i must (dynamic)
this
> config file.
> 
> is it posible to use a wildcard in a commandname so different urls are
> mapped to single commands.
> /hq/*/faq.m
> /hq/*/agenda.m
> /hq/*/*.m
> *.m
> 
> thanks in advance bart
> 
> 
> ---
> 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=1470&alloc_id=3638&op=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_id70&alloc_id638&op=click
[INVALID FOOTER]


RE: [Mav-user] One command for many urls?

2004-02-10 Thread Schnitzer, Jeff
I would recommend using a Servlet Filter to remap the URL to something a
little more traditional, like /view.m?file=/set1/pic1.html.  Servlet
filters let you do a lot of cool URL munging.

Jeff


> -Original Message-
> From: Todd O'Bryan [mailto:[EMAIL PROTECTED]
> Sent: Saturday, February 07, 2004 2:55 PM
> To: [EMAIL PROTECTED]
> Subject: [Mav-user] One command for many urls?
> 
> I just downloaded Maverick this morning, and I'm already realizing how
> much time I've been wasting the last few months.
> 
> Anyway, I'm trying to write a resource viewer that will present one of
> hundreds of jpegs to users depending on which URL they try to access.
> For example,
> 
> /view/set1/pic1.html
> /view/janesset/pic4.html
> 
> should return pages with the appropriate jpegs in them (along with
> window dressing), where the path to the particular jpegs defined by
> set1 and janesset are in a configuration file.
> 
> I can do this in a generic servlet by mapping /view/* to the servlet
> which reads the configuration file and serves up the appropriate local
> resource, and I've done that successfully. Now, however, I want to
> check to make sure that people are logged in, have access to the
> resource they're trying to view, handle errors robustly, and generally
> separate the M, V, and C parts of my code.
> 
> Does Maverick let me map multiple URLs to a single command? If not,
> should I use query parameters instead of paths? I like the clean-ness
> of the resource looking like a simple web page that somebody could
type
> into their browser without a lot of strange symbols, but I can't tell
> if it's possible to do this.
> 
> Any insight appreciated,
> Todd
> 
> 
> 
> ---
> 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]



---
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.
> 
>   
>   
>   
>   
>   
> 
>   
>   
> 
>   
> 
>   
>   
>   
>   
>   
> 
> 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 ...
> 
>   
>   
> 
>   
> 
>   
>   
>   
>   
> 
> 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] 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] 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,
> 
> 
>   
> 
> 
> 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:
> 
> 
>   
>   hot.jsp
>   hoter.jsp
>   hotest.jsp
>   
> 
> 
> 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  elements like this:


  
  
  



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] Curious about how mav handles dates

2004-01-14 Thread Schnitzer, Jeff
> From: Travis Reeder [mailto:[EMAIL PROTECTED]
> 
> What can you pass in for mav to handle a date from a request param
> properly?  I would like to pass in the long value.

Dunno.  Maverick uses the Jakarta commons beanutils to populate form
beans.  I'm not sure if it handles dates in any way; you might want to
check their documentation or mailing list.

At worst, just pass strings and do the conversion yourself.

3jeff


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
[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 don’t understand – why can’t 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_id78&alloc_id371&op=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?









Sorry,
I don’t understand – why can’t 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 don’t 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_id78&alloc_id371&op=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_id78&alloc_id371&op=click
[INVALID FOOTER]


RE: [Mav-user] OS dependent while retrieving Dispatcher : the right message

2003-11-25 Thread Schnitzer, Jeff
Are you sure you have the exact same versions of everything?

When you say "doesn't work" do you mean the value you get is null?

If this is really happening, it would be a bug in your container.  What
container?

3jeff

> -Original Message-
> From: Pierre de Soyres [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 24, 2003 5:49 AM
> To: [EMAIL PROTECTED]
> Subject: [Mav-user] OS dependent while retrieving Dispatcher : the
right
> message
> 
> Hello,
> 
> (Sorry for the last message that contained mistakes)
> 
> I saw a strange comportment while retrieving the Dispatcher :
> 
> -> Under Windows XP, this code doesn't work (but it should) and i
still
> can't understand why :
> protected Dispatcher getDispatcher() {
> return
>
(Dispatcher)this.getCtx().getServletContext().getAttribute(Dispatcher.MA
VE
> RICK_APPLICATION_KEY);
> }
> 
> -> but this one works fine (which tooks me a long time before finding
it)
> :
> protected Dispatcher getDispatcher() {
> return
>
(Dispatcher)this.getCtx().getServletContext().getAttribute("maverickAppl
ic
> ationKey");
> }
> 
> 
> -> Under linux : the right one works fine :
> protected Dispatcher getDispatcher() {
> return
>
(Dispatcher)this.getCtx().getServletContext().getAttribute(Dispatcher.MA
VE
> RICK_APPLICATION_KEY);
> }
> 
> Strange ! isn't it !!
> Any idea ?
> 
> Thanks.
> 
> ---
> Pierre de Soyres
> 
> 
>
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> 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: 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] Controllers selecting views

2003-11-11 Thread Schnitzer, Jeff
Right now, building their login server.  It's a J2EE app built of out
JBoss, EJBs, Hibernate, Maverick, and a half dozen other technologies.
However, the user-facing web frontend is built with Struts (that part is
maintained by the Austin team).

One of the things I had to do in Austin last week was take their
existing Struts frontend and adapt it to my login server.  It was the
first time in a couple years that I've worked on a Struts app... seems
like an awful lot of work for a simple application :-(

Jeff

> -Original Message-
> From: Travis Reeder [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 11, 2003 3:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Mav-user] Controllers selecting views
> 
> That's awesome about Ultima, what are you doing for them?
> 
> travis
> 
> Schnitzer, Jeff wrote:
> 
> >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]
> >
> >.
> >
> >
> >
> 
> 
> ---
> 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]



---
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] 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] Pico-enabled Controllers?

2003-11-04 Thread Schnitzer, Jeff
> From: Jozsa Kristof [mailto:[EMAIL PROTECTED]
> 
> I'm ready with my stuff. Maverick is now able to load FormBean style
> controller instances preinitialized with another components IoC type-3
> style
> from a picocontainer provided through a custom dispatcher class. It
works.
> If anyone's interested in the code, drop me a mail.

Cool... what's a picocontainer?  :-)

Jeff


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

 



  



 

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

">Manage> groups

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:
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> - main page:
> <% String sessionid = request.getSession().getId(); %>
>  href="groupslist.m;jsessionid=<%=sessionid%>">Manage
> groups
> 
> 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] 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] 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] session tracking

2003-10-24 Thread Schnitzer, Jeff
Are those redirects or forwards ("redirect" or "document" views)?  If
redirects, there is a fix in CVS right now that will address it.

If forwards... I don't think you need to worry about adding the session
id.  You're already within the context of a request, the session will be
there.

Jeff

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 24, 2003 4:15 AM
> To: [EMAIL PROTECTED]
> Subject: [Mav-user] session tracking
> 
> Hello,
> 
> When using Maverick and when cookies are disabled... I use Java's
> encodeURL method to get the sessionid in the URL so the URL then looks
> something like:
> menu.m;jsessionid=X
> 
> In the Maverick.xml file I got the following part:
> 
> 
>   
>   
>   
>  
> 
> Of course I want to get the sessionid passed on to the controller
class
> used in the planning-command. So the path when Menu returns success
should
> be planning.m;jsessionid=X. What is a smart way to pass the
sessionid
> on to the next pages?
> 
> David


---
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.(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.(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:
>  type="xslt">
>  
>provider="org.infohazard.maverick.opt.view.DomifyViewFactory"/>
>  
>  
>   
>
>   
>  
> 
> 
> 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
> >
> > 
> >
> > 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] jsessionid's in redirects

2003-10-15 Thread Schnitzer, Jeff
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
> 
> 
> 
> 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]


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:
> 
> 
>   
>   
>   
>   
> 
>   
>   
>   
>   
>   
> 
> ...
>   
>class="org.infohazard.friendbook.ctl.Friends"/>
> 
>   
>   
> 
>   
>   
>value="background-color: yellow;"/>
>   
>   
>   
>   
> 
> 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] 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?
> 
> 
> 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] 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:
> 
>  
>  
>  
>   path="file:/home/mmoulton/xsl/index.xsl" monitored="true"/>
>   path="file:/home/mmoulton/xsl/template.xsl" />
>  
>  
> 
> 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] relative paths under Maverick...

2003-10-06 Thread Schnitzer, Jeff
You want to try to think of this from the browser's perspective.  The
browser loads the stylesheet from /styles/, so anything included from
that stylesheet (by the browser) will be relative to /styles/.
"../images/orange2.gif" is correct.

If it works in windows and not linux, I would guess that you have a
case-sensitivity problem.  The linux filesystem is case-sensitive, the
windows filesystem isn't.

Jeff

> -Original Message-
> From: Ed Thompson [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2003 1:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Mav-user] relative paths under Maverick...
> 
> Tried this and discovered the path problem was not with the JSP, but
> with the style sheet referncing a backgroups image:
> 
> 
> 
> I have tried   background-image :
url("../images/orange2.gif");
> which works in windows but now linux.
>background-image : url("images/orange2.gif");
> works in neither
> 
> Within an MVC, what is the correct reference to an image from the
style
> sheet, giventhe following directory layout:
> 
> root/
>   |---jsp/
>   |---images/
>   |---styles/
> 
> 
> 
> 
> 
> ---
> 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] hot to pass objects to include page

2003-10-06 Thread Schnitzer, Jeff
JSP includes should work:


  


You might have to explicitly scope 'p' into the request attributes.
Note that this adds quite a bit of overhead to servicing a page.  Much
less overhead, but a bit more tricky is to use @include:


  <%@ include file="other.jsp" %>


Now you just have to make sure when you're writing other.jsp that you
don't do anything that would cause trouble if you repeatedly include the
file.

Velocity macros are a lot more pleasant, but probably not by themselves
worth switching your entire presentation technology for :-)

Jeff

> -Original Message-
> From: Travis Reeder [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2003 8:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Mav-user] hot to pass objects to include page
> 
> One way to do it with JSTL is to use jsp includes, then just include
the
>   "component" wherever you want to use it.  Other than that, I think
you
> have to make an component class and drop jstl for that component.
Then
> you could just plug in that componenent with  value="${myComponent.display}"/>
> 
> Travis
> 
> Doug Kirk wrote:
> 
> > With Velocity, this is a simple matter of creating macros to do your
> > work for you. I use macros to generate my 's from a
database.
> > Further, you can either place your macros in the file being
rendered, or
> > in the velocity global macro file.
> >
> > So, in the global macro file you define:
> >
> > #macro names($list)
> >   #foreach ($p in $list)
> > $p.name
> >   #end
> > #end
> >
> > Then, in your page, you simply write:
> >
> > $names($model.projects)
> >
> > In the macro above, Velocity doesn't care what type 'p' is, as it
treats
> > it as an Object any way; it will introspect for an accessor for the
> > 'name' property and render it to the output.
> >
> > Cheers,
> > Doug
> >
> >
> > On Monday, October 6, 2003, at 07:50 AM, Taavi Tiirik wrote:
> >
> >>
> >> Hello,
> >>
> >> This is not entirely maverick specific but I am trying to find a
> >> solution to this in maverick environment hence the question.
> >>
> >> I am currently using jstl as a view technology but if this can
> >> be achieved with velocity and not with jstl then I am quite
> >> ready to switch. Prefer to find a quick jstl solution though.
> >>
> >> I would like to make my views more modular and reuse
> >> common components as much as possible. For example
> >> if I iterate over some sort of collection I would rather
> >> include a component that knows how to render this
> >> object instead of having similar rendering code in so
> >> many places.
> >>
> >> So instead of this:
> >> 
> >> , etc.
> >> 
> >>
> >> I would like to have something like this: (does not work like this
> >> though)
> >> 
> >> 
> >>   
> >> 
> >> 
> >>
> >> and something like this in output-project.jsp:
> >> , etc.
> >>
> >> This kind of approach works as far as I only pass simpe strings
> >> but not with beans, etc. I need beans :)
> >>
> >> So please tell me how do you do this?
> >>
> >> best regards,
> >> Taavi
> >>
> >>
> >>
> >> ---
> >> 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]
> >
> > .
> >
> 
> 
> 
> ---
> 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] 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:   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] proper way to set params in redirect

2003-10-03 Thread Schnitzer, Jeff
> From: Travis Reeder [mailto:[EMAIL PROTECTED]
> 
> Is the proper way to do setViewParam in controllerContext?

Yep.  Or if you want, you can setModel() the entire redirect string.  Or
you can add params statically in the config file.

Jeff


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


RE: [Mav-user] Getting to an object from JSP

2003-09-30 Thread Schnitzer, Jeff
Anything you put in the request/session/application attributes is
available anywhere else you have access to those collections.

It's generally considered bad form to pass data to views that way but if
it makes sense for your application then do it.  Note that some
templating technologies (like XSLT) don't provide access to the
attribute collections.

If you're calling session.setAttribute("object1", foo); then you can
access the foo in JSTL as ${object1}.

Jeff

> -Original Message-
> From: Thompson, Kris [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 30, 2003 2:43 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Mav-user] Getting to an object from JSP
> 
> I believe so, Jeff or others?  As I understand it, model represents
your
> Controller class therefore anything in your jsp that is
${model.something}
> where something is a getter in your controller.
> 
> The quick answer is Yes.
> 
> >
> > So basically everything the jsp needs should ge accessible
> > with a getter
> > method in the current controller object? (Trying to
> > understand the theory).
> >
> >
> >
> >
> >
> 
> 
> ---
> 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] Question on xsl translation of static xml

2003-09-30 Thread Schnitzer, Jeff
> From: Marco Pas [mailto:[EMAIL PROTECTED]
> 
> i want to do a xml translation on a specific file and am using the
> following
> in my maverick.xml:
> 
> 
> 
>   
>   
>   
> 
> 
> The problem is that i receive my xsl file and not the transformation..
> Any hints on how to accomplish this ?

This works fine, friendbook-domify has an example.

A guess:  Are you using "domify" as the default-view-type?  If so, you
need to explicitly set the view type to "document" if you want a
document source.





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


  
  
  
  
  ... etc


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] I18n/l10n

2003-09-24 Thread Schnitzer, Jeff
> From: Ted Husted [mailto:[EMAIL PROTECTED]
> 
> This is OT, but I've been planning to do the same, as an alternative
to
> parse. A very nice aspect of Velocity is that its not hard to write
> valid XHTML templates. Unless, of course, you are slicing and dicing
> them with parse =:(

Yeah... this is, IMHO, a compelling advantage of Velocity over
Freemarker or JSP.  I believe the only significant (and pretty minor at
that) issue is the relational operator <.

> So, once I get through a pass on the latest set of pages in my lead
> application, I'd like to go back and try assembling them using XSL, to
> get most of the benefits of parse (or Tiles), without loosing valid
> XHMTL file or paying a runtime penalty.

It does seem to provide the best of all worlds.  It would be a lot more
flexible than tiles too.

My only concern is that it would make life harder for nontechie
designers.  Then again, it might not - the XSL templates would rarely
need to change, and it would be easy to build up a "vocabulary" of xml
elements so that actual page content might look very simple.  The
downside of this is that it completely abandons standard html editor
tools... which were probably choking on the velocity anyways.

A lot of my desire for this approach comes from using the Tigris CSS
stylesheets.  CSS is supposed to separate style from content but the
HTML ends up looking pretty miserable anyways, with strange divs and
classes and all manner of incomprehensible junk.  I'd rather specify tab
pages with real XML tags like  instead of figuring out the right
CSS classes to put on table cells.

Jeff


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


[Mav-user] PROPOSAL: Move java packaging to net.sf.mav.*

2003-09-24 Thread Schnitzer, Jeff
> From: Ted Husted [mailto:[EMAIL PROTECTED]
> 
> Schnitzer, Jeff wrote:
> > 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.
> 
> If there were interest, I'd be glad to volunteer for the grunt work,
as
> part of my right of passage =:)

If you're volunteering, you have my +0.5 :-)  Scott, Jim, Mike? 

> I'm still waiting on Anthon's reply regarding the FormProc patch.
Jeff's
> setup my account, and, in the meantime, I have some minor JavaDoc
fixes
> I could apply to the core, if that's all right. No code changes.

Please, go for it :-)

Jeff


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


RE: [Mav-user] HTTP Headers, XSLT transformation

2003-09-23 Thread Schnitzer, Jeff
> From: Dave Hahn [mailto:[EMAIL PROTECTED]
> 
> Is there a way, using opt-domify, to set HTTP headers on the last
step?
>  It seems one could solve it with servlet filters, but I'm looking for
> some way to manage this within the Maverick framework.

This isn't a domify issue; you're in the XSL transform stage and domify
is long forgotten.

The question becomes:  How can you set HTTP headers from a templating
technology (XSL) which knows nothing about HTTP?  It's a bit of a
problem.  Maverick allows you to specify an output-type on the transform
node in the configuration file, but that's limited to just one header.

A couple alternatives:

1) We could modify the XSLTransformFactory to allow specifying arbitrary
headers and values in the config file.  Downside is that these headers
can only be defined statically.

2) Create a final transform type that understands a particular schema.
Maybe any instance of  results in a
header being set and the elements stripped from the output.  It wouldn't
add much overhead and would allow quite a bit of flexibility.  Only
catch is that the set-header entries would have to appear near the
beginning of the source so that the headers are set before the output
buffer is committed.

#1 is probably useful to do no matter what.  #2 is a good exercise for
the reader :-)

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


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] PROPOSAL: Add Ted Husted as committer

2003-09-22 Thread Schnitzer, Jeff
Welcome Ted :-)

Jeff Schnitzer
[EMAIL PROTECTED]


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











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


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.

welcome.m

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] RE: Default page like index.m

2003-09-12 Thread Schnitzer, Jeff
Thanks, I'll add that as well.

Jeff Schnitzer
[EMAIL PROTECTED]

> From: Ted Husted [mailto:[EMAIL PROTECTED]
> 
> Here's a patch for the CVS FAQ regarding YAS:
> 
> 
> 
> 
> A third solution is to use a HTML page to redirect to a servlet URI.
> 
> 
> 
> 
> 
> 
> 
> [Not sure if you can actually have a programlisting in a listitem or
> note.]
> 
> -Ted.


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


RE: [Mav-user] FormProc Controller

2003-09-12 Thread Schnitzer, Jeff
> From: Ted Husted [mailto:[EMAIL PROTECTED]
> 
> Is anyone (else) working on this:
> 
> Check out how to make a Controller using formproc
> http://sourceforge.net/projects/formproc/

Not actively at the moment.  I looked into it a while ago for one of my
projects, then decided that frameworks like this are awfully complicated
for just validating simple form data.  Maybe my needs just aren't
sophisticated enough.

Development is pretty much driven by someone with a specific need; if
you would like to take a stab at it, please do :-)

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

RE: [Mav-user] get Server info

2003-09-03 Thread Schnitzer, Jeff
> From: Pierre de Soyres [mailto:[EMAIL PROTECTED]
> 
> with a HttpServletRequest, i can retrieve the Host name with :
> request.getServerName();
> 
> does anyone know if it is possible to retrieve such information within
the
> Maverick Dispacher's init(ServletConfig) method ?

No, that doesn't actually make sense.  The request.getServerName()
method returns the actual server name encoded in the request (for HTTP
1.1 requests; HTTP 1.0 requests don't include that information).  This
is the value used for virtual hosting.

Compare the results of viewing this URL with a HTTP1.1 browser:
http://mysun-mail.sun.com/servlet/SnoopServlet

with the results of a HTTP1.0 browser:
telnet mysun-mail.sun.com 80
Trying 192.18.129.22...
Connected to mysun-mail.sun.com.
Escape character is '^]'.
GET /servlet/SnoopServlet HTTP/1.0
...

Since getServerName() is specific to a particular request, it doesn't
make any sense in the context of Servlet.init().

If you're looking for the native hostname of the machine, use the
standard java mechanism.  I'm not quite sure what that is offhand, but
try this:

InetAddress.getLocalHost().getHostName();

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



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] 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")
> 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:
> >
> > 
> > 
> >  > path="admin/remoteAccessResponse.vm"/>
> > 
> >
> > 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] ModelLifetime.discard() issue

2003-08-15 Thread Schnitzer, Jeff
I can't imagine what could cause that if reuseMaverickContext is
disabled.  Can you send me a testcase?

Jeff Schnitzer
[EMAIL PROTECTED]

> -Original Message-
> From: Trebor Carpenter [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 15, 2003 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [Mav-user] ModelLifetime.discard() issue
> 
> Whoops, I was using the wrong test case and testing redirect not
> forward. When using forward I still have the same problem, even with
> reuseMaverickContext off.
> 
> --
> Trebor Carpenter, mailto:[EMAIL PROTECTED]
> 
> -Original Message-
> From: Trebor Carpenter
> Sent: Friday, August 15, 2003 12:11 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Mav-user] ModelLifetime.discard() issue
> 
> 
> Turning off reuseMaverickContext does indeed take care of this. I had
> forgotten I had that turned on. I originally turned it on simply
because
> that was the behavior before 2.2.0 made it optional, and I wasn't sure
> whether I needed it or not.
> 
> Thanks!
> 
> --
> Trebor Carpenter, mailto:[EMAIL PROTECTED]
> 
> -Original Message-
> From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 14, 2003 7:28 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Mav-user] ModelLifetime.discard() issue
> 
> 
> > 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]
> 
> 
> ---
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
>
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01
> /01
> [INVALID FOOTER]
> 
> 
> ---
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-
> url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
> [INVALID FOOTER]



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
[INVALID FOOTER]


RE: [Mav-user] 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












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


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

2003-08-09 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 Release

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] Login with dynamic redirect

2003-08-04 Thread Schnitzer, Jeff
Why not follow the pattern of the friendbook sample app?  Rather than
redirect to the login page (which changes the URL in the browser and
does all manner of nasty things to the history), why not just forward to
a "you need to log in first" page?  A complete set of appropriate
parameters is easily passed in the model to the log-in-first page.

IMHO, redirects are messy.

Jeff Schnitzer
[EMAIL PROTECTED]

> -Original Message-
> From: David Cruwys [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 01, 2003 10:14 PM
> To: [EMAIL PROTECTED]
> Subject: [Mav-user] Login with dynamic redirect
> 
> Scenario 1
> 
> User types http://host/app/protectedCommand.m, the protected command
sees
> that the user
> is not logged in so redirects them to login screen, when the user has
> logged
> in successfull
> the loggin can return either SUCCESS or if a redirect property is set,
the
> login can redirect
> to desired screen
> 
>   
>   class="com.muesliflakes.webapp.portal.ctl.PrtLoginCmd"/>
> 
>  
> 
>  
> 
>  
>  
>  
> 
>   
> 
> I can get this working with the following code.
> 
>public String execute( BaseForm formBean, ControllerContext cctx )
> throws
> Exception
>{
>  try
>  {
> // Authenticate Code...Throw exception if login failed...
> 
> if ( ! StrUtil.isEmpty( formBean.getRedirect( ) ) )
> {
>cctx.setModel( formBean.getRedirect( ) );
>return "redirect";
> }
> return SUCCESS;
>  }
>  catch ( SignInException e )
>  {
>  }
>   }
> 
> Scenario 2,
> 
> User types http://host/app/protectedCommand.m?p1=v1&p2=v2&p3=v3
> 
> Same idea, user is redirected to login and then if login is
successfull
> they
> should be redirected through to initially selected command, only this
time
> there are a number of URL paramters that I wish to have set, Does
anyone
> have a simple way of acheiving this functionality.
> 
> Cheers Dave
> 
> 
> 
> 
> ---
> 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] PROPOSAL: Add Mike Moulton as committer

2003-08-04 Thread Schnitzer, Jeff
Done, welcome Mike Moulton!

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]


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


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

2003-07-21 Thread Schnitzer, Jeff
Title: new user









Sure, send it out… and a link should
be no problem.

 

It’s a pretty quiet list.  I
like to think that’s because the framework is so intuitive and the documentation
is so good :-)

 

Thanks,

Jeff Schnitzer

[EMAIL PROTECTED]

 

 



-Original Message-
From: Volkmann, Mark
[mailto:[EMAIL PROTECTED] 
Sent: Monday, July 21, 2003 2:22
PM
To:
'[EMAIL PROTECTED]'
Subject: [Mav-user] new user

 

I see
that there isn't much traffic on this mailing list now.  That's a
shame.  I just learned about Maverick a few days ago and I'm hooked. 
I like it much better that Struts.  Part of the reason is that I strongly
prefer generating HTML using XSLT than using JSP and Struts strongly leans
toward JSP.

DOMify
works great for generating an XML representation of your model!  However,
I think the issue of it not dealing with circular references needs to be
addressed.

I'm
creating a presentation of Maverick that I may present at the St. Louis Java
User Group soon.  If there is any interest in putting a link to my
presentation on the Maverick web site, I'd be open to that.  If anyone is
interested, I can send my presentation to this mailing list before I give the
talk.  That way if I've misstated something, one of you might correct me
on it before it's too late.

Congrats
on a great framework! 



***
WARNING: All e-mail sent to and from this
address will be received or
otherwise recorded by the A.G. Edwards corporate
e-mail system and is
subject to archival, monitoring or review by,
and/or disclosure to,
someone other than the recipient.











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


  
  


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

2003-07-07 Thread Schnitzer, Jeff
> From: DEO Kedar [mailto:[EMAIL PROTECTED]
> 
> Is this the right way to do it? how would I persist the dropdown list
> otherwise? why do the cctx.getModel() returns null in the second
> controller when I had explicitly set the model in the first
controller.
> Isn't it that the model should exists in the context.

That's certainly one reasonable approach.

Don't call cctx.getModel() to get the model - use the formBean object
passed into perform().  Maybe the getModel() method should be removed
from that interface.  H.

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



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
It's always a good idea to look up that exception in the source code.
In this case, check out XSLTransformFactory.java:142.  Looks like the
class you are specifying for a URI resolver does not exist.  Actually,
it looks like you are doing something like this:  uri-resolver=""

Jeff Schnitzer
[EMAIL PROTECTED]

> -Original Message-
> From: Marcel Kung [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 02, 2003 1:36 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Mav-user] Reload command in web.xml
> 
> Now that I know how to use the reload.m command everything's working
fine.
> I
> tried using the template-caching idea when I was looking
> for a solution originally. The result was the following (similar under
> both
> Tomcat and Resin):
> 
> java.lang.ClassNotFoundException:
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Class.java:130)
>   at
>
org.infohazard.maverick.transform.XSLTransformFactory.init(XSLTransformF
ac
> to
> ry.java:142)
>   at
>
org.infohazard.maverick.flow.MasterFactory.defineTransformFactories(Mast
er
> Fa
> ctory.java:269)
>   at
org.infohazard.maverick.flow.Loader.loadModules(Loader.java:195)
>   at
org.infohazard.maverick.flow.Loader.loadDocument(Loader.java:155)
>   at org.infohazard.maverick.flow.Loader.(Loader.java:88)
>   at
> org.infohazard.maverick.Dispatcher.reloadConfig(Dispatcher.java:220)
>   at org.infohazard.maverick.Dispatcher$1.go(Dispatcher.java:231)
>   at
org.infohazard.maverick.Dispatcher.service(Dispatcher.java:179)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
>   at
>
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChai
n.
> ja
> va:105)
>   at
>
com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:
17
> 3)
>   at
>
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.ja
va
> :1
> 49)
>   at
>
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.j
av
> a:
> 221)
>   at
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:256)
>   at
com.caucho.server.port.WorkerThread.run(WorkerThread.java:126)
>   at java.lang.Thread.run(Thread.java:536)
> Given that Maverick was working albeit that I had to restart Resin (in
the
> absence of my knowledge of the reload.m command) I decided that I
wouldn't
> bother looking into this issue ;-). However now that it's been brought
up
> perhaps someone might be able to shed some light on
this.Cheers,Marcel
> -
> Original Message -
> From: "jim moore" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 03, 2003 4:40 AM
> Subject: Re: [Mav-user] Reload command in web.xml
> 
> 
> > the reload command only tells maverick to reload maverick.xml.
basically
> to
> > refresh its mappings. you use the feature so that if you change
> maverick.xml
> > you don't need to restart the webapp. it should also reload all
> stylesheets
> > referenced in maverick.xml (this was working the last time I tried
it).
> >
> > for working on stylesheets, though, i generally found it more useful
to
> set
> > template-caching to disabled on the XSLTransformFactory:
> >
> >   > provider="org.infohazard.maverick.transform.XSLTransformFactory">
> >
> >
> >
> >  
> >
> > This will cause maverick to not cache stylesheets at all so as soon
as
> you
> > edit them you will see the changes--note this will destroy
performance,
> so
> > its great on a dev server, horrible on a live server.
> >
> > --jim
> >
> >
> > - Original Message -
> > From: "Thompson, Kris" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 02, 2003 12:19 PM
> > Subject: RE: [Mav-user] Reload command in web.xml
> >
> >
> > Sorry I don't have an answer for this but I would like to ask why
would
> one
> > want to use this feature anyway?  What is the true benefit?
> >
> > Kris
> >
> > > -Original Message-
> > > From: Marcel Kung [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, July 01, 2003 7:22 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [Mav-user] Reload command in web.xml
> > >
> > >
> > > In previous mav-user list archives there is mention of using the
> > > reloadCommand to cause Maverick to reload all the maverick.xml and
XSL
> > > changes automatically. In particular email
> > > http://sourceforge.net/mailarchive/message.php?msg_id=110721
> > > references the
> > > following settings in web.xml:
> > >
> > > 
> > >   dispatcher
> > >   Maverick Dispatcher
> > >
> > >
org.infohazard.maverick.Dispatcher
> > >   
> > > reloadCommand
> > > reload
> > >  
> > >  2
> > > 
> > >
> > > This appears in the Friendbooks examples and I have tried the
> > > examples under
> > > both Tomcat and Resin and in neither does this reload appear
> > > to work. You
> > > can change the xsl stylesheets and maverick.xml and refresh
> > > the browser but
> > > until you restart the server nothing changes. How is this
> > > relo

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: [Mav-user] ThrowawayBean2 and session

2003-07-01 Thread Schnitzer, Jeff
Do I understand this correctly?  You have three commands:  search, edit,
and save.  Upon successful save, you want to show the search page again.

How important is it that links are bookmarkable?  You can do either a
redirect or a forward.  If you do a redirect you have to figure out how
to "remember" the former values of the search clause, but the URLs will
be accurate.

I have a similar construct in one of my webapps, and I use the redirect
approach because I'm pretty anal-retentive about sensible bookmarking.
Instead of storing anything in the session I track the current state of
the search form in persistent cookies.  This has the added advantage
that the user always returns to the same search state whenever they come
back to the page, even across sessions.

If you want to use a forward, I recommend creating a new model
(appropriate to the search view) in your UseCaseSave controller and
calling getCtx().setModel().  Then forward to the JSP.  This is probably
easier to do if you use FormBeanUser (or ThrowawayFormBeanUser).  No,
you don't need to know anything about Struts.  Take a look at the
friendbook-jsp-fbu sample application in the latest release.

Jeff Schnitzer
[EMAIL PROTECTED] 

> -Original Message-
> From: DEO Kedar [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2003 12:55 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [Mav-user] ThrowawayBean2 and session
> 
> Hi,
> 
> I am a new user of maverick. I have understood the friendbook-jsp
example,
> but I have the following problem...
> 
> This is how my maverick.xml file looks like
> 
> 
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 
> all the controller classes are extended from ThrowawayBean2.
> 
> When I click a link on the index.htm file (href="UCSearch.m"), the
> UCSearch.jsp page is displayed which has few text boxes and drop down
as
> filters for search. I have the logic in the perform() method of the
> UseCaseSearch controller to populate the drop down.
> Once I click search on the UCSearch page the  page is submitted
> (UCSearch.m). I have a hidden variable set to true, the controller in
the
> perform() reads the hidden variable and populates a collection of
UseCase
> objects. since its the same controller whatever filter criteria's I
had
> selected in the first place are displayed along with the search
result.
> Then I select a UseCase (UseCaseManage.m) and go to the UseCase.jsp
page,
> to edit a use case. On the edit page I have a save button, submits to
> (UseCaseSave.m), the UseCaseSave controller saves the changed use case
in
> db.
> The problem is returning back to the original search page after the
save
> and having the page remember the filter criterias.
> If i have the maverick file as above   path="UCSearch.m"/> then it displays an error since the UseCaseSave
> controller's getter's and setter's are not the same as of the
> UseCaseSearch controller. Secondly, if I use type="redirect", then it
> displays the page with empty text boxes, and also the url looks like
> http://localhost:8080/uc/UCsave.m
> 
> What is my workaround with this, to keep things in session. I have not
> looked into the FormBeanUser controller. Is there a way to define the
> formbean for a controller in the maverick.xml ? Can someone post a
good
> example using FormBeanUser controller along with how to setup the
> maverick.xml file.
> Is it necessary to know struts to learn the usage of FormBeanUser??
> 
> Thanks,
> Deo
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---
> 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: 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.


  
...

  

  


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: 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:
> 
> 
> 
> 
> Then it would treat that trim like an include instead of a transform?

You can already do this quite easily like this:





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


  
 ...blah header blah...
 ...blah navbar blah...

 "
flush="true"/>
  


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: [Mav-user] Writing a book on JBoss/Jetty - including maverick - looking for reviewers

2003-06-24 Thread Schnitzer, Jeff
Title: RE: [Mav-user] Writing a book on JBoss/Jetty - including maverick - looking for reviewers






Sounds great – I’d love to help out.

Jeff

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Kimberley Scott
Sent: Monday, June 23, 2003 3:28 PM
To: Mav-User (E-mail)
Subject: [Mav-user] Writing a book on JBoss/Jetty - including maverick - looking for reviewers

Hiya,

My hubby spurred me on to do this, so I'll blame him if I get flamed... :-) 

I've been wanting to write something about JBoss/Jetty for some time due to the complete lack of solid, cookbook-like reliable documentation. A couple of weekends ago I put together the first few chapters, and now having a weeks worth of Maverick under my belt, I'm definately going to include a segment on it. I'm wondering if anyone feels up to spending a bit of time acting as a reviewer for the book as a whole and particularly the Maverick section when I get to it. I haven't written that bit yet. :-0 When I get to that, I'll probably be asking a million dumb questions wringing every last bit of information and usage and example ideas out of the people in this group... My hope is the section of maverick will become the 'cookbook' for maverick **as long as the illustrious leaders are fine with this**... I know this should probably be done via serverside or someone, but the 'soon to be' maverick section really needs to be reviewed by people who use it.

Whaddaya say Jeff?

If anyone is interested, just drop me an e-line. I written about 93 pages so far, but it's only been a weekends work and has a few bugs in it, and I only get every second weekend or so to work on it (in between cooking and cleaning :-), so it'll be a while before it's finished. Maybe if I have real user comments within the doc I'll get off my arse and finish it and get it published... :-) 

It's currently in word doc format using the O'Reilly animal book template btw.

Kimbo

Ms Kimberley Scott

Senior Software Engineer

DCG Media Ltd




RE: [Mav-user] Commands vs. Controllers

2003-06-24 Thread Schnitzer, Jeff
Title: Commands vs. Controllers









Keep
in mind that I have the javadoc generation configured to only show public
classes and interfaces.  This is the subset of Maverick that is of specific
interest to anyone who wants to develop with Maverick, and leaves off a lot
that would be of interest to people who are developing Maverick itself.  If
you would like to generate javadocs for everything, include the attribute Private=”true”
on the javadoc ant task.

 

Everyone’s comments were right-on
though.  Command is the internal structure that determines what Maverick
does when a particular command (ie blah.m) is executed.  ControllerWithParams
is a decorator that adds controller params defined in the config file to
runtime controllers.

 

Jeff Schnitzer

[EMAIL PROTECTED]

 

 



-Original Message-
From: Thompson, Kris
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2003 7:23
AM
To: [EMAIL PROTECTED]
Subject: [Mav-user] Commands vs.
Controllers

 

What
is the deal with the  Command interface, it doesn't appear to be used in
the src code... according to the Javadocs at least?  Is this some old code
that is just laying around or is it part of some future plan?

Next
question, what is the purpose or use of the ControllerWithParams Controller?


Thanks


Kris
Thompson 










[Mav-user] ANN: Release 2.2.0 of Maverick

2003-06-21 Thread Schnitzer, Jeff








Version 2.2.0 is up.

 

Be sure to check the release notes, there are some minor API
and behavior changes in this release. 
In particular:

 

.  The param collection on the context interfaces
has been split up into separate controller, view, and transform param collections.

 

.  Reuse of the
maverick context between command invocations within the same http request is
now disabled by default.  Version
2.1.2 added this feature, but it broke SiteMesh.  Now you can configure it with an init-param to the Dispatcher (check the docs in the download).

 

Enjoy :-)

 

Jeff Schnitzer

[EMAIL PROTECTED]








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

2003-06-21 Thread Schnitzer, Jeff
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> 
> Just a question on how the transforms are implemented.  Will it
process
> the entire "wrapped" portion before outputting?  So say if you had a
very
> long page in the wrapped, woudl it process that before outputting
> anything?

Processing always occurs linearly along the pipeline.  The view is
processed, then the first transform, then the next transform, etc.*  In
the case of document aka wrapping transforms, the previous step is fully
executed and the output is buffered.  Then a String is made out of that
data, placed in the request attributes, and the transform document is
executed.

This means you should probably be careful about doing this with
super-huge pages on high-volume sites... but if you're worried, profile
it first.  Usually any sophisticated system has other much worse
bottlenecks.

* If the connections between steps are made with SAX events, then the
whole assembly is put together and executed as-is.  How the work is
broken down is up to the transformation engine (xalan, etc).

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: [Mav-user] Question about model in transforms

2003-06-21 Thread Schnitzer, Jeff
> 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]


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. 

 

I’m not quite sure why what I was
saying earlier wouldn’t 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 you’re
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
could make 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] Best Practices Please

2003-06-20 Thread Schnitzer, Jeff









Hello!

 

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
controllers should only be instantiated once, and there are no synchronization
issues (as long as you code your FormBeanUser
controller thread-safe, which should be easy).  I seem to remember the synchronization/gc discussion was related to the performance (dis)advantages of pooling controllers – we don’t
do that.

 

Issue2:  I agree,
sophisticated inheritance chains become painful with ThrowawayBean-style
controllers.  For most of my
personal work, I actually use ThrowawayFormBeanUser
to get the best of both worlds.

 

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 could make the redirect a forward
instead if you want to.  In either
case it goes to a different controller. 
Perhaps I am misunderstanding your question?

 

Jeff Schnitzer

[EMAIL PROTECTED]

 

 

 

 

 

-Original Message-
From: David Cruwys
[mailto:[EMAIL PROTECTED]] 
Sent: Friday, June 20, 2003 10:23 PM
To: [EMAIL PROTECTED]
Subject: [Mav-user] Best Practices
Please

 



Issue 1





It would seem to me on the surface,
that the FormBeanUser - Singleton is a better choice of controller for
scallable systems then the Throwaway controller but through the examples and
discussions in the past (Most notably "reusable controllers and session
objects") this is not the case.





 





Also through my own tests with the
FormBeanUser, I noticed that it gets instantiated every time so how is it
considered to be a singleton. 





 





An issue raised in thread
"reusable controllers and session objects" was the case of GC vs
Synchronisation, well I wonder how much synchronisation there would be.





 





The SingletonControllers could be
created at load time and I would not think there would be a requirement to
synchronize the look them up of when needed. And since they would act upon
FormBeans that would be created locally within the go method or passed in
externally, then there are no issues of synchronisation that I can see.





 





Also the abillity to have multi
action controllers would be a simple to setup.





 





Issue2





Which brings me to multiple actions,
There is a thread ( I can't find it at the moment ) about these where the reply
is to have multiple controllers instead of a controller with multiple
action methods. These controllers would all be deriving from a base controller
that can hand common issues such as exception handling, but since most of the
uses of the controllers that I have seen stem from ThrowawayBean2 which I
think implies that the model is getting mixed into the controller, I think that
having base controller functionality followed by form bean properties and
then followed by individual actions all in one class hierachy is
starting to get a bit deep and you've mixed data with action, which seems wrong
to me because form data may be resusable accross different action domains.





 







Issue3





I have a login command that returns
the "home" view when the user successfully logs in.





 





I was thinking that my login form
would generally be called from a user trying to access a protected page in
which case I would want to redirect to that page after login, or alternatively
a prewritten url such as
/login.m?user=dave&password=newbie&fowardto=todo. which could attempt
login and if successfule call the todo command.





 





From what I can tell, the result of
commands is just a string representing global views or embedded views in the
command, what if I wan't to halt proccessing of the login controller once the
user is validated and redirect through to a different controller (which has its
on view). Esentially I want to change controllers on the fly.





 





Now I know that an answer for
this particular situation is to put the login code into the base
controller as is the case with sample app, but I don't wan't to do it this way,
plus I can see other reasons for having the ability to change controllers on
the fly anyway.





 





How do I acheive this ?





 







Issue4





Maverick is Brilliant, Die Struts
Die









 





Cheers Dave the Newbie





 





And the lord said unto the
Java-Guru, have mercy on the newbie for he/she is a dumbass who does not know
what their saying.










  1   2   3   >