You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sean Schofield <se...@schof.com> on 2004/10/12 17:29:56 UTC

JSF and Struts Integration

I have been doing some reading recently on JSF and I have a few comments and questions.

At first I thought JSF would focus mostly on the "V" in MVC.  But after doing some reading on this, it seems like JSF really provides the "M" and "C" as well.  Is this accurate?

It seems possible to combine the view of JSF with the Struts controller (and apparently this is what the integration package is about.)  Most of the discussion about combining the two revolves around migration from existing Struts projects to JSF.  Other than migration purposes, what is the point in using both?  

I like Tiles and plan to continue to use it, but I consider Tiles to be only a small part of Struts.  Most of the familiar Struts entities seem to be covered by JSF and I am not sure why it would make sense to keep using Struts if there are features in JSF that are appealing to you.  Of course you could use Struts for validation but is it really worth dealing with two frameworks just because you like Struts validation better than JSF validation?

My point in asking these questions is that I am trying decide the direction our current Struts applications should take.  I am very happy with Struts but worry that over the long run, the focus will be on JSF and our applications will miss out on some of the developments there.

Finally, is the ComposableRequestProcessor in struts-chain going to deal with JSF eventually?  Will this make it even easier to combine the two?

TIA for you comments and suggestions,

sean

Re: JSF and Struts Integration

Posted by Mark Lowe <ma...@boxstuff.it>.
On 12 Oct 2004, at 17:57, Hubert Rabago wrote:

> Lots of people more qualified than me to respond to your questions,
> but I know a little bit about the theory and can give you a preview of
> what they'll likely say.
>
>
> On Tue, 12 Oct 2004 11:29:56 -0400, Sean Schofield
> <se...@schof.com> wrote:
>> I have been doing some reading recently on JSF and I have a few 
>> comments and questions.
>>
>> At first I thought JSF would focus mostly on the "V" in MVC.  But 
>> after doing some reading on this, it seems like JSF really provides 
>> the "M" and "C" as well.  Is this accurate?

Its positioned much like struts, the focus is on the controller servlet 
and there is the option of using Faces JSP if you like , or not. There 
are example where folk put the model stuff in the controller/backing 
beans, but this is also true of some struts examples.

>
> Yes.  Some even believe the navigation rules of JSF is easier to
> understand than those of Struts.

I haven't found this, but that could be because I'm used to struts.

>
>>
>> It seems possible to combine the view of JSF with the Struts 
>> controller (and apparently this is what the integration package is 
>> about.)  Most of the discussion about combining the two revolves 
>> around migration from existing Struts projects to JSF.  Other than 
>> migration purposes, what is the point in using both?
>>
>
> You could use both if you had no plans of switching fully but would
> like to take advantage of the UI widgets of JSF.
>
>> I like Tiles and plan to continue to use it, but I consider Tiles to 
>> be only a small part of Struts.  Most of the familiar Struts entities 
>> seem to be covered by JSF and I am not sure why it would make sense 
>> to keep using Struts if there are features in JSF that are appealing 
>> to you.  Of course you could use Struts for validation but is it 
>> really worth dealing with two frameworks just because you like Struts 
>> validation better than JSF validation?
>>
>> My point in asking these questions is that I am trying decide the 
>> direction our current Struts applications should take.  I am very 
>> happy with Struts but worry that over the long run, the focus will be 
>> on JSF and our applications will miss out on some of the developments 
>> there.
>>
>
> Whose focus?  Struts users miss out on lots of developments outside
> Struts, but they miss out on Struts progress as well.  There are still
> some active Struts committers, and I suspect a lot of lurkers trying
> to contribute.  There are also lots of Struts 1.3/2.x discussions
> currently going on, and even Craig himself is still an active
> participant in those discussions.  If you have a Struts-only app, then
> you're sure to miss out on JSF developments.  If you want to use JSF
> UI components, Craig's struts-faces integration library would help.
>
>> Finally, is the ComposableRequestProcessor in struts-chain going to 
>> deal with JSF eventually?  Will this make it even easier to combine 
>> the two?
>>
>> TIA for you comments and suggestions,
>>
>> sean
>>
>
> I don't have anything against JSF as a whole, but a lot of times I
> feel like most switchers are switching just because they feel that
> other people are switching, too.

I think that faces has some strong advantages over struts, some of 
which folk may disagree with..

Having backing beans that you can also add processing methods to makes 
more sense to me.. It makes sense to be to have a save method in the 
UserBean, not in a separate action.

Some things that jsf brings are good and bad like dataTable, it does 
more of the work, but some site builders would object to the table 
being generated rather than being able to tweak bits in. It also only 
generates html 4 not xhtml, but who really cares as long as its valid / 
parsable?

The option to save the session on the client means that needing to use 
LazyLists and such like to store stuff in the request is no longer 
required. Some folk complain about the huge hidden form property that 
the sun jsf implementation leaves in the page, but I'd just say that 
nonesense .NET uses this technique to save state on the client also 
(not that thats a justification).Of course scoping to session does mean 
having to clean up after your self, this could be seen as a cost.

I also prefer the validation model, mapping validations in the jsp 
leaves the site builder to say which validation s/he wants in the jsp. 
Not tucked away in an xml file or java class.

Out of container Unit testing can be done without struts test case as 
Backing beans are just plain beans.

You can have void methods for you actions and you're not forced to 
declare a forward. which is nice for editing type interfaces.

public void saveAction() {
	service.save(userBean);
}

There are reasons for preferring struts to faces, but also good reasons 
to prefer faces over struts..


Mark

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


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


Re: JSF and Struts Integration

Posted by Craig McClanahan <cr...@gmail.com>.
On Wed, 13 Oct 2004 19:36:37 +0200, Matthias Wessendorf
<ma...@matthias-wessendorf.de> wrote:
> Craig,
> 
> 
> > With Creator (which has nice support for consuming web
> > services), I used Google's published API for doing searches
> > via a SOAP request to build a little demo program -- with the
> > text field for the query string, and the results table, on
> > the same page.  I only wanted to display the table if there
> > were actually any results ... easy to do:
> 
> 
> is that demo, that uses Google-API, available somewhere online?
> or inside of the Creator Trial Version?

There's a link to the WSDL for the GoogleSearchService under "Web
Services --> Samples" in the Server Navigator menu, so you can easily
use the API yourself (you'll want to get Google's docs about it, at
<http://www.google.com/apis/> to understand the search parameters). 
The actual demo app is not currently available publicly, but it's on
our list that will show up on the Creator web site someday.

> 
> Thanks,
> Matthias
> 

Craig

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


RE: JSF and Struts Integration

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
Craig,


> With Creator (which has nice support for consuming web 
> services), I used Google's published API for doing searches 
> via a SOAP request to build a little demo program -- with the 
> text field for the query string, and the results table, on 
> the same page.  I only wanted to display the table if there 
> were actually any results ... easy to do:


is that demo, that uses Google-API, available somewhere online?
or inside of the Creator Trial Version?

Thanks,
Matthias




>   <h:dataTable ... rendered="#{Search.resultsAvailable}" ...>
>       ...
>    </h:dataTable>
> 
> where Search is my backing bean for the page, and 
> resultsAvailable is a boolean property indicating whether 
> there are currently any results ready to be displayed (from 
> the last search).  Now, the entire table is either displayed 
> or not displayed, based on that value.
> 
> 
> > 
> > >indeed, the integration library hooks the two frameworks together 
> > >only when processing an action event from a submit buttton or 
> > >hyperlink).
> > >
> > >
> > >
> > Interesting.  Thanks for this nugget.  This helps with my 
> "behind the 
> > scenes" understanding of what you're up to.
> > 
> 
> If you look at how it actually works, it's really a front controller
> (JSF) in front of a front controller (Struts), where the 
> outer one is dealing with user interface events (clicking the 
> node of a tree control to expand or contract, for example), 
> while the inner one is dealing with business transactions.
> 
> > 
> > sean
> > 
> 
> Craig
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


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


Re: Back Button Error

Posted by Martin Gainty <mg...@hotmail.com>.
Hello Stup:
You need to redirect your Response
e.g.
Response.Redirect(Request.Url.PathAndQuery)
Martin
----- Original Message -----
From: "Sudipto Roy" <su...@yahoo.co.in>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, October 13, 2004 2:23 PM
Subject: Back Button Error


>
>
>
>
> Hi Guys
>
> How can I solve this problem when I click on IE Back Button getting this
Message as below :
> Warning: Page has Expired
> The page you requested was created using information you submitted in a
form. This page is no longer available. As a security precaution, Internet
Explorer does not automatically resubmit your information for you.
>
> To resubmit your information and view this Web page, click the Refresh
button.
>
>
>
>
> How can I resubmit the Page programatically when I click on IE Back
Button?
>
> Is there any way so that the Save,Delete,Update Action in a Page will not
be added to IE History Object?
>
> Thanks
>
>
>
>
>
>
> Yahoo! India Matrimony: Find your life partneronline.

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


Re: Back Button Error

Posted by Sean Schofield <se...@schof.com>.
How did you originally get to the page you are trying to get back to?  
It sounds like you are doing an HTML POST.  I believe this is standard 
behavior in IE when you POST something. 

IE is trying to tell you that the only way it can reproduce the page is 
to repost the same data that generated it in the first place.

sean


Sudipto Roy wrote:

> 
>
>Hi Guys
>
>How can I solve this problem when I click on IE Back Button getting this Message as below :
>Warning: Page has Expired 
>The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. 
>
>To resubmit your information and view this Web page, click the Refresh button. 
>
>
> 
>
>How can I resubmit the Page programatically when I click on IE Back Button?
>
>Is there any way so that the Save,Delete,Update Action in a Page will not be added to IE History Object?
>
>Thanks
>
> 
>
>
>
>
>Yahoo! India Matrimony: Find your life partneronline.
>  
>



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


Back Button Error

Posted by Sudipto Roy <su...@yahoo.co.in>.

 

Hi Guys

How can I solve this problem when I click on IE Back Button getting this Message as below :
Warning: Page has Expired 
The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. 

To resubmit your information and view this Web page, click the Refresh button. 


 

How can I resubmit the Page programatically when I click on IE Back Button?

Is there any way so that the Save,Delete,Update Action in a Page will not be added to IE History Object?

Thanks

 




Yahoo! India Matrimony: Find your life partneronline.

Re: JSF and Struts Integration

Posted by Craig McClanahan <cr...@gmail.com>.
On Wed, 13 Oct 2004 09:18:53 -0400, Sean Schofield
<se...@schof.com> wrote:

> Fair enough.  By the way, I'm not bagging on the UI components in any
> way.  The one that looks the most intriguing to me is the "rendered"
> attribute that comes with the various widgets.  That attribute combined
> with the EL is sweet! Currently I have my own custom tags to check for
> field availablility and editability.  I perform two checks for every
> field with two tags (ex. <isEditable> and <isNotEditable>).  The
> rendered attribute combined with EL could condense my code (and get rid
> of the need for two custom tags!)

Yes, "rendered" is quite handy.  It's standard on all components, and
it's recursive.

With Creator (which has nice support for consuming web services), I
used Google's published API for doing searches via a SOAP request to
build a little demo program -- with the text field for the query
string, and the results table, on the same page.  I only wanted to
display the table if there were actually any results ... easy to do:

  <h:dataTable ... rendered="#{Search.resultsAvailable}" ...>
      ...
   </h:dataTable>

where Search is my backing bean for the page, and resultsAvailable is
a boolean property indicating whether there are currently any results
ready to be displayed (from the last search).  Now, the entire table
is either displayed or not displayed, based on that value.


> 
> >indeed, the integration library hooks the two frameworks
> >together only when processing an action event from a submit buttton or
> >hyperlink).
> >
> >
> >
> Interesting.  Thanks for this nugget.  This helps with my "behind the
> scenes" understanding of what you're up to.
> 

If you look at how it actually works, it's really a front controller
(JSF) in front of a front controller (Struts), where the outer one is
dealing with user interface events (clicking the node of a tree
control to expand or contract, for example), while the inner one is
dealing with business transactions.

> 
> sean
> 

Craig

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


Re: JSF and Struts Integration

Posted by Sean Schofield <se...@schof.com>.
Craig McClanahan wrote:

>The *standard* UI components weren't meant to be compelling -- they
>were meant to give people an opportunity to actually explore the APIs
>without having anything except a JSF implementation.
>
>  
>
Fair enough.  By the way, I'm not bagging on the UI components in any 
way.  The one that looks the most intriguing to me is the "rendered" 
attribute that comes with the various widgets.  That attribute combined 
with the EL is sweet! Currently I have my own custom tags to check for 
field availablility and editability.  I perform two checks for every 
field with two tags (ex. <isEditable> and <isNotEditable>).  The 
rendered attribute combined with EL could condense my code (and get rid 
of the need for two custom tags!)

>indeed, the integration library hooks the two frameworks
>together only when processing an action event from a submit buttton or
>hyperlink).
>
>  
>
Interesting.  Thanks for this nugget.  This helps with my "behind the 
scenes" understanding of what you're up to.

>Does Struts offer enough value add to be compelling for use together
>with JSF?  The list of adds is fairly thin at the moment, and IMHO
>this is a way that Struts2 should distinguish itself, by focusing on
>this area of development.  But that's for the future.
>  
>
That's kind of what I've been thinking.  For me, Tiles is a huge add but 
I'm not wedded to ActionForms, etc.  I look forward to the controller 
imporvements to be discussed on struts-dev! 

Thanks for your hard work on both of these projects!

sean


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


Re: JSF and Struts Integration

Posted by Craig McClanahan <cr...@gmail.com>.
On Tue, 12 Oct 2004 14:02:07 -0400, Sean Schofield
<se...@schof.com> wrote:
> >
> Are the UI widgets of JSF really that compelling?

The *standard* UI components weren't meant to be compelling -- they
were meant to give people an opportunity to actually explore the APIs
without having anything except a JSF implementation.

>  So far I think there
> are some minor improvements over Struts tags but the real promise seems
> to be in third party/open-source add-ons which are in the infancy
> stages.  Plus the UI widgets often require preprocessing to use.  At
> that point it seems like why not just go with JSF completely?
> 

I believe there's room for a C-oriented framework behind JSF's
V-oriented framework (note that the "controller" inside JSF is for
handling user interface events, not necessarily application business
logic -- indeed, the integration library hooks the two frameworks
together only when processing an action event from a submit buttton or
hyperlink).

> >I don't have anything against JSF as a whole, but a lot of times I
> >feel like most switchers are switching just because they feel that
> >other people are switching, too.
> >
> >
> I agree.  That's why I want to discuss with others and think it through
> carefully.   So far my plan is to evaluate JSF fully and decide whether
> I like it better than Struts (in its current inception with the
> currently available tags) .  I know its not completely an "either-or"
> decision but I'd rather minimize the mixing of the two frameworks as
> much as possible.
> 

As I said in my blog, if using just JSF meets your needs, go for it
... its easier to manage one framework instead of two.  But if you
need features of a view tier framework and a controller tier
framework, then there's nothing wrong with using two.

Does Struts offer enough value add to be compelling for use together
with JSF?  The list of adds is fairly thin at the moment, and IMHO
this is a way that Struts2 should distinguish itself, by focusing on
this area of development.  But that's for the future.

One thing I would *not* do is build new apps based on the Struts HTML
tags, once the integration library is completed (should be soon ...
I've got time carved out to squash the last few bugs next week).  JSF
does the V much better than the Struts tags do (although you might
like to use Tiles as well for reusable layouts).

> My two cents.
> 
> sean

Craig

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


Re: JSF and Struts Integration

Posted by Sean Schofield <se...@schof.com>.
Hubert Rabago wrote:

>Yes.  Some even believe the navigation rules of JSF is easier to
>understand than those of Struts.
>
>  
>
I haven't finished exploring all of the nav features of JSF, but I tend 
to agree with this comment.  Navigation seems to me to be one of the 
more awkward aspects of Struts.  I came up with my own navigation 
solution to put on top of Struts when I had multi screen wizards that 
needed to have "next" and "prev" buttons (and also reused screens.)  I 
could probably dump this in favor of JSF.

The navigation of JSF also seems to be a big reason why you wouldn't 
want to use both Struts and JSF together indefinitely.  I think it would 
get confusing having 50% of the navigation rules contained in the 
struts-config and 50% in the faces-config. 

>You could use both if you had no plans of switching fully but would
>like to take advantage of the UI widgets of JSF.
>
>  
>
Are the UI widgets of JSF really that compelling?  So far I think there 
are some minor improvements over Struts tags but the real promise seems 
to be in third party/open-source add-ons which are in the infancy 
stages.  Plus the UI widgets often require preprocessing to use.  At 
that point it seems like why not just go with JSF completely?

>I don't have anything against JSF as a whole, but a lot of times I
>feel like most switchers are switching just because they feel that
>other people are switching, too.
>  
>
I agree.  That's why I want to discuss with others and think it through 
carefully.   So far my plan is to evaluate JSF fully and decide whether 
I like it better than Struts (in its current inception with the 
currently available tags) .  I know its not completely an "either-or" 
decision but I'd rather minimize the mixing of the two frameworks as 
much as possible.

My two cents.

sean


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


Problem with struts validator../ Struts 1.2

Posted by Marco Mistroni <mm...@waersystems.com>.
Hello all,
	I am using Struts validator in my webapplication for one of my
forms.
While I was using Struts 1.1 everything worked fine, but now that I have
updated my jars to use Struts 1.2 whenever I run my code I get the
following exception:

2004-10-13 17:38:06,797 DEBUG (ContactForm.java:65): setupMessages

[13/10/04 17:38:06:812 BST] 4e405c33 DynaValidator E
org.apache.struts.validator.DynaValidatorForm
org.apache.struts.util.StrutsValidator

[13/10/04 17:38:06:812 BST] 4e405c33 DynaValidator E
org.apache.struts.validator.DynaValidatorForm  TRAS0014I: The following
exception was logged org.apache.commons.validator.ValidatorException:
org.apache.struts.util.StrutsValidator
	at
org.apache.commons.validator.ValidatorAction.loadValidationClass(Validat
orAction.java:646)
	at
org.apache.commons.validator.ValidatorAction.executeValidationMethod(Val
idatorAction.java:555)
	at
org.apache.commons.validator.Field.validateForRule(Field.java:811)
	at org.apache.commons.validator.Field.validate(Field.java:890)
	at org.apache.commons.validator.Form.validate(Form.java:174)
	at
org.apache.commons.validator.Validator.validate(Validator.java:367)
	at
org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm
.java:112)
	at
com.waersystems.ngenweb.contact.ContactForm.validate(ContactForm.java:50
)
	at
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess
or.java:921)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
206)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
	at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
	at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
	at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
	at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)
	at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:283)
	at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)
	at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:76)
	at
com.waersystems.ngenweb.filter.XsltFilter.doFilter(XsltFilter.java:188)
	at
com.waersystems.ngenweb.filter.XsltFilter.doFilter(XsltFilter.java:145)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.waersystems.ngenweb.filter.LoginCheck.doFilter(LoginCheck.java:86)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:939)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:530)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:176)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:7
9)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:201)
	at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
	at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:182)
	at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
	at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
	at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
610)
	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:435)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
.
 
org.apache.commons.validator.ValidatorException:
org.apache.struts.util.StrutsValidator
	at
org.apache.commons.validator.ValidatorAction.loadValidationClass(Validat
orAction.java:646)
	at
org.apache.commons.validator.ValidatorAction.executeValidationMethod(Val
idatorAction.java:555)
	at
org.apache.commons.validator.Field.validateForRule(Field.java:811)
	at org.apache.commons.validator.Field.validate(Field.java:890)
	at org.apache.commons.validator.Form.validate(Form.java:174)
	at
org.apache.commons.validator.Validator.validate(Validator.java:367)
	at
org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm
.java:112)
	at
com.waersystems.ngenweb.contact.ContactForm.validate(ContactForm.java:50
)
	at
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess
or.java:921)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
206)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
	at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
	at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
	at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
	at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)
	at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:283)
	at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)
	at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:76)
	at
com.waersystems.ngenweb.filter.XsltFilter.doFilter(XsltFilter.java:188)
	at
com.waersystems.ngenweb.filter.XsltFilter.doFilter(XsltFilter.java:145)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.waersystems.ngenweb.filter.LoginCheck.doFilter(LoginCheck.java:86)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:939)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:530)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:176)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:7
9)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:201)
	at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
	at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:182)
	at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
	at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
	at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
610)
	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:435)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)



my validation.xml Is as follows..

<form-validation>
      <formset>
         <form name="contactForm">
            <field property="contactRef" depends="required">
               <msg name="required"
                    key="error.field.required"/>
               <arg0 key="prompt.contact"/>
               
            </field>
         </form>
</form-validation>


and in the struts config I am declaring following plugin

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
		<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml" />
	</plug-in>
	


my form extends DynaValidationForm..

anyone can tell me what's going on?

Is it because in my webinf\lib I have both struts-1.2.jar and
commons-validator-1.3.jar?

Thanks in advance and regards
	Marco

   



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


Re: JSF and Struts Integration

Posted by Hubert Rabago <hr...@gmail.com>.
Geez, my writing can be very confusing.

> Whose focus?  Struts users miss out on lots of developments outside
> Struts, but they miss out on Struts progress as well.  

I meant, those not using Struts would miss out on Struts developments
as well.  Maybe it's time for me to get some lunch.

Hubert

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


Re: JSF and Struts Integration

Posted by Hubert Rabago <hr...@gmail.com>.
Lots of people more qualified than me to respond to your questions,
but I know a little bit about the theory and can give you a preview of
what they'll likely say.


On Tue, 12 Oct 2004 11:29:56 -0400, Sean Schofield
<se...@schof.com> wrote:
> I have been doing some reading recently on JSF and I have a few comments and questions.
> 
> At first I thought JSF would focus mostly on the "V" in MVC.  But after doing some reading on this, it seems like JSF really provides the "M" and "C" as well.  Is this accurate?

Yes.  Some even believe the navigation rules of JSF is easier to
understand than those of Struts.

> 
> It seems possible to combine the view of JSF with the Struts controller (and apparently this is what the integration package is about.)  Most of the discussion about combining the two revolves around migration from existing Struts projects to JSF.  Other than migration purposes, what is the point in using both?
> 

You could use both if you had no plans of switching fully but would
like to take advantage of the UI widgets of JSF.

> I like Tiles and plan to continue to use it, but I consider Tiles to be only a small part of Struts.  Most of the familiar Struts entities seem to be covered by JSF and I am not sure why it would make sense to keep using Struts if there are features in JSF that are appealing to you.  Of course you could use Struts for validation but is it really worth dealing with two frameworks just because you like Struts validation better than JSF validation?
> 
> My point in asking these questions is that I am trying decide the direction our current Struts applications should take.  I am very happy with Struts but worry that over the long run, the focus will be on JSF and our applications will miss out on some of the developments there.
> 

Whose focus?  Struts users miss out on lots of developments outside
Struts, but they miss out on Struts progress as well.  There are still
some active Struts committers, and I suspect a lot of lurkers trying
to contribute.  There are also lots of Struts 1.3/2.x discussions
currently going on, and even Craig himself is still an active
participant in those discussions.  If you have a Struts-only app, then
you're sure to miss out on JSF developments.  If you want to use JSF
UI components, Craig's struts-faces integration library would help.

> Finally, is the ComposableRequestProcessor in struts-chain going to deal with JSF eventually?  Will this make it even easier to combine the two?
> 
> TIA for you comments and suggestions,
> 
> sean
> 

I don't have anything against JSF as a whole, but a lot of times I
feel like most switchers are switching just because they feel that
other people are switching, too.

Hubert

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


Re: JSF and Struts Integration

Posted by Craig McClanahan <cr...@gmail.com>.
On Tue, 12 Oct 2004 11:29:56 -0400, Sean Schofield
<se...@schof.com> wrote:
> I have been doing some reading recently on JSF and I have a few comments and questions.
> 
> At first I thought JSF would focus mostly on the "V" in MVC.  But after doing some reading on this, it seems like JSF really provides the "M" and "C" as well.  Is this accurate?

Not really.  JSF supports value binding expressions so that you can
"connect" a component with some model data in your M tier, but JSF
doesn't really care what technology you're using there.  There is just
enough C to support letting an action event navigate from one page to
another, but nothing like what Struts does of passing all such
navigation requests through a common lifecycle.

> 
> It seems possible to combine the view of JSF with the Struts controller (and apparently this is what the integration package is about.)  Most of the discussion about combining the two revolves around migration from existing Struts projects to JSF.  Other than migration purposes, what is the point in using both?

If you want to use Struts features like Tiles and the Validator
framework, you'd use them together.

> 
> I like Tiles and plan to continue to use it, but I consider Tiles to be only a small part of Struts.  Most of the familiar Struts entities seem to be covered by JSF and I am not sure why it would make sense to keep using Struts if there are features in JSF that are appealing to you.  Of course you could use Struts for validation but is it really worth dealing with two frameworks just because you like Struts validation better than JSF validation?

If client side Javascript validators are important to you, that is
likely to be a tipping point.

> 
> My point in asking these questions is that I am trying decide the direction our current Struts applications should take.  I am very happy with Struts but worry that over the long run, the focus will be on JSF and our applications will miss out on some of the developments there.
> 

You'll get the longer version of my answer to these types of questions
on my blog:

  http://blogs.sun.com/craigmcc

> Finally, is the ComposableRequestProcessor in struts-chain going to deal with JSF eventually?  Will this make it even easier to combine the two?

That's sort of an orthogonal question, because the struts-chain code
only deals with what happens *after* a form submit event is processed.
 It's just a replacement for the 1.1/1.2 RequestProcessor class, which
means you could even use them together today.

> 
> TIA for you comments and suggestions,
> 
> sean
> 
Craig

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