Help on Struts BC4J Framework

Hi Everybody,
I am new to BC4J Framework. I have enough experience in Java and JSP/Struts. Is there any guide which will explain me step by step development of an sample application using JDeveloper, Struts, BC4J and Oracle Database. I have tried to search the forum, but not able to find proper document. Please help.
Thanks & Regards,
Shailesh Joshi

Can anyone please tell me why in struts in most of the situations we are getting the error,
cannot find ActionForward and ActionMappings.You're getting the error because Struts isn't configured correctly. The solution is to configure Struts correctly.
~

Similar Messages

  • 10g UIX / Struts / BC4J

    We are searching for best practices for developping secure web applications using uix / struts / bc4j that demonstrates different login scenario and connection pooling with the database. Did somebody find something in documentation ? or a great book that expose this problematic ?

    Hi, I am also looking for a document or procedure like that.
    Did you get any help, or found any way to do that ?
    Can you share with me ?
    I will appreciate if you could have some time to share the ideas ?

  • Bussines rules problems using Struts + BC4J

    Hi, I'm using struts + bc4j and I have some problems with the validations made on the entities.
    Looks like sometimes, struts didn't shows the error message until the commit is made. But the problem is that on the navigator shows me the stack trace of the exception, but only when I do the commit of the transaction.
    In the test of the application module, the business rules works perfectly.
    If somebody can help me i will aprecciate it.
    Thanks
    Daniel Gonzalez

    There are already some threads on this topic.
    Unfortunately, they don't give solutions - not yet ;)
    Custom Method Validator
    addVetoableChangeListener for attribute doesn't seem to get fired
    HTH,
    Adrian

  • Maintaining page stack using BC4J framework

    We are developing a web application using JDeveloper(using bc4j+struts) in which list of functions are available in the tree menu on the left side. On clicking any function three tabs are displayed in the main body which are search, result list and maintenance. Now let's say user did some search on function A by entering some criterias and clicking the search button and output is shown in the result tab. Now user goes to another function B and does some operation. Now the requirement is that when the user returns to function A the previously set search criteria should remain. This is required for all functions. Without persiting in the web tier (HttpSession) what is the best way to do this using BC4J framework. Should I design View Objects with all transient attributes for each of the screens and use the application module in stateful mode? What can be the best and generic way to solve this?
    Note that we will have several combos (LOV) which are themselves mapped to a view object in the search page.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDev Team (Laura):
    Which version of JDeveloper are you using?<HR></BLOCKQUOTE>
    I'm using JDeveloper 3.1 .
    Please could you check with the developer if it's bug or not and if there is some fix to this (plans?).
    TIA,
    Seb.
    null

  • Generated STRUTS BC4J App not able to create view row

    I have build a BC4J AppModul with JDeveloper 9.03. The AppModul works fine in the testerapp and also with a UIX generated application. However, with the generated STRUTS BC4J app i allways get the following error message JBO-25013: Too many objects match the primary key oracle.jbo.Key[78 ] when creating a new entry (Browse/New/Update). The exception is thrown in the oracle.jbo.html.struts11.actions.UpdateAction.java populateRow() method. The related entity class builds the primary key with oracle.jbo.server.SequenceImpl in its create() method. Any idea ?

    I think the ViewObject you operated in your ApplicationModule contains two or more Rows has the same
    primary_keys.Check that!!

  • Anyone deploy ADF(UIX,Struts,BC4J) to 9iAS 9.02?

    Has anyone been successful in deploying a ADF 10g app using UIX/Struts/BC4J to Oracle 9iAS 9.02?

    Deploying a UIX application directly from JDeveloper 10g to iAS 9.0.2 isn't supported out of the box. You can deploy directly to iAS 10g (9.0.4), standalone OC4J 10g (9.0.4) instances (one is included with JDeveloper 10g), iAS 9.0.3 Java edition, standalone OC4J 9.0.3, and selected third party servlet engines.
    There are two issues that you would need to workaround to deploy a 10g ADF application to iAS 9.0.2. One issue is that 9.0.2 versions of some of the ADF libraries (BC4J and UIX for example) are on the global application.xml classpath of the iAS 9.0.2 customer home OC4J instance. You would need to manually upgrade your 9.0.2 instance to have all of the ADF 10g libraries. The second issue is that some of the ADF 10g libraries (like BC4J) require JDK 1.4, and iAS 9.0.2 shipped with an earlier version of the JDK. I personally don't know if using iAS 9.0.2 with JDK 1.4 is a supported combination, but I will try to find out for you.
    By the way, you might wonder why we don't have these same problems with with iAS 9.0.3 and 9.0.4 since the ADF 10g libraries are more recent than what shipped with those releases. In OC4J 9.0.3 and 9.0.4 there is a "search-local-classes-first" option in orion-web.xml that allows classes provided as part of a web application to be loaded in preference to what is on the global application.xml classpath. We use this feature to deploy ADF 10g applications (and include the JARs for some of the ADF libraries in the WEB-INF/lib of the application). In addition, there is a tool called the ADF Installer that is part of JDeveloper that will upgrade versions of some of the backward compatible ADF libraries (like BC4J) in the global application.xml.

  • Struts+ bc4j insensitive case search using queryAction

    I'm working in a new project using Struts+bc4j.
    the queryAction, when it executes a query using this attributes and applying a new viewcritteria, it works in a case-sensitive mode. I'm looking for a way to make it non-case-sensitive in a View OBject level.
    Regards
    Daniel Gonzalez

    Change the query to do this e.g.
    where lower(Emp.ENAME) = lower(:1) or whatever

  • How to implement command pattern into BC4J framework?

    How to implement command pattern into BC4J framework, Is BC4J just only suport AIDU(insert,update,delete,query) function? Could it support execute function like salary caculation in HR system or posting in GL(general ledger) system? May I create a java object named salaryCalc which use view objects to get the salary by employee and then write it to database?
    Thanks.

    BC4J makes it easy to support the command pattern, right out of the box.
    You can write a custom method on your application module class, then visit the application module wizard and see the "Client Methods" tab to select which custom methods should be exposed for invocation as task-specific commands by clients.
    BC4J is not only for Insert,Update,Delete style applications. It is a complete application framework that automates most of the typical things you need to do while building J2EE applications. You can have a read of my Simplifying J2EE and EJB Development Using BC4J whitepaper to read up on an overview of all the basic J2EE design patterns that the framework implements for you.
    Let us know if you have more specific questions on how to put the framework into practice.

  • Integrate struts validator framework

    (JHeadstart 9.0.4: Toplink/JSP/Struts)
    I am trying to integrate the struts validator framework . I'm encountering the following
    problem. When a validation rule(defined in the struts validation.xml) is violated I would expect
    that the JSP include named jhsInfo.jsp would show the errormessage because I assumed that it also
    reads from the same Error Bean (ActionErrors object ) struts normally uses.
    When I include a jsp of my own, containing the following:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html:errors/>
    then messages raised by the struts validation framework are shown and everything seems to work.
    I have the following questions:
    - Is it possible to show struts validation error messages using the jhsInfo.jsp ?
    I investigated the <jhs:ifContainsError> in the JHeadstart Taglibrary
    and noticed how it checks for the JHS_USER_INFO session attribute; apparently, when the validate()
    method in JhsDynaActionForm finds ActionErrors through the Struts Validator framework, this session attribute is not set.
    However, even if we add this attribute explicitly to sessionData in validate(), we do not get the Struts Validator Action Errors.
    - If not possible, how could we adapt the code to make it work? Should we instantiate JHeadstart UserExceptions
    for all ActionErrors or does JHeadstart have built-in functionality to deal with these ActionErrors in the proper way?
    Are we running into a bug, is it intentional to keep Struts Validator Error separate from JHeadstart Exception Errors
    or is JHeadstart currently not equipped with the logic to deal with the ActionErrors?
    Thanks in advance,
    Rob Brands (Amis)

    Rob,
    JHeadstart transforms UserExceptions (controller-independent) to Struts specific ActionErrors and ActionMessages in JhsRequestprocessor.convertUserExceptions.
    So, with JHeadstart you can either use ACtionErrors/ActionMessages directly, or indirectly by thrwoing UserExceptions.
    In jhsInfo we use html:messages to loop over both messages and errors (The boolean attribute message determines whether ActionErrors or ActionMessages are iterated). We do not use html:errors because that does not provide you with control over the layout of individual messages.
    You are right that our custom tags ifContainsError and ifContainsInformation should also directly check for existence of ActionErrors and ActionMessages. We will fix that for the upcoming release.
    With that fix in place, you should be able to use jhsInfo.jsp to display validator messages.
    You mentioned you tried to put a "dummy" JHS_USER_INFO exception on the session in the validate() method. This approach should work, however, to display ActionErrors (as is the case with the validator framework), you should use JHS_USER_ERROR as the key, noy JHS_USER_INFO.
    For now, you could choose to modify jhsInfo.jsp and use your own ifContains tags, until we have fixed this.
    Steven Davelaar.

  • How to Implement Strut Tiles  Framework in JSF

    Hi
    I am new to JSF tried to implent struts tiles in jsf 1.2 but i am facing some problm.
    is any one have ideas about how to implementing struts tiles framework in jsf??....
    Cheers
    Sekar M

    Hope the below URLs should answer your question
    [http://www.jroller.com/HazemBlog/entry/how_to_use_struts_tiles]
    [http://www.ibm.com/developerworks/library/j-integrate/]
    [http://www.laliluna.de/blog/2007/02/28/struts_tiles_jsf_myfaces_migration_or_integration.html]

  • Need help on struts configuration with ColdFusion 10 using IIS

    We need help on struts configuration with ColdFusion 10 using IIS.
    Earlier we were using ColdFusion 8 with IIS 6 for one of our application.  This application internally calls struts. After upgrading to ColdFusion 10 struts calls are not loading. We get 404 error.
    In ColdFusion 8 struts were configured using  actions extension .do in IIS from this file-
    C:\ColdFusion8\runtime\lib\wsconfig\jrun_iis6.dll.
    But in ColdFusion 10 this file is not present as ColdFusion 10 uses Tomcat in place of Jrun.
    Also there is no information in ColdFusion log file.

    Duane wrote:
    doctormirabilis, Welcome to the discussion area!
    1) how can i configure the time capsule in order to operate as a remote base station synchronizing with the relay using the ethernet port?
    Configure the Time Capsule to act as a bridge (not distributing IP addresses). Also configure the Time Capsule to create an 802.11n wireless network with a unique network name (SSID). That's it.
    2) how can i avoid that my powerbook while accessing my wireless network does connect through the relay station instead of using the time capsule?
    Configure the Time Capsule to use a different network name than the WDS link between the 2 AirPort Express (AX). Configure the PowerBook to use the Time Capsule network.
    There are 2 pieces of information that you should be aware of...
    (1) None of the PowerBooks are capable of 802.11n.
    (2) The WDS link cuts your available bandwidth in half. So the wireless link to your neighbor's has a maximum potential of 27 Mbps.
    Let's for a minute assume that you have a Mac compatible with 802.11n. In your configuration the time you could take advantage of the 802.11n speed is when the Mac is sending/recieving data directly from/to the Time Capsule.
    There would be NO speed increase in Internet access. The speed of Internet access is going to be controlled by the slowest link in the path to the Internet. That is probably the connection to the ISP. The next slowest path is the WDS link to your neighbor's.
    Duane,
    I am in a similar situation, sharing internet with my neighbor. Do you think it would be plausible to hook up a vonage phone adapter to time capsule's ethernet port if time capsule is bridging from my neighbor's router in the configuration you have described? A check of my upload speed shows 1.67Mbps (powerbookG4 w/ airport extreme). Vonage reccommends 90kbps minimum upload speed. Am I going to lose some speed putting the Vonag adapter behind time capsule?
    Thank you

  • Struts validation framework not working

    Hi
    I created a very simple webapp and using struts validation framework. But, it always give me validation errors even i filled out all the required firled information. i have my struts-config included the plug-in, points to the location of validation.xml & validation-rule.xml, and i have the validate set to true, and an input point to the page when validation fails, plus my formbean to extend the validatorForm. But, no matter what, it always pass the validation. in other words, the validate method in the validator always returns 0 errors. Any ideas what might be wrong? or any suggestions of how i can debug it?
    Thanks a lot.
    cc

    There is an bug in Sun One App Server
    U need to add permission for delete in the server policy file
    please refer to
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4803631

  • Urgent problem in struts bc4j app

    The problem occurs between the Controller an the View Layer(can I debug there?) Anyway, I can see the data in the Action class, but not in the jsp page, there's just one row (the first).
    Thank you.
    I'm using the 9.0.3.3 build 1205
    The Action class:
    public class ShowneuebehauftrAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    BC4JContext context = BC4JContext.getContext(request);
    ViewObject vo = context.getApplicationModule().findViewObject("BehauftrNeu");
    //here the output looks fine
    Row r = vo.first();
    while (r != null)
    for (int i = 0; i < vo.getAttributeCount(); i++)
    String attrName = vo.getAttributeDef(i).getName();
    String attrVal = r.getAttribute(i).toString();
    System.out.println(attrName + " = " + attrVal);
    r = vo.next();
    return BC4JUtils.getForwardFromContext(context, mapping);
    And the jsp page:
    <%@ page language="java" errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <html>
    <head>
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <LINK REL=STYLESHEET TYPE="text/css" HREF="bc4j.css">
    <TITLE>
    <bean:message key="behauftr.title"/>
    </TITLE>
    </head>
    <body>
    <table border="0" bgcolor="#003399">
    <tr>
    <th><font color="white" size="3"><bean:message key="behauftr.nr"/></font></th>
    <th><font color="white" size="3"><bean:message key="behauftr.wunschdatum"/></font></th>
    <th><font color="white" size="3"><bean:message key="behauftr.status"/></font></th>
    <th> </th>
    </tr>
    <jbo:RowsetIterate datasource="DataaccessModule.BehauftrNeu" userange="true" >
    <tr bgcolor="#f3f3f3">
    <td>
    <jbo:ShowValue dataitem="Nr"/>
    </td>
    <td>
    <jbo:ShowValue dataitem="Wunschdatum"/>
    </a>
    </td>
    <td align="right">
    <jbo:ShowValue dataitem="BasNr"/>
    </td>
    </tr>
    </jbo:RowsetIterate>
    </table>
    </body>
    </html>

    There's another question: I tried to format a date field to SimpleDate format dd.MM.yyyy - in the Entity's and ViewObject's Attribute-Editor-Control-Hint.
    It works fine in the BC-App-Module, but in the Action class there's the yyyy-MM-dd format back again (and of course in the jsp page as well). Does this have to be handled in the Action class?
    But, more important, I still can't figure out why there's only one row in the jsp page - as described earlier -
    Thanks in advance for your help.
    Regards
    gabriela

  • Struts bc4j date pick window problem

    i'm using bc4j and struts in jdeveloper 9.0.3
    i generated application using the wizard
    running it using the jdeveloper oc4j works fine
    when i deploy it to remote stand alone oc4j
    the application work fine except for the date chooser button which suppose to open a window in which the user pick up a date. the button does not appear and there is a message "calendar for date entry assistance"
    when i press the link and explorer error jump telling a run time error occurred (object expected).
    a) i need a solution
    b) how can i customize the calendar object

    I've had problems similar to this when building portlets that use BC4J. When you put the same portlet on a page twice, the portal "parallel page engine" calls the portlet renderer with two threads that share the same HttpSession. (Very similar to your multi-frame case) I had to add some code like this in my renderer class:
    HttpSession sess = request.getSession();
    synchronized (sess) {
    // fetch appmodule, do stuff, return appmodule
    This effectively single-threads the usage of your ApplicationModule so that the multiple concurrent requests don't clobber eachother by executing queries, and moving the row pointer on your RowIterators and ViewObjects. But, it only single-threads it on a per-user basis, because we synchronized on the HttpSession.
    Hope this helps...

  • To JDev Team : SQL generated, Struts, BC4J Admin, ...

    Hi,
    I've followed the Tutorial 'Generating a Struts-based JSP Application for an
    Application Module', where I'm working with only one table.
    When I run the 'main.html', on the left side ( navigator ), there are 'Browse' and 'Query' options.
    Every time I click on 'Browse', I always have this error :
    Error Message: JBO-26044: Error while getting estimated row count for view object TimesheetView1, statement
    SELECT count(1) FROM (SELECT Timesheet.ts_id, Timesheet.ts_user, Timesheet.ts_code, Timesheet.ts_date, Timesheet.ts_hour
    FROM timesheet Timesheet) ESTCOUNT
    My config are :
    * Win2K
    * JAVA_HOME set to j2sdk1.4.1_01
    * mySQL 3.23.49 with JDBC driver mysql-connector-java-2.0.14-bin.jar
    * I use ultraDevHack=true as parameter within the URL
    Even with 'ultraDevHack=true' parameter, the subselect still not working.
    I've seen in the forum that JDev Team have tried with that parameter, and it worked,
    but it didn't mention with which version of mySQL and which JDBC driver.
    I would like to modify the above SQL into a simpler one 'SELECT COUNT(*) FROM timesheet'.
    Anybody know how ?
    The View Object Wizard didn't help me at all for the above SQL.
    In fact I would like to fully controled, modified, or cuztomised all SQL generated.
    Back to main.html, the header contains two buttons 'BC4J Admin' and 'Help'.
    When I click on 'BC4J Admin', I have this :
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java
    error: Invalid class file format in C:\j2sdk1.4.1_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
    C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
    package _wm;
    ^
    2 errors
    Why is that ?
    Out of scope, sometimes it's very slow accessing this forum ( 'Connection timed out' or 'The specified network name is no longer available' ...).
    Any of you have the same problem ?
    Is it possible to put some criterias within the Search, i.e. Sort by Date ?
    Any help would be appreciated.

    Hi,
    I've followed the Tutorial 'Generating a Struts-based JSP Application for an
    Application Module', where I'm working with only one table.
    When I run the 'main.html', on the left side ( navigator ), there are 'Browse' and 'Query' options.
    Every time I click on 'Browse', I always have this error :
    Error Message: JBO-26044: Error while getting estimated row count for view object TimesheetView1, statement
    SELECT count(1) FROM (SELECT Timesheet.ts_id, Timesheet.ts_user, Timesheet.ts_code, Timesheet.ts_date, Timesheet.ts_hour
    FROM timesheet Timesheet) ESTCOUNT
    My config are :
    * Win2K
    * JAVA_HOME set to j2sdk1.4.1_01
    * mySQL 3.23.49 with JDBC driver mysql-connector-java-2.0.14-bin.jar
    * I use ultraDevHack=true as parameter within the URL
    Even with 'ultraDevHack=true' parameter, the subselect still not working.
    I've seen in the forum that JDev Team have tried with that parameter, and it worked,
    but it didn't mention with which version of mySQL and which JDBC driver.
    I would like to modify the above SQL into a simpler one 'SELECT COUNT(*) FROM timesheet'.
    Anybody know how ?
    The View Object Wizard didn't help me at all for the above SQL.
    In fact I would like to fully controled, modified, or cuztomised all SQL generated.
    Back to main.html, the header contains two buttons 'BC4J Admin' and 'Help'.
    When I click on 'BC4J Admin', I have this :
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java
    error: Invalid class file format in C:\j2sdk1.4.1_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
    C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
    package _wm;
    ^
    2 errors
    Why is that ?
    Out of scope, sometimes it's very slow accessing this forum ( 'Connection timed out' or 'The specified network name is no longer available' ...).
    Any of you have the same problem ?
    Is it possible to put some criterias within the Search, i.e. Sort by Date ?
    Any help would be appreciated.

Maybe you are looking for