You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ivo Zivkov <iz...@sympatico.ca> on 2004/02/25 21:53:46 UTC

Struts and Melvin

We are considering using Melvin (http://maven.apache.org/) with our 
Struts project.  Anybody had any experience in how well they work together?

Your help will be appliciated.

Ivo Zivkov




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: multi application config

Posted by David Evans <ds...@berndtgroup.net>.
Thanks for your reply, and for Struts and Tomcat.<g>
Based on your points below i'll be using the single context, single
sturts, multiple modules config.  Mostly because i can see the users
eventually wanting customizations that will be easiest to implement
using sessions.

thanks again,

dave

On Wed, 2004-02-25 at 17:25, Craig R. McClanahan wrote:
> Quoting David Evans <ds...@berndtgroup.net>:
> 
> > Hello,
> > 
> > I am getting ready to create our companies intranet, which will contain
> > many different applications: a time tracker, a task manager, a
> > directory, etc. I will be using struts for the applications. There will
> > be a filter for authentication and a default application which will
> > display a menu that sends the authenticated user to the selected
> > application. I am trying to decide whether to build the applications in
> > a single context running struts as a multi module application or to
> > configure tomcat with multiple contexts and have struts run one app per
> > context. Does anyone have any advice or can anyone point to
> > documentation regarding the pros and cons of each approach?
> > 
> 
> There are several considerations and no one always-right answer, but here's a
> couple of things that tend to push you one way or the other very quickly.
> 
> * Do you want users to be able to sign on once
>   and then access all the apps they have access
>   to, or is it acceptable to require login for
>   each app individually?  If you're using container
>   managed security, most containers (including
>   Tomcat) have some sort of "single sign on"
>   feature for this purpose.  With roll-your-own
>   security, it might or might not be that easy.
> 
> * Do you need HttpSession state to be shared across
>   all of your applications?  If so, you should
>   probably put everything in one webapp.  With
>   multiple webapps, your users will have a session
>   in each of them, all totally independent.
> 
> * When upgrading your apps, is it acceptable to
>   take them all down at once, or do you only want
>   to impact the individual apps that are being
>   updated?  For most company intranets, there is
>   likely to be slack time where this won't matter,
>   but it could be an issue for 24x7 shops.
> 
> * Is the overall size of the apps so big, and worked
>   on by so many people, that it gets difficult to manage
>   a single webapp configuration (and struts configuration)?
>   Individual smaller Struts based apps are likely to be
>   easier to deal with, but you can accomplish a lot of
>   the same ease of use with Struts modules.
> 
> In fact, with a little forethought, you could probably write all your apps as
> independent modules, and then try it either way, with relatively little pain.
> 
> Craig
> 
> 
> > 
> > thanks
> > 
> > dave
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: multi application config

Posted by "Craig R. McClanahan" <cr...@apache.org>.
Quoting David Evans <ds...@berndtgroup.net>:

> Hello,
> 
> I am getting ready to create our companies intranet, which will contain
> many different applications: a time tracker, a task manager, a
> directory, etc. I will be using struts for the applications. There will
> be a filter for authentication and a default application which will
> display a menu that sends the authenticated user to the selected
> application. I am trying to decide whether to build the applications in
> a single context running struts as a multi module application or to
> configure tomcat with multiple contexts and have struts run one app per
> context. Does anyone have any advice or can anyone point to
> documentation regarding the pros and cons of each approach?
> 

There are several considerations and no one always-right answer, but here's a
couple of things that tend to push you one way or the other very quickly.

* Do you want users to be able to sign on once
  and then access all the apps they have access
  to, or is it acceptable to require login for
  each app individually?  If you're using container
  managed security, most containers (including
  Tomcat) have some sort of "single sign on"
  feature for this purpose.  With roll-your-own
  security, it might or might not be that easy.

* Do you need HttpSession state to be shared across
  all of your applications?  If so, you should
  probably put everything in one webapp.  With
  multiple webapps, your users will have a session
  in each of them, all totally independent.

* When upgrading your apps, is it acceptable to
  take them all down at once, or do you only want
  to impact the individual apps that are being
  updated?  For most company intranets, there is
  likely to be slack time where this won't matter,
  but it could be an issue for 24x7 shops.

* Is the overall size of the apps so big, and worked
  on by so many people, that it gets difficult to manage
  a single webapp configuration (and struts configuration)?
  Individual smaller Struts based apps are likely to be
  easier to deal with, but you can accomplish a lot of
  the same ease of use with Struts modules.

In fact, with a little forethought, you could probably write all your apps as
independent modules, and then try it either way, with relatively little pain.

Craig


> 
> thanks
> 
> dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


multi application config

Posted by David Evans <ds...@berndtgroup.net>.
Hello,

I am getting ready to create our companies intranet, which will contain
many different applications: a time tracker, a task manager, a
directory, etc. I will be using struts for the applications. There will
be a filter for authentication and a default application which will
display a menu that sends the authenticated user to the selected
application. I am trying to decide whether to build the applications in
a single context running struts as a multi module application or to
configure tomcat with multiple contexts and have struts run one app per
context. Does anyone have any advice or can anyone point to
documentation regarding the pros and cons of each approach?


thanks

dave


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Struts and Melvin

Posted by Oswald Campesato <oc...@yahoo.com>.
Hello, Ivo:
 
FWIW:  I've dabbled with Maven in the context of the Groovy scripting language
(http://groovy.codehaus.org) rather than Struts, and it's power derives, in part,
from the plug-in extensibility (similar in spirit to Eclipse).  Maven provides all the
features of Ant; moreover, you can also embed Ant scripts in Maven scripts.
 
Ant 1.6.1 provides undocumented support for Groovy that enables you to embed
Groovy code in an Ant build file.  I've included a simple "proof-of-concept" example 
that is derived from discussion with Peter Reilly in the Groovy user group:
 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<?xml version="1.0"?>
<project name="InvokeScriptCodeInAnt" 
         default="invokeLanguages" basedir=".">
  <target name="invokeLanguages" 
          depends="invokeGroovy"/>
  <target name="invokeGroovy">
   <script language="groovy"><![CDATA[
      z = <<<END
      this is a multi
      line string
END
      println(z);
      list = [1, 2, 3]
      println(list[0..2])
      map=["a":1, "b":2]
      println("a is " + map["a"])
    ]]></script>
  </target>
</project>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
A good presentation of Maven that contrasts Maven with Ant:
http://www.theserverside.com/articles/article.jsp?l=MavenMagic

Indirect response, but nonetheless I hope it helps....
 
Cordially,
 
Oswald
 
btw:  here's a crazy thought:  use Maven to maintain Groovy to embed 
in Ant to support your Struts code (but don't tell your boss, though).
 

Ivo Zivkov <iz...@sympatico.ca> wrote:
We are considering using Melvin (http://maven.apache.org/) with our 
Struts project. Anybody had any experience in how well they work together?

Your help will be appliciated.

Ivo Zivkov




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------
Do you Yahoo!?
Get better spam protection with Yahoo! Mail

RE: Xhtml tag usage question

Posted by Renato Romano <r....@set-network.com>.
Thank you very much for your detailed explanation!!!
Renato

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________


-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk] 
Sent: giovedì 26 febbraio 2004 12.36
To: Struts Users Mailing List
Subject: Re: Xhtml tag usage question


Unfortunately it saves the xhtml 'flag' in page scope so there isn't
much you can do about it.

Background: BaseHandlerTag has an isXhtml() method which calls the
TagUtils.isXhtml() method which checks the xhtml 'flag' in page scope.

I did think a solution would be to override the TagUtils.isXhtml()
method to either always return 'true' or check a flag in request scope
(which you would have to set some way) - but unfortunately the instance
variable for TagUtils is both private and final - so theres no way to
extend and implement your own custom TagUtils version in 'vanilla'
struts. If you build your own version of struts, you could change
TagUtils itself, so maybe thats an option for you - but then every time
you take a new struts version you have to re-implement your change.

Another alternative is to extend the struts tags to create 'xhtml'
versions - all you would have to do is override the isXhtml() method
there. For example

public class XhtmlTextTag extends TextTag
   public XhtmlTextTag () {
      super();
    }
  protected boolean isXhtml() {
      return true;
  }
}

So I think you have a few options:
   - put the <html:xhtml> tag in every jsp
   - build your own version of struts and change TagUtils
   - extend the struts tags to create xhtml versions

Personally, I would go with <html:xhtml> for now and try to get struts
changed so that either the scope of the xhtml flag can be customized or
TagUtils can be extended and overriden.

Niall

----- Original Message ----- 
From: "Renato Romano" <r....@set-network.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Thursday, February 26, 2004 8:49 AM
Subject: Xhtml tag usage question


> I tried to insert the xhtml tag in my pages, but the only way I found 
> is to insert it in each tile that composes my page. It seems it is not

> sufficient to put it in the template file, or in the page using the 
> template. Is there a better approach ? Any help is appreciated
> Renato
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Xhtml tag usage question

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Unfortunately it saves the xhtml 'flag' in page scope so there isn't much
you can do about it.

Background: BaseHandlerTag has an isXhtml() method which calls the
TagUtils.isXhtml() method which checks the xhtml 'flag' in page scope.

I did think a solution would be to override the TagUtils.isXhtml() method to
either always return 'true' or check a flag in request scope (which you
would have to set some way) - but unfortunately the instance variable for
TagUtils is both private and final - so theres no way to extend and
implement your own custom TagUtils version in 'vanilla' struts. If you build
your own version of struts, you could change TagUtils itself, so maybe thats
an option for you - but then every time you take a new struts version you
have to re-implement your change.

Another alternative is to extend the struts tags to create 'xhtml'
versions - all you would have to do is override the isXhtml() method there.
For example

public class XhtmlTextTag extends TextTag
   public XhtmlTextTag () {
      super();
    }
  protected boolean isXhtml() {
      return true;
  }
}

So I think you have a few options:
   - put the <html:xhtml> tag in every jsp
   - build your own version of struts and change TagUtils
   - extend the struts tags to create xhtml versions

Personally, I would go with <html:xhtml> for now and try to get struts
changed so that either the scope of the xhtml flag can be customized or
TagUtils can be extended and overriden.

Niall

----- Original Message ----- 
From: "Renato Romano" <r....@set-network.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Thursday, February 26, 2004 8:49 AM
Subject: Xhtml tag usage question


> I tried to insert the xhtml tag in my pages, but the only way I found is
> to insert it in each tile that composes my page. It seems it is not
> sufficient to put it in the template file, or in the page using the
> template. Is there a better approach ?
> Any help is appreciated
> Renato
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Xhtml tag usage question

Posted by Renato Romano <r....@set-network.com>.
I tried to insert the xhtml tag in my pages, but the only way I found is
to insert it in each tile that composes my page. It seems it is not
sufficient to put it in the template file, or in the page using the
template. Is there a better approach ?
Any help is appreciated
Renato

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org