You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Matt Raible <mr...@gmail.com> on 2007/11/07 18:47:57 UTC

Struts 2 Plugin for Grails?

Has anyone thought about creating a Struts 2 Plugin for Grails?  
There's one for Wicket - which proves you don't have to use the  
default web framework (Spring MVC).

http://grails.org/Wicket+Plugin

IMO, Grails Controllers look a lot more like Struts Actions than they  
do Spring MVC. I really like the productivity Groovy gives you and  
I'm impressed with Grails. I especially like it because it uses all  
the same underlying technologies as AppFuse - it just simplifies things.

Thanks,

Matt

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


Re: Struts 2 Plugin for Grails?

Posted by Tom Schneider <sc...@gmail.com>.
Interesting idea!

Another plug-in idea would be to see if there was a way to integrate
grails flow:

http://www.jcatalog.com/oss/grailsflow/whygrailsflow.html

I've been considering ways to make the Spring Webflow Plugin easier.
(We all know how much you like that plugin, Matt)  There's just too
much overlap between what the SWF XML does and what the XWork XML
does.
Tom

On 11/7/07, Matt Raible <mr...@gmail.com> wrote:
> Has anyone thought about creating a Struts 2 Plugin for Grails?
> There's one for Wicket - which proves you don't have to use the
> default web framework (Spring MVC).
>
> http://grails.org/Wicket+Plugin
>
> IMO, Grails Controllers look a lot more like Struts Actions than they
> do Spring MVC. I really like the productivity Groovy gives you and
> I'm impressed with Grails. I especially like it because it uses all
> the same underlying technologies as AppFuse - it just simplifies things.
>
> Thanks,
>
> Matt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

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


Re: Struts 2 Plugin for Grails?

Posted by Antonio Petrelli <an...@gmail.com>.
Please don't hijack this thread, create a new one, but at the Struts Users
mailing list:
http://struts.apache.org/mail.html

Antonio

2008/2/6, interz12 <fo...@opensymphony.com>:
>
> Hi,
> Does anyone out there actually have a struts2 app running under a grails
> project? We have a large app (mainly struts1 actions) but running in struts2
> with the s1 plugin and are trying to get it to run under grails.
>
> The app boots up as a spring bean, but struts1 actions fail and error with
> the below. I've tracked this down to something is wiping the default catalog
> that gets stored in the CatalogFactory, but I'm not sure what is the reason.
> Can anyone assist?
>
> [215940] [/].[action] Servlet.service() for servlet action threw exception
> javax.servlet.ServletException: Cannot find catalog 'struts'
>         at org.apache.struts.chain.ComposableRequestProcessor.init(
> ComposableRequestProcessor.java:182)
>         at org.apache.struts.action.ActionServlet.getRequestProcessor(
> ActionServlet.java:648)
>         at org.apache.struts.action.ActionServlet.process(
> ActionServlet.java:1991)
>         at org.openmrm.core.view.web.MrmActionServlet.process(Unknown
> Source)
>         at org.apache.struts.action.ActionServlet.doPost(
> ActionServlet.java:464)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> ---------------------------------------------------------------------
> Posted via Jive Forums
>
> http://forums.opensymphony.com/thread.jspa?threadID=155849&messageID=296205#296205
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: Struts 2 Plugin for Grails?

Posted by interz12 <fo...@opensymphony.com>.
Hi,
Does anyone out there actually have a struts2 app running under a grails project? We have a large app (mainly struts1 actions) but running in struts2 with the s1 plugin and are trying to get it to run under grails.

The app boots up as a spring bean, but struts1 actions fail and error with the below. I've tracked this down to something is wiping the default catalog that gets stored in the CatalogFactory, but I'm not sure what is the reason. Can anyone assist?

[215940] [/].[action] Servlet.service() for servlet action threw exception
javax.servlet.ServletException: Cannot find catalog 'struts'
	at org.apache.struts.chain.ComposableRequestProcessor.init(ComposableRequestProcessor.java:182)
	at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:648)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1991)
	at org.openmrm.core.view.web.MrmActionServlet.process(Unknown Source)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:464)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=155849&messageID=296205#296205


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


Re: Struts 2 Plugin for Grails?

Posted by Dave Newton <ne...@yahoo.com>.
Works on My Machine (tm)

--- Brian Pontarelli <br...@pontarelli.com> wrote:

> Well, I was planning on checking out the next JSR,
> but jcp.org is down. 
> I'll check back later. If anyone from Sun is on this
> list, might want to 
> email the folks that manage that site and let them
> know it is toast 
> right now.
> 
> -bp
> 
> 
> mraible wrote:
> > I don't think their implementation would be
> useful. Their JSP compiler
> > doesn't support taglibs or JSP EL - the only thing
> it has that resembles JSP
> > is the extension. ;-)
> >
> > Matt
> >
> >
> > Ted Husted wrote:
> >   
> >> On Nov 20, 2007 11:57 AM, mraible
> <ma...@raibledesigns.com> wrote:
> >>     
> >>> The best thing is to probably see what's on tap
> for JSP 2.2 and see if we
> >>> can
> >>> get it on the EG's radar.
> >>>
> >>> Matt
> >>>       
> >> If Matt's client were willing to contribute the
> IP, another way to
> >> proceed would be to open source a proof of
> concept for the EG to
> >> consider (and the rest of us to actually use!).
> Depending on the
> >> extent of package, the contribution could be
> setup as a top-level ASF
> >> project or Commons component.
> >>
> >> Call me crazy, but I believe in folding my own
> parachute :)
> >>
> >> -Ted.
> >>
> >>
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail:
> dev-help@struts.apache.org
> >>
> >>
> >>
> >>     
> >
> >   
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> dev-help@struts.apache.org
> 
> 


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


Re: Struts 2 Plugin for Grails?

Posted by Brian Pontarelli <br...@pontarelli.com>.
Well, I was planning on checking out the next JSR, but jcp.org is down. 
I'll check back later. If anyone from Sun is on this list, might want to 
email the folks that manage that site and let them know it is toast 
right now.

-bp


mraible wrote:
> I don't think their implementation would be useful. Their JSP compiler
> doesn't support taglibs or JSP EL - the only thing it has that resembles JSP
> is the extension. ;-)
>
> Matt
>
>
> Ted Husted wrote:
>   
>> On Nov 20, 2007 11:57 AM, mraible <ma...@raibledesigns.com> wrote:
>>     
>>> The best thing is to probably see what's on tap for JSP 2.2 and see if we
>>> can
>>> get it on the EG's radar.
>>>
>>> Matt
>>>       
>> If Matt's client were willing to contribute the IP, another way to
>> proceed would be to open source a proof of concept for the EG to
>> consider (and the rest of us to actually use!). Depending on the
>> extent of package, the contribution could be setup as a top-level ASF
>> project or Commons component.
>>
>> Call me crazy, but I believe in folding my own parachute :)
>>
>> -Ted.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>
>>     
>
>   


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


Re: Struts 2 Plugin for Grails?

Posted by mraible <ma...@raibledesigns.com>.
I don't think their implementation would be useful. Their JSP compiler
doesn't support taglibs or JSP EL - the only thing it has that resembles JSP
is the extension. ;-)

Matt


Ted Husted wrote:
> 
> On Nov 20, 2007 11:57 AM, mraible <ma...@raibledesigns.com> wrote:
>> The best thing is to probably see what's on tap for JSP 2.2 and see if we
>> can
>> get it on the EG's radar.
>>
>> Matt
> 
> If Matt's client were willing to contribute the IP, another way to
> proceed would be to open source a proof of concept for the EG to
> consider (and the rest of us to actually use!). Depending on the
> extent of package, the contribution could be setup as a top-level ASF
> project or Commons component.
> 
> Call me crazy, but I believe in folding my own parachute :)
> 
> -Ted.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts-2-Plugin-for-Grails--tf4766264.html#a13862901
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: Struts 2 Plugin for Grails?

Posted by Ted Husted <hu...@apache.org>.
On Nov 20, 2007 11:57 AM, mraible <ma...@raibledesigns.com> wrote:
> The best thing is to probably see what's on tap for JSP 2.2 and see if we can
> get it on the EG's radar.
>
> Matt

If Matt's client were willing to contribute the IP, another way to
proceed would be to open source a proof of concept for the EG to
consider (and the rest of us to actually use!). Depending on the
extent of package, the contribution could be setup as a top-level ASF
project or Commons component.

Call me crazy, but I believe in folding my own parachute :)

-Ted.

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


Re: Struts 2 Plugin for Grails?

Posted by mraible <ma...@raibledesigns.com>.
The best thing is to probably see what's on tap for JSP 2.2 and see if we can
get it on the EG's radar.

Matt


Brian Pontarelli wrote:
> 
> I'm up for it. Perhaps a proposal that everyone can "sign" would help? 
> Matt, any other ideas on how to get it moving?
> 
> -bp
> 
> 
> mraible wrote:
>> I think the community is ripe for a change in JSPs. We should definitely
>> start voicing opinions about changing the spec so they can be loaded from
>> the classpath - or some other resource loader. My current client has
>> their
>> own JSP compiler and they leverage Spring's Resource Loader stuff to load
>> JSPs from a JAR on a remote server. It's technically feasible - let's
>> make
>> it part of the spec!
>>
>> Matt
>>
>>
>> Ted Husted wrote:
>>   
>>> Has anyone tried encapsulating Jasper behind a standalone servlet and
>>> have it load the JSP template independently of the container (a la
>>> Freemarker and Velocity) but not independently of the servlet API
>>> (which would be the second biggest upgrade to the spec).
>>>
>>> -Ted.
>>>
>>> On Nov 19, 2007 8:06 PM, Martin Cooper <ma...@apache.org> wrote:
>>>     
>>>> On Nov 19, 2007 9:55 AM, Brian Pontarelli <br...@pontarelli.com> wrote:
>>>>
>>>> <huge-snip/>
>>>>
>>>>       
>>>>> I'd even go one step further and
>>>>> abstract out JSPs so that they didn't require a container and provide
>>>>> a
>>>>> javax package to access and use them outside of containers.
>>>>>         
>>>> Good luck with this part. ;-) I went down that path for a while, a few
>>>> years ago, and it's a major pain to try to work around all the
>>>> dependencies on the servlet API, especially in a way that allows
>>>> arbitrary tag libraries to continue to work. We ended up having to
>>>> create an artificial request in order to get the right context for the
>>>> container to invoke the JSP. Yuck.
>>>>
>>>> --
>>>> Martin Cooper
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts-2-Plugin-for-Grails--tf4766264.html#a13860894
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: Struts 2 Plugin for Grails?

Posted by Brian Pontarelli <br...@pontarelli.com>.
I'm up for it. Perhaps a proposal that everyone can "sign" would help? 
Matt, any other ideas on how to get it moving?

-bp


mraible wrote:
> I think the community is ripe for a change in JSPs. We should definitely
> start voicing opinions about changing the spec so they can be loaded from
> the classpath - or some other resource loader. My current client has their
> own JSP compiler and they leverage Spring's Resource Loader stuff to load
> JSPs from a JAR on a remote server. It's technically feasible - let's make
> it part of the spec!
>
> Matt
>
>
> Ted Husted wrote:
>   
>> Has anyone tried encapsulating Jasper behind a standalone servlet and
>> have it load the JSP template independently of the container (a la
>> Freemarker and Velocity) but not independently of the servlet API
>> (which would be the second biggest upgrade to the spec).
>>
>> -Ted.
>>
>> On Nov 19, 2007 8:06 PM, Martin Cooper <ma...@apache.org> wrote:
>>     
>>> On Nov 19, 2007 9:55 AM, Brian Pontarelli <br...@pontarelli.com> wrote:
>>>
>>> <huge-snip/>
>>>
>>>       
>>>> I'd even go one step further and
>>>> abstract out JSPs so that they didn't require a container and provide a
>>>> javax package to access and use them outside of containers.
>>>>         
>>> Good luck with this part. ;-) I went down that path for a while, a few
>>> years ago, and it's a major pain to try to work around all the
>>> dependencies on the servlet API, especially in a way that allows
>>> arbitrary tag libraries to continue to work. We ended up having to
>>> create an artificial request in order to get the right context for the
>>> container to invoke the JSP. Yuck.
>>>
>>> --
>>> Martin Cooper
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>
>>     
>
>   


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


Re: Struts 2 Plugin for Grails?

Posted by mraible <ma...@raibledesigns.com>.
I think the community is ripe for a change in JSPs. We should definitely
start voicing opinions about changing the spec so they can be loaded from
the classpath - or some other resource loader. My current client has their
own JSP compiler and they leverage Spring's Resource Loader stuff to load
JSPs from a JAR on a remote server. It's technically feasible - let's make
it part of the spec!

Matt


Ted Husted wrote:
> 
> Has anyone tried encapsulating Jasper behind a standalone servlet and
> have it load the JSP template independently of the container (a la
> Freemarker and Velocity) but not independently of the servlet API
> (which would be the second biggest upgrade to the spec).
> 
> -Ted.
> 
> On Nov 19, 2007 8:06 PM, Martin Cooper <ma...@apache.org> wrote:
>> On Nov 19, 2007 9:55 AM, Brian Pontarelli <br...@pontarelli.com> wrote:
>>
>> <huge-snip/>
>>
>> > I'd even go one step further and
>> > abstract out JSPs so that they didn't require a container and provide a
>> > javax package to access and use them outside of containers.
>>
>> Good luck with this part. ;-) I went down that path for a while, a few
>> years ago, and it's a major pain to try to work around all the
>> dependencies on the servlet API, especially in a way that allows
>> arbitrary tag libraries to continue to work. We ended up having to
>> create an artificial request in order to get the right context for the
>> container to invoke the JSP. Yuck.
>>
>> --
>> Martin Cooper
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts-2-Plugin-for-Grails--tf4766264.html#a13851330
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: Struts 2 Plugin for Grails?

Posted by Brian Pontarelli <br...@pontarelli.com>.
(snip)
> got its act together, it would quickly surpass the SS project. I can't
> imagine any project not using Spring integration, but at that time
>
> I messed around with the GSP Result as well, but at that time, GSP
> just being moved from being a seperate project, to the Grails
> codebase, and it was not easy to track down its status. So I gave up
>   
(snip)

I'm not sure if you mean in general about spring or just those using 
grails. Guice and other DI frameworks are really gaining some traction 
and with Groovy 1.1 most are usable. Personally, any framework I select 
must work with Guice, otherwise it doesn't make sense for my 
organization. I haven't looked at length into either solution, but I 
would tend to favor the solution that let's me use Guice rather than Spring.

-bp

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


Re: Struts 2 Plugin for Grails?

Posted by Brian Pontarelli <br...@pontarelli.com>.
Piero Sartini wrote:
> Am Montag, 19. November 2007 18:55:43 schrieb Brian Pontarelli:
>   
>> Hopefully that helps clear things up somewhat. If not, feel free to ask
>> more questions.
>>     
>
> Thanks for your detailed answer, I do understand the issues with JSP much 
> better now.
>   
Excellent!

>> Oh, and as for your upcoming development around
>> "components", I'd go with FreeMarker. Let me know how it goes and if you
>> need any help.
>>     
>
> 1 question - but it is somewhat offtopic:
> I really want to use struts2.1 - but smarturls does work on 2.0 only. I know 
> there was some discussion about merging smarturls into the codebehind plugin. 
> But as far as I can see there was just a merge of ZeroConfig into CodeBehind.
>
> What is preferred: will smarturls be available for 2.1 or is CodeBehind the 
> way to go? (If so, will it be possible to drop in my jars and have their 
> actions loaded?)
>   
SmartURLs is my preference for how to get going. It will be updated for 
2.1 once I get some time and I'm still hoping to merge it. I see an 
email from Ted sitting in my inbox, so I'm guessing that the discussion 
will commence about how to proceed.

-bp

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


Re: Struts 2 Plugin for Grails?

Posted by Piero Sartini <li...@pierosartini.de>.
Am Montag, 19. November 2007 18:55:43 schrieb Brian Pontarelli:
> Hopefully that helps clear things up somewhat. If not, feel free to ask
> more questions.

Thanks for your detailed answer, I do understand the issues with JSP much 
better now.

> Oh, and as for your upcoming development around
> "components", I'd go with FreeMarker. Let me know how it goes and if you
> need any help.

1 question - but it is somewhat offtopic:
I really want to use struts2.1 - but smarturls does work on 2.0 only. I know 
there was some discussion about merging smarturls into the codebehind plugin. 
But as far as I can see there was just a merge of ZeroConfig into CodeBehind.

What is preferred: will smarturls be available for 2.1 or is CodeBehind the 
way to go? (If so, will it be possible to drop in my jars and have their 
actions loaded?)

Thanks,
	Piero

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


Re: Struts 2 Plugin for Grails?

Posted by Ted Husted <hu...@apache.org>.
Has anyone tried encapsulating Jasper behind a standalone servlet and
have it load the JSP template independently of the container (a la
Freemarker and Velocity) but not independently of the servlet API
(which would be the second biggest upgrade to the spec).

-Ted.

On Nov 19, 2007 8:06 PM, Martin Cooper <ma...@apache.org> wrote:
> On Nov 19, 2007 9:55 AM, Brian Pontarelli <br...@pontarelli.com> wrote:
>
> <huge-snip/>
>
> > I'd even go one step further and
> > abstract out JSPs so that they didn't require a container and provide a
> > javax package to access and use them outside of containers.
>
> Good luck with this part. ;-) I went down that path for a while, a few
> years ago, and it's a major pain to try to work around all the
> dependencies on the servlet API, especially in a way that allows
> arbitrary tag libraries to continue to work. We ended up having to
> create an artificial request in order to get the right context for the
> container to invoke the JSP. Yuck.
>
> --
> Martin Cooper

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


Re: Struts 2 Plugin for Grails?

Posted by Martin Cooper <ma...@apache.org>.
On Nov 19, 2007 9:55 AM, Brian Pontarelli <br...@pontarelli.com> wrote:

<huge-snip/>

> I'd even go one step further and
> abstract out JSPs so that they didn't require a container and provide a
> javax package to access and use them outside of containers.

Good luck with this part. ;-) I went down that path for a while, a few
years ago, and it's a major pain to try to work around all the
dependencies on the servlet API, especially in a way that allows
arbitrary tag libraries to continue to work. We ended up having to
create an artificial request in order to get the right context for the
container to invoke the JSP. Yuck.

--
Martin Cooper

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


Re: Struts 2 Plugin for Grails?

Posted by Brian Pontarelli <br...@pontarelli.com>.
Piero Sartini wrote:
> Am Freitag, 16. November 2007 23:04:37 schrieb Brian Pontarelli:
>   
>> Yep. I fall into that category. How else can you build reusable
>> components in Struts2?
>>     
>
> Could you please explain why this does not work in s2? I need to build such an 
> application and was under the impression that it will work with JSPs (I used 
> smarturls before and the JSPs were under WEB-INF/content/ ... isn't it 
> possible to load them from a jar? )
>   
The issue is that JSPs are controlled under the J2EE specification. 
According to that specification, JSPs are compiled into Servlets by the 
J2EE container. These Servlets are then mapped to specific URLs 
automatically by the container based on the location of the JSP within 
the web application. Some URLs are accessible to the outside world and 
others aren't (i.e. /index.jsp is accessible while 
/WEB-INF/content/index.jsp isn't). When a URL comes into the container 
or is handled via a forward or server-side include, the J2EE container 
looks in the web application for the JSPs and compiles them if they 
haven't already been compiled.

There isn't anything technical that prevents the J2EE container from 
looking in the classpath for either a JSP or pre-compiled JSP. In fact, 
some containers do support pre-compiling your JSPs. However, this often 
requires some major configuration and handling. The issue is that the 
J2EE specification doesn't specifically define a mechanism for mapping 
URLs to JSPs loaded from the classpath and how to handle compiling and 
caching those JSPs. Therefore, most containers provide some type of 
non-standard mechanism to accomplish this and most support is pretty 
painful.

That is one of the main reasons why FreeMarker and Velocity were added 
as engines to WebWork and Struts.

In general, it wouldn't be difficult to add the same support for JSPs. 
It would mostly require a default classpath search mechanism for 
locating the JSPs based on the URL. I'd even go one step further and 
abstract out JSPs so that they didn't require a container and provide a 
javax package to access and use them outside of containers.

Hopefully that helps clear things up somewhat. If not, feel free to ask 
more questions. Oh, and as for your upcoming development around 
"components", I'd go with FreeMarker. Let me know how it goes and if you 
need any help.

-bp

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


Re: Struts 2 Plugin for Grails?

Posted by Piero Sartini <li...@pierosartini.de>.
Am Freitag, 16. November 2007 23:04:37 schrieb Brian Pontarelli:
> Yep. I fall into that category. How else can you build reusable
> components in Struts2?

Could you please explain why this does not work in s2? I need to build such an 
application and was under the impression that it will work with JSPs (I used 
smarturls before and the JSPs were under WEB-INF/content/ ... isn't it 
possible to load them from a jar? )

	Piero

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


Re: Struts 2 Plugin for Grails?

Posted by Ted Husted <hu...@apache.org>.
On Nov 19, 2007 11:39 AM, Jim Cushing <ji...@mac.com> wrote:
> I hope that Struts 2 continues to strongly support Freemarker. In
> fact, I wish they promoted it as the preferred choice.

FreeMarker is cool, but I'm still a die-hard Velocity fan :)

Here's the thing: If we started using FreeMarker or Velocity as our
primary examples, this move would quickly turn into FUD like about the
group abandoning JSP. And, realistically, the people who need the most
help from the examples are newbies being forced to use JSPs.

Though, I would agree that our FreeMarker and Velocity documentation
could go into greater detail of why these systems are technically
superior to JSPs, and we could use many more ftl/vt cookbook articles.
(Feel free to contribute!)


On Nov 19, 2007 12:55 PM, Brian Pontarelli <br...@pontarelli.com> wrote:
> [JAR-ability] is one of the main reasons why FreeMarker and Velocity were added
> as engines to WebWork and Struts.

Back in the day, *all* of the other MVC frameworks focussed on
Velocity. I'd wager that, more than anything else, the JSP taglib is
the reason why people are using Struts today, rather than Barracuda or
Maverick or Turbine, or several others that existed before Struts 1
shipped.

At first, people touted that templates were safer and better suited
for MVC since there were no scriptlets (good point!). Later, people
added the argument that we could put templates in JARS (better
point!). Being able to load JSPs from the classpath would definitely
be the single biggest functional upgrade to the technology.

-Ted.

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


Re: Struts 2 Plugin for Grails?

Posted by Jim Cushing <ji...@mac.com>.
This is precisely why I like things like Freemarker and Velocity: You  
don't have to wait for the JCP to propose and ratify a standard, and  
for the vendors to adopt it.

I hope that Struts 2 continues to strongly support Freemarker. In  
fact, I wish they promoted it as the preferred choice.

On Nov 19, 2007, at 11:30 AM, Brian Pontarelli wrote:

> Musachy Barroso wrote:
>>> Yep. I fall into that category. How else can you build reusable
>>> components in Struts2? I'm still waiting for the JSP spec is fixed  
>>> to
>>> support everything from JAR files or modules and make JSP usable  
>>> outside
>>> J2EE container contexts
>>>
>>
>> is that ever going to happen? (I really hope so)
>>
> You and me both! I've been waiting for this since my first article  
> back in 2000 about the debacle of JSPs. If I had more time I'd try  
> to fire up the JSR for the next version, but I have no doubt it  
> would be quite a battle.
>
> -bp
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>


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


Re: Struts 2 Plugin for Grails?

Posted by Brian Pontarelli <br...@pontarelli.com>.
Musachy Barroso wrote:
>> Yep. I fall into that category. How else can you build reusable
>> components in Struts2? I'm still waiting for the JSP spec is fixed to
>> support everything from JAR files or modules and make JSP usable outside
>> J2EE container contexts
>>     
>
> is that ever going to happen? (I really hope so)
>   
You and me both! I've been waiting for this since my first article back 
in 2000 about the debacle of JSPs. If I had more time I'd try to fire up 
the JSR for the next version, but I have no doubt it would be quite a 
battle.

-bp


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


Re: Struts 2 Plugin for Grails?

Posted by Musachy Barroso <mu...@gmail.com>.
> Yep. I fall into that category. How else can you build reusable
> components in Struts2? I'm still waiting for the JSP spec is fixed to
> support everything from JAR files or modules and make JSP usable outside
> J2EE container contexts

is that ever going to happen? (I really hope so)

musachy

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


Re: Struts 2 Plugin for Grails?

Posted by Brian Pontarelli <br...@pontarelli.com>.
Ted Husted wrote:
> On Nov 13, 2007 9:00 AM, Tom Schneider <sc...@gmail.com> wrote:
>   
>> And who says that Struts 2 devs recommend Freemarker?  I sure don't. :)
>> Tom
>>     
>
> It's true that there are quite a few hardcore Struts 2 teams that use
> FreeMarker or Velocity (for good reason). But, the Apache Struts
> Project group doesn't have an established preference,  beyond using
> JSP in most of the examples, but mainly because it's a lingua franca.
>   
Yep. I fall into that category. How else can you build reusable 
components in Struts2? I'm still waiting for the JSP spec is fixed to 
support everything from JAR files or modules and make JSP usable outside 
J2EE container contexts (i.e. for email templates and such). Until then 
we do everything in FreeMarker.

-bp


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


Re: Struts 2 Plugin for Grails?

Posted by Ted Husted <hu...@apache.org>.
On Nov 13, 2007 9:00 AM, Tom Schneider <sc...@gmail.com> wrote:
> And who says that Struts 2 devs recommend Freemarker?  I sure don't. :)
> Tom

It's true that there are quite a few hardcore Struts 2 teams that use
FreeMarker or Velocity (for good reason). But, the Apache Struts
Project group doesn't have an established preference,  beyond using
JSP in most of the examples, but mainly because it's a lingua franca.

-Ted.

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


Re: Struts 2 Plugin for Grails?

Posted by Tom Schneider <sc...@gmail.com>.
For those interested, Mark and I have been collaborating on a proof of
concept for this idea. Details are here:
http://cwiki.apache.org/confluence/display/S2PLUGINS/Grails+Plugin  We
have a simple precompiled groovy controller and GSP up and running.

On Nov 13, 2007 10:38 PM, Vinny <xa...@gmail.com> wrote:
> My unsolicited 2 cents. The idea of integrating Grails scaffolding with
> Struts 2 has been bouncing
> in my  head for  few weeks now. The Grails CRUD is a true sweet spot for me
> but
> Struts still excels when it's time to move beyond a CRUD Action. Getting the
> 2 frameworks
> working together would be awesome. Looking forward to see where this goes.
>
>
> On Nov 13, 2007 9:00 AM, Tom Schneider <sc...@gmail.com> wrote:
>
> > Just for completeness I'd think we'd want a GSPResult.  Just because
> > it's slow now, doesn't mean it will be slow in the future.  (Look at how
> > slow freemarker was before we tweaked it)  Also, for those looking to
> > migrate over, if GSP isn't supported, that might be a issue for existing
> > grails apps.
> >
> > And who says that Struts 2 devs recommend Freemarker?  I sure don't. :)
> > Tom
> >
> > Matt Raible wrote:
> > > I don't know if we'd really need to support GSPResult in a Struts 2
> > > Plugin. AFAIK, the slowest part of Grails is GSP.
> > >
> > > http://tinyurl.com/2298jh
> > >
> > > If we were to write a plugin, would it implement the same scaffolding
> > > that Grails has by default? If so, it might be better to use
> > > FreeMarker since that seems to be a recommended choice among Struts 2
> > > developers. I don't believe there's a FreeMarker Plugin for Grails,
> > > but I'd be interested in creating one. A colleague of mine has been
> > > successful in making Grails work with JSP.
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
> --
> The Street Programmer http://streetprogrammer.com
>

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


Re: Struts 2 Plugin for Grails?

Posted by Vinny <xa...@gmail.com>.
My unsolicited 2 cents. The idea of integrating Grails scaffolding with
Struts 2 has been bouncing
in my  head for  few weeks now. The Grails CRUD is a true sweet spot for me
but
Struts still excels when it's time to move beyond a CRUD Action. Getting the
2 frameworks
working together would be awesome. Looking forward to see where this goes.

On Nov 13, 2007 9:00 AM, Tom Schneider <sc...@gmail.com> wrote:

> Just for completeness I'd think we'd want a GSPResult.  Just because
> it's slow now, doesn't mean it will be slow in the future.  (Look at how
> slow freemarker was before we tweaked it)  Also, for those looking to
> migrate over, if GSP isn't supported, that might be a issue for existing
> grails apps.
>
> And who says that Struts 2 devs recommend Freemarker?  I sure don't. :)
> Tom
>
> Matt Raible wrote:
> > I don't know if we'd really need to support GSPResult in a Struts 2
> > Plugin. AFAIK, the slowest part of Grails is GSP.
> >
> > http://tinyurl.com/2298jh
> >
> > If we were to write a plugin, would it implement the same scaffolding
> > that Grails has by default? If so, it might be better to use
> > FreeMarker since that seems to be a recommended choice among Struts 2
> > developers. I don't believe there's a FreeMarker Plugin for Grails,
> > but I'd be interested in creating one. A colleague of mine has been
> > successful in making Grails work with JSP.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
The Street Programmer http://streetprogrammer.com

Re: Struts 2 Plugin for Grails?

Posted by Tom Schneider <sc...@gmail.com>.
Just for completeness I'd think we'd want a GSPResult.  Just because 
it's slow now, doesn't mean it will be slow in the future.  (Look at how 
slow freemarker was before we tweaked it)  Also, for those looking to 
migrate over, if GSP isn't supported, that might be a issue for existing 
grails apps.

And who says that Struts 2 devs recommend Freemarker?  I sure don't. :)
Tom

Matt Raible wrote:
> I don't know if we'd really need to support GSPResult in a Struts 2
> Plugin. AFAIK, the slowest part of Grails is GSP.
>
> http://tinyurl.com/2298jh
>
> If we were to write a plugin, would it implement the same scaffolding
> that Grails has by default? If so, it might be better to use
> FreeMarker since that seems to be a recommended choice among Struts 2
> developers. I don't believe there's a FreeMarker Plugin for Grails,
> but I'd be interested in creating one. A colleague of mine has been
> successful in making Grails work with JSP.
>   

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


Re: Struts 2 Plugin for Grails?

Posted by Matt Raible <ma...@raibledesigns.com>.
I don't know if we'd really need to support GSPResult in a Struts 2
Plugin. AFAIK, the slowest part of Grails is GSP.

http://tinyurl.com/2298jh

If we were to write a plugin, would it implement the same scaffolding
that Grails has by default? If so, it might be better to use
FreeMarker since that seems to be a recommended choice among Struts 2
developers. I don't believe there's a FreeMarker Plugin for Grails,
but I'd be interested in creating one. A colleague of mine has been
successful in making Grails work with JSP.

Matt

On 11/12/07, Philip Luppens <ph...@gmail.com> wrote:
> On Nov 12, 2007 3:57 AM, Tom Schneider <sc...@gmail.com> wrote:
> > See my comments below:
> >
> > Mark Menard wrote:
> > > On 11/11/07 5:07 PM, "Tom Schneider" <sc...@gmail.com> wrote
> > > I will agree with you, and I've decided I'm done reinventing wheels. So, I'm
> > > game. I'm very pressed for time, but I'm definitely interested in this. I
> > > think a bridge from Java based Struts 2 development into Groovy is really
> > > exciting. We have realized some serious productivity gains using Groovy with
> > > Struts 2 in the simple way we've been using it in house for some time now.
> > >
> > Good, I'm glad we're on the same page.  I really liked some of the stuff
> > I saw with Groovy/Grails.  No rush here, I just wanted to throw this out
> > there in case anyone else was interested in pursuing this.  (Don
> > expressed interest at one point)
> > >> 3. A GSPResult that can create the context for the GSP page and execute
> > >> the GSP page.
> > >>
> > >> I did some work on this over the weekend and it didn't take too much
> > >> effort to get a GSPResult going.  (Although the templated executed, it
> > >> didn't display any data because I didn't have a ModelAndView for the
> > >> template to run against)
> > >>
> > >
> > > I think someone has done a GSP result. It might make some sense to look at
> > > that.
> > >
> > Close, but not exactly a GSPResult:
> > http://struts.apache.org/2.x/docs/groovyresult.html
>
> Ok, I'll jump in for a moment. The difference between GW (GroovyWorks)
> & SS (Scripting Support) is indeed the Spring requirement. I took the
> GroovyScriptEngine object and build the plugin around it - extremely
> easy, but no Spring integration, and it only allows for writing
> actions and interceptors in Groovy. Which, imho, was more than enough
> at that time. I also met Mark at that time, and saw that once Spring
> got its act together, it would quickly surpass the SS project. I can't
> imagine any project not using Spring integration, but at that time
>
> I messed around with the GSP Result as well, but at that time, GSP
> just being moved from being a seperate project, to the Grails
> codebase, and it was not easy to track down its status. So I gave up
> there. At that time, there weren't any real benefits to it either
> other than just being a new view.
> The groovy result has nothing to do with GSP, it was done way before
> that. I simply needed dispatching to a script (don't ask, had some
> weird requirements back in the days), and so I used that one. Think of
> it as a first step towards the SS project.
>
> Cheers,
>
> Phil
>
> --
> Software Architect - Hydrodesk
> "Always code as if the guy who ends up maintaining your code will be a
> violent psychopath who knows where you live." - John F. Woods
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
http://raibledesigns.com

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


Re: Struts 2 Plugin for Grails?

Posted by Philip Luppens <ph...@gmail.com>.
On Nov 12, 2007 3:57 AM, Tom Schneider <sc...@gmail.com> wrote:
> See my comments below:
>
> Mark Menard wrote:
> > On 11/11/07 5:07 PM, "Tom Schneider" <sc...@gmail.com> wrote
> > I will agree with you, and I've decided I'm done reinventing wheels. So, I'm
> > game. I'm very pressed for time, but I'm definitely interested in this. I
> > think a bridge from Java based Struts 2 development into Groovy is really
> > exciting. We have realized some serious productivity gains using Groovy with
> > Struts 2 in the simple way we've been using it in house for some time now.
> >
> Good, I'm glad we're on the same page.  I really liked some of the stuff
> I saw with Groovy/Grails.  No rush here, I just wanted to throw this out
> there in case anyone else was interested in pursuing this.  (Don
> expressed interest at one point)
> >> 3. A GSPResult that can create the context for the GSP page and execute
> >> the GSP page.
> >>
> >> I did some work on this over the weekend and it didn't take too much
> >> effort to get a GSPResult going.  (Although the templated executed, it
> >> didn't display any data because I didn't have a ModelAndView for the
> >> template to run against)
> >>
> >
> > I think someone has done a GSP result. It might make some sense to look at
> > that.
> >
> Close, but not exactly a GSPResult:
> http://struts.apache.org/2.x/docs/groovyresult.html

Ok, I'll jump in for a moment. The difference between GW (GroovyWorks)
& SS (Scripting Support) is indeed the Spring requirement. I took the
GroovyScriptEngine object and build the plugin around it - extremely
easy, but no Spring integration, and it only allows for writing
actions and interceptors in Groovy. Which, imho, was more than enough
at that time. I also met Mark at that time, and saw that once Spring
got its act together, it would quickly surpass the SS project. I can't
imagine any project not using Spring integration, but at that time

I messed around with the GSP Result as well, but at that time, GSP
just being moved from being a seperate project, to the Grails
codebase, and it was not easy to track down its status. So I gave up
there. At that time, there weren't any real benefits to it either
other than just being a new view.
The groovy result has nothing to do with GSP, it was done way before
that. I simply needed dispatching to a script (don't ask, had some
weird requirements back in the days), and so I used that one. Think of
it as a first step towards the SS project.

Cheers,

Phil

-- 
Software Architect - Hydrodesk
"Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live." - John F. Woods

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


Re: Struts 2 Plugin for Grails?

Posted by Tom Schneider <sc...@gmail.com>.
See my comments below:

Mark Menard wrote:
> On 11/11/07 5:07 PM, "Tom Schneider" <sc...@gmail.com> wrote
> I will agree with you, and I've decided I'm done reinventing wheels. So, I'm
> game. I'm very pressed for time, but I'm definitely interested in this. I
> think a bridge from Java based Struts 2 development into Groovy is really
> exciting. We have realized some serious productivity gains using Groovy with
> Struts 2 in the simple way we've been using it in house for some time now.
>   
Good, I'm glad we're on the same page.  I really liked some of the stuff 
I saw with Groovy/Grails.  No rush here, I just wanted to throw this out 
there in case anyone else was interested in pursuing this.  (Don 
expressed interest at one point)
>> 3. A GSPResult that can create the context for the GSP page and execute
>> the GSP page.
>>
>> I did some work on this over the weekend and it didn't take too much
>> effort to get a GSPResult going.  (Although the templated executed, it
>> didn't display any data because I didn't have a ModelAndView for the
>> template to run against)
>>     
>
> I think someone has done a GSP result. It might make some sense to look at
> that.
>   
Close, but not exactly a GSPResult: 
http://struts.apache.org/2.x/docs/groovyresult.html

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


Re: Struts 2 Plugin for Grails?

Posted by Mark Menard <ma...@mjm.net>.
On 11/11/07 5:07 PM, "Tom Schneider" <sc...@gmail.com> wrote:

> Mark,
> I was reading Getting Started With Grails this weekend and the more I
> look at Grails, the more I see your Groovy Works effort fitting into a
> Grails mini-porting effort to Struts 2.  Much of what you describe is
> already in Grails and I think the last thing we need is yet another
> groovy web framework. :)

I will agree with you, and I've decided I'm done reinventing wheels. So, I'm
game. I'm very pressed for time, but I'm definitely interested in this. I
think a bridge from Java based Struts 2 development into Groovy is really
exciting. We have realized some serious productivity gains using Groovy with
Struts 2 in the simple way we've been using it in house for some time now.

> Just to expand upon this, I think there are 3 main pieces we would need
> to make this work:
> 1. A new plugin based on Don's rest plugin that maps incoming request to
> grails controllers.

I'll have to check out Don's plugin and get a look at it. I would assume
that this plugin would still route the request through the usual Xwork
infrastructure and interceptors, right?

What about also mapping to S2 controllers written in Java? I would want that
to be available too. It would provide a migration path to users who want to
use Grails type stuff, and keep their current investment in S2. I'd love to
be able to drop my existing S2 app down into Grails and just keep growing
it.

> 2. A grails controller engine that can take the grails request, provide
> the necessary context and execute a grails controller.

I'm not sure I follow you here, but I'm sure I'll get it eventually.

> 3. A GSPResult that can create the context for the GSP page and execute
> the GSP page.
>
> I did some work on this over the weekend and it didn't take too much
> effort to get a GSPResult going.  (Although the templated executed, it
> didn't display any data because I didn't have a ModelAndView for the
> template to run against)

I think someone has done a GSP result. It might make some sense to look at
that.

Take care,

Mark


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


Re: Struts 2 Plugin for Grails?

Posted by Tom Schneider <sc...@gmail.com>.
Mark,
I was reading Getting Started With Grails this weekend and the more I 
look at Grails, the more I see your Groovy Works effort fitting into a 
Grails mini-porting effort to Struts 2.  Much of what you describe is 
already in Grails and I think the last thing we need is yet another 
groovy web framework. :)

Just to expand upon this, I think there are 3 main pieces we would need 
to make this work:
1. A new plugin based on Don's rest plugin that maps incoming request to 
grails controllers.
2. A grails controller engine that can take the grails request, provide 
the necessary context and execute a grails controller.
3. A GSPResult that can create the context for the GSP page and execute 
the GSP page.

I did some work on this over the weekend and it didn't take too much 
effort to get a GSPResult going.  (Although the templated executed, it 
didn't display any data because I didn't have a ModelAndView for the 
template to run against)
Tom


Mark Menard wrote:
> On 11/7/07 2:58 PM, "Tom Schneider" <sc...@gmail.com> wrote:
>   
> They are very similar. The difference used to be that s2ss did not require
> Spring, or didn't support it. I don't exactly recall. Groovy Works requires
> and uses Spring to wire the dependencies of the objects it manufactures.
>
> Additionally I think the directions were different. It was my plan, if I had
> more time, to really build on the Groovy Works thing and make it more like a
> Groovy version of Struts 2 with an integrated stack. I really haven't had
> time to pursue that goal. The idea was download GW's and its maven template.
> Run the template and code without need for XML, with a well defined project
> structure, ORM in place, etc. Obviously I haven't gotten that far, and other
> things have come along in S2 that do some of those things, like SmartURLs,
> code behing, zero config, etc.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>   


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


Re: Struts 2 Plugin for Grails?

Posted by Mark Menard <ma...@mjm.net>.
On 11/7/07 2:58 PM, "Tom Schneider" <sc...@gmail.com> wrote:

> How are http://code.google.com/p/s2ss/ and
> http://code.google.com/p/groovyworks/ different?  Looking at the code
> they look very similar.  I've been trying to make sure the Plugin
> Registry is up to date and has all the plugins that are available, so
> I'm wondering if these are 2 separate entries, or if they are
> essentially the same thing.

They are very similar. The difference used to be that s2ss did not require
Spring, or didn't support it. I don't exactly recall. Groovy Works requires
and uses Spring to wire the dependencies of the objects it manufactures.

Additionally I think the directions were different. It was my plan, if I had
more time, to really build on the Groovy Works thing and make it more like a
Groovy version of Struts 2 with an integrated stack. I really haven't had
time to pursue that goal. The idea was download GW's and its maven template.
Run the template and code without need for XML, with a well defined project
structure, ORM in place, etc. Obviously I haven't gotten that far, and other
things have come along in S2 that do some of those things, like SmartURLs,
code behing, zero config, etc.

Mark


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


Re: Struts 2 Plugin for Grails?

Posted by Tom Schneider <sc...@gmail.com>.
How are http://code.google.com/p/s2ss/ and
http://code.google.com/p/groovyworks/ different?  Looking at the code
they look very similar.  I've been trying to make sure the Plugin
Registry is up to date and has all the plugins that are available, so
I'm wondering if these are 2 separate entries, or if they are
essentially the same thing.
Thanks,
Tom

On 11/7/07, Mark Menard <ma...@mjm.net> wrote:
> On 11/7/07 1:38 PM, "Matt Raible" <mr...@gmail.com> wrote:
>
> > What I'd like is to use Grails to develop my application, but have it
> > use Struts 2 under-the-covers instead of Spring MVC. As far as code
> > differences between writing a Spring MVC Grails Controller and a
> > Struts 2 Grails Controller - I don't think there needs to be any.
>
> Hmmm.... This sounds a lot like what I've been working with for the past
> year sort of. I'm not using Grails, but I have been using Groovy over Struts
> 2.
>
> I really haven't dug into Grails much, only picked over the transactions and
> proxy stuff deep in the framework at one point, but it seems to me that
> Grail is fairly closely wedded to Spring MVC under the covers. At least from
> outward appearances. I think swapping the underlying framework would be a
> lot of work, and would make the framework into something else, so to speak.
> I doubt it could be done without creating incompatibilities.
>
> Now, if it could be done that would be really cool and I'd probably migrate
> my current project to it to take advantage of the highly integrated stack of
> Grails.
>
> > The problem I'm looking to solve is one where companies are using two
> > web frameworks: a dynamic one (Grails) and a static one (Struts 2).
>
> Yup. Understood. Take a look at: http://code.google.com/p/groovyworks/
>
> It's young, but it does allow development of pretty much everything in
> Groovy over Struts 2. It's really not hard. You just need an object factory
> that can manufacture objects from Groovy scripts. Then use Spring's
> scripting support for your service beans and DAO's. (The nice thing about
> this setup is you only need to restart if you change an interface or your
> domain model.) Now, with Groovy 1.1's support for annotations you can use
> all the neat stuff that's in S2 and can even do your domain objects in
> Groovy.
>
> Now, with all of that said I'm interested in what you find when you dig into
> Grails. If looks feasible let me know. I might be able to come up for air
> from this project I've been on and be able to lend a hand.
>
> Mark
> --
> Mark Menard
> personal: http://www.vitarara.org/
> business: http://www.vitarara.net/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

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


Re: Struts 2 Plugin for Grails?

Posted by Don Brown <mr...@twdata.org>.
On 11/8/07, Matt Raible <mr...@gmail.com> wrote:
> What I'd like is to use Grails to develop my application, but have it
> use Struts 2 under-the-covers instead of Spring MVC. As far as code
> differences between writing a Spring MVC Grails Controller and a
> Struts 2 Grails Controller - I don't think there needs to be any.

Interesting, I didn't know Grails used Spring under the covers.  Might
look into that during the hackathon.
> One of the main reasons I chose Struts 2 for the prototype I've done
> was because it allowed me to call methods with arguments from its EL.
> Since I see a move away from OGNL (and possibly) this feature, it
> makes me less inclined to use Struts 2. I may be able to see

I think a definite condition of accepting the Unified EL would be
support for calling methods.  If we did go the UEL route, I'd guess
we'd be more like Seam, where we extended it to do things like method
calls.  Again, moving to UEL hasn't been decided and even if it had,
it is probably at least a year or two away.

Don

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


Re: Struts 2 Plugin for Grails?

Posted by Mark Menard <ma...@mjm.net>.
On 11/7/07 1:38 PM, "Matt Raible" <mr...@gmail.com> wrote:

> What I'd like is to use Grails to develop my application, but have it
> use Struts 2 under-the-covers instead of Spring MVC. As far as code
> differences between writing a Spring MVC Grails Controller and a
> Struts 2 Grails Controller - I don't think there needs to be any.

Hmmm.... This sounds a lot like what I've been working with for the past
year sort of. I'm not using Grails, but I have been using Groovy over Struts
2. 

I really haven't dug into Grails much, only picked over the transactions and
proxy stuff deep in the framework at one point, but it seems to me that
Grail is fairly closely wedded to Spring MVC under the covers. At least from
outward appearances. I think swapping the underlying framework would be a
lot of work, and would make the framework into something else, so to speak.
I doubt it could be done without creating incompatibilities.

Now, if it could be done that would be really cool and I'd probably migrate
my current project to it to take advantage of the highly integrated stack of
Grails.

> The problem I'm looking to solve is one where companies are using two
> web frameworks: a dynamic one (Grails) and a static one (Struts 2).

Yup. Understood. Take a look at: http://code.google.com/p/groovyworks/

It's young, but it does allow development of pretty much everything in
Groovy over Struts 2. It's really not hard. You just need an object factory
that can manufacture objects from Groovy scripts. Then use Spring's
scripting support for your service beans and DAO's. (The nice thing about
this setup is you only need to restart if you change an interface or your
domain model.) Now, with Groovy 1.1's support for annotations you can use
all the neat stuff that's in S2 and can even do your domain objects in
Groovy.

Now, with all of that said I'm interested in what you find when you dig into
Grails. If looks feasible let me know. I might be able to come up for air
from this project I've been on and be able to lend a hand.

Mark
-- 
Mark Menard
personal: http://www.vitarara.org/
business: http://www.vitarara.net/


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


Re: Struts 2 Plugin for Grails?

Posted by Matt Raible <mr...@gmail.com>.
What I'd like is to use Grails to develop my application, but have it  
use Struts 2 under-the-covers instead of Spring MVC. As far as code  
differences between writing a Spring MVC Grails Controller and a  
Struts 2 Grails Controller - I don't think there needs to be any.

The problem I'm looking to solve is one where companies are using two  
web frameworks: a dynamic one (Grails) and a static one (Struts 2).

The easy solution is to use Spring MVC for the static one, but I've  
found Struts 2 easier to learn and use than Spring MVC. It's  
difficult to sell companies on using 2 web frameworks (Spring MVC/ 
Grails and Struts 2), so I'm hoping to experiment with getting Grails  
to use Struts 2. If that fails, I'll look into trying to redo my  
existing Struts 2 prototype with Spring MVC.

One of the main reasons I chose Struts 2 for the prototype I've done  
was because it allowed me to call methods with arguments from its EL.  
Since I see a move away from OGNL (and possibly) this feature, it  
makes me less inclined to use Struts 2. I may be able to see  
FreeMarker as an alternative (since I believe this allows it), but  
the tooling around FreeMarker is pretty poor, so that might be a  
tough sell.

Matt

On Nov 7, 2007, at 10:29 AM, Mark Menard wrote:

> Hi Matt,
>
> I was actually thinking about this recently when I saw a mention of  
> the
> Wicket plugin someplace. It got me thinking. I've done a lot of  
> work on
> using Groovy with Struts 2, but it has a long way to go. If there  
> was a way
> to integrate S2 with Grails that would be really interesting.
>
> What would you see as the goals of a S2 plugin? Run S2 actions in  
> Grails and
> forward to Grails views? Use a Grails controller and forward to a  
> S2 view?
> Be able to use S2 interceptors?
>
> Personally I'm interested if I could migrate my S2 actions, that  
> are written
> in Groovy already, and my views into a Grails project and have them  
> run,
> then be able to start using the Grails controllers or view mixed  
> with S2
> stuff.
>
> Mark
>
>
> On 11/7/07 12:47 PM, "Matt Raible" <mr...@gmail.com> wrote:
>
>> Has anyone thought about creating a Struts 2 Plugin for Grails?
>> There's one for Wicket - which proves you don't have to use the
>> default web framework (Spring MVC).
>>
>> http://grails.org/Wicket+Plugin
>>
>> IMO, Grails Controllers look a lot more like Struts Actions than they
>> do Spring MVC. I really like the productivity Groovy gives you and
>> I'm impressed with Grails. I especially like it because it uses all
>> the same underlying technologies as AppFuse - it just simplifies  
>> things.
>>
>> Thanks,
>>
>> Matt
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>


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


Re: Struts 2 Plugin for Grails?

Posted by Mark Menard <ma...@mjm.net>.
Hi Matt,

I was actually thinking about this recently when I saw a mention of the
Wicket plugin someplace. It got me thinking. I've done a lot of work on
using Groovy with Struts 2, but it has a long way to go. If there was a way
to integrate S2 with Grails that would be really interesting.

What would you see as the goals of a S2 plugin? Run S2 actions in Grails and
forward to Grails views? Use a Grails controller and forward to a S2 view?
Be able to use S2 interceptors?

Personally I'm interested if I could migrate my S2 actions, that are written
in Groovy already, and my views into a Grails project and have them run,
then be able to start using the Grails controllers or view mixed with S2
stuff.

Mark


On 11/7/07 12:47 PM, "Matt Raible" <mr...@gmail.com> wrote:

> Has anyone thought about creating a Struts 2 Plugin for Grails?
> There's one for Wicket - which proves you don't have to use the
> default web framework (Spring MVC).
> 
> http://grails.org/Wicket+Plugin
> 
> IMO, Grails Controllers look a lot more like Struts Actions than they
> do Spring MVC. I really like the productivity Groovy gives you and
> I'm impressed with Grails. I especially like it because it uses all
> the same underlying technologies as AppFuse - it just simplifies things.
> 
> Thanks,
> 
> Matt
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org


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