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

Similar Messages

  • Struts Tile Controller and DB Connection

    Hai all
    i want to connect to database inside Struts Tile Controller implements class;
    when we use in Actions process we can use getDataSource functions in Controller implementation call i think we cant have this function how can i still use DBCP inside Tile controller class
    help me pls
    archi

    hai
    is it possible to use function getDataSource function without extending Action

  • Struts - tiles definition not reflecting for a JSP

    Hi everyone, I am struggling with this problem since 2 weeks..I will be thankful to you if u can tell me the solution...the problem is :
    In my tiles-defs.xml, all the definitions are working fine but for only one jsp, its not getting reflected. I want my jsp to extend another JSP to display common menu and header. I added the below definition in the xml but its not working...
    <definition name="requestDelete" extends="standardLayout">
    <put name="content" value="/jsp/volumes/requestDelete.jsp" />
    <put name="title" type="string" value="Request" />
    </definition>
    Already the below definitions are present in the xml and they are working fine...but the one i added is not working
    <definition name="requestCreate" extends="standardLayout">
    <put name="content" value="/jsp/volumes/requestCreate.jsp" />
    <put name="title" type="string" value="Request" />
    </definition>
    <definition name="requestView" extends="standardLayout">
    <put name="content" value="/jsp/volumes/requestView.jsp" />
    <put name="title" type="string" value="Request" />
    </definition>
    Please someone help me to find out the solution..

    can you explain what exception it is throwing ?

  • Forward to Tiles definition from faces-config.xml

    Hello,
    can anybody explain me how to make a forward to a Tiles definition from the faces-config.xml file? I�m using MyFaces with Tomahawk and Tiles, but I also tried with Jsf without myFaces and lots of combinations but I can�t fix it.
    Here is my faces-config file:
    <faces-config>
    <navigation-rule>
    <from-view-id>/pages/JP000.jsp</from-view-id>
    <navigation-case>
    <from-outcome>loginFrm</from-outcome>
    <to-view-id>/JP002.tiles</to-view-id>
    </navigation-case>
    </navigation-rule>
    <application>
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>
    </application>
    </faces-config>
    and this is the tiles-defs.xml:
    <tiles-definitions>
         <!-- === layouts === -->
         <definition name="general.menu"
              path="/pages/tiles/templates/general.menu.jsp">
              <put name="titleHTML" type="string"     value="mi_title" />
              <put name="menu" value="/pages/tiles/menu.jsp" />
         </definition>
         <!-- === pages === -->
         <definition name="JP002.tiles" extends="general.menu">
              <put name="titleHTML" type="string"     value="mi_title" />
              <put name="content" value="/pages/menus/JP002.jsp" />
              <put name="menu" value="0" />
         </definition>
    </tiles-definitions>
    Lots of thanks!!!!

    Today I downloaded tomahawk-examples-1.1.5-bin. (http://myfaces.apache.org/download.html). They have one example with tiles, and it works the way I want it to.
    I'm still trying to figure it out what is causing this behaviour.
    At least, I tried to change the value they're using for linkage between <to-view-id> and tiles definition, and found that JSF is still ignoring the real value in <to-view-id>
    : it was originally 'blah.jsp', but 'blah' or 'blah.tiles' worked the same way, while in tiles definition the corresponding name was always blah.tiles.
    It seems that they are looking into tiles definitions first with the key composed of the first part of the value in <to-view-id> (before the dot) concatenated with hardcoded '.faces'.
    I tried to change the key value in both config files to something like 'blah.ttt', and it did not work.
    I'm not sure at the moment if this would be a problem for me, I may use this framework, knowing the limitations.
    Also, I'll look into the code, if this may be altered and at what cost.
    Still, the basic jsf problem with always interpreting the value in <to-view-id> as blah.jsp remains.

  • Can't get definitions factory from context in struts tiles in weblogic 10

    I have exception trace which only happens whenever i recompiling my java file while running my web application in weblogic 10
    javax.servlet.ServletException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Can't get definitions factory from context.
    *     at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)*
    *     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)*
    *     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)*
    Caused by: javax.servlet.jsp.JspException: Can't get definitions factory from context.
    *     at org.apache.struts.tiles.taglib.InsertTag.processDefinitionName(InsertTag.java:580)*
    *     at org.apache.struts.tiles.taglib.InsertTag.createTagHandler(InsertTag.java:479)*
    *     at org.apache.struts.tiles.taglib.InsertTag.doStartTag(InsertTag.java:441)*
    Anybody has any idea how to fix this?
    It seems the error happen because weblogic trying to reload the context after i recompiling java file
    How do i turn off / workaround on this?
    By the way i m using struts tiles
    Thanks

    I have exception trace which only happens whenever i recompiling my java file while running my web application in weblogic 10
    javax.servlet.ServletException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Can't get definitions factory from context.
    *     at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)*
    *     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)*
    *     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)*
    Caused by: javax.servlet.jsp.JspException: Can't get definitions factory from context.
    *     at org.apache.struts.tiles.taglib.InsertTag.processDefinitionName(InsertTag.java:580)*
    *     at org.apache.struts.tiles.taglib.InsertTag.createTagHandler(InsertTag.java:479)*
    *     at org.apache.struts.tiles.taglib.InsertTag.doStartTag(InsertTag.java:441)*
    Anybody has any idea how to fix this?
    It seems the error happen because weblogic trying to reload the context after i recompiling java file
    How do i turn off / workaround on this?
    By the way i m using struts tiles
    Thanks

  • 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

  • Struts 1.2.4 and BC4J in JDev 9.0.3.4

    Hi,
    I did some sample code using Struts and BC4J in JDev 9.0.3.4. I was using the Struts version that came with the JDev.
    Then I downloaded Struts 1.2.4 and unpacked it instead of the shipped version and backed up the old one. I did another sample application in a new project and it gave me this error
    java.lang.NoSuchMethodException: Bean has no property named application
    It's not recognizing the
    <set-property property="application" value="TPSModule"/>
    in the struts-config.xml file.
    When I restore the old version libraries in the WEB-INF/lib, everything works fine.
    Can I not use Struts 1.2.4 with JDev 9.0.3.4?
    Any help is appreciated.

    No the article is not applicable for 9.0.3 I've never tested the compatibility of the 9.0.3 + Struts integration - obviously it does not work.
    What does work is the ADF bindings used in 9.0.5 and above which can be safely used with newer versions of Struts.

  • Struts tiles to create event based loading of tiles on a JSP

    Hi All,
    I am working on a web app where I am using struts tiles to create my JSPs. I have tiles for header, footer & nav bar.
    Now I want to break up my JSP body in multiple tiles. It is required that I insert only one body tile initially, say body1, which contains few hyperlinks. Depending on which link is clicked, I would attach another tile (body2) below the first one. Can any advanced tiles user inform me if it's possible with struts-tiles, & if yes how?
    Thanks.

    Tiles is basically used to overload the jsp pages and reuse them.
    In your tiles-defs.xml file:
    //Tiles for header, footer and nav bar goes here
    //Tiles for body1 and body2  goes here
    <definition name="BodyTile" page="/yourPage.jsp">
              <put name="body1" value="/blank.jsp" />
              <put name="body2" value="/blank.jsp" />
    </definition>
    <!--Blank jsp is a simple html page without any data into it-->
    Now create a customized tile for your module. Mapping has to be done in struts-config.xml.
    Notice that the definitions here extend the tile from tiles-defs.xml, i.e. "BodyTile"
    <definition name="ActionOneWithBodyOne" extends="BodyTile">
        <put name="body1" value="/yourPage1.jsp" />
    </definition>
    <definition name="ActionTwoWithBodyTwo" extends="BodyTile">
        <put name="body1" value="/yourPage1.jsp" />
        <put name="body2" value="/yourPage2.jsp" />
    </definition>Now when you first load the page forward it to "ActionOneWithBodyOne" and it displays you just your body1.
    When ever u click a link on body 1, after performing the action populate the form bean corresponding to yourPage2.jsp and forward the action to "ActionTwoWithBodyTwo".
    Hope that helps!!
    SirG

  • Combo box in jsp : implemented by struts tiles

    Hi,
    I have few problems with JSP...
    we have devided the body part in the tiles into two parts
    initially..................
    body1: jsp with combo box
    body2: a blank jsp
    if the user selects an option from the combo box..in onchange function ..iam getting the value of the selected option..and iam doing form.action="action selected by user" ... so that it will go the struts-config then inturn will call the action then by forwarding success..will go to the struts-config file again ..then by have name="seccess".. it will call path="somedefinition"....this definition is defined in the tiles-definition file...
    where again...extending some standard definition by overriding ..
    body1:jsp with combo box
    body2:jsp related to the selected option..in the combo box
    second time.. in body1: again we r calling original jsp na..it will show default select only na??
    so how to get the selected option and how i can give that option as selected when it is loading second time.
    Hope you got my problem...
    Please help me out...
    Waiting for ur kind reply
    Thanks & Regards
    Kranti Kiran Kumar Parisa
    Software Engineer [ e-Biz ]
    [email protected]

    It's not nice to highjack someone elses thread. I posted a reply http://forum.java.sun.com/thread.jsp?forum=45&thread=552915 (though I shouldn't have, shoulda done it here). if you have questions post them to this thread instead. Leave the other one to the OP's question.

  • Struts-Tiles

    Hi,
    I am new to struts and XML as well. I was trying to use tiles in my application. For that I created a Tiles definitions page called "tiles-def.xml". I tried to put that in /web-inf folder and add the entires to struts-config.xml file for the tiles plugin.
    NOw I am getting the following error in tiles-def.xml:
    Document root element"tiles-definitions" must match DOCTYPE root "struts-config".
    Could anyone tell me what could have been the reason.
    Thanks in advance

    Does your tiles-def.xml start with:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
    <tiles-definitions>

  • Using Struts tiles

    hi,
    Has any body worked with Struts Tiles in workshop. Is it possible. Can any one share his experience.
    Regds
    Ashwani

    Hi Rohrlich,
    I attempted managing portal layout (e.g.: header.jsp,
    footer.jsp and body.jsp) by Struts Tiles (see below) and
    there is no sample code in the online document of WLW8.1.
    If possibility, have you any suggestion of it or advice
    reads.
    Thanks you in advance.
    <b>
    There is error message after requesting somepage.jsp:
    [ServletException in:Controller.jpf] TilesPlugin :
    Specified RequestProcessor not compatible with
    TilesRequestProcessor'
    </b>
    Environment info:
    -WLW 8.1.4 ( necessary for my workplace)
    -struts-1.2.9-bin.zip
    I practiced rudely code as below...
    [WEB-PROJ]/WEB-INF/.pageflow-struts-generated/jpf-struts-config.xml
    <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="../tiles-defs.xml"/>
    <set-property property="definitions-debug" value="0"/>
    <set-property property="definitions-parser-details" value="0"/>
    <set-property property="definitions-parser-validate" value="false"/>
    </plug-in>
    [WEB-PROJ]/WEB-INF/tiles-defs.xml
    <tiles-definitions>
    <definition name=".template" path="layout.jsp">
    <put name="title" value="title" />
    <put name="header" value="header.jsp" />
    <put name="body" value="Controller.jpf" />
    </definition>
    </tiles-definitions>
    [WEB-PROJ]/WEB-INF/web.xml
    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    [WEB-PROJ]/layout.jsp
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <table border="2" width="300" bordercolor="Gray">
    <tr><td bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td></tr>
    <tr><td><tiles:insert attribute="header"/></td></tr>
    <tr><td><tiles:insert attribute="body"/></td></tr>
    </table>
    [WEB-PROJ]/somepage.jsp
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <tiles:definition id=".template" template="layout.jsp">
    <tiles:put name="title" value="This is the title." />
    <tiles:put name="header" value="header.jsp" />
    <tiles:put name="body" value="Controller.jpf" />
    </tiles:definition>
    <tiles:insert beanName=".template" />
    Best regards,
    Beginner Chan<b></b>

  • Need a help with Struts Tiles dynamic menu

    Hello,
    I am started few days ago with Tiles, try to develop web application.
    Can anybody sugest very simple example with Tiles and menu.
    So my definition looks like this:
    tiles-def.xml
    <tiles-definitions>
    <definition name="MainDefinition" path="/layouts/myLayout.jsp">
    <put name="title" value="This is the title." />
    <put name="header" value="/tiles/header.jsp" />
    <put name="menu" value="/tiles/menu.jsp" />
    <put name="body" value="/tiles/body.jsp" />
    <put name="footer" value="This is the footer." />
    </definition>
    I am simple layout.
    I need to on menu click change body content, now i am doing it like this:
    index.jsp
    <%@ page language="java" %>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%String body = request.getParameter("body");%>
    <tiles:insert definition="MainDefinition" flush="true">
    <tiles:put name="body" type="string"> <%= body %> </tiles:put>
    </tiles:insert>
    But now body is a string how to make it open url?
    Maybe somebody have link to menu Tiles good examples.
    Thanks

    But here's some useful advice :P
    I'm going to assume that the other two people involved in this have a bit more experience, have them do most of the designing. Have them leave most of the easy stuff for you. You can then spend your time learning the minimum of what you need to know. And if you have problems, or don't understand things, ask your partners for help.
    And you'll want to set some spare time for you to all get together and do something fun so that you don't kill each other because of the stress :P
    I've had a lot of bad project experiences, fortunatly they where all just at school :P I blame myself, mainly because I didn't do the whole thing myself (mostly because I listened to people when they said that I shouldn't or couldn't do everything myself.) I'd like to say that it's mostly because of poor communication, and disorganization, but an awful lot of it had to do with the fact that I tend to be the only person with any work ethic what so ever.
    But whinning and repressed memories aside, good communication and organization help a lot. Come up with a good system with your team mates. And don't be afraid to ask questions. And don't worry about dividing up the work load equally. Just make sure you put in a good amount of effort, if not frightening amounts.
    If all of you are clueless, divide up the learning stuff between yourselves too.
    I have no experience with Struts. I've done a bit of stuff with XML, but nothing too complicated. The XML by itself tends to be extremely easy. What you plan on doing with it can vary (I don't like XML incidentally :P)
    Other then that, good luck.

  • Jspfs cannot be used in Apache tiles definitions

    I know I am not the first to encounter this, but for prosperity sakes... If you put a jspf in a tile-definition, the tiles mechanism still works, it is just that the included jspf never gets compiled. If you know of a work-around I would love to hear it. I just spent a good portion of last night figuring out this inane item.
    <tiles-definitions>
    <definition name="product" path="entrylayout.jsp">
    <!-- I am using a jspf here, and it works in the layout -->
    <!-- except that it is uncompiled -->
    <put name="entry.item" value="/WEB-INF/product/product.jspf" />
    </definition>
    </tiles-definitions>

    DHinojosa,
    I would like to thank you for your post. Two years later after, and your post completely saved my life.
    I was getting weird errors when using JSF + tiles in jspf with apache tiles2.
    once i changed my tiles to jsp everything worked great.
    I'll cheer to your health tonight!!!
    thank you thank you thank you!!!
    :))

  • Urgent: Struts Tile Version supported in 10.1.2.0.2

    We are porting a tiles-application to 10.1.2.0.2 OC4J. But we get some errors invoking a tiles-page.I think the struts version we are using is 1.2.6. The struts-tiles.tld says version 1.3 And the error we get is:
    Errors parsing struts-tiles.tld
    Error: <>tiles.taglib.useattributeTEI
    Any suggestions? Thanks.

    I've found this is a problem only with the standalone
    version of OC4J 10.1.2.0.0You mean it works correctly in Oracle 10gAS?I have yet to test the main application server.
    It only returns the JAZNUserManager each and every time.Pardon my ignorance, what are you expecting it to return?Well in previous revisions it has always returned the custom UserManager I have declared in my orion-application.xml.
    In my orion-application.xml file I have:
    <user-manager class="com.security.model.MyUserManager" display-name="MyUserManager">
         <property name="jdbcDriver" value="com.mysql.jdbc.Driver" />
         <property name="dbUrl" value="jdbc:mysql://localhost/mysql" />
         <property name="dbUser" value="user" />
         <property name="dbPass" value="user" />
    </user-manager>If I modify the application.xml file and place my own Custom UserManager there it affects the whole server. In my case it should only affect the current application it is declared in.
    I've already spent a week on this with metalink and we resolved that this is the way it should work.
    Going back to revision 9.0.4.0.0 of the OC4J standalone this problem does not exist and I get the Custom User manager returned that was declared.
    Even the standalone_guide.pdf in 10.1.2.0.0 still has the same reference that this should work - but it does not.
    Anthony

  • Virtual Directory with struts-tiles

    is have serious problems in configuring struts-tiles with virtual-directories for local developement. I have got my tiles-def.xml deployed in my ear. And i have got virtual-directory mapping, which works great, but not with tiles, because i want to include the jsp in my tiles-def.
              is this possible? Does anybody have an experience?
              Thanks heaps.

    A few methods that come to mind off hand would be:
    1) Make an app on your server act as a proxy to the other app. That is, make a Servlet mapped to all URLs in the context. The servlet simply makes a corresponding request to the other server passing all pertinent information from the originating client. Your servlet then reads the response and pipes it directly to the response object
    2) Try setting up a <context> element with the docBase attribute set to the other server's docBase. The other computer would have to give your server read/write access to the directory of interest. Since your server would be actually hosting the application you would have to check on environment and resources to make sure any required settings are duplicated properly.
    3) Have the other application hosted on a different port, and your firewall map that port to their server and your port to your server.

Maybe you are looking for