Developing WebApplication basing on Struts Framework

Hi,
We are developing an Web application. In our previous application we had used MVC1 architecture where we have one renderer for one .jsp page. Now we want to move to MVC2 architecture with struts framework at Controller level. I request a detailed documentation regarding this if any one has....
We are concerned about how to make the portal understand about our architecture. Do we need to follow any standard steps to for making the portal to understand that this application is been developed Struts framework.
We are using Oracle Portal 10.1.4 and Jdeveloper 10.1.3.2
Regards,
tulacenath.

actionForm acForm =
(actionForm)request.getAttribute("ActionForm");
// i have added the form to session in my parent
pageNote the above Statements.....
>
>
When the page is loaded for the first time with
default search option chosen
its working fine. However, when the search option is
changed and the
search function is executed it leads to the error
page.
I tried step by step debugging and found that the
actionForm was null when
the search was performed second time.
How could i solve this problem? any ideas?for this remove ur reset method from bean class and manually do this.
( create another method to nullify values and call it when required )
AE

Similar Messages

  • Seeking solution in WLP for using MVC struts framework

    Hi,
    We would like to implement Struts like similar solution with Weblogic Portal Server.
    I would like to know the possibilities of bringing the Struts framework in WLP
    and I also would like to know the contraints in implementing the similar framework
    in existing WLP.
    Thanks in advance.
    Regds,
    Ratnakar

    Hi Rathnakar,
    In this very same newsgroup this subject has risen in september last year.
    I include the posting, but admit that I have not tried it so far.
    Regards,
    Ad van Ommen
    [email protected]
    ===================================================
    "Raphaël Faudou" <[email protected]> wrote in message
    news:<[email protected]>...
    I have not seen any official document on this integration but I personnaly
    developped
    a struts-portal adapter that allows a struts-based webapp to run as a
    portlet
    in the BEA portal.
    The idea is to redirect the displaying
    nstruction -requestDispatcher.forward(request,
    response) - toward the portal webflow servlet with the appropriate
    parameters
    (portletName, pageName, event).
    Remark : If you use struts 1.1, this adapter is very simple because you only
    have
    to inherit the RequestProcessor class and redefine the "doForward" method.
    Then, you have two design solutions :
    1) you model a simplified webflow with only presentation nodes and
    transitions
    that match what your navigation as specified in your struts-config.xml.
    In this case, logic is handled by Struts framework and presentation is
    handled
    by the portal webflow servlet.
    2) you dont' want to use portal webflow and you have to bypass it by
    developing
    another adapter at the portal side.
    In this case, logic and presentation are handled by th Struts framework and
    the
    portal adapter only displays the next page in the appropriate portlet.
    Conclusion : you can deploy a struts-based application in the BEA portal
    after
    developing one or two adapters that can be generic.
    Good luck
    =====================================================
    "Ratnakar Sonti" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi,
    We would like to implement Struts like similar solution with WeblogicPortal Server.
    I would like to know the possibilities of bringing the Struts framework inWLP
    and I also would like to know the contraints in implementing the similarframework
    in existing WLP.
    Thanks in advance.
    Regds,
    Ratnakar

  • Oracle portal using JSF, JSP, Struts framework

    Hi ,
    Can anyone tell me how to build an oracle portal using JSF,Jsp and Struts Framework.
    Also please provide any manual or documentation for developing oracle portal.
    Thanks in Advance,
    Raghav

    At present, i think the best thing to do is to look at the example provided with the struts-faces integration taglib. I don't know any documentation about it.
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

  • Need to understand Struts Framework

    Greetings everyone,
    I am trying to understand how the entire Struts Framework works.
    If I am running tomcat, is copying and pasting the WAR file into webapps directory the only way to install struts?
    Since I am new to struts and was trying to understand how it works from ground up, I tried creating the neccessary files needed and copied the struts.jar into my web app's WEB-INF\lib folder.
    Unfortunately, I kept on hitting errors.
    Here is my app directory structure
    1) MyApp/
    - index.jsp
    - displayname.jsp
    2) WEB-INF/
    - struts-config.xml
    - struts-html.tld
    - web.xml
    3) WEB-INF/classes/example/
    - NameAction.class
    - NameForm.class
    4) WEB-INF/lib/
    - servlet-api.jar
    - struts.jar
    I am getting this error:
    HTTP Status 404 - /StrutsActionForm/index.jsp
    type Status report
    message /StrutsActionForm/index.jsp
    description The requested resource (/StrutsActionForm/index.jsp) is not available.
    Apache Tomcat/5.5.20
    I know it sounds silly but that's the only way I can truly understand the entire struts framework.
    Your reply will be much appreciated.

    If you specify the appBase of your application in Tomcat's server.xml ,
    or define a <Context>.xml and point the docBase to where ever your code's main directory is, you won't hae to create a WAR file and place it under WEB-INF each time you make any change.
    This saves a lot of time and effort in the development envionment, especially when you make a change to JSP pages - you can just refresh the browser to see the changes instead of creating a WAR file just to see changes in JSPs.
    Create a WAR file only when you are deploying your application to production / live website - a WAR file is not necessary in dev environment.
    With the above set-up your project can be located outside and independent of Tomcat, as long as the appBase or docBase are pointing to the location of your project.
    For tomcat related questions join the Tomcat User Mailing List
    and for struts question Struts User Mailing List

  • How Ajax works with Struts framework

    How Ajax works with Struts framework .
    Thanks
    Ramki

    So we must write file name(like abc.do), If am using struts <html:link > tag like <html:like action="abc" >Click</html:link>, so with ajax we must call like <a href ="abc.do">Click</a> .
    But there is a problem, if am using ,
    <servlet-mapping>
    <servlet-name>MainServlet</servlet-name>
    <url-pattern>/r/*</url-pattern>
    </servlet-mapping>
    or
    <servlet-mapping>
    <servlet-name>MainServlet</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    here i am changing web.xml file based on client interest. At those situation we must change all jsp pages for <a href ="/r/abc">Click</a> .like,.
    It's very difficult.
    Is any other way to use ajax with Struts (Only struts tags)
    Thanks
    Ramki

  • Porting unix shell script to WEBUI having Struts framework

    Hi,
    I am working on an assignment where I have to migrate various unix shell scripts to web based application using struts framework(J2EE).
    Is there any way to call the existing unix shell script thru the web based application?? so that the rewritting complexity can be reduced.
    Any expert suggestion will be appreciated.
    Thanks
    Raj

    Thank you for reply ,
    And sorry by mistake question repeated twice,
    but when iam executing those batch files it is throwing some exceptions,
    in that file you did not mention to set the JRE path whether it is not necessary and also there msoc05 is the machine name of unix system that need to kept or need to be changed with window IP address .please reply.
    thanks in advance.

  • Does struts framework only fit Value Object in BC4J?

    1. From "Query Page" to "List Results Page", I use the DataTags to iterate the RowSet.
    Is there any way to save the rowset into the web server to avoid hitting the database again when user wants to turn back from detail page to list page? And then use DataTags again to iterate the saved Rowset.
    2. If database is down, instead of showing the user Http 500 server error, I want to catch it before doing
    <jbo:ApplicationModule ......./> and show user my own message. Is it possible to catch the exception here in JSP?
    3. our application consists of BC4J and Struts. Do we have to create Value Object in BC4J in order to fit Struts framework? Or say, It is only the best way.

    Jane,
    1. From "Query Page" to "List Results Page", I use the DataTags to iterate the RowSet.
    Is there any way to save the rowset into the web server to avoid hitting the database again when user wants to turn back from detail page to list page? And then use DataTags again to iterate the saved Rowset.
    The rowset is saved in the BC4J cache, and it should hit the database only when necessary. The detail set is not eagerly retrieved so only the first time the detail set is browsed, the rows will be fetched with a query.
    Also this depend if you application is stateful or not (using the releasemode property on the ApplicationModule tag). In Stateful mode, the application need to be re-activated and if your AM has been recycled, the data will need to be refetch. In Reserved mode, everything is preserved but you can share you AM with anybody else (faster but less scalable).
    2. If database is down, instead of showing the user Http 500 server error, I want to catch it before doing
    <jbo:ApplicationModule ......./> and show user my own message. Is it possible to catch the exception here in JSP?
    You should be able to try catch around the applicationModule tag. Let me get more info on this one.
    3. our application consists of BC4J and Struts. Do we have to create Value Object in BC4J in order to fit Struts framework? Or say, It is only the best way.
    No, you do no have to create a Value Object in BC4J, but we think it will save you a lot of development time doing so.
    See following links:
    http://otn.oracle.com/products/jdev/htdocs/bc4j9irc_datasheet.html
    http://otn.oracle.com/products/jdev/htdocs/j2ee_bc4j.html
    Charles.

  • Is Struts framework WLS cluster-safe?

    In a clustered WLS environment, there are programming requirements
              having to do with the use of the session object ("Session Programming
              Requirements" in http://edocs.bea.com/wls/docs61/cluster/servlet.html).
              The Jakarta Struts framework uses the session object extensively.
              Does anyone know whether Struts complies with the above requirements
              and is therefore WLS cluster-safe? Has anyone deployed a Struts-based
              application to a WLS cluster?
              

    Let's look at it without synchronization:
    Thread A calls execute() method (no class variables that are not constants)
    Thread B calls execute() method (no class variables that are not constants)
    Let's look at it with synchronization:
    Thread A calls execute() method (synchronization check succeeds)
    Thread B calls execute() method (synchronization check hangs until thread A is done and releases the lock)
    Let's say that the execute() method does something with decent latency (like accessing a network resource or a database). Now, you eventually end up with a 'queue' of threads waiting for the lock to be released. This is a scaling constraint. It introduces a bottleneck into your application.
    Now, this is sometimes unavoidable. For example, database connections are a scarce resource. The solution to this is a connection pool, which helps, but does not eliminate the bottleneck. Wherever possible, you want to avoid scaling bottlenecks.
    You have the ability to do so in your case. Try to avoid anything in your Action class itself (a class variable) that is anything other than a String or a primitive and ensure that any of those variables are constants (static and final). Now, these variables are 'thread-safe' because they are constant and immutable.
    For your execute() method, only use variables that are in the method signature itself or created/declared within the execute() method. This will ensure your Action class is in fact thread-safe. The minute you declare a mutable class variable (or a class like List that allows you to manipulate its contents), you introduce the possibility of a race condition and thread-unsafety (if that's a real term).
    - Saish

  • Using Multiple Properties Files in Struts Framework

    Hi Everybody!
    I just to know how to use a multiple message-resources files in a Struts Framework.
    I've 2 properties file :
    1. ApplicationResources_A.properties
    2. ApplicationResources_B.propertiesI put the files under WEB-INF/classes dir.
    My configuration in struts-config file something like below:
    <!--  Begin Testing -->
         <message-resources key="A" parameter="ApplicationResources_A" />
         <message-resources key="B" parameter="ApplicationResources_B" />
    <!--  End Testing -->
    </struts-config>
    if my JSP code is like below , this error is thrown:
    org.apache.jasper.JasperException: Cannot find message resources under key A
      <tr>
        <td width="17%">Language A</td>
        <td width="83%"><bean:message bundle="A" key="user.lang.desc"/></td>
      </tr>
      <tr>
        <td width="17%">Language B</td>
        <td width="83%"><bean:message bundle="B"  key="user.lang.desc"/></td>
      </tr>
    but  if I change the  JSP code like below it  work fine:
      <tr>
        <td width="17%">Language A</td>
        <td width="83%"><bean:message key="user.lang.desc"/></td>
      </tr>
      <tr>
        <td width="17%">Language B</td>
        <td width="83%"><bean:message  key="user.lang.desc"/></td>
      </tr>
    In this code , I dont know  which resources file is used.
    So how do I solve this problem. Thanks you.

    I have defined the following:
    struts-config.xml
    <message-resources key="ldap" parameter="com/project/struts/ldap"/>
    Action.java
    In execute method:
    MessageResources messageResources= MessageResources.getMessageResources("com/project/struts/ldap");
    System.out.println("INITIAL_CONTEXT_FACTORY"+messageResources.getMessage("INITIAL_CONTEXT_FACTORY"));
    and it is working, however I have to change "com/project/struts/ldap" value in Action.java file whenever there is any change in name or location of ldap.properties.
    Can I access this properties in such way that I don't have to change parameter path manually in Action.java (modifying in struts-config.xml is okay)? like access through key="ldap" or something.
    Thanks and regards,

  • Use properties file in Struts framework

    I develop a websit with struts, web ap is tomcat5.0, and I have a conf.properties file
    this file is different from ApplicationResource.properties, conf.properties in the /MySite/conf/ directory, not in src directory
    When I Use the conf.properties file in a Common Java Class that not extends any super class
    it will occur a FileNotFoundException exception
    How to make it
    public class Environment
         private static Properties prop = new Properties();
         private static FileInputStream in = null;
         public static String getVariable(String key)
              try
                   in = new FileInputStream(new File("\\conf\\config.properties"));
                   prop.load(in);
                   return prop.getProperty(key, null);
              catch (Exception e)
                   e.printStackTrace();
                   return null;
              finally
                   try
                        in.close();     
                   catch(Exception e)
                        e.printStackTrace();
         }

    Your class cannot find the file in the location tht u have given. The path (\\conf\\config.properties) is relative to the location where your source (Environment class) is kept.
    Try to hard code the path & see if your source can find the prop file ...

  • Dynamic Tree Creation using JSP, Struts framework

    I urgently require tips/information/code snippet for creating a Dynamic Tree structure.
    Tree is the hierarchical folder structure that we see in windows operating system.
    Dynamic tree in the sense that all nodes shall be populated from database & a radio button shall be present at each node that can be selected & submitted to form.
    Tree should be done using JSP (& if required Javascript).
    I am using Struts framework .
    [email protected]

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • Develop report based on INFOCUBE and ODS

    Hi,
      Pls, can anybody help regarding developing reports based on INFOCUBE
    and ODS object
    i am using SAP BW 7.0
    what is the transaction code for reports
    what are the steps to develop reports
    Thanks\
    - Mubeen.

    There is no transaction code as such as you have to use the front-end application to create queries off your Cubes/ ODS.
    open Bex query designer -> select info provider (cube or ods) -> drag and drop the keyfigures in columns, -> char in rows -> save.
    Also look at
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm

  • Can we use ejb in struts framework?

    can we use ejb in struts framework?I need the reasons for both yes or no answers.

    This question is not appropriate for this forum, which deals with the J2EE SDK. Have you looked at the Struts documentation? Have you performed a Google search? If you had, you would have found the answer....
    -Ian Evans

  • Populating Database values into a combo box in STRUTS Framework

    Hi Guys,
    I am currently working on a STRUTS Framework project and I can't get much resources related to the problems that I'm facing.
    Currently I need to populate a JSP file's Combo box with database values. What I don't know here is the syntax used to in STRUTS framework to populate the Combo box with database values. Anyone with experience related to this topic, please kindly help me out.

    Struts doesn't define anything about the datab layer. You're free to implement how you will.
    Struts instead guides you into following an MVC pattern.
    You populate a combo box with values from a bean.
    So you need to set up a bean for this page to talk to.
    That bean can be populated from the database - but at that point you're in java/jdbc code - and away from the struts layer.
    My suggestions
    1 - Define a bean to represent the information from the database.
    2 - write a method that queries the database, and copies the data into a List of those beans. This will be your Data access layer.
    3 - in your action, call that method, and then set the list of beans as a request attribute. Or maybe as a property on a form.
    4 - use that list of beans to populate your dropdown box.

  • Question about java-based server app frameworks

    Hello, I am working on a Java applet application and would like to choose a Java-based scalable server framework to use within my applcation. I have found a few like xsocket or QuickServer and have a question about other. And, also, which is the one You may advise? Yours sincerely, Slawek

    For online gaming server. I first heard of xsocket and started using this, but have the problem with NAT. I now know that I need to initiate connections from client behind NAT (server has a public IP) and send messages from server to client within the same connection. I am doing this the following way (as shown in examples- below), but it appears that server receives messages, but client doesnt. I dont listen on any ports in client application and just need to take advantage of the connection initiated (information go from client to server properly).
    Server-
    try{ nbc = pool.getNonBlockingConnection(inetAddress, 8090);
    try{ nbc.write("|01|______|02|______|03|______|04|______|05|______|06|______|07|______|08|______|09|______|10|______"); }catch(Exception ee){}
    }catch(java.io.IOException f){}
    Client-
    public boolean onData(INonBlockingConnection nbc) throws IOException,ClosedChannelException,BufferUnderflowException,MaxReadSizeExceededException{
    String x = nbc.readStringByLength(100);
    System.out.println("S >> C = "+x);

Maybe you are looking for

  • New late 2013 Macbook Pro 15" Graphics issue

    Im starting this new thread because I cant find anyone else on here with this problem I'm having. Since I first got my new late 2013 MBP 15" 16gb RAM 1TB Flash Drive. I noticed a couple of things. First, I opened photoshop cc with about 20+ average r

  • Sky hd box interference with laptop

    Hi Everyone I am having a rather odd problem , we have 2 sky hd boxes , 1 downstairs and 1 upstairs both are connected to the internet via wi-fi , we also have a multitude of devices that also use the internet via wi-fi in the house like ipods laptop

  • SMARTFORMS: 2 columns (each column consist 1 table) in 1 page

    Hi..., I've got problem that there is requirement to development smartforms as below format: Page 1 column "A"                column "B" No. Description     Qty Amt     | No. Description     Qty Amt 1. Desc1         1 100 |  5. Desc5               5

  • Best practices on enterprise and application roles in OIM and OAM 11g?

    Hi, all, I wonder if any of you can give me some advice on role design for OIM and OAM 11g. I'd like to have both enterprise roles, such as Accountant II, and application roles, such as App1_User, App1_Admin, etc. Ideally, the enterprise role would a

  • List edit Orders Display Default current date

    Dear We need to display the IW 37 Actual start date range is ex : 15.12.07 & 15.02.08 . It should come as default to all users log in. This should refelect all the log ins when ever going for IW 37 . Where we have to put  this to get the defualt days