Integrating Struts, Tiles, and JavaServer Faces

I have tried some sample applications in jsf. They are working properly. Basically, our application is based on struts. We fee that that it will be difficult to convert struts based application into jsf. So we plan to integrate jsf components into struts application. I found a site http://www.ibm.com/developerworks/library/j-integrate/ where jsf-struts integration material has been given. For this integaration, struts-faces.jar is required. when i try to start the server after struts-faces-1.3.8.jar placed in Tomcat 5.5\common\lib folder, server is not started properly. I have found struts-faces-1.3.8.jar in struts-1.3.8-lib. Should I user struts-faces.jar? if it is so, Where to find struts-faces.jar Please provide a solution for this problem.

Wow, Srikanth. What a great contribution! I'm right at the begining of the design phase of a project that will hopefully go live in March and while I had already settled on a Tiles/Struts approach, I was really wanting to bring in JSF as well. I'm glad to see that someone is actively working on the integration components. I hope that the code modifications you propose make it into the Struts-Faces libraries soon.
One question. While I've been deveolping J2EE webapps for a couple of years now,
I'm still a little new to the Struts/Tiles arena. After reading your article at IBM developerWorks I wasn't able to ascertain whether or not what you proposed worked with the idea of individual controllers for each tile, which is a pattern that my project will need to adopt (I read about it in the short article here - http://www.theserverside.com/resources/article.jsp?l=Tiles101).
Can you shed some light on the subject? Will the modifications you proposed allow Tiles to continue to work in that fashion?
-Matt Welch
Hi,
Currently JSF, Struts and Tiles cannot work together
out of the box.
Craig McClanahan has come up with Struts-Faces which
lets you integrate Struts and JSF. This is ideal for
projects who want to protect their code investment in
Struts and also want to take advantage of JSF once it
is final.
Unfortunately if you are also using Tiles, this is not
possible because of some showstoppers on your way. I
started on this venture a while back and ran into the
same problems and decided to write some code - on top
of Struts-Faces and was pretty successful.
I am sharing this knowledge with the rest of you with
this article of mine on IBM developerWorks
http://www-106.ibm.com/developerworks/library/j-integra
e/
As already pointed out in this forum earlier, this
article covers the steps to integrate the three and
provides complete source code and also a working
example.
Hope you will find the article and the code useful.
Thanks,
Srikanth

Similar Messages

  • How do I use Struts Tiles with JavaServer Faces?

    I want to use JavaServer Faces and need something like tiles.
    Is it right that tiles is for struts what Portlets is for JavaServer Faces?
    Do I have to use Portlets or is there something else?
    What Do I have to do to use Portlets?
    Do I have to use any "engines" or something like that?
    Thanks

    Miikee_
    I guess you understood me wrong!
    JSF RI (and also MyFaces) are implementation of JavaServer Faces Spec.
    Each JSF app needs to be deployed inside of a Servlet Container.
    (like Tomcat). An no, they aren't coming up with an own servlet engine.
    But... you can also run MyFaces and the RI inside of an portlet container
    (eg pluto) instead of Servlet Container.
    HTH,
    Matthias

  • Stored procedure, EJB, JPA, and JavaServer Faces

    Hi!
    I am currently working on a Web application using EJB, JPA, and JavaServer Faces. A part of the
    business logic is already stored in the database as stored procedures, so we need to call those
    procedures (instead of named queries) through a EJB and represent the data on the web tier.
    Where can I find an extensive tutorial using this technology? There is no such tutorial in the Oracle Learning Library.
    Maybe somebody can provide a link and/or example.
    Thanks in advance for your help!

    Hi,
    http://download.oracle.com/docs/cd/B10464_05/web.904/b10313/queries.htm#1135305
    For more help, see the TopLink / JPA forum
    TopLink/JPA
    Frank

  • JavaServer Faces or Struts - New insights anyone?

    Hello Everyone:
    JSP or Struts???!! I'm really lost.
    I've read almost every posting on the subject (on this and other forums), yet, I couldn't come with a solid conclusion (may be only inclinations).
    I've started developing my very first real-world web application which is to be up and running by December 2003. I've started reading on both Struts and JavaServer Faces so as to adopt either in that application.
    What complicates things is that I'm a new comer to the web-application world in general (let alone Struts and JSF).
    I'm inclined to use JSF (as it seems that it would be gaining more support and popularity in the near future), yet, It's still in the EA form, while Struts is matured and already popular.
    I'm in need of a Mentor's advice to direct me to the suitable technology as I regard this first project to be both an investment into my career and a robust/reliable front end to my capabilities.
    Appreciate your responses and suggestions. I also appreciate all your previous posts (especially Craig's ones), and apologize if this is an old topic.
    Kindest regards

    You must have read my posts then.
    I think JSF should be ALLWAYS compared to
    http://borland.com/products/downloads/download_csharpbuilder.html which is free (Borland C#) or
    http://www.asp.net/webmatrix/guidedtour/getstarted/tooloverview.aspx
    at all times, and people should pick the one that is cheaper in production or faster to develop on.
    It would be great to read someplace feature/cost comparison to
    http://borland.com/products/downloads/download_csharpbuilder.html
    I think if people are using EJB and/or Blueprints, they should use JSF (but wait till version 2.0?)
    If they are using Windows Servers, they should use Borland C#
    If you like JSF design and would like open source, this is most like JSF, IMO (note that it could support standards like XUL or X-Forms or WS/SOA):
    http://jakarta.apache.org/ecs
    My choice is this via SOA:
    http://examples.macromedia.com/petmarket/store.html
    Struts does have 6 books out and at least 4 places that offer training on it, and a production track record, it is an open standard, everyone (WW2, Spring, etc.) allways starts w/ "We are like Struts,... only better".
    .V

  • JavaServer Faces and Struts

    For those of you interested in using JavaServer Faces and Struts together (and my mailbox indicates that this is quite a few people :-), I'm happy to announce the immediate availability of an integration library that allows you to use the EA3 release of JavaServer Faces with a recent nightly build (20030216 or later) of Struts 1.1 -- it will also work with the upcoming 1.1-rc2 and 1.1-final releases -- together. Nightly builds of the integration library are available at <http://jakarta.apache.org/builds/jakarta-struts/nightly/struts-faces/>.
    The sources for this package are in the Struts CVS repository, in the "contrib/struts-faces" directory, and will be included in the source nightly distributions starting with the 20030307 version. It is not currently planned to include the struts-faces integration library with binary distributions of Struts 1.1, since it is still an EA quality release.
    See the README.txt file (included in the nightly build) for more information on running the example application and using the integration library in your own applications.

    What are the reasons not to have extended
    RequestProcessor from Struts with the
    capabilities of the FacesServlet... a sort of
    "FacesProcessor" (extended the regular
    RequestProcessor)? (should be nice for views
    with no JSF components: in order not to execute
    FacesServlet for each views , event if there is
    no JSF component in the view)It turned out that I needed a customized RequestProcessor anyway (a couple of the processXxx methods had to work differently), but it actually would have been more work incorporating FacesServlet directly into it. In essence, there is now (in the combined version) a "front controller" for UI events , FacesServlet, and a "middle controller" for form submit events (RequestProcessor). When a UI event happens that just causes the current page to be redisplayed (think of a tree control where you click on the "expand this node" icon), you don't really want the Struts controller servlet to even be bothered by this request. Indeed, if you're using a presentation that was based on DHTML+Javascript, such an event would have been handled on the client anyway, and would never have been sent to the server at all.
    The combined approach still supports Faces and non-Faces pages, though. This means you can migrate one page at a time and test things (which is exactly what I did when I ported the pages of the example app).

  • Struts-faces library: provided struts/tiles example doesn't work?!

    Dear all,
    I�ve been trying to migrate my struts-tiles application to JavaServer Faces using the struts-faces library. I downloaded the latest nightly build, but I was unable to deploy and run the second example (the one using tiles) on Tomcat 5.0.28.
         At first, the <h:commandLink> components for the �Register� and �Login� links on the first page (loggedoff.jsp) wouldn�t work, probably because they should have been replaced by <s:commandLink>. So I fixed that, but then I get an inexplicable http 404 error: �Invalid path /layout was requested� when I click on any of the two links.
         Looking at the source code of both JSP and HTML I noticed that the JSP element <s:form action="/editRegistration"> translates to <form id="menu:_id5" name="registrationForm" action="/StrutsFacesExample/layout.do" method="post">. The action element is obviously(?) wrong: there is no layout.do action mapping anywhere, it�s the path pointing to the main layout jsp with the suffix replaced!
    I�ve been able to trace the problem down to method �action� in library class org.apache.struts.faces.renderer.FormRenderer, which does the following:
    protected String action(FacesContext context, UIComponent component) {
    String actionURL =
    context.getApplication().getViewHandler().
    getActionURL(context, context.getViewRoot().getViewId());
    if (log.isTraceEnabled()) {
    log.trace("getActionURL(" + context.getViewRoot().getViewId() +
    ") --> " + actionURL);
    return (context.getExternalContext().encodeActionURL(actionURL));
    Any ideas on what could be going wrong here? I also tried deploying the example on Tomcat 5.5.7 and JBoss 3.2.5, but the behavior was the same.
    Any comments would be greatly appreciated!
    Mario

    Did you ever find a solution to this problem? No, unfortunately I am still looking for a solution to this one.
    I� ve also reported this to Bugzilla (http://issues.apache.org/bugzilla/show_bug.cgi?id=35265) so you might want to keep an eye on the issue, in case something comes up. However there appears to be no significant activity in the library�s source code repository for almost a month.
    After reading other discussions in forums like this one, I must say that I am discouraged: I seriously doubt if anyone has successfully managed to use the struts-faces integration library. A lot of people are suggesting that integrating the two frameworks is not worth the trouble, and so I am now in the process of evaluating the cost of complete migration from struts to jsf (btw, it doesn�t look good�). Nevertheless, some recent articles demonstrate the library�s use (the most recent one is Kito Mann�s http://www.jsfcentral.com/reading/#4030 ) so I might be wrong.
    It would be nice though if someone who has managed to integrate the two technologies successfully would share his views on this forum�
    Mario

  • Current status of Tiles and JSF integration

    Hi. I am new to JSF, and I have been researching Tiles integration with JSF. I've read a lot of posts about difficulties encountered when integrating them, and other posts seem to suggest that it is definitely do-able (some posts say using Shale Tiles is the way to go instead of using Struts tiles.)
    I have not found any definitive or straight forward tutorial on integrating Tiles and JSF. Is it a matter of the JSF technology not being fully developed? Will tiles be easily integrated (as it is in Struts) in the future, without jumping through hoops?
    Any opinions or advice would be greatly appreciated. I would rather not use JSF w/ JSP includes as an alternative. It seems as though Struts would be a better choice for what I have to do, unless I can integrate JSF and tiles functionality with relative ease.
    Thanks.

    Cold-Gin wrote:
    I have not found any definitive or straight forward tutorial on integrating Tiles and JSF. Is it a matter of the JSF technology not being fully developed? Will tiles be easily integrated (as it is in Struts) in the future, without jumping through hoops?I certainly wouldn't say that JSF technology is not fully developed by any stretch. It's certainly possible that there's some sort of impedance mismatch between the two, but Tiles support is hardly the measure of a framework's maturity. :P
    Having said that, I really can't say much more than that with regard to Tiles. What I can suggest, though, is JSFTemplating or Facelets. Both are mature products, engineered specifically for use with JSF. Facelets is probably the more popular of the two and is slated for inclusion in JSF 2.0 in some form, while JSFTemplating, which supports the Facelets syntax, is another strong alternative (which, incidentally, is what powers the GlassFish admin GUI).
    Hope that helps...

  • When to move from Struts to JavaServer Faces

    Hi all,
    we've noticed that JavaServer Faces appears to be the future for Model-View-Controller (MVC) framework, and eventually make Struts obsolete (IMHO).
    we are just about to embark on a new project and wondering if JavaServer Faces (JSF) is mature enough to deserve our attention, or should we wait until its full production release.
    any comments will be appreciated.
    regards,
    Trajano

    I would say if it's not at a full production release yet, then wait. If you have a real world app, it's not worth using a beta system to run it on. At least not without some thorough testing of your own, but only you know what your application needs.

  • JSF Tiles and Struts ActionForward

    Hi All
    I would like to use Tiles with my JSF application.
    In order to get the best from Tiles i would like to use definitions.
    the problem that most of the power of Tiles and definitions is coming from the use of ActionForward.
    Does any one now how i can implement ActionForward with struts definition name in the Navigation in JSF.
    I understand that i need to hack the Navigation model and get the Tiles bean from the Tiles using the outcome value.
    Then i know that i need some how to get the tree that generates and forward it to the JSF or somthing like this.
    Does any one have an idea how to do it???
    Thanks
    Noam

    hi,
    in MyFaces there is an example using JSF and Tiles.
    MyFaces provides a custom ViewHandler faciltity.
    see http://sourceforge.net/projects/myfaces
    hope that helps.
    Regards,
    Matthias

  • JSF and Struts - differences and integration goal.

    I am a newbie J2EE developer and I am not clear about main differences between JSF and Struts also I saw couple of articles describing integration between JSF and Struts. Could someone give me an explanation, what the main conceptual differences between those technologies and what's the goal of integration both of them?

    I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
    http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
    Hope that helps.

  • JavaServer Faces and Portal Servers

    Hi all,
    Do you think JavaServer Faces will have substantial applications in developing the user interface for a portal server? To me, it seems like the whole portal page with the tabbed panes and other gadgets could be one large JavaServer Faces component, composed of many smaller JavaServer Faces components. The user interface for a portlet for instance would be a smaller component that is a part of the larger portal page component. Does this make sense to you?
    Your ideas are appreciated.
    Thanks,
    Mete

    Hello Craig,
    Thanks very much for your reply. I think this topic is an exciting one: Making portal servers and portlets integrate well with JavaServer Faces.
    You said that JavaServer Faces will make it easy for portal servers to contain portlets that have JavaServer Faces components in their GUI, but understandably this does not mean that portlets will be required to have a GUI that is made out of JavaServer Faces. The portal server should be tolerant to any kind of GUI that a portlet may be using. So, how would a portal server that has its portal layout built completely with JavaServer Faces work well with portlets that do not have a JavaServer Faces GUI? Would JavaServer Faces make it easy to to embed GUI markup from non-Faces portlets into a portal page that is generated by a master JavaServer Faces component that encapsulates the whole portal page layout?
    How could a scenario like this be handled:
    The user device is a handheld device, so the master portal page JavaServer Faces component decides to use a WML renderer for generating the portal page instead of an HTML renderer. All of the JavaServer Faces enabled portlets are generated using the WML renderer, but the portlets that do not have a JavaServer Faces GUI cannot be rendered in WML. What should the master portal page JavaServer Faces component do in this case?
    Thanks,
    Mete

  • JavaServer Faces and servlet???

    Dear All,
    I'm very new to J2EE. I'm wondering, when should we used Java Servlet?
    If we develop with JavaServer Faces technology, do we code any servlets? I came accross the FacesServlet. The book says that it is included with the JavaServer Faces API and it seems that I don't need to write any code for this class.
    I'm very confuse. PLease help me...

    did you maybe forget to specify the /faces/* prefix within the URL?
    You have to configure the faces servlet to a prefix path and specify it within your URLs...

  • JavaServer Faces and JavaFX

    Is JavaServer Faces and JavaFX the same?

    Nope, Java FX was only announced in May 2007 whereas JSF has been around for a few years now. JSF is a framework and JavaFX are a series of products.
    Try looking up Wikipedia for the info:
    http://en.wikipedia.org/wiki/Java_FX
    http://en.wikipedia.org/wiki/Java_Server_Faces
    Illu

  • Strut tile definition and bc4j

    Hi ,
    I am working on a BC4j Struts based project.I was on my way to implement tile definition thru a xml file and implementing do action forwards,for ex welcome.do,viewreport.do.For doing this I had to change the controller entry in struts-config.xml from
    <controller debug="3" locale="true" processorClass="oracle.jbo.html.struts11.BC4JRequestProcessor" contentType="text/html;charset=windows-1252"/>
    to
    <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" contentType="text/html;charset=windows-1252"/
    after I did this the actions I had implemented myself with to work with tile defs,they are working fine ,but there were some other actions(as I started with a wizard created bc4j strut app) which are bc4j related have stopped working because BC4JRequestProcessor was no more
    defined as the request processor....
    How to solve this?How to make both strut actions and bc4j actions work inside a project...can 2 request processors be used at the same time...
    can anybody help??

    check this weblog entry by Steve Muench
    http://radio.weblogs.com/0118231/2003/09/14.html
    success
    -Jan

  • Link for BC4J Struts-JSP and Tiles

    Hi,
    I have a JSP-Struts application. By the default generation, JDeveloper build a main.html Page. This page have many Frames and one Frame is "navFrame". On this frame I have a link for a JSP Page : Browse. The call is OK. No Problems.
    No I have another Page with Tiles :
    <template:insert page="IMDLayout.jsp" flush="true">
    <template:put name="title" value="Invoices Interface" />
    <template:put name="header" value="/tiles/common/header.jsp" />
    <template:put name="footer" value="/tiles/common/footer.jsp" />
    <template:put name="menu" value="/tiles/common/menu.jsp" />
    <template:put name="body" value="VInvoiceUsersView1_Browse.do" />
    </template:insert>
    The "body" Tiles call the same JSP Page as the link on the "navFrame", but now I have the following error :
    [ServletException in:VInvoiceUsersView1_Browse.do] Response has already been committed'
    Why ?
    Please help me, I need a solution. Does somebody use BC4J/Struts/Tiles ? Any Experience ? Problem ?
    Thanks
    Yves

    Repost

Maybe you are looking for

  • Can two people use the same computer with two different ipods?

    I was just wondering if me and my mother can use the same computer with our ipods?

  • [SOLVED] Updating Xorg screwed up my screen-resolution.

    After doing pacman -Syu earlier this evening, my screen-resolution was screwed up. One of the packages that was updated by pacman -Syu was X to 1.7.1-1 and all of its depencies. I downgraded xorg (and its dependencies) to 1.6.3.901-1 and after that e

  • I just installed Itunes on a new computer, and it erased all my songs when

    iT DELETED ALL my songs from my Ipod, cuz it said it was updating it Is there any way I can redo this, I am going to die if I loose all my movies and songs What can I do to redo this updating I hate this feature of Ipod, I dont have my songs on this

  • Update from 3.5 FMS to 5 pro

    Hi,      we have a couple of streaming interactive servers that are 3.5 and 4, do we need to purchase the full 5 pro licence or just an upgarde one?     Also are there any issues with running the update process, or should we do a clean install?    Fi

  • Icons Greyed Out Sometimes

    I have two users, running Adobe Acrobat Pro Extended 9 on Windows XP.  If they go to Windows Explorer and navigate to a file, open it, the Link Tool icon is greyed out.  If they open the Acrobat 9 software, do a File and then Open inside the software