Need help implementing AJAX in an existing Struts Application

Hi!
I am trying to implement AJAX in my existing Struts Application. I need a good approach to go ahead and implement Ajax. I was thinking.. may be i will have to club all the code in the forms n actions (in the current Struts application) to one form and action, So I can easily include the dynamic content in the page.
Please let me know if you have any ideas of how to implement AJAX in a fully developed Struts application.
Thanks,
Swapna.

Hello Friends,
Check out whether the link below could be of somehelp for you folks...
http://www.it-eye.nl/weblog/2005/12/13/ajax-in-struts-implementing-dependend-select-boxes/
http://today.java.net/pub/a/today/2005/10/27/sprinkle-ajax-magic-into-struts-webapp.html
http://www.theserverside.com/news/thread.tss?thread_id=37355
http://getahead.ltd.uk/dwr/examples/lists
http://www.componentsource.com/products/backbase-ajax-struts/summary.html
http://www.jibbering.com/2002/4/httprequest.html
added to it there are few implementation frameworks which are addressing this issue you may further search on it and update abt the info which could be very much useful for all of the ppl out here.
and there is a current thread running on the same topic it'd really appriciated if u can accomadate ur posts there.
http://forum.java.sun.com/thread.jspa?threadID=784924&tstart=0
REGARDS,
RAHUL

Similar Messages

  • Need help on AJAX in java

    Hi! I'm very new to the concept of AJAX and I was hoping someone could help me out. Basically, I have an application that needs to implement AJAX to speed up the transaction.
    What the program does is it has a dropdown box which has dates. After the user selects a date and clicks the submit button, the server returns a user from the database.
    My question is, how do I implement AJAX here? If it is possible, please guide me with this since I barely know how and where to start.
    Thanks!

    dont crosspost

  • Integrating an existing struts application

    Sorry if this has been discussed before but I tried searching the newsgroup with
    no success. tia.
    I am trying to integrate the struts application found in the struts-example.war
    file that I extracted from the jakarta-struts-1.1.zip file from jakarta.apache.org.
    (I have successfully deployed and tested this war file to the weblogic server
    so I know the application works.)
    I unzip the war file into a temp directory and follow the instructions found in
    "e-docs.bea.com/workshop/docs81/doc/en/portal/buildportals/appIntegratingStruts.html"
    After creating a struts portlet using the wizard and putting the portlet into
    my test portal, when I try to run the portal using debug in Workshop, I get:
    <Error> <netuix> <BEA-420599> <Unable to perform action [example/begin] for Struts
    module [example]. Please ensure that both module and action are correct.>
    <Error> <netuix> <BEA-420037> <There was an error loading the requested URI /example/mainMenu.jsp.>
    <Error> <netuix> <BEA-423012> <There was an error while running a lifecycle stage
    Lifecycle: UIControl.render :: for the control :: null ::.com.bea.netuix.nf.UIControlException:
    No ActionResult returned for action [example/begin] in Struts module [example].
    Please ensure that both module and action are correct in portlet StrutsContent
    element.
    at com.bea.netuix.servlets.controls.content.StrutsContent.preRender(StrutsContent.java:399)
    at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:388)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:619)
    I've tried changing the struts action and content uri with no success. I've tried
    changing the
    struts-auto-config-<module name>.xml file with even less success.
    Help would be greatly appreciated. tia.

    Have anyone got the answer from BEA ...
    I am also having the same problem.
    Pl. post if you have any answers.
    Thanks
    Kicha
    "Julien De Santis-Caron" <[email protected]> wrote:
    >
    Hi,
    I have the same problem and I can't find any way for correcting this.
    Please, help-us with this issue because integration of existing Struts
    applications
    into a portlet is a critical issue for choosing a Portal solution.
    thanks
    Julien De Santis-Caron
    "Dean Saiki" <[email protected]> wrote:
    Sorry if this has been discussed before but I tried searching the newsgroup
    with
    no success. tia.
    I am trying to integrate the struts application found in the struts-example.war
    file that I extracted from the jakarta-struts-1.1.zip file from jakarta.apache.org.
    (I have successfully deployed and tested this war file to the weblogic
    server
    so I know the application works.)
    I unzip the war file into a temp directory and follow the instructions
    found in
    "e-docs.bea.com/workshop/docs81/doc/en/portal/buildportals/appIntegratingStruts.html"
    After creating a struts portlet using the wizard and putting the portlet
    into
    my test portal, when I try to run the portal using debug in Workshop,
    I get:
    <Error> <netuix> <BEA-420599> <Unable to perform action [example/begin]
    for Struts
    module [example]. Please ensure that both module and action are correct.>
    <Error> <netuix> <BEA-420037> <There was an error loading the requested
    URI /example/mainMenu.jsp.>
    <Error> <netuix> <BEA-423012> <There was an error while running a lifecycle
    stage
    Lifecycle: UIControl.render :: for the control :: null ::.com.bea.netuix.nf.UIControlException:
    No ActionResult returned for action [example/begin] in Struts module
    [example].
    Please ensure that both module and action are correct in portlet StrutsContent
    element.
    at com.bea.netuix.servlets.controls.content.StrutsContent.preRender(StrutsContent.java:399)
    at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:388)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:619)
    I've tried changing the struts action and content uri with no success.
    I've tried
    changing the
    struts-auto-config-<module name>.xml file with even less success.
    Help would be greatly appreciated. tia.

  • Need help .. 4g usb modem .. application installed but cannot detect the usb modem .. mobily network interface installed but cannot detect the unit

    need help .. 4g usb modem .. application installed but cannot detect the usb modem .. mobily network interface installed but cannot detect the unit

    When you contacted the modem manufaturer what did they have to say?

  • Need help in install Jspell SDK on Oracle Application Server 10g 10.1.2.0.2

    Hi all,
    I need help in installing Jspell SDK software in Oracle Application SERVER 10G 10.1.2.0.2.
    Can anybody help me out. Please feel free to share any documentation if available or your experience to install Jspell on Oracle Application Server 10g.
    Thanks
    Yaaminy
    480-262-7881

    Hello,
    Did you copy the 2 JAR files in your /forms/java directory ?
    Did you add them to your /forms/server/formsweb.cfg file (archive_jini tag) ?
    As always when a Java Bean is in the game, display the Java Console at runtime to see if any error are raised.
    Francois

  • Need help from Jeff in getting CC desktop application

    Jeff, I was unable to find my previous question to you from the other day. To start over, my CC desktop application is gone missing after 10 months of CC usage.  I need to  download a LR update so I can use my camera with raw files. How can I get this back? Apparently Adobe doesn't allow reinstalling of individual programs even though I actually own LR. Please redirect me accordingly. I need help. I have win 7 64.
    GeneC

    Genec2 locking this discussion and will respond in CC desktop app icon missing.

  • Need help Installing OID Repository on existing database server using RepCA

    I have an oracle database server running 10g (10.2.0.4) and I want to install metadata repository on it. I downloaded the Application Server Metadata Repository Creation Assistant 10.1.2.0.1 (standard edition).
    I find that there are no batch files in the download, just setup.exe. When I run that I am asked for an ORA_HOME - when I provide the home where the database is installed I get the message that the home already has the database and the software cannot be installed on it.
    How do I add the repository to an existing instance of oracle database server? Also, is the version I downloaded the right version #
    Thanks

    Hi sameer khan,
    first let me ask, are you talking about Netweaver04s (WAS 7.00), in this case my answer can give you some hints.
    Note 883948 gives information of the installation of an additional usage tye (like BI JAVA)
    You have more than one possibility to install the usage type BI JAVA. The most common installation types are:
    1. BI installation and a separate BI JAVA installation with 2 <SID>
    2. BI JAVA Addin Installation in an existing NW04s
    I recommend to use option 1:
    In case you install a separate BI-JAVA instance, you need a separate <SID> for your J2EE environment. In this case it is not possible to use the same <SID>. This installation can be done on the same or a separate server. Furthermore, you can use a separate database or install the J2EE instance in the same database (--> MCOD). I recommend to use a separate database. Note: In this installation option, Sapinst normally installs a separate user store. With the usage type BI JAVA it makes (in most cases) sense, to use the user store of the BI system, where it belongs to. If you want to do so, "Revise" the user store option before you start the installation and and choose the production client of the BI system.
    If you like to use an Addin Installation, another <SID> is not possible. I would only recommend this kind of installation in test environments.
    It doesn't matter, which kind you choose, after installation, you have to do the steps for "Setting up bex Web", see Note 917950. This is sometimes a little bit tricky, with Note 937697 there is a Support Tool, which can help.
    Good luck with your installation
    Kind Regards
    Marc

  • ACE - need help implementing basic parameter map

    Hi,
    I'm trying to implement a connection parameter on an ACE module that sumply sets the TCP timeout to 0.
    I can get this to work fine if I permit all TCP traffic in the class-map, but it doesn't work if I use an ACL;
    >>Match all TCP;
    parameter-map type connection TCP-Timeout
    set timeout inactivity 0
    class-map match-all TCP-Timeout-Out-Class
    2 match port tcp any
    class-map match-all TCP-Timeout-in-Class
    2 match port tcp any
    policy-map multi-match TCP-Timeout-Out-Policy
    class TCP-Timeout-Out-Class
    connection advanced-options TCP-Timeout
    policy-map multi-match TCP-Timeout-in-Policy
    class TCP-Timeout-in-Class
    connection advanced-options TCP-Timeout
    Interface vlan 920
    service-policy input TCP-Timeout-in-Policy
    Interface vlan 923
    service-policy input TCP-Timeout-Out-Policy
    >>Match ACL;
    access-list TCP-Timeout-Group-Out line 10 extended permit ip 10.221.178.0 0.0.0.255 any
    access-list TCP-Timeout-Group-in line 10 extended permit ip any 10.221.178.0 0.0.0.255
    parameter-map type connection TCP-Timeout
    set timeout inactivity 0
    class-map match-all TCP-Timeout-Out-Class
    match access-list TCP-Timeout-Group-Out
    class-map match-all TCP-Timeout-in-Class
    match access-list TCP-Timeout-Group-in
    policy-map multi-match TCP-Timeout-Out-Policy
    class TCP-Timeout-Out-Class
    connection advanced-options TCP-Timeout
    policy-map multi-match TCP-Timeout-in-Policy
    class TCP-Timeout-in-Class
    connection advanced-options TCP-Timeout
    Interface vlan 320
    service-policy input TCP-Timeout-in-Policy
    Interface vlan 323
    service-policy input TCP-Timeout-Out-Policy
    Any ideas?
    Many Thanks

    Try changing the class-map from "type match-all" to "type match-any". Match all implies both statments need to be true. The match-any is probably what you want. Either of the ACL statements can be true.
    Also try to apply the policy globally instead of the interfaces, simplifying the config might help as well.
    e.g.:
    access-list TCP-Timeout-Group line 10 extended permit ip 10.221.178.0 0.0.0.255 any
    access-list TCP-Timeout-Group line 20 extended permit ip any 10.221.178.0 0.0.0.255
    class-map match-any TCP-Timeout-Class
    match access-list TCP-Timeout-Group
    parameter-map type connection TCP-Parameter-Map
    set timeout inactivity 0
    policy-map multi-match TCP-Timeout-Out-Policy
    class TCP-Timeout-Out-Class
    connection advanced-options TCP-Parameter-Map
    service policy input TCP-Timeout-Out-Policy <- apply it globally
    Hope it helps.
    Roble

  • Need Help Adding Flash Intro To Existing Site

    OK I'm helping a buddy of mine out and he's already got his sie built for him by someone else, the index file is .php. Now I've got this little Flash animation that we want to run first, then when it's done go to his website. When I try to add it to the top of the index page all that happens is the site loads like in normally did but with the Flash movie at the top instead of being another page. What do we need to do to have it load on it's own first?

    yes.  the index.html should embed your flash intro swf and at the end to your swf (and in a skip intro button code) you should open the current main page (using getURL or navigateToURL).

  • Need help in design login page in struts

    Friends. I am new to struts. I am designing one Login page which works fine. Now i want to add Remember Me option to login page. Help me to do this. Thanks in Advance.

    Try this,
    Action class
    if(event check blah blah) {
                             Cookie usernameCookie = new Cookie("Username", strUserId);
                             usernameCookie.setMaxAge(60 * 60 * 24 * 30);
                             response.addCookie(usernameCookie);
                             Cookie passwordCookie = new Cookie("Password", strPassword);
                             passwordCookie.setMaxAge(60 * 60 * 24 * 30);
                             response.addCookie(passwordCookie);
                             Cookie checkCookie = new Cookie("Check", strCheck);
                             checkCookie.setMaxAge(60 * 60 * 24 * 30);
                             response.addCookie(checkCookie);
                        }else {
                             Cookie usernameCookie = new Cookie("Username", "");
                             response.addCookie(usernameCookie);
                             Cookie passwordCookie = new Cookie("Password", "");
                             response.addCookie(passwordCookie);
                             Cookie checkCookie = new Cookie("Check", eventname);
                             response.addCookie(checkCookie);
                        }in jsp
    <bean:cookie id="uname" name="Username" value=""/>
    <bean:cookie id="pword" name="Password" value=""/>
         <html:text property="UserId" value="<%=uname.getValue() %>"/>
         <html:password property="Password" value="<%=pword.getValue() %>"/>
         <logic:equal value="on" cookie="Check">
              <input type="checkbox" name="CheckBox" checked="checked" >
         </logic:equal>
         <logic:notEqual value="on" cookie="Check">
              <input type="checkbox" name="CheckBox">
         </logic:notEqual>
    <html:submit property="" styleClass="button" ><bean:message key="button.login" /></html:submit>- vignesh

  • Need help, implementing streams between oracle 10g databases

    Hello all.
    Please help me, and give me instruction if any body implement streams between databases (Oracle 10g)
    I have implemented streams between schema table on (10g) and result was success.
    Firstly I want to know some thing, such as:
    1) Is it possible make streams with conditions, (make only DML or DDL i know) but make DML and not DELETE operation, just INSERT and UPDATE operations on the table?
    2) After changes was applied on target database, can I delete that records which copied (replicated) on source database?
    I have 2 databases and one of them is for archive purpose (I want use it as target database for streams). Other one is PROD database, applications make DML operation.
    I) record insert with null status
    II) processing (status 1)
    III) if success (status 2) unsuccess (status 3)
    For now, I have cron script on (Linux host) and in this script has PLSQL anonymous block and it works couple times during the day. This script works as archive.
    My task is: Make it via Oracle streams.
    Thank you beforehand.

    For conditions on the type of operation (Insert) check in the doc after apply handler and you can associate what ever code and conditions you want. You can also choose to work with a subset rules but there are some restriction as no lobs :
    [http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_rules.htm#insertedID7|http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_rules.htm#insertedID7]
    For a complete list of the restrictions :
    [http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/ap_restrictions.htm#i1012965|http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/ap_restrictions.htm#i1012965]

  • Need help implementing Radix sort to handle negative values

    Hi !
    I'm in desperate need for some help here...
    I've been struggling with this Radix sort algorithm for some time now. It sorts positive integers very well, and very fast, but it cant handle negative values. Is there anyone who can help me improve this algorithm to also sort negative integer values?
    I need it to be as fast or even faster then the current one, and it has to be able to sort values in an array from address x -> y.
    Here's what I have so far
    /** sorts an int array using RadixSort (can only handle positive values [0 , 2^31-1])
          * @param a an array to be sorted
          * @param b an array of the same size as a (a.length) to be used for temporary storage
          * @param start start position in a (included)
          * @param stop stop position in a (excluded)
         public void sort(int[] a, int[] b, int start, int stop){
              int[] b_orig = b;
              int rshift = 0, bits = 8;
              for (int mask = ~(-1 << bits); mask != 0; mask <<= bits, rshift += bits) {
                   int[] cntarray = null;
                   try{cntarray = new int[1 << bits];}catch(Exception e){System.out.println("Error");};
                   for (int p = start; p < stop; ++p) {
                        int key = (a[p] & mask) >> rshift;
                        ++cntarray[key];
                   for (int i = 1; i < cntarray.length; ++i)
                        cntarray[i] += cntarray[i-1];
                   for (int p = stop-1; p >= start; --p) {
                        int key = (a[p] & mask) >> rshift;
                        --cntarray[key];
                        b[cntarray[key]+start] = a[p];
                   int[] temp = b; b = a; a = temp;
              if (a == b_orig)
                   System.arraycopy(a, start, b, start, stop-start);
         }I think it can be solved by offsetting all positive values the with the number of negative values found in "a" during the last run through the main for loop (as the last (or first) 8 bits in an 32 bit integer contains the prefix bit (first bit in an 32 bit integer), 0 for positive value, 1 for negative).
    Thanks in advance !
    /Sygard.

    ah, beautiful !
    /** sorts an int array using RadixSort (can handle values [-2^31 , 2^31-1])
          * @param a an array to be sorted
          * @param b an array of the same size as a (a.length) to be used for temporary storage
          * @param start start position in a (included)
          * @param stop stop position in a (excluded)
         public void sort(int[] a, int[] b, int start, int stop){
              int[] b_orig = b;
              int rshift = 0;
              for (int mask = ~(-1 << bits); mask != 0; mask <<= bits, rshift += bits) {
                   int[] cntarray = null;
                   try{cntarray = new int[1 << bits];}catch(Exception e){System.out.println("Error");};
                   if(rshift == 24){
                        for (int p = start; p < stop; ++p) {
                             int key = ((a[p] & mask) >>> rshift) ^ 0x80;
                             ++cntarray[key];
                        for (int i = 1; i < cntarray.length; ++i)
                             cntarray[i] += cntarray[i-1];
                        for (int p = stop-1; p >= start; --p) {
                             int key = ((a[p] & mask) >>> rshift) ^ 0x80;
                             --cntarray[key];
                             b[cntarray[key]+start] = a[p];
                        int[] temp = b; b = a; a = temp;
                   else{
                        for (int p = start; p < stop; ++p) {
                             int key = (a[p] & mask) >>> rshift;
                             ++cntarray[key];
                        for (int i = 1; i < cntarray.length; ++i)
                             cntarray[i] += cntarray[i-1];
                        for (int p = stop-1; p >= start; --p) {
                             int key = (a[p] & mask) >>> rshift;
                             --cntarray[key];
                             b[cntarray[key]+start] = a[p];
                        int[] temp = b; b = a; a = temp;
              if (a == b_orig)
                   System.arraycopy(a, start, b, start, stop-start);
         }That's what I ended up with - and it works !
    Thanks a million !!

  • Need help implementing a Questionnaire page

    Hi,
    I have a requirement to build a web page which is like a Questionnaire page.
    There are multiple questions and each question can have multiple acceptable responses. The responses can be either an Input text/Check box/RadioGroup depending on the Question type.
    Each question can also have sub-questions depending on the responses. Each sub-question will also have its acceptable responses and further child questions. Currently we are supporting 5 level of parent-child questions hierarchy.
    We are also planning to support the re-arrangement of questions. Is it possible to achieve this functionality using standard ADF components ? I am trying to implement the same using a Tree table. I created a self reference view link to display all the questions in a hierarchal manner. But for displaying the responses I was not able to define the relationship in the tree table.
    The same thing I tried with forEach. Defined view links between Questions and responses VO. But I guess forEach does not support view links. So I was not able to get the responses corresponding to each question.
    [UI Mockup|http://apps-ux.us.oracle.com/fusion_prototypes/v2/prc/PRC_Qualification/shells/questionnaire.htm] for this page.
    Please suggest some approach to implement the above functionality.
    Thanks in Advance,
    Rakesh

    The Questionnaire page will look somewhat like the below questions.
    1.How long has your company been in business? //Parent question#1 : There are 3 radio group for selecting A/B/C.
    A.○ 0-2 years
    B.○ 3-5 years
    C.○ 5-10 years
    1.A.1 What is the founding month & year of your company? // For response A there are two sub-questions 1.A.1 & 1.A.2, 1.A.1 is of type I/p text & 1.A.2 shows 3 checkboxes.
    1.A.2 Who are some of your key investors?
    A.□ Advantage Capital Partners
    B.□ Goldman Sachs
    C.□ Others
    1.A.2.C Who are your key investor(s)? // For response C to qn 1.A.2 this is a sub-question of type i/p text.
    2. What is your annual revenue? // Parent question#2 which can also have sub-questions
    A.○ $5-$10 million
    B.○ $10-$15 million
    C.○ $15+ million
    Edited by: user775413 on Feb 14, 2011 9:42 AM
    Edited by: user775413 on Feb 14, 2011 9:52 AM

  • Need help in adding pictures in existing albums on my new ipad

    I have created several albums on my ipad.
    yesterday when I wanted to add more pictures using the edit button and add photos I was unable to choose the one I wanted to see.
    I only got the world copy instead?

    These links may be helpful.
    How To Create Photo Albums http://tinyurl.com/cxm4eoq
    How to Add New Albums in the Photos App on the iPad & Add Photos to the Album
    http://tinyurl.com/7qep7fs
     Cheers, Tom

  • Need help setting up a project using Struts

    Hello,
    I have been following tutorials on using struts and came to succeed in creating the first examples from the book I am mainly relying on. Although there is only one problem left which isn't addressed in the concerned book, which is the fact I have 3 jar files which remain locked when I try to undeploy the application. These files are commons-digester.jar, commons-validator.jar and struts.jar which are located in the WEB-INF/lib directory.
    I have been testing a few things in order to find the problem and it would seem to be with the ActionServlet since removing it from the web.xml configuration file made it possible to undeploy successfully.
    The application I am trying to do is a simple example based on the struts-blank.war file that comes with Struts 1.2.4 with a few modifications:
    -changed the entry for message-resources in struts-config.xml for
    <message-resources parameter="application" />
    -Moved the application.properties file to the WEB-INF/Classes folder instead of having it in WEB-INF/Classes/Java/resources
    Thanks in advance
    -Dalzhim

    Hi HC-Ralph and welcome to the Cisco Home Community!
    The WRVS4400N is now being handled by the Cisco Small Business Support Community.
    For discussions about this product, please go here.
    OnnagokorO

Maybe you are looking for

  • ITunes downloading causing some weird kind of kernel panic?

    Hi, I purchased some content from the iTunes store tonight (no bigger than 1.5Gb max) and during the download process iTunes has hung or partially hung the entire system over half a dozen times. Any suggestions on how to clean the system up so it sto

  • Big box!!

    I cant accept the ipod software licence agreement because the box that comes up in the itunes doesn't let me make it bigger. I have the words "I have read and agree to the ipod software license agree " but cant scroll write to press accept. I tried t

  • Who's using your wi-fi connection?

    Is there a program or anyway to show who's using a wireless network at a given time? Like a feature that shows a list of computers that are on the wireless network? thx

  • OSD: install software DURING task sequence based upon collection membership

    Hi, I'd like to refer to my previous post as a starting point. Below again the background of my question. But please advise on a powershell script that runs at the end of a task sequence that: *enumerates the pc's collection memberships and based upo

  • Ability to bring in Lightroom files directly?

    Hello, I use Lightroom and don't always need to bring them into Photoshop for additional editing beyond what has already been done in Lightroom and I would like to bring them into Indesign without converting to Photoshop first.  It would be nice to b