Re: Webwork -> Struts 2.0.x migration xwork API issue related to ProxyFactories

2012-12-17 Thread ChadDavis
I don't have answers to your specific questions, but I did do a similar
migration recently.  I encountered one fairly significant hidden issue that
I'll warn you about.  When you migrate, you can leave your xml on the
xworks dtds.  It works, but as you migrate up the struts2 versions, there's
a point where they moved the actual storage of the dtd's ( on the web I
mean ) to apache.  This causes the internal resolution of the dtd's to
break.  The simplest way to avoid this is to migrate your xml config files
to the Struts2 dtds.  Here's a link to my thread on this issue, but you
don't really need to digest it all.  You can be safe by simply migrating
the to the struts dtd's from the start.

http://markmail.org/thread/qkc7owqiiu3j63gl

On Mon, Dec 17, 2012 at 10:25 AM, Eero Nevalainen wrote:

> 3.0.2


Re: REST Mappers

2012-12-13 Thread ChadDavis
> So, it seems like the RestActionMapper needs to be injected with the
> > struts.rest.namespace so it can be knowledgeable aobut this when building
> > the actionmapping namespace . . .
>
> But I thin it's rather how you name your action packages:
> - com.demo.action.rest.RestAction
> - com.demo.action.NormalAction
>

Perhaps I misunderstand the purpose of struts.rest.namespace.  I had
thought it's purpose would be to cause the RestActionMapper to reject
handling of all requests not in struts.rest.namespace.   Is this incorrect?


Re: REST Mappers

2012-12-13 Thread ChadDavis
> So, I can't get this to work when using with convention/rest plugin
> > combination.  I did NOT try to use it with a xml/rest plugin combo.
>
> You can combine convention/xml/rest together - in struts.xml you can
> define constants or even a new stack which is simpler than use
> annotations
>

Yes.  The convention/xml/rest combo works for me.  It's just the
struts.rest.namespace part.  And I'll discuss that on another reply.


Re: REST Mappers

2012-12-12 Thread ChadDavis
Did you try to use the new REST plugin without Convention plugin ?
> REST plugin can work with XML based configuration as well and it has
> support for namespace prefix - struts.rest.namespace


So, I can't get this to work when using with convention/rest plugin
combination.  I did NOT try to use it with a xml/rest plugin combo.  After
looking through the code, it doesn't appear that it would work, but I'm not
that familiar with the code.  As Antonios says, the RestActionMapper
doesn't see this setting at all.  The RestActionProxyFactory DOES see it
though.  The problem is that by the time the proxy factory get's the
ActionMapping, the mapper has already decided that the namespace is empty
string.  So, the rest proxy thinks that the request isn't for a REST
action, because it's not in struts.rest.namespace, and the whole request
get's handed over to the default proxy factory.

So, it seems like the RestActionMapper needs to be injected with the
struts.rest.namespace so it can be knowledgeable aobut this when building
the actionmapping namespace . . .


Re: REST Mappers

2012-12-10 Thread ChadDavis
On Mon, Dec 10, 2012 at 9:30 AM, Lukasz Lenart wrote:

> > I'm adding the convention/rest plugin combo to our existing app right
> now.
> >  It's not well documented, but I think it's going to work out.  I'll
> write
> > up a blog entry and post it to the list when I'm finished with my spikes.
>
> You're more than welcome to fill ICLA and contribute to the docs :-)



I'm planning to do that soon.  I'm keen to start making code contributions
too.  I actually wrote a book about S2 in 2008, but then I didn't work with
S2 professionally for several years. But I have recently rejoined the fold
with a new job and am happy to be working with the framework again!


Re: REST Mappers

2012-12-10 Thread ChadDavis
On Sun, Dec 9, 2012 at 6:09 AM, Antonios Gkogkakis  wrote:

> another issue, was that every time we had a non REST action
> being called. the RestActionMapper, would find it in the configuration and
> would  treat it as a rest action with no method, so it would try to guess
> the method and fail because the method didn't exist in the Action class. By
>


I think I've figured this issue out too.  It requires configuring the
mappers to handle different URLs.


Re: REST Mappers

2012-12-10 Thread ChadDavis
On Sun, Dec 9, 2012 at 3:24 AM, Antonios Gkogkakis  wrote:

> Had we wanted to use the more modern REST plugin, we would have to refactor
> the app to use the convention plugin. I'm not sure whether
> that's a straightforward task, but back then we encountered a few issues
> and gave up.
>


I'm adding the convention/rest plugin combo to our existing app right now.
 It's not well documented, but I think it's going to work out.  I'll write
up a blog entry and post it to the list when I'm finished with my spikes.


Re: wierd stack trace regarding parsing of struts.xml

2012-12-03 Thread ChadDavis
There are (from 2.3):
>
> 79:dtdMappings.put("-//Apache Software Foundation//DTD Struts
> Configuration 2.0//EN", "struts-2.0.dtd");
> 80:dtdMappings.put("-//Apache Software Foundation//DTD Struts
> Configuration 2.1//EN", "struts-2.1.dtd");
> 81:dtdMappings.put("-//Apache Software Foundation//DTD Struts
> Configuration 2.1.7//EN", "struts-2.1.7.dtd");
> 82:dtdMappings.put("-//Apache Software Foundation//DTD Struts
> Configuration 2.3//EN", "struts-2.3.dtd");
>
>
Oh, I wasn't looking at the Struts2XmlConfigurationProvider; I was looking
at the XmlConfigurationProvider . . .


Re: wierd stack trace regarding parsing of struts.xml

2012-12-03 Thread ChadDavis
Why aren't there mappings for the struts-xxx.dtd's?



On Mon, Dec 3, 2012 at 1:20 AM, Lukasz Lenart wrote:

> 2012/12/1 ChadDavis :
> > Thanks Lukasz.  This is very useful information. I think this clearly
> fixes
> > my problem, but I still have some questions.
> >
> > 1) when was xwork moved to ASF?
>
> Just before 2.2.1, two years ago, but DTDs where changed sometime later
>
> http://struts.apache.org/2.x/docs/version-notes-221.html
>
> > 2) It's not really Struts 2 doing the look up right?  It's the sax
> parser?
> >  Is Struts2 using the EntityResolver to add the resolution logic that
> > converts the DOCTYPE tag to a classpath resource lookup?  If you don't
> know
> > of the top of your head, I plan to dive into the code myself anyhow.
>
> Yes, but you can tell the parser where the DTDs are, so it can read
> them locally before looking for them over the internet. See
> XmlConfigurationProvider for more details.
>
> Example:
> mappings.put("-//Apache Struts//XWork 2.3//EN", "xwork-2.3.dtd");
> mappings.put("-//Apache Struts//XWork 2.1.3//EN",
> "xwork-2.1.3.dtd");
> mappings.put("-//Apache Struts//XWork 2.1//EN", "xwork-2.1.dtd");
> mappings.put("-//Apache Struts//XWork 2.0//EN", "xwork-2.0.dtd");
> mappings.put("-//Apache Struts//XWork 1.1.1//EN",
> "xwork-1.1.1.dtd");
> mappings.put("-//Apache Struts//XWork 1.1//EN", "xwork-1.1.dtd");
> mappings.put("-//Apache Struts//XWork 1.0//EN", "xwork-1.0.dtd");
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: wierd stack trace regarding parsing of struts.xml

2012-12-03 Thread ChadDavis
So, it seems like this should be added to the wiki on the webworks to
struts 2 migration page . . . I'm more than willing to do provide the text.
 what do you think?


On Mon, Dec 3, 2012 at 1:20 AM, Lukasz Lenart wrote:

> 2012/12/1 ChadDavis :
> > Thanks Lukasz.  This is very useful information. I think this clearly
> fixes
> > my problem, but I still have some questions.
> >
> > 1) when was xwork moved to ASF?
>
> Just before 2.2.1, two years ago, but DTDs where changed sometime later
>
> http://struts.apache.org/2.x/docs/version-notes-221.html
>
> > 2) It's not really Struts 2 doing the look up right?  It's the sax
> parser?
> >  Is Struts2 using the EntityResolver to add the resolution logic that
> > converts the DOCTYPE tag to a classpath resource lookup?  If you don't
> know
> > of the top of your head, I plan to dive into the code myself anyhow.
>
> Yes, but you can tell the parser where the DTDs are, so it can read
> them locally before looking for them over the internet. See
> XmlConfigurationProvider for more details.
>
> Example:
> mappings.put("-//Apache Struts//XWork 2.3//EN", "xwork-2.3.dtd");
> mappings.put("-//Apache Struts//XWork 2.1.3//EN",
> "xwork-2.1.3.dtd");
> mappings.put("-//Apache Struts//XWork 2.1//EN", "xwork-2.1.dtd");
> mappings.put("-//Apache Struts//XWork 2.0//EN", "xwork-2.0.dtd");
> mappings.put("-//Apache Struts//XWork 1.1.1//EN",
> "xwork-1.1.1.dtd");
> mappings.put("-//Apache Struts//XWork 1.1//EN", "xwork-1.1.dtd");
> mappings.put("-//Apache Struts//XWork 1.0//EN", "xwork-1.0.dtd");
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: wierd stack trace regarding parsing of struts.xml

2012-12-03 Thread ChadDavis
Thanks!


On Mon, Dec 3, 2012 at 1:20 AM, Lukasz Lenart wrote:

> 2012/12/1 ChadDavis :
> > Thanks Lukasz.  This is very useful information. I think this clearly
> fixes
> > my problem, but I still have some questions.
> >
> > 1) when was xwork moved to ASF?
>
> Just before 2.2.1, two years ago, but DTDs where changed sometime later
>
> http://struts.apache.org/2.x/docs/version-notes-221.html
>
> > 2) It's not really Struts 2 doing the look up right?  It's the sax
> parser?
> >  Is Struts2 using the EntityResolver to add the resolution logic that
> > converts the DOCTYPE tag to a classpath resource lookup?  If you don't
> know
> > of the top of your head, I plan to dive into the code myself anyhow.
>
> Yes, but you can tell the parser where the DTDs are, so it can read
> them locally before looking for them over the internet. See
> XmlConfigurationProvider for more details.
>
> Example:
> mappings.put("-//Apache Struts//XWork 2.3//EN", "xwork-2.3.dtd");
> mappings.put("-//Apache Struts//XWork 2.1.3//EN",
> "xwork-2.1.3.dtd");
> mappings.put("-//Apache Struts//XWork 2.1//EN", "xwork-2.1.dtd");
> mappings.put("-//Apache Struts//XWork 2.0//EN", "xwork-2.0.dtd");
> mappings.put("-//Apache Struts//XWork 1.1.1//EN",
> "xwork-1.1.1.dtd");
> mappings.put("-//Apache Struts//XWork 1.1//EN", "xwork-1.1.dtd");
> mappings.put("-//Apache Struts//XWork 1.0//EN", "xwork-1.0.dtd");
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: wierd stack trace regarding parsing of struts.xml

2012-12-01 Thread ChadDavis
> > But what do you think needs to match the jar file?  I mean,
> struts2-core.jar doesn't contain xwork-1.1.1.dtd, but the xwork jar does .
> . . so why wouldn't it find it if it was just taking the xwork-1.1.1.dtd
> and checking the classpath.
>
> When XWork was moved to ASF, we changed all the DOCTYPEs, the correct one
> is:
>
> "-//Apache Struts//XWork 1.0//EN"
> "http://struts.apache.org/dtds/xwork-1.1.1.dtd";>
>
> You can find all the DTDs here [1], basically all these DTDs are part
> of distribution, so Struts 2 can read them from jars and don't have to
> look over the internet. In your case, the DOCTYPE is not available
> locally and Struts 2 is trying to fetch it from internet.
>
> [1] http://struts.apache.org/dtds/
>


Thanks Lukasz.  This is very useful information. I think this clearly fixes
my problem, but I still have some questions.

1) when was xwork moved to ASF?

2) It's not really Struts 2 doing the look up right?  It's the sax parser?
 Is Struts2 using the EntityResolver to add the resolution logic that
converts the DOCTYPE tag to a classpath resource lookup?  If you don't know
of the top of your head, I plan to dive into the code myself anyhow.


problem with docs for convention plugin

2012-06-26 Thread ChadDavis
Found a minor bug in the docs that is kind of troublesome on the user,
but easy to fix I'm sure . . .


http://struts.apache.org/2.3.4/docs/convention-plugin.html#ConventionPlugin-Introduction

The convention plugin points to an older version, which is actually
not compatible with the 2.3.4 struts core.


This is from the "Setup" section:



org.apache.struts
struts2-convention-plugin
2.1.6


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



Re: Jetty 6.x vs Tomcat 6.x

2009-03-20 Thread ChadDavis
On Thu, Mar 19, 2009 at 11:12 AM, Wes Wannemacher  wrote:
> In theory, an app should work on any app server, but from time to time
> I've found out about incompatibilities the hard way. For instance,

Similarly, I found incompatibility in JSP parsers in the past.  My
issue was moving from TC to Weblogic, several years back, but the
issue was due to Tomcat having a less strict enforcement of syntax
rules than weblogic.  This is like what Wes reports.  It could be some
syntax in the JSP that TC let's slip, and Jetty doesn't.

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



Re: doc problem at struts.properites page

2009-03-02 Thread ChadDavis
I'd be more than happy to fix this kind of thing.  How would I do that?

On Mon, Mar 2, 2009 at 2:17 PM, Musachy Barroso  wrote:
> That should be "default.properties"
>
> On Mon, Mar 2, 2009 at 4:14 PM, ChadDavis  wrote:
>> On the page that explains the struts.properties, the documentation says:
>>
>> " the list of properties can be found in struts-default.properties
>> (inside struts2.jar). "
>>
>> Shouldn't that just be "default.properties" or is there another
>> properties file called "struts-default.properties"?
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



doc problem at struts.properites page

2009-03-02 Thread ChadDavis
On the page that explains the struts.properties, the documentation says:

" the list of properties can be found in struts-default.properties
(inside struts2.jar). "

Shouldn't that just be "default.properties" or is there another
properties file called "struts-default.properties"?

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



struts2-archetype-starter

2009-03-02 Thread ChadDavis
Is there one of these for 2.1 yet?  When I follow the links I end up
at a 2.0.11 version.  I'm just wondering if the docs are behind or
this just isn't available yet.

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



Re: [ANN] "Ajax on Struts 2" Training at ApacheCon Europe

2009-02-07 Thread ChadDavis
> Its good to hear... Is there any possibility of getting video of the session
> or the presentations.. this will be useful for the developers who are not
> able to come to the conference, at least for the developers in other
> countries...

They don't publish the trainings like that.  I'm not sure why.  But
I'll publish blog versions of everything either as I'm preparing the
training, or shortly after the training.  It won't be the same as
being in the room, but it will cover the same content.

My Blog:  http://zeroinsertionforce.blogspot.com/

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



Re: How to set base context path?

2009-02-05 Thread ChadDavis
You want this one:

http://www.imdb.com/title/tt0042546/

On Thu, Feb 5, 2009 at 3:14 PM, Musachy Barroso  wrote:
> Ah, now you made curious...
>
> musachy
>
> On Thu, Feb 5, 2009 at 5:13 PM, David C. Hicks  wrote:
>>
>> ChadDavis wrote:
>>>
>>> "Harvey" is nice though.  Great movie.  There's a scene with this
>>> slightly chubby lady singing that cracks me up completely.
>>>
>>
>> Amazing, but you're the first person I've encountered who got the reference
>> to the movie.  I had to explain it to everyone else - the magical, invisible
>> rabbit.  That's funny.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



Re: How to set base context path?

2009-02-05 Thread ChadDavis
"Harvey" is nice though.  Great movie.  There's a scene with this
slightly chubby lady singing that cracks me up completely.

On Thu, Feb 5, 2009 at 3:00 PM, David C. Hicks  wrote:
> I think we've got the problem solved now.  One of the developers found that
> in one case the path was actually hard-coded in a JSP.  Ugh!  We also had
> not provided a namespace for our struts package, and so apparently it was
> defaulting to the package name.  Just little details that get left until the
> last minute.
>
> ChadDavis wrote:
>>>
>>> 2) Is it possible to not have to have the base path defined in Struts at
>>> all?  It seems to me that this would be the ideal solution.
>>>
>>
>>
>> If you deploy the app as the root app in the servlet container, then
>> your struts namespaces are essentially doing this.  I think the net
>> effect is what you are looking for.  But maybe I misunderstand
>> something.
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



Re: How to set base context path?

2009-02-05 Thread ChadDavis
> 2) Is it possible to not have to have the base path defined in Struts at
> all?  It seems to me that this would be the ideal solution.


If you deploy the app as the root app in the servlet container, then
your struts namespaces are essentially doing this.  I think the net
effect is what you are looking for.  But maybe I misunderstand
something.

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



Re: Access Struts2 Action Properties

2009-02-05 Thread ChadDavis
Custom tag?  Is this a custom JSP tag?

On Thu, Feb 5, 2009 at 2:21 AM, Dominik Fischer  wrote:
> Hello folks,
>
> how can i access a property (i.e. data) of a class like
>
> public class BabyAction extends ActionSupport implements RequestAware {
>private List data;
>
>public List getData() {
>return this.data;
>}
>
>public void setSearch(List data) {
>this.data = data;
>}
>
>...
>
> }
>
> ... in a custom tag like ...
>
> ?
>
> I have tried it with request.getAttribute() or session.getAttribute, but
> nothing worked.
>
>
> Thank you
> Dom
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



[ANN] "Ajax on Struts 2" Training at ApacheCon Europe

2009-02-04 Thread ChadDavis
Hello.  I'm Chad Davis, one of the authors of Struts 2 in Action.

I'll be teaching a one day training on Struts 2 Ajax at the ApacheCon
Europe ( http://eu.apachecon.com/c/aceu2009/ ).  This course will work
for Struts 2 newbies as well as Struts 2 developers wanting to see how
the framework plays well with Ajax.  Here's a quick tick list of the
training's features:

Struts 2 Intro
Convention over Configuration with S2
Ajax on S2
JSON
JQuery Ajax API
Maven and S2

See the blurb at bottom of this page for more details.

TITLE:

"Ajax on Struts 2: How a Second Generation Web Application Framework
Meets the Demands of RIA"

LINK:   http://eu.apachecon.com/c/aceu2009/sessions/217

SUMMARY:

Struts 2 is a brand new, second generation web application framework.
Two criteria by which all new frameworks should be judged are ease of
development and compatibility with RIA techniques. If a new framework
is worth it's hype, it should ease your carpal tunnel syndrome ( less
typing! ) while simultaneously making Ajax, and other RIA techniques,
as natural and convenient as traditional models of web application
development. This training will try to provide two things. First,
we'll give everyone a hands-on introduction to Struts 2 development by
coding a "Hello World on steroids". In addition to demonstrating the
Struts 2 development flow, this pumped-up Hello World will also
demonstrate how to do Ajax on Struts 2. You'll get a peak at a day in
the life of a Struts 2 developer, and you'll also see how the
framework facilitates clean Ajax development. It's part intro, part
best practices. Bring your laptop and be ready to code. Ideally, have
a Java IDE and a servlet container ready to go. Team programming will
be encouraged ; teams of two should work best -- one typist and one
"listener". We're going to move fast, but it should work.

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