Re: Struts Tags Error
Geeth Narayanan wrote: I believe it is a compile time error than a runtime one. So, I don't have a stack trace. Ok then... How does the JSP look like then? Perhaps it is possible to see from that. As far as I read the error it is because a JSP tag has been used combined with a Struts HTML tags, which it isn't that happy about. Please post the JSP causing the error... Claus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help : how to redirect to a global-forward ?
Why are you using action inside global-forward. Use a forward element. You can reference it from action like mapping.findForward("toLogin"); rgds Antony Paul On Wed, 3 Nov 2004 10:27:49 +0530, sachin <[EMAIL PROTECTED]> wrote: > hi all, > > i have a global forward defined as > > > > > > now in my Action class i want to forward this to global forward "toLogin" > if the session is not valid .. > > how can achieve this ? > this is going to be common for all Action classes , so i can not mapp them in > each action-mapping defination .. > > please tell me some way by which i can redirect to this page > > thanks in advance > > Regards, > Sachin Hegde > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help : how to redirect to a global-forward ?
hi all, i have a global forward defined as now in my Action class i want to forward this to global forward "toLogin" if the session is not valid .. how can achieve this ? this is going to be common for all Action classes , so i can not mapp them in each action-mapping defination .. please tell me some way by which i can redirect to this page thanks in advance Regards, Sachin Hegde - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need an alternative to bean:define
Is JSTL an option? I find Struts Logic tag hard to read! If so, I think this should do: HTH. Of course this is from top of my head, i haven't tried it. ATTA On Tue, 02 Nov 2004 16:16:25 -0800, Janice <[EMAIL PROTECTED]> wrote: > My brain has stopped working. I need an alternative to bean:define. > > What I'm TRYING to do is iterate through a list, displaying a certain bit of > code only when its different than the last iteration (grouping). > > Here's a snip: > > > > > > value="<%=lastClientName%>"> > > > client: > > > /> > > > End of snip. > > This won't compile since bean "lastClientName" has already been defined. I > can't change my version of Struts. > > What would be some clean syntax to use instead? > > Thanks so much in advance! > > J > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need an alternative to bean:define
My brain has stopped working. I need an alternative to bean:define. What I'm TRYING to do is iterate through a list, displaying a certain bit of code only when its different than the last iteration (grouping). Here's a snip: client: End of snip. This won't compile since bean "lastClientName" has already been defined. I can't change my version of Struts. What would be some clean syntax to use instead? Thanks so much in advance! J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSF or Struts w/ JSF (again)
Howard, take a look at McClannahan's blog entry here: http://blogs.sun.com/roller/comments/craigmcc/Weblog/struts_or_jsf_struts_and You also might be interested in this article: http://svn.apache.org/viewcvs.cgi/*checkout*/struts/trunk/contrib/struts-shale/README.html He hints at the future of web application development and architecture using JSF, Struts and Spring. I haven't used JSF yet, but am currently looking at it for future projects. Hope this helps you some. robert > -Original Message- > From: Abrams, Howard A [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 02, 2004 6:23 PM > To: Struts Users Mailing List > Subject: RE: JSF or Struts w/ JSF (again) > > > > Thanks again Kevin, but the bullet points from the article don't state > why I would want to use Struts w/ JSF. With the exception of the quote > about the controller being 'powerful', they just list why JSF is good. > I know why JSF is good, why is Struts plus JSF better? > > > -Original Message- > > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, November 02, 2004 11:13 AM > > To: Struts Users Mailing List > > Subject: Re: JSF or Struts w/ JSF (again) > > > > From the article: > > > > Why integrate the trinity? > > As the JSP and the related specifications mature, new standards like > > JSF and the JSP Standard Tag Library (or JSTL, which uses simple tags > > to encapsulate the core functionality common to many JSP applications) > > are emerging. Following are some of the advantages to using the new > > technologies as an integrated whole: > > > > * Cleaner separation of behaviors and presentation. With the > > separation of tag, renderer, and component, the roles of page authors > > and application developers in the development cycle become better > > defined. > > > > * Changing the presentation for a component does not have an > > avalanche effect. Now you can easily just change the renderer. In the > > traditional MVC model, since this separation did not exist, any change > > in tags needed changes to the business logic as well. Not any more. > > > > * Renderer independence. Or restated, protocol independence by > > reusing component logic for multiple presentation devices with > > multiple renderers. The ability to use different renderers eliminates > > the need to code the entire presentation tier for specific devices. > > > > * A standard for assembling and reusing custom components. JSF > > thinks beyond "forms and fields" and provides a rich component model > > for rendering custom GUI components. Using JSF you can customize the > > way each component looks and behaves in a page. Developers also gain > > the ability to create their own GUI components (like menus and trees), > > which can easily be included in any JSP page with simple custom tags. > > Just like the Java front-end GUI components provided by AWT and Swing, > > we can have custom components for our Web pages that use their own > > event handlers and have customizable appearances. This is GUI nirvana > > for the Web tier! > > > > Struts is a framework that already possesses a large customer base. > > Many IT departments have recognized the value of this MVC framework > > and have been using it for quite a while. JSF doesn't possess the > > equivalent of Struts's powerful controller architecture, as well as > > its standardized ActionForm and Actions (with their declarative > > capabilities). When you integrate Tiles into the mix, you give > > yourself the ability to reuse and change corporate layouts in a > > seamless manner. > > > > The challenges of migrating JSF-enabled Struts applications are > > two-fold. First, Struts tags are not JSF-compliant. In other words, > > they do not extend the UIComponentTag as mandated by the JSF > > specification, therefore, JSF cannot interpret and associate > > UIComponent and Renderers with them. > > > > Second, there is no link between the FacesServlet and Struts > > RequestProcessor. In a Struts application, the RequestProcessor > > manages the show with the callback methods into ActionForm and Actions > > classes. Getters and setters for ActionForm properties and validate() > > are the callback methods in the ActionForm. For Action, execute() is > > the callback method. Unless the RequestProcessor gets invoked, the > > callback methods in Struts ActionForm and Actions classes do not get a > > chance to invoke the business logic. > > > > > > On Tue, 2 Nov 2004 13:57:56 -0500, Abrams, Howard A > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > -Original Message- > > > > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > > > > Sent: Tuesday, November 02, 2004 10:40 AM > > > > To: Struts Users Mailing List > > > > Subject: Re: JSF or Struts w/ JSF (again) > > > > > > > > I found this article to be useful in addressing some of your > > > questions: > > > > http://www-106.ibm.com/developerworks/java/library/j-integrate/ > > > > > > > > > > Thanks for the
Re: JSF or Struts w/ JSF (again)
You need to remember where, in a sense, you are, Howard. A lot of people, obviously, have invested a lot of time and energy into Struts based applications. With the advent or potential of JSF, so need to start to think about moving over. So, the merger of the two technologies here are not for people starting out but rather with a substantial investment in Struts to start. I think you have gotten good advice here. If you are starting out, as you apparently are, you need to choose, probably, one or the other. One the one hand, with your limited knowledge of the area, you will probably, I would GUESS, be best served by Struts because it has a lot of things that you, I think, would have to build for JSF. On the other hand, JSF will potentially be the future, and you might want to jump on board now. Michael On Tue, 2 Nov 2004 18:23:28 -0500, Abrams, Howard A <[EMAIL PROTECTED]> wrote: > > Thanks again Kevin, but the bullet points from the article don't state > why I would want to use Struts w/ JSF. With the exception of the quote > about the controller being 'powerful', they just list why JSF is good. > I know why JSF is good, why is Struts plus JSF better? > > > > > -Original Message- > > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, November 02, 2004 11:13 AM > > To: Struts Users Mailing List > > Subject: Re: JSF or Struts w/ JSF (again) > > > > From the article: > > > > Why integrate the trinity? > > As the JSP and the related specifications mature, new standards like > > JSF and the JSP Standard Tag Library (or JSTL, which uses simple tags > > to encapsulate the core functionality common to many JSP applications) > > are emerging. Following are some of the advantages to using the new > > technologies as an integrated whole: > > > > * Cleaner separation of behaviors and presentation. With the > > separation of tag, renderer, and component, the roles of page authors > > and application developers in the development cycle become better > > defined. > > > > * Changing the presentation for a component does not have an > > avalanche effect. Now you can easily just change the renderer. In the > > traditional MVC model, since this separation did not exist, any change > > in tags needed changes to the business logic as well. Not any more. > > > > * Renderer independence. Or restated, protocol independence by > > reusing component logic for multiple presentation devices with > > multiple renderers. The ability to use different renderers eliminates > > the need to code the entire presentation tier for specific devices. > > > > * A standard for assembling and reusing custom components. JSF > > thinks beyond "forms and fields" and provides a rich component model > > for rendering custom GUI components. Using JSF you can customize the > > way each component looks and behaves in a page. Developers also gain > > the ability to create their own GUI components (like menus and trees), > > which can easily be included in any JSP page with simple custom tags. > > Just like the Java front-end GUI components provided by AWT and Swing, > > we can have custom components for our Web pages that use their own > > event handlers and have customizable appearances. This is GUI nirvana > > for the Web tier! > > > > Struts is a framework that already possesses a large customer base. > > Many IT departments have recognized the value of this MVC framework > > and have been using it for quite a while. JSF doesn't possess the > > equivalent of Struts's powerful controller architecture, as well as > > its standardized ActionForm and Actions (with their declarative > > capabilities). When you integrate Tiles into the mix, you give > > yourself the ability to reuse and change corporate layouts in a > > seamless manner. > > > > The challenges of migrating JSF-enabled Struts applications are > > two-fold. First, Struts tags are not JSF-compliant. In other words, > > they do not extend the UIComponentTag as mandated by the JSF > > specification, therefore, JSF cannot interpret and associate > > UIComponent and Renderers with them. > > > > Second, there is no link between the FacesServlet and Struts > > RequestProcessor. In a Struts application, the RequestProcessor > > manages the show with the callback methods into ActionForm and Actions > > classes. Getters and setters for ActionForm properties and validate() > > are the callback methods in the ActionForm. For Action, execute() is > > the callback method. Unless the RequestProcessor gets invoked, the > > callback methods in Struts ActionForm and Actions classes do not get a > > chance to invoke the business logic. > > > > > > On Tue, 2 Nov 2004 13:57:56 -0500, Abrams, Howard A > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > -Original Message- > > > > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > > > > Sent: Tuesday, November 02, 2004 10:40 AM > > > > To: Struts Users Mailing List > > > > Subject: Re: JSF or Struts w/ J
Re: JSF or Struts w/ JSF (again)
Perhaps this link to Craig's blog will help clarify things: http://blogs.sun.com/roller/page/craigmcc/20040927#struts_or_jsf_struts_and Matt Abrams, Howard A wrote: Thanks again Kevin, but the bullet points from the article don't state why I would want to use Struts w/ JSF. With the exception of the quote about the controller being 'powerful', they just list why JSF is good. I know why JSF is good, why is Struts plus JSF better? -Original Message- From: Kevin Bridges [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 02, 2004 11:13 AM To: Struts Users Mailing List Subject: Re: JSF or Struts w/ JSF (again) From the article: Why integrate the trinity? As the JSP and the related specifications mature, new standards like JSF and the JSP Standard Tag Library (or JSTL, which uses simple tags to encapsulate the core functionality common to many JSP applications) are emerging. Following are some of the advantages to using the new technologies as an integrated whole: * Cleaner separation of behaviors and presentation. With the separation of tag, renderer, and component, the roles of page authors and application developers in the development cycle become better defined. * Changing the presentation for a component does not have an avalanche effect. Now you can easily just change the renderer. In the traditional MVC model, since this separation did not exist, any change in tags needed changes to the business logic as well. Not any more. * Renderer independence. Or restated, protocol independence by reusing component logic for multiple presentation devices with multiple renderers. The ability to use different renderers eliminates the need to code the entire presentation tier for specific devices. * A standard for assembling and reusing custom components. JSF thinks beyond "forms and fields" and provides a rich component model for rendering custom GUI components. Using JSF you can customize the way each component looks and behaves in a page. Developers also gain the ability to create their own GUI components (like menus and trees), which can easily be included in any JSP page with simple custom tags. Just like the Java front-end GUI components provided by AWT and Swing, we can have custom components for our Web pages that use their own event handlers and have customizable appearances. This is GUI nirvana for the Web tier! Struts is a framework that already possesses a large customer base. Many IT departments have recognized the value of this MVC framework and have been using it for quite a while. JSF doesn't possess the equivalent of Struts's powerful controller architecture, as well as its standardized ActionForm and Actions (with their declarative capabilities). When you integrate Tiles into the mix, you give yourself the ability to reuse and change corporate layouts in a seamless manner. The challenges of migrating JSF-enabled Struts applications are two-fold. First, Struts tags are not JSF-compliant. In other words, they do not extend the UIComponentTag as mandated by the JSF specification, therefore, JSF cannot interpret and associate UIComponent and Renderers with them. Second, there is no link between the FacesServlet and Struts RequestProcessor. In a Struts application, the RequestProcessor manages the show with the callback methods into ActionForm and Actions classes. Getters and setters for ActionForm properties and validate() are the callback methods in the ActionForm. For Action, execute() is the callback method. Unless the RequestProcessor gets invoked, the callback methods in Struts ActionForm and Actions classes do not get a chance to invoke the business logic. On Tue, 2 Nov 2004 13:57:56 -0500, Abrams, Howard A <[EMAIL PROTECTED]> wrote: -Original Message- From: Kevin Bridges [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 02, 2004 10:40 AM To: Struts Users Mailing List Subject: Re: JSF or Struts w/ JSF (again) I found this article to be useful in addressing some of your questions: http://www-106.ibm.com/developerworks/java/library/j-integrate/ Thanks for the pointer Kevin. The article does a good job explaining _HOW_ to integrate the two, but (and perhaps it's because I don't know enough about Struts), it didn't seem explain _WHY_ I would want to integrate the two. The only semi-concrete reason/feature I found in the article was this: "JSF doesn't possess the equivalent of Struts's powerful controller architecture, as well as its standardized ActionForm and Actions (with their declarative capabilities)." [sic] Can someone explain what makes the struts controller so 'powerful' in relation to JSF? What about Struts' ActionForm and Action and their benefit over JSF actions and beans? On Tue, 2 Nov 2004 13:22:15 -0500, Abrams, Howard A <[EMAIL PROTECTED]> wrote: Hi everyone, For a new project, I'm planning on using JSF. The questions I need to answer are: What will Struts add if I use it together with JSF? Does it add missing functionality? Is there a good design pattern th
RE: JSF or Struts w/ JSF (again)
Thanks Michael, That helped a little. Perhaps someone who knows JSF and Struts well (Craig?) could comment on how the Struts controller is better than using JSF by itself. (Which leads us back to my original questions at the bottom of this thread.) I'm not sure I would mix Struts and JSF either; I'm looking to see if there is a good reason to do so. At this point, the consensus on this group seems to be that if you are going to use JSF, there is not a strong reason to use Struts with it (tiles & the validation framework excluded). Does anyone disagree? Thanks, h. > -Original Message- > From: Dakota Jack [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 02, 2004 11:08 AM > To: Struts Users Mailing List > Subject: Re: JSF or Struts w/ JSF (again) > > I think that the article meant "Struts powerful controller > ARCHITECTURE [emphasis added]", Howard. There are Actions, > ActionForms, ActionMappings, ActionServlet, ActionMessages, > RequestProcessor, and other less significant classes.. All these are > integrated into a very useful and very powerful "controller > architecture" using struts-config.xml. I am not going to say much > about JSF, because I am not qualified, but that uses a very different > "architecture" involving an event based idea, unlike Struts. I would > strongly suggest that you take a look at the core Struts code in the > action package. Essentially, you map certain (maybe all) requests to > Struts and the "controller architecture" takes over from there. 'Hope > this is helpful. > > I am not sure that I would mix Struts and JSF myself. I think I would > either go with one or the other. I am not wedded to that thought, > however. > > Michael > > > On Tue, 2 Nov 2004 13:57:56 -0500, Abrams, Howard A > <[EMAIL PROTECTED]> wrote: > > > > > > > > > -Original Message- > > > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, November 02, 2004 10:40 AM > > > To: Struts Users Mailing List > > > Subject: Re: JSF or Struts w/ JSF (again) > > > > > > I found this article to be useful in addressing some of your > > questions: > > > http://www-106.ibm.com/developerworks/java/library/j-integrate/ > > > > > > > Thanks for the pointer Kevin. The article does a good job explaining > > _HOW_ to integrate the two, but (and perhaps it's because I don't know > > enough about Struts), it didn't seem explain _WHY_ I would want to > > integrate the two. The only semi-concrete reason/feature I found in the > > article was this: > > > > "JSF doesn't possess the equivalent of Struts's powerful controller > > architecture, as well as its standardized ActionForm and Actions (with > > their declarative capabilities)." [sic] > > > > Can someone explain what makes the struts controller so 'powerful' in > > relation to JSF? What about Struts' ActionForm and Action and their > > benefit > > over JSF actions and beans? > > > > > > > > > > > > On Tue, 2 Nov 2004 13:22:15 -0500, Abrams, Howard A > > > <[EMAIL PROTECTED]> wrote: > > > > Hi everyone, > > > > > > > > For a new project, I'm planning on using JSF. The questions I need > > to > > > > answer are: > > > > > > > > What will Struts add if I use it together with JSF? Does it add > > missing > > > > functionality? Is there a good design pattern that JSF alone does > > not > > > > enforce? Are there common problems that are easier to solve using > > the > > > > combination? (For the moment, ignore the validation framework and > > tiles) > > > > > > > > I've been searching the internet and the list archives for answers. > > The > > > > only concrete feature I found was message from Craig saying that > > because > > > > all request processing is routed through a common controller, Struts > > > > helps > > > > implementing things such as authentication and logging. Is this > > > > significantly easier that decorating the viewHandler or > > actionListener > > > > in > > > > JSF? Isn't that what struts-faces does anyway? (the message I'm > > > > referring > > > > to can be found here: > > http://mail-archives.apache.org/eyebrowse/ReadMsg? > > > > [EMAIL PROTECTED]&msgNo=112850) > > > > > > > > I've got a fairly good handle on JSF, but I'm not proficient with > > > > Struts. > > > > I'm hoping some of the seasoned Struts developers reading this can > > point > > > > out the benefits I've missed. > > > > > > > > Thanks in advance, > > > > Howard > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > >
RE: JSF or Struts w/ JSF (again)
Thanks again Kevin, but the bullet points from the article don't state why I would want to use Struts w/ JSF. With the exception of the quote about the controller being 'powerful', they just list why JSF is good. I know why JSF is good, why is Struts plus JSF better? > -Original Message- > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 02, 2004 11:13 AM > To: Struts Users Mailing List > Subject: Re: JSF or Struts w/ JSF (again) > > From the article: > > Why integrate the trinity? > As the JSP and the related specifications mature, new standards like > JSF and the JSP Standard Tag Library (or JSTL, which uses simple tags > to encapsulate the core functionality common to many JSP applications) > are emerging. Following are some of the advantages to using the new > technologies as an integrated whole: > > * Cleaner separation of behaviors and presentation. With the > separation of tag, renderer, and component, the roles of page authors > and application developers in the development cycle become better > defined. > > * Changing the presentation for a component does not have an > avalanche effect. Now you can easily just change the renderer. In the > traditional MVC model, since this separation did not exist, any change > in tags needed changes to the business logic as well. Not any more. > > * Renderer independence. Or restated, protocol independence by > reusing component logic for multiple presentation devices with > multiple renderers. The ability to use different renderers eliminates > the need to code the entire presentation tier for specific devices. > > * A standard for assembling and reusing custom components. JSF > thinks beyond "forms and fields" and provides a rich component model > for rendering custom GUI components. Using JSF you can customize the > way each component looks and behaves in a page. Developers also gain > the ability to create their own GUI components (like menus and trees), > which can easily be included in any JSP page with simple custom tags. > Just like the Java front-end GUI components provided by AWT and Swing, > we can have custom components for our Web pages that use their own > event handlers and have customizable appearances. This is GUI nirvana > for the Web tier! > > Struts is a framework that already possesses a large customer base. > Many IT departments have recognized the value of this MVC framework > and have been using it for quite a while. JSF doesn't possess the > equivalent of Struts's powerful controller architecture, as well as > its standardized ActionForm and Actions (with their declarative > capabilities). When you integrate Tiles into the mix, you give > yourself the ability to reuse and change corporate layouts in a > seamless manner. > > The challenges of migrating JSF-enabled Struts applications are > two-fold. First, Struts tags are not JSF-compliant. In other words, > they do not extend the UIComponentTag as mandated by the JSF > specification, therefore, JSF cannot interpret and associate > UIComponent and Renderers with them. > > Second, there is no link between the FacesServlet and Struts > RequestProcessor. In a Struts application, the RequestProcessor > manages the show with the callback methods into ActionForm and Actions > classes. Getters and setters for ActionForm properties and validate() > are the callback methods in the ActionForm. For Action, execute() is > the callback method. Unless the RequestProcessor gets invoked, the > callback methods in Struts ActionForm and Actions classes do not get a > chance to invoke the business logic. > > > On Tue, 2 Nov 2004 13:57:56 -0500, Abrams, Howard A > <[EMAIL PROTECTED]> wrote: > > > > > > > > > -Original Message- > > > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, November 02, 2004 10:40 AM > > > To: Struts Users Mailing List > > > Subject: Re: JSF or Struts w/ JSF (again) > > > > > > I found this article to be useful in addressing some of your > > questions: > > > http://www-106.ibm.com/developerworks/java/library/j-integrate/ > > > > > > > Thanks for the pointer Kevin. The article does a good job explaining > > _HOW_ to integrate the two, but (and perhaps it's because I don't know > > enough about Struts), it didn't seem explain _WHY_ I would want to > > integrate the two. The only semi-concrete reason/feature I found in the > > article was this: > > > > "JSF doesn't possess the equivalent of Struts's powerful controller > > architecture, as well as its standardized ActionForm and Actions (with > > their declarative capabilities)." [sic] > > > > Can someone explain what makes the struts controller so 'powerful' in > > relation to JSF? What about Struts' ActionForm and Action and their > > benefit > > over JSF actions and beans? > > > > > > > > > > > > On Tue, 2 Nov 2004 13:22:15 -0500, Abrams, Howard A > > > <[EMAIL PROTECTED]> wrote: > > > > Hi everyone, > > > > > > > > For a new project, I'm planning on usi
Including a Struts action in a JSP - IllegalStateException / truncated response issue
Hello, I've seen a few posts on this subject, through this and other resources, but I haven't seen any appealing workarounds. I'd like to try to bring all the relevant information from these posts together and then ask for help in identifying a viable workaround. I apologize in advance if this issue is well known and understood and I just missed the best resources on the subject. Goals: 1) To build a Struts application where _every_ request to the application goes through a Struts action that collects and packages data then forwards (using Struts ActionForward's) to a JSP. 2) To be able to include one or more Struts actions in any given JSP (ie: ). Behavior when implementing these goals: 1) Usually, when executing a single include of a Struts action on a JSP, everything works fine though sometimes there are problems (as listed below). 2) When including more than one Struts action on a JSP I get an IllegalStateException - Response has already been committed. 3) Sometimes, when a JSP only includes one Struts action, the first x bytes of the response will be missing when it is returned (without exception) to the client. Relevant issues (correct me where I'm wrong): 1) Including (, , etc.) a JSP/Servlet on a JSP sometimes (always?) causes the response to be committed because includes use RequestDispatcher.include() which in turn commits the response. 2) Forwarding a request using an ActionForward from a Struts action to a JSP can not be done when a response has been committed. 3) Increasing the response buffer size has no effect on these issues. 4) Using the include directive (<%@ include file="filename" %>) won't work because that includes source a translation time. 5) It has been reported that using does not (fully/always?) resolve the problematic behavior. 6) Using absolute URLs with prevents the response from being committed because the context of the request is assumed to be independent. The visibility of an authenticated, populated session can be affected by passing the jsessionid in on the URL. This seems to be the only viable workaround though I haven't tested it thoroughly yet. Reference: http://www.mail-archive.com/[EMAIL PROTECTED]/msg13284.html http://www.jguru.com/faq/view.jsp?EID=501393 http://www.mail-archive.com/[EMAIL PROTECTED]/msg05711.htm l http://www.mail-archive.com/[EMAIL PROTECTED]/msg15194.html http://forum.java.sun.com/thread.jsp?thread=484731&forum=45&message=2266 277 http://www.mail-archive.com/[EMAIL PROTECTED]/msg15189.html http://jguru.com/forums/view.jsp?EID=1204797 http://forum.java.sun.com/thread.jsp?thread=461644&forum=45&message=2115 900 http://www.mail-archive.com/[EMAIL PROTECTED]/msg18018.html http://www.mail-archive.com/[EMAIL PROTECTED]/msg74816.html http://www.mail-archive.com/[EMAIL PROTECTED]/msg29073.html My setup: - Oracle AS 10g (OC4J) app server - Struts 1.1 - JSTL 1.0.6 Is there any clean way to meet the two goals listed above without error? Thanks, Jeff
RE: Struts and Displaying data from a database
Yes, I get the overall architecture of how to do it now. I'm somewhat new to 'beans' and haven't used a collection before but I have more to research now while I try to figure it out. Thank you all for your responses! -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 02, 2004 2:34 PM To: Struts Users Mailing List Subject: RE: Struts and Displaying data from a database Have the business logic (where ever it may reside) return a collection of JavaBean. You can simply place the collection in some scope (request, session, etc..) and render it on the JSP page using JSTL (for-each) or Struts iterate tag. You basically define an action mapping which will be invoked before displaying the .jsp page. The action delegates to the business logic (which does the work of retrieving the data) and then places the returned collection in some scope. The action then forwards to the appropriate .jsp page. Does this help? robert > -Original Message- > From: dbm_mailinglist [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 02, 2004 2:25 PM > To: Struts Users Mailing List > Subject: RE: Struts and Displaying data from a database > > > I guess that's where I get lost. What does the bean return so that it > can display multiple rows in the JSTL/JSP? I guess the type of the > 'getter' would be some type that allowed you to loop through the > dataan array maybe? > > Do you know if there are any examples on the web? I'm trying to stick to > just JSP/JSTL/Servlets/Java and trying to steer away from additional > tools like Hibernate. > > Thank you much! > > > -Original Message- > From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 02, 2004 2:02 PM > To: 'Struts Users Mailing List' > Subject: RE: Struts and Displaying data from a database > > > I'm a complete newbie to Struts. I know how to use Struts to > > build forms and submit them, but how do I just display data > > from a database? I want a screen that just displays data from > > a sql command to a database and displays the results in a > > html table. Do I use ActionForm even though I don't have a > > form? I haven't been able to find any good examples on the web. > > You don't necessarily need an ActionForm for this, but you do need a > JavaBean to hold the data you want to display. To display it on the > page, > use JSTL tags. > > -- > Tim Slattery > [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and Displaying data from a database
Have the business logic (where ever it may reside) return a collection of JavaBean. You can simply place the collection in some scope (request, session, etc..) and render it on the JSP page using JSTL (for-each) or Struts iterate tag. You basically define an action mapping which will be invoked before displaying the .jsp page. The action delegates to the business logic (which does the work of retrieving the data) and then places the returned collection in some scope. The action then forwards to the appropriate .jsp page. Does this help? robert > -Original Message- > From: dbm_mailinglist [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 02, 2004 2:25 PM > To: Struts Users Mailing List > Subject: RE: Struts and Displaying data from a database > > > I guess that's where I get lost. What does the bean return so that it > can display multiple rows in the JSTL/JSP? I guess the type of the > 'getter' would be some type that allowed you to loop through the > dataan array maybe? > > Do you know if there are any examples on the web? I'm trying to stick to > just JSP/JSTL/Servlets/Java and trying to steer away from additional > tools like Hibernate. > > Thank you much! > > > -Original Message- > From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 02, 2004 2:02 PM > To: 'Struts Users Mailing List' > Subject: RE: Struts and Displaying data from a database > > > I'm a complete newbie to Struts. I know how to use Struts to > > build forms and submit them, but how do I just display data > > from a database? I want a screen that just displays data from > > a sql command to a database and displays the results in a > > html table. Do I use ActionForm even though I don't have a > > form? I haven't been able to find any good examples on the web. > > You don't necessarily need an ActionForm for this, but you do need a > JavaBean to hold the data you want to display. To display it on the > page, > use JSTL tags. > > -- > Tim Slattery > [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and Displaying data from a database
From: dbm_mailinglist [mailto:[EMAIL PROTECTED] Subject: RE: Struts and Displaying data from a database > I guess that's where I get lost. What does the bean return so > that it can display multiple rows in the JSTL/JSP? I guess > the type of the 'getter' would be some type that allowed you > to loop through the dataan array maybe? One of the bean's properties would yield a collection of (other) beans. Each bean in that collection would correspond to one row of the HTML table. You can use to iterate over that collection. Another poster mentioned the DisplayTag taglib, which is very good for this sort of thing (www.displaytag.org). -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and Displaying data from a database
I guess that's where I get lost. What does the bean return so that it can display multiple rows in the JSTL/JSP? I guess the type of the 'getter' would be some type that allowed you to loop through the dataan array maybe? Do you know if there are any examples on the web? I'm trying to stick to just JSP/JSTL/Servlets/Java and trying to steer away from additional tools like Hibernate. Thank you much! -Original Message- From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 02, 2004 2:02 PM To: 'Struts Users Mailing List' Subject: RE: Struts and Displaying data from a database > I'm a complete newbie to Struts. I know how to use Struts to > build forms and submit them, but how do I just display data > from a database? I want a screen that just displays data from > a sql command to a database and displays the results in a > html table. Do I use ActionForm even though I don't have a > form? I haven't been able to find any good examples on the web. You don't necessarily need an ActionForm for this, but you do need a JavaBean to hold the data you want to display. To display it on the page, use JSTL tags. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSF or Struts w/ JSF (again)
Abrams, Howard A wrote: _WHY_ I would want to integrate the two. I do not see the point of using too many technologies, it gets exponentialy harder. So pick one, but... are there any production JSF sites out there? .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSF or Struts w/ JSF (again)
>From the article: Why integrate the trinity? As the JSP and the related specifications mature, new standards like JSF and the JSP Standard Tag Library (or JSTL, which uses simple tags to encapsulate the core functionality common to many JSP applications) are emerging. Following are some of the advantages to using the new technologies as an integrated whole: * Cleaner separation of behaviors and presentation. With the separation of tag, renderer, and component, the roles of page authors and application developers in the development cycle become better defined. * Changing the presentation for a component does not have an avalanche effect. Now you can easily just change the renderer. In the traditional MVC model, since this separation did not exist, any change in tags needed changes to the business logic as well. Not any more. * Renderer independence. Or restated, protocol independence by reusing component logic for multiple presentation devices with multiple renderers. The ability to use different renderers eliminates the need to code the entire presentation tier for specific devices. * A standard for assembling and reusing custom components. JSF thinks beyond "forms and fields" and provides a rich component model for rendering custom GUI components. Using JSF you can customize the way each component looks and behaves in a page. Developers also gain the ability to create their own GUI components (like menus and trees), which can easily be included in any JSP page with simple custom tags. Just like the Java front-end GUI components provided by AWT and Swing, we can have custom components for our Web pages that use their own event handlers and have customizable appearances. This is GUI nirvana for the Web tier! Struts is a framework that already possesses a large customer base. Many IT departments have recognized the value of this MVC framework and have been using it for quite a while. JSF doesn't possess the equivalent of Struts's powerful controller architecture, as well as its standardized ActionForm and Actions (with their declarative capabilities). When you integrate Tiles into the mix, you give yourself the ability to reuse and change corporate layouts in a seamless manner. The challenges of migrating JSF-enabled Struts applications are two-fold. First, Struts tags are not JSF-compliant. In other words, they do not extend the UIComponentTag as mandated by the JSF specification, therefore, JSF cannot interpret and associate UIComponent and Renderers with them. Second, there is no link between the FacesServlet and Struts RequestProcessor. In a Struts application, the RequestProcessor manages the show with the callback methods into ActionForm and Actions classes. Getters and setters for ActionForm properties and validate() are the callback methods in the ActionForm. For Action, execute() is the callback method. Unless the RequestProcessor gets invoked, the callback methods in Struts ActionForm and Actions classes do not get a chance to invoke the business logic. On Tue, 2 Nov 2004 13:57:56 -0500, Abrams, Howard A <[EMAIL PROTECTED]> wrote: > > > > > -Original Message- > > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, November 02, 2004 10:40 AM > > To: Struts Users Mailing List > > Subject: Re: JSF or Struts w/ JSF (again) > > > > I found this article to be useful in addressing some of your > questions: > > http://www-106.ibm.com/developerworks/java/library/j-integrate/ > > > > Thanks for the pointer Kevin. The article does a good job explaining > _HOW_ to integrate the two, but (and perhaps it's because I don't know > enough about Struts), it didn't seem explain _WHY_ I would want to > integrate the two. The only semi-concrete reason/feature I found in the > article was this: > > "JSF doesn't possess the equivalent of Struts's powerful controller > architecture, as well as its standardized ActionForm and Actions (with > their declarative capabilities)." [sic] > > Can someone explain what makes the struts controller so 'powerful' in > relation to JSF? What about Struts' ActionForm and Action and their > benefit > over JSF actions and beans? > > > > > > > On Tue, 2 Nov 2004 13:22:15 -0500, Abrams, Howard A > > <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > > > > For a new project, I'm planning on using JSF. The questions I need > to > > > answer are: > > > > > > What will Struts add if I use it together with JSF? Does it add > missing > > > functionality? Is there a good design pattern that JSF alone does > not > > > enforce? Are there common problems that are easier to solve using > the > > > combination? (For the moment, ignore the validation framework and > tiles) > > > > > > I've been searching the internet and the list archives for answers. > The > > > only concrete feature I found was message from Craig saying that > because > > > all request processing is routed through a common controller, Struts > > > helps > > > implementing things
Re: Struts and Displaying data from a database
1. http://www.w3.org/TR/REC-html40/struct/tables.html 2. http://www.displaytag.org/index.jsp "dbm_mailinglist" <[EMAIL PROTECTED]> 11/02/2004 01:56 PM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To <[EMAIL PROTECTED]> cc Subject Struts and Displaying data from a database Hello, I'm a complete newbie to Struts. I know how to use Struts to build forms and submit them, but how do I just display data from a database? I want a screen that just displays data from a sql command to a database and displays the results in a html table. Do I use ActionForm even though I don't have a form? I haven't been able to find any good examples on the web. Any ideas? Thank you! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSF or Struts w/ JSF (again)
I think that the article meant "Struts powerful controller ARCHITECTURE [emphasis added]", Howard. There are Actions, ActionForms, ActionMappings, ActionServlet, ActionMessages, RequestProcessor, and other less significant classes.. All these are integrated into a very useful and very powerful "controller architecture" using struts-config.xml. I am not going to say much about JSF, because I am not qualified, but that uses a very different "architecture" involving an event based idea, unlike Struts. I would strongly suggest that you take a look at the core Struts code in the action package. Essentially, you map certain (maybe all) requests to Struts and the "controller architecture" takes over from there. 'Hope this is helpful. I am not sure that I would mix Struts and JSF myself. I think I would either go with one or the other. I am not wedded to that thought, however. Michael On Tue, 2 Nov 2004 13:57:56 -0500, Abrams, Howard A <[EMAIL PROTECTED]> wrote: > > > > > -Original Message- > > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, November 02, 2004 10:40 AM > > To: Struts Users Mailing List > > Subject: Re: JSF or Struts w/ JSF (again) > > > > I found this article to be useful in addressing some of your > questions: > > http://www-106.ibm.com/developerworks/java/library/j-integrate/ > > > > Thanks for the pointer Kevin. The article does a good job explaining > _HOW_ to integrate the two, but (and perhaps it's because I don't know > enough about Struts), it didn't seem explain _WHY_ I would want to > integrate the two. The only semi-concrete reason/feature I found in the > article was this: > > "JSF doesn't possess the equivalent of Struts's powerful controller > architecture, as well as its standardized ActionForm and Actions (with > their declarative capabilities)." [sic] > > Can someone explain what makes the struts controller so 'powerful' in > relation to JSF? What about Struts' ActionForm and Action and their > benefit > over JSF actions and beans? > > > > > > > On Tue, 2 Nov 2004 13:22:15 -0500, Abrams, Howard A > > <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > > > > For a new project, I'm planning on using JSF. The questions I need > to > > > answer are: > > > > > > What will Struts add if I use it together with JSF? Does it add > missing > > > functionality? Is there a good design pattern that JSF alone does > not > > > enforce? Are there common problems that are easier to solve using > the > > > combination? (For the moment, ignore the validation framework and > tiles) > > > > > > I've been searching the internet and the list archives for answers. > The > > > only concrete feature I found was message from Craig saying that > because > > > all request processing is routed through a common controller, Struts > > > helps > > > implementing things such as authentication and logging. Is this > > > significantly easier that decorating the viewHandler or > actionListener > > > in > > > JSF? Isn't that what struts-faces does anyway? (the message I'm > > > referring > > > to can be found here: > http://mail-archives.apache.org/eyebrowse/ReadMsg? > > > [EMAIL PROTECTED]&msgNo=112850) > > > > > > I've got a fairly good handle on JSF, but I'm not proficient with > > > Struts. > > > I'm hoping some of the seasoned Struts developers reading this can > point > > > out the benefits I've missed. > > > > > > Thanks in advance, > > > Howard > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and Displaying data from a database
I had this question the other day and was referred to Hibernate (http://www.hibernate.org) by David Friedman. The other name that cam up was ibatis. I chose hibernate and used this tutorial to help figure it out: http://homepage.mac.com/edahand/projects/java/example1.html On Tue, 2 Nov 2004 13:56:54 -0500, dbm_mailinglist <[EMAIL PROTECTED]> wrote: > Hello, > I'm a complete newbie to Struts. I know how to use Struts to build forms > and submit them, but how do I just display data from a database? I want > a screen that just displays data from a sql command to a database and > displays the results in a html table. Do I use ActionForm even though I > don't have a form? I haven't been able to find any good examples on the > web. > > Any ideas? > > Thank you! > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and Displaying data from a database
> I'm a complete newbie to Struts. I know how to use Struts to > build forms and submit them, but how do I just display data > from a database? I want a screen that just displays data from > a sql command to a database and displays the results in a > html table. Do I use ActionForm even though I don't have a > form? I haven't been able to find any good examples on the web. You don't necessarily need an ActionForm for this, but you do need a JavaBean to hold the data you want to display. To display it on the page, use JSTL tags. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSF or Struts w/ JSF (again)
> -Original Message- > From: Kevin Bridges [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 02, 2004 10:40 AM > To: Struts Users Mailing List > Subject: Re: JSF or Struts w/ JSF (again) > > I found this article to be useful in addressing some of your questions: > http://www-106.ibm.com/developerworks/java/library/j-integrate/ > Thanks for the pointer Kevin. The article does a good job explaining _HOW_ to integrate the two, but (and perhaps it's because I don't know enough about Struts), it didn't seem explain _WHY_ I would want to integrate the two. The only semi-concrete reason/feature I found in the article was this: "JSF doesn't possess the equivalent of Struts's powerful controller architecture, as well as its standardized ActionForm and Actions (with their declarative capabilities)." [sic] Can someone explain what makes the struts controller so 'powerful' in relation to JSF? What about Struts' ActionForm and Action and their benefit over JSF actions and beans? > > On Tue, 2 Nov 2004 13:22:15 -0500, Abrams, Howard A > <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > > > For a new project, I'm planning on using JSF. The questions I need to > > answer are: > > > > What will Struts add if I use it together with JSF? Does it add missing > > functionality? Is there a good design pattern that JSF alone does not > > enforce? Are there common problems that are easier to solve using the > > combination? (For the moment, ignore the validation framework and tiles) > > > > I've been searching the internet and the list archives for answers. The > > only concrete feature I found was message from Craig saying that because > > all request processing is routed through a common controller, Struts > > helps > > implementing things such as authentication and logging. Is this > > significantly easier that decorating the viewHandler or actionListener > > in > > JSF? Isn't that what struts-faces does anyway? (the message I'm > > referring > > to can be found here: http://mail-archives.apache.org/eyebrowse/ReadMsg? > > [EMAIL PROTECTED]&msgNo=112850) > > > > I've got a fairly good handle on JSF, but I'm not proficient with > > Struts. > > I'm hoping some of the seasoned Struts developers reading this can point > > out the benefits I've missed. > > > > Thanks in advance, > > Howard > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts and Displaying data from a database
Hello, I'm a complete newbie to Struts. I know how to use Struts to build forms and submit them, but how do I just display data from a database? I want a screen that just displays data from a sql command to a database and displays the results in a html table. Do I use ActionForm even though I don't have a form? I haven't been able to find any good examples on the web. Any ideas? Thank you!
Re: JSF or Struts w/ JSF (again)
I found this article to be useful in addressing some of your questions: http://www-106.ibm.com/developerworks/java/library/j-integrate/ On Tue, 2 Nov 2004 13:22:15 -0500, Abrams, Howard A <[EMAIL PROTECTED]> wrote: > Hi everyone, > > For a new project, I'm planning on using JSF. The questions I need to > answer are: > > What will Struts add if I use it together with JSF? Does it add missing > functionality? Is there a good design pattern that JSF alone does not > enforce? Are there common problems that are easier to solve using the > combination? (For the moment, ignore the validation framework and tiles) > > I've been searching the internet and the list archives for answers. The > only concrete feature I found was message from Craig saying that because > all request processing is routed through a common controller, Struts > helps > implementing things such as authentication and logging. Is this > significantly easier that decorating the viewHandler or actionListener > in > JSF? Isn't that what struts-faces does anyway? (the message I'm > referring > to can be found here: http://mail-archives.apache.org/eyebrowse/ReadMsg? > [EMAIL PROTECTED]&msgNo=112850) > > I've got a fairly good handle on JSF, but I'm not proficient with > Struts. > I'm hoping some of the seasoned Struts developers reading this can point > out the benefits I've missed. > > Thanks in advance, > Howard > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSF or Struts w/ JSF (again)
Hi everyone, For a new project, I'm planning on using JSF. The questions I need to answer are: What will Struts add if I use it together with JSF? Does it add missing functionality? Is there a good design pattern that JSF alone does not enforce? Are there common problems that are easier to solve using the combination? (For the moment, ignore the validation framework and tiles) I've been searching the internet and the list archives for answers. The only concrete feature I found was message from Craig saying that because all request processing is routed through a common controller, Struts helps implementing things such as authentication and logging. Is this significantly easier that decorating the viewHandler or actionListener in JSF? Isn't that what struts-faces does anyway? (the message I'm referring to can be found here: http://mail-archives.apache.org/eyebrowse/ReadMsg? [EMAIL PROTECTED]&msgNo=112850) I've got a fairly good handle on JSF, but I'm not proficient with Struts. I'm hoping some of the seasoned Struts developers reading this can point out the benefits I've missed. Thanks in advance, Howard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tile Communication
I've accomplished complex functionality like that in the past with javascript, dhtml and a hidden frame. The user would interact with a specific area of the page and submit data. The javascript functions would sit on a global window level and serialize the data into xml packets that were passed to the hidden frame. The hidden frame submitted the xml to the backend and was given a response in xml, which was parsed in javascript and then redisplayed in the appropriate tile area. It was an intranet application and the technique gave us the ability to 100% cache the client layer on the clients machine. The only data that ever got sent back and forth was the xml through the hidden frame ... gave us a huge performance boost. The original application we replaced was a compiled windows app and we were able to get the speed of the web app to within 5% of the compiled windows app after the caching had synchronized. I would imagine a similar techique could be utilized with struts. On Tue, 2 Nov 2004 08:37:14 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >I am new to Tiles. Is it possible to present a link in one tile and have > >it fire an action that updates another tile without having to reload the > >whole page? FAQ seems to not have a lot of tiles related stuff. > > Tiles are not frames. With HTML frames, if you decide to reload only a > frame you can do it. > If you have a layout that does not use frames, you will reload the whole > page, even if you change only a sub-tile of the page. > If you want to be able to reload only a part of the page, you should use > Tiles and HTML frames together. > Ciao > Antonio Petrelli > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Nested Properties in ActionForms
:) thanks for pointing that out.. that was a dumb mistake I made while typing in my question. They are public in the actual class. -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 02, 2004 10:39 AM To: Struts Users Mailing List Subject: RE: Nested Properties in ActionForms Your accessors on the Form class are private. Make them public. > -Original Message- > From: Apte, Dhanashree (Noblestar) [mailto:[EMAIL PROTECTED] > Sent: Monday, November 01, 2004 9:26 AM > To: 'Struts Users Mailing List' > Subject: Nested Properties in ActionForms > > > Hi All, > > I need to know the correct way to display nested properties of a form > on my jsp using struts. > > I have an ActionForm of type: > > public class EmployeeInfoForm extends ActionForm { > private Name empName; > private Name spouseName; > > private String getFirstName() { > return empName.getFirstName(); > } > > private void setFirstName(String fn) { > empName.setFirstName(fn); > } > } > > and the class Name has the following structure: > > public class Name { > private String firstName; > private String middleName; > private String lastName; > > public String getFirstName() { > return firstName; > } > > public void setFirstName(String fn) { > firstName = fn; > } > } > > > On the jsp I have: > > > I get the exception: No getter method for property firstName of bean > employeeForm. > > > What is the correct way to accomplish what I am trying to do here? Any > help appreciated. > > Thanks a lot! > Dhanashree. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Nested Properties in ActionForms
Your accessors on the Form class are private. Make them public. > -Original Message- > From: Apte, Dhanashree (Noblestar) [mailto:[EMAIL PROTECTED] > Sent: Monday, November 01, 2004 9:26 AM > To: 'Struts Users Mailing List' > Subject: Nested Properties in ActionForms > > > Hi All, > > I need to know the correct way to display nested properties > of a form on my jsp using struts. > > I have an ActionForm of type: > > public class EmployeeInfoForm extends ActionForm { > private Name empName; > private Name spouseName; > > private String getFirstName() { > return empName.getFirstName(); > } > > private void setFirstName(String fn) { > empName.setFirstName(fn); > } > } > > and the class Name has the following structure: > > public class Name { > private String firstName; > private String middleName; > private String lastName; > > public String getFirstName() { > return firstName; > } > > public void setFirstName(String fn) { > firstName = fn; > } > } > > > On the jsp I have: > > > I get the exception: No getter method for property firstName > of bean employeeForm. > > > What is the correct way to accomplish what I am trying to do > here? Any help appreciated. > > Thanks a lot! > Dhanashree. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble on HP-UX, 1.2.4 & 1.2.5 FileNotFoundException in commons-validator.jar
From: "Joe Hertz" <[EMAIL PROTECTED]> > Don't suppose you've tried building the Validator on the HP-UX machine? No... but it's Java, I shouldn't have to. Write once, run anywhere, right? > I'd be curious if it worked packaged up if you did that. That same exact .jar file *does* work as part of the struts-examples.war webapp. I copied it over to my own webapp, stopped/started, and... FileNotFoundException. > You've obviously found something that is both subtle and significant in > terms of a problem (jar extraction is pretty darn basic!). I assume the Win > and HP-UX boxes are using the same JDK's and Servlet Containers? No, different JDK's, though I think it's the same Tomcat version. What I've most likely found is some obscure issue with HP's JDK that only crops up with a very specific combination of events. It will probably disappear with our next round of patches and tuning. We used to have Tomcat mysteriously crash once a month or so... that also went away. Meanwhile we shrug and work around it! -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sol: compile jsp with struts taglibs problem
Hi Guys Thanks for Peng I found that i was putting a servlet.jar library into my war WEB-INF/lib directory, so that i cut it and it worked fine. Thanks a lot! On Tue, 2 Nov 2004 09:33:44 -0400, Ricardo Andres Quintero wrote > Hi Guys: > does anyone know why this error happens with tomcat 5? > im deploying into JBoss 3.2.5, and the problem is this: > > Ha tenido lugar un error en la línea: 22 en el archivo jsp: /web/jsp/inicio.jsp > Error de servlet generado: > /home/desarrollo/jboss-3.2.5/server/default/work/jboss.web/localhost/semc/org/apache/jsp/web/jsp/inicio_jsp.java:218: > _jspx_meth_html_submit_0(javax.servlet.jsp.tagext.JspTag, > javax.servlet.jsp.PageContext) in org.apache.jsp.web.jsp.inicio_jsp > cannot be applied to > (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) > if (_jspx_meth_html_submit_0(_jspx_th_html_form_0, > _jspx_page_context))^ > > i search in internet, and i dont find the solution. > > -- > Ricardo Andrés Quintero R. > Ubiquando Ltda. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ricardo Andrés Quintero R. Ubiquando Ltda. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
GlobalException doesn't work
Hi, I'm using Struts 1.1 with Tomcat (bundled with JBoss) and got the 500 error page when the "execute" method of an action class throws ClassNotFoundException. I have defined global exceptions, which I think should be used when a ServletException happens and directs me to the correct error page I defined. It works if I catch the ClassNotFoundException and re-throw it as a ServletException by myself, but I don't think I'm supposed to do that according to Struts online documentation. javax.servlet.ServletException: Servlet execution threw an exception org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 69) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces sor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) b20460.application.presentation.filters.SetCharacterEncodingFilterB20460Web. doFilter(SetCharacterEncodingFilterB20460Web.java:157) Any insights into this? Thanks in advance, John Yu The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile jsp with struts taglibs problem
Ricardo, It would be helpful to see what's on line 22 of inicio.jsp, as in the jsp stuff you have written. On Tue, 2 Nov 2004 09:33:44 -0400, Ricardo Andres Quintero <[EMAIL PROTECTED]> wrote: > Hi Guys: > does anyone know why this error happens with tomcat 5? > im deploying into JBoss 3.2.5, and the problem is this: > > Ha tenido lugar un error en la línea: 22 en el archivo jsp: /web/jsp/inicio.jsp > Error de servlet generado: > /home/desarrollo/jboss-3.2.5/server/default/work/jboss.web/localhost/semc/org/apache/jsp/web/jsp/inicio_jsp.java:218: > _jspx_meth_html_submit_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) > in org.apache.jsp.web.jsp.inicio_jsp cannot be applied to > (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) > if (_jspx_meth_html_submit_0(_jspx_th_html_form_0, > _jspx_page_context))^ > > i search in internet, and i dont find the solution. > > -- > Ricardo Andrés Quintero R. > Ubiquando Ltda. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Tags Error
I believe it is a compile time error than a runtime one. So, I don't have a stack trace. -Original Message- From: dmu2201 [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 02, 2004 2:38 AM To: Struts Users Mailing List Subject: Re: Struts Tags Error Geeth Narayanan wrote: >I am trying to use Struts 1.2.4 on Tomcat 5.0. I seem to get errors for >any of the struts tags including the tiles tag due to incompatibility >with JSP2.0 or something, I guess. > >Here is the error: > >:\wqt\vcs\tis\nb\tel-web-ube\build\generated\src\org\apache\jsp\jsp\sho p >\Input_jsp.java:112: >_jspx_meth_html_base_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.js p >.PageContext) in org.apache.jsp.jsp.shop.Input_jsp cannot be applied to >(org.apache.struts.taglib.html.HtmlTag,javax.servlet.jsp.PageContext) > if (_jspx_meth_html_base_0(_jspx_th_html_html_0, >_jspx_page_context)) > ^ >C:\wqt\vcs\tis\nb\tel-web-ube\build\generated\src\org\apache\jsp\jsp\sh o >p\Input_jsp.java:148: >_jspx_meth_html_radio_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.j s >p.PageContext) in org.apache.jsp.jsp.shop.Input_jsp cannot be applied to >(org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) > >I am assuming others use struts tags running on tomcat 5.0 container. Is >there any reason why I get this error? If so, how can it be fixed? > >Thanks. > >Geeth > > Where is this error from? There has to more to that stack trace, since the only think this says is that it is something with _jspx_page_context but not what the problem is... I'm using several Struts tags with Tomcat 5.x and JSP 2.0 without any issues Claus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
compile jsp with struts taglibs problem
Hi Guys: does anyone know why this error happens with tomcat 5? im deploying into JBoss 3.2.5, and the problem is this: Ha tenido lugar un error en la línea: 22 en el archivo jsp: /web/jsp/inicio.jsp Error de servlet generado: /home/desarrollo/jboss-3.2.5/server/default/work/jboss.web/localhost/semc/org/apache/jsp/web/jsp/inicio_jsp.java:218: _jspx_meth_html_submit_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.web.jsp.inicio_jsp cannot be applied to (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) if (_jspx_meth_html_submit_0(_jspx_th_html_form_0, _jspx_page_context))^ i search in internet, and i dont find the solution. -- Ricardo Andrés Quintero R. Ubiquando Ltda. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: html list
Hi Look at http://www.javaranch.com/ --- andy wix <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know of a mailing list similar to this > one for html problems? > > cheers, > Andy > > _ > Want to block unwanted pop-ups? Download the free > MSN Toolbar now! > http://toolbar.msn.co.uk/ > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > = A$HI$H __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: html list
Hi, Does anyone know of a mailing list similar to this one for html problems? cheers, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Tags Error
Geeth Narayanan wrote: I am trying to use Struts 1.2.4 on Tomcat 5.0. I seem to get errors for any of the struts tags including the tiles tag due to incompatibility with JSP2.0 or something, I guess. Here is the error: :\wqt\vcs\tis\nb\tel-web-ube\build\generated\src\org\apache\jsp\jsp\shop \Input_jsp.java:112: _jspx_meth_html_base_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp .PageContext) in org.apache.jsp.jsp.shop.Input_jsp cannot be applied to (org.apache.struts.taglib.html.HtmlTag,javax.servlet.jsp.PageContext) if (_jspx_meth_html_base_0(_jspx_th_html_html_0, _jspx_page_context)) ^ C:\wqt\vcs\tis\nb\tel-web-ube\build\generated\src\org\apache\jsp\jsp\sho p\Input_jsp.java:148: _jspx_meth_html_radio_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.js p.PageContext) in org.apache.jsp.jsp.shop.Input_jsp cannot be applied to (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) I am assuming others use struts tags running on tomcat 5.0 container. Is there any reason why I get this error? If so, how can it be fixed? Thanks. Geeth Where is this error from? There has to more to that stack trace, since the only think this says is that it is something with _jspx_page_context but not what the problem is... I'm using several Struts tags with Tomcat 5.x and JSP 2.0 without any issues Claus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tile Communication
>I am new to Tiles. Is it possible to present a link in one tile and have >it fire an action that updates another tile without having to reload the >whole page? FAQ seems to not have a lot of tiles related stuff. Tiles are not frames. With HTML frames, if you decide to reload only a frame you can do it. If you have a layout that does not use frames, you will reload the whole page, even if you change only a sub-tile of the page. If you want to be able to reload only a part of the page, you should use Tiles and HTML frames together. Ciao Antonio Petrelli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]