Struts: saveToken, restToken, isTokenValid, and isCancelled

Dear Struts users,
Although there are so many examples in internet, I could not really understand when and how to use "saveToken, restToken, isTokenValid, and isCancelled" in a Struts DispatchAction class.
I would appreciate any explaination in order to clear mind.
Cheers,
Pengyou

Hia penguy here is the solution to ur questions
Handle Duplicate Form Submission
�� The problem of duplicate form submission
arises when a user clicks the Submit button
more than once before the response is sent
back or when a client accesses a view by
returning to a previously bookmarked page.
�� Handle it by using the saveToken() and
isTokenValid() methods of Action class
�C saveToken() method creates a token (a unique
string)
and saves that in the user's current session
�C isTokenValid() checks if the token stored in the
user's
current session is the same as that was passed as
the request parameter.
i think u get me.. if any doubt still u have in mind
pls let meknow
regards
shanuThank both of you for prompt answers.
Now I can use your answer to describe my real questions.
Assume the user clicks on the submit button. Then an action will be sent to the action class or dispatchAction class ...
Question 1: In the case of dispatchAction, should "saveToken" and "isTokenValid" used in the same method or in different method or there is no restriction? I believe they should be in the same sequence (until the final result will displayed to user).
Question 2: What will happen if the user clicks twice the submit button.
An error message as programmed? If yes, what can i do if I would just ignore the second submit.
Question 3: In which case should I use "resetToken"?
Question 4: If there is also a cancel button, should I use "isCancelled"?
I appreciate more explaination.
Cheers.
PY

Similar Messages

  • Struts 1.1-b2 and OC4J R2

    Has anyone successfully deployed an struts 1.1-b2 application to a Release 2 app server? I have it working locally in JDeveloper but get the "message resource not found" error once I deploy to the container. The struts.jar is in the web-inf/lib, the properties files are in the web-inf/classes directory after deployment.
    Ruth

    I got the app up and running, but some info on the struts mailing list suggest you need to make configuration changes to certain files on the server, such as adding the struts jars as library entries in the orion-application.xml file in the application deployments folder. Have you had to make configuration changes after deployment to get it to run smoothly or are these workarounds for previous versions of struts and OC4J?
    Ruth
    Yes, we are able to do that. Since you have it loaded into JDeveloper, make your Struts source code available and step through it, so you can find out where the process isn't working the way you expect.

  • 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.

  • Using Struts with JDeveloper, BC4J and OC4J 9.0.2

    Is it feasible to use Struts with JDeveloper 9.0.2, BC4J 9.0.2 and OC4J 9.0.2? We have an application that uses the BC4J JBO tags in version 9.0.2. We wish to use Struts and we want to retain the use of the JBO tags. Is there a way to do this without upgrading to 9.0.3?

    Here are two related questions:
    Can we upgrade to oracle9iAS 9.0.3 yet still use JDeveloper 9.0.2 and BC4J/JBO 9.0.2?
    Can we upgrade to JDeveloper 9.0.3 and BC4J/JBO 9.0.3 yet still deploy to oracle9iAS 9.0.2?

  • How struts invoking form getters and setters of a property

    hi,
    can anyone explain me how struts framework was calling the form properties getters and setters
    i have an idea like preparing a string such that
    if propert of text box is propertName, preparring a string with get and set making first letter capital
    setPropertyName
    getPropertyName
    and invoking that method in form property
    but i dont think this is the exact way struts follow , there could be a prcise and direct way to invoke propert methods
    i have another idea
    getting the declared method of the form class and search for the string propertyname in the methods name, and sure this is also not perfect way
    with regards
    satya

    can anyone tell where i can find libraries for access/manipulate beans.
    and sample example to invoke getters and setter of the property but not like preparing String "setPropertyName" or "getPropertyName" and invoking the method i beleive there should be standard way
    and also setPropertyName may take different type parameters i cannot keep number of if conditions to check for different datatypes
    with regards
    satya

  • Struts 1.2.9 and YUI

    hi,
    Is it possible to use YUI with struts 1.2.9?
    if so where can i get some details about plugin and some example codes/docs. thanks

    [double post|http://forum.java.sun.com/thread.jspa?threadID=5278202&tstart=0]

  • ProgressProperty and isCancelled causing a bound value that cannot be set.

    I noticed that cancelling the following application causes errors since a bound value cannot be set. I tried to add some conditions to prevent this error from happening but to no avail.
    The following is the main culprit:
    pb.progressProperty().bind(serv.progressProperty());You can also notice that I tried to use progressProperty and ChangeListener instead of bind method. Unfortunately unsuccessfully. Can I make progressbar functioning without bind method (code above)?
    Complete error message when cancel button is pressed is the following:
    Service status: SCHEDULED
    Let the download begin!
    Service status: CANCELLED
    Service status cancelled when progress was: 0.09582292038557658
    java.lang.RuntimeException: A bound value cannot be set.
         at javafx.beans.property.DoublePropertyBase.set(Unknown Source)
         at javafx.scene.control.ProgressIndicator.setProgress(Unknown Source)
         at dm.Thr$2.handle(Thr.java:73)
         at dm.Thr$2.handle(Thr.java:1)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
         at javafx.event.Event.fireEvent(Unknown Source)
    Cancelling!
    Finished/cancelled!
         at javafx.scene.Node.fireEvent(Unknown Source)
         at javafx.scene.control.Button.fire(Unknown Source)
         at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
         at com.sun.javafx.scene.control.skin.SkinBase$5.handle(Unknown Source)
         at com.sun.javafx.scene.control.skin.SkinBase$5.handle(Unknown Source)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
         at javafx.event.Event.fireEvent(Unknown Source)
         at javafx.scene.Scene$MouseHandler.process(Unknown Source)
         at javafx.scene.Scene$MouseHandler.process(Unknown Source)
         at javafx.scene.Scene$MouseHandler.access$1300(Unknown Source)
         at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
         at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
         at com.sun.glass.ui.View.notifyMouse(Unknown Source)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
         at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)Application:
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javafx.application.Application;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ProgressBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class Thr extends Application {
         @Override
         public void start(Stage stage) throws Exception {
              final Group rootGroup = new Group();
               final Scene scene = new Scene(rootGroup, 500, 400, Color.GHOSTWHITE);
               stage.setScene(scene);
               stage.setTitle("Testing downloads from Spring");
               stage.show();
               setS(rootGroup);
         final VBox vbox = new VBox();
         final javafx.scene.control.Button btn = new javafx.scene.control.Button("START!");
         final TextArea tf = new TextArea();
         final javafx.scene.control.Button btnC = new javafx.scene.control.Button("CANCEL!");
         final ProgressBar pb = new ProgressBar();
         final FirstLineService serv = new FirstLineService();
         boolean cancelled = false;
         private void setS(Group rg) {
              tf.setPrefRowCount(5);
              vbox.getChildren().add(btn);
              vbox.getChildren().add(tf);
              vbox.getChildren().add(btnC);
              vbox.getChildren().add(pb);
              pb.setPrefWidth(450);
              rg.getChildren().add(vbox);
              btn.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.start();
                        System.out.println("Service status: "+serv.getState());
                        tf.setText("STARTED!");
              btnC.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.cancel();
                        System.out.println("Service status: "+serv.getState());
                        System.out.println("Service status cancelled when progress was: "+serv.getProgress());
                        tf.appendText("\nCANCELLED!");
                        pb.setProgress(serv.getProgress());
              //pb.setProgress(0);
              if (cancelled!=true) {
                   pb.progressProperty().bind(serv.progressProperty());
              } else {
                   pb.progressProperty().unbind();
              /*pb.progressProperty().addListener(new ChangeListener<Task>() {
                   @Override
                   public void changed(ObservableValue<? extends Task> arg0,
                             Task arg1, Task arg2) {
                        // TODO Auto-generated method stub
                        pb.setProgress(serv.getProgress());
         private class FirstLineService extends Service {
            protected Task createTask() {
                return new Task<Void>() {
                    protected Void call() {
                         URL url;
                             try {
                                  url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                               InputStream in = url.openStream();
                               int fileSize = url.openConnection().getContentLength()/1024;
                               File f = new File("spring.zip");
                               BufferedInputStream bin = new BufferedInputStream(in, 1024);
                               FileOutputStream fos = new FileOutputStream(f);
                               BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
                               int n=0;
                               int k=0;
                               System.out.println("Let the download begin!");
                               while(n !=-1){
                                    if (isCancelled()) {
                                         cancelled = true;
                                            n=-1;
                                            System.out.println("Cancelling!");
                                       } else {
                                       k=k+1;
                                    n=bin.read();
                                    bos.write(n);
                                    updateProgress(k/1024,fileSize);
                                    //pb.progressProperty().bind(this.progressProperty());
                                    //pb.setProgress(getProgress());
                               bos.close();
                               System.out.println("Finished/cancelled!");
                             } catch (MalformedURLException e) {
                                  e.printStackTrace();
                             } catch (FileNotFoundException e) {
                                  e.printStackTrace();
                             } catch (IOException e) {
                                  e.printStackTrace();
                          return null;
         public static void main(final String[] arguments)
              Application.launch(arguments);
    }

    The following is the main culprit:
    pb.progressProperty().bind(serv.progressProperty());I think your problem is the following line:
       pb.setProgress(serv.getProgress())  //bound value cannot be setAdd a listener to a serv. progressProperty()
      serv.progressProperty().addListener(new ChangeListener() {
                       @Override
                       public void changed(ObservableValue o, Object oldVal,
                               Object newVal) {
                          pb.progressProperty().setValue(serv.getProgress());
                   });Here is the modified code:
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javafx.beans.value.*;
    import javafx.application.Application;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ProgressBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class Thr extends Application {
         @Override
         public void start(Stage stage) throws Exception {
              final Group rootGroup = new Group();
               final Scene scene = new Scene(rootGroup, 500, 400, Color.GHOSTWHITE);
               stage.setScene(scene);
               stage.setTitle("Testing downloads from Spring");
               stage.show();
               setS(rootGroup);
         final VBox vbox = new VBox();
         final javafx.scene.control.Button btn = new javafx.scene.control.Button("START!");
         final TextArea tf = new TextArea();
         final javafx.scene.control.Button btnC = new javafx.scene.control.Button("CANCEL!");
         final ProgressBar pb = new ProgressBar();
         final FirstLineService serv = new FirstLineService();
         boolean cancelled = false;
         private void setS(Group rg) {
              tf.setPrefRowCount(5);
              vbox.getChildren().add(btn);
              vbox.getChildren().add(tf);
              vbox.getChildren().add(btnC);
              vbox.getChildren().add(pb);
              pb.setPrefWidth(450);
              rg.getChildren().add(vbox);
              btn.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.start();
                        System.out.println("Service status: "+serv.getState());
                        tf.setText("STARTED!");
                     serv.progressProperty().addListener(new ChangeListener() {
                       @Override
                       public void changed(ObservableValue o, Object oldVal,
                               Object newVal) {
                          pb.progressProperty().setValue(serv.getProgress());
              btnC.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.cancel();
                        System.out.println("Service status: "+serv.getState());
                        System.out.println("Service status cancelled when progress was: "+serv.getProgress());
                        tf.appendText("\nCANCELLED!");
                        //pb.setProgress(serv.getProgress());n
              //pb.setProgress(0);
         //     if (cancelled!=true) {
    //               pb.progressProperty().bind(serv.progressProperty());//
    //          } else {
    //               pb.progressProperty().unbind();
              pb.progressProperty().addListener(new ChangeListener<Task>() {
                   @Override
                   public void changed(ObservableValue<? extends Task> arg0,
                             Task arg1, Task arg2) {
                        // TODO Auto-generated method stub
                        pb.setProgress(serv.getProgress());
         private class FirstLineService extends Service {
            protected Task createTask() {
                return new Task<Void>() {
                    protected Void call() {
                         URL url;
                             try {
                                  url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                               InputStream in = url.openStream();
                               int fileSize = url.openConnection().getContentLength()/1024;
                               File f = new File("spring.zip");
                               BufferedInputStream bin = new BufferedInputStream(in, 1024);
                               FileOutputStream fos = new FileOutputStream(f);
                               BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
                               int n=0;
                               int k=0;
                               System.out.println("Let the download begin!");
                               while(n !=-1){
                                    if (isCancelled()) {
                                         cancelled = true;
                                            n=-1;
                                            System.out.println("Cancelling!");
                                       } else {
                                       k=k+1;
                                    n=bin.read();
                                    bos.write(n);
                                    updateProgress(k/1024,fileSize);
                                    //pb.progressProperty().bind(this.progressProperty());
                                    //pb.setProgress(getProgress());
                               bos.close();
                               System.out.println("Finished/cancelled!");
                             } catch (MalformedURLException e) {
                                  e.printStackTrace();
                             } catch (FileNotFoundException e) {
                                  e.printStackTrace();
                             } catch (IOException e) {
                                  e.printStackTrace();
                          return null;
         public static void main(final String[] arguments)
              Application.launch(arguments);
    }

  • Unable to use Struts taglib in JSF and Struts-tiles app

    With the taglib correctly defined as follows,
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    I'm trying to use <link rel="stylesheet" href="<html:rewrite page='/WEB-INF/csslib/layout.css'/>" type="text/css"/> to pull in my stylesheet. But I get an error saying:
    Apr 24, 2007 10:58:31 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: ServletException in '/pages/layout.jsp': null
         at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)
         at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
         at org.apache.jsp.pages.runTest_jsp._jspx_meth_tiles_insert_0(runTest_jsp.java:78)
         at org.apache.jsp.pages.runTest_jsp._jspService(runTest_jsp.java:54)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)
         at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
         at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
         at org.apache.jsp.index_jsp._jspService(index_jsp.java:49)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)
    If I take out the <html:rewrite> reference, it works like a charm.
    What is the problem here?

    Hi,
    Pls try application-config tag like this
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb">
        </property>
        <property name="SharingReference" value="com.sap.portal.runtime.application.soap">
        </property>
      </application-config>
    Also check component tag is in this order
    <component name="AddAccounts">
          <component-config>
            <property name="ClassName" value="Test">
            </property>
            <property name="JSP" value="pagelet/test.jsp">
            </property>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld">
            </property>
          </component-profile>
        </component>
    regards,
    Sujesh

  • Struts 1.3.5 and Jdeveloper

    It is possible to use struts 1.3.5 with jdeveloper? In this case what I have to do in order to use this framewor?
    Thanks
    Giorgio

    Re: Change Struts DTDs to 1.3 version

  • Struts 1.2.4 and jstl 1.0

    Hi all,
    i want to develop a web application on weblogic 6.1 which is a jsp 1.2/servlet 2.3 webcontainer. That means i cannot use JSTL 1.1, i should use version 1.0 instead.
    So my questions are,
    Is struts 1.2.4 fully compatible with JSTL 1.0 ?
    Has anyone tried to use struts 1.2.4 with weblogic 6.1 ?
    Is it better to use Struts 1.1 instead of struts 1.2.4 ? ( I am facing bugs using dyna validators)

    Is struts 1.2.4 fully compatible with JSTL 1.0 ?Yes, I have not encountered any issues.
    Has anyone tried to use struts 1.2.4 with weblogic 6.1 ?No, sorry.
    Is it better to use Struts 1.1 instead of struts 1.2.4 ? 1.2.4 is the latest stable release, I would probably go with that. Did you check for bug reports of your dynavalidator issue? They have been resolved.

  • Struts current page action and parent action

    what is the difference if the action for current page and parent page action is the same or not same? when I should use the same action and when I need to use different actions?
    thanks

    For this approach you can use PhaseListener for RESTORE_VIEW phase and in the afterPhase method chech the viewId and navigate to the relevant page.

  • Struts and JSF Integration in OPDk-java based portlet

    Hi,
    thanks in advance for your help.
    I'm developing a PDK java based portlet. For some reasons I cannot use the JSF bridge but I would like to integrate Struts and Jsf in my portlet, using Struts to manage actions and navigation and JSF (with ADF Faces components) for the view. I'm using the Strus-Faces library.
    When I try to submit my portlet form, I receive the error "request URL not found on this server". I'm posting some exstracts of my code.
    It's made of three pages: the main one "Integration1ShowPage", "error" and "result". The MainAction.java displays my mainPage, where there's a form. To keep it easy, when the user submits this form, the ActionName returns "success" and the "result" page should be displayed.
    The MainAction works properly: the portlet is displayed but when I tried to submit the form I receive
    The requested URL /provaDeploy/htdocs/integration1/integration1ShowPage.do was not found on this server.Could you please suggest me something?
    Many many thanks,
    B.
    <struts-config>
    <action-mappings>
      <action path = "/mainAction" type = "strutsjsfintegration1.MainAction">
        <forward name = "success" path = "/faces/htdocs/integration1/integration1ShowPage.faces"/>
      </action>
      <action path = "/nameAction" name = "nameForm"
      input = "/faces/htdocs/integration1/integration1ShowPage.faces" scope = "request"
      type = "strutsjsfintegration1.NameAction">
        <forward name = "success" path = "/faces/htdocs/integration1/result.faces"/>
        <forward name = "failure" path = "/faces/htdocs/integration1/error.faces"/>
        <forward name = "again" path = "faces/htdocs/integration1/integration1ShowPage.faces"/>
      </action>
    </action-mappings>
    <controller>
      <set-property property = "processorClass"
       value="org.apache.struts.faces.application.FacesRequestProcessor"/>
       </controller>
    <message-resources parameter="definitiveStrutsPortlet.ApplicationResources"/>
    </struts-config>

    Hi,
    have a look at this whitepaper for how to use JavaScript in ADF.
    http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
    This link here (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html --> see sample 71) shows an integration sample between a Java Applet and ADF. Its a similar use case to yours
    Frank

  • Making a delete commit automatically with ADF BC, Struts and ADF UIX

    I'm trying to create a delete action that commits to the database automatically using ADF Business Components, Struts and ADF UIX.
    I have a browse page from which the user can view all records in the table, and perform edit, create and delete actions on the data.
    When the user selects a record and clicks edit they are taken to a screen where they can amend the details of that record. Create works in a similar way, but the create action on the view object is invoked before taking the user to the edit page (this is done by linking the browse page to an ADF DataAction (bound to Create) on the Struts page flow diagram, and then linking the ADF DataAction to the edit page).
    When the user clicks submit on the edit page, the container follows a forward from the edit page to an ADF DataAction bound to the Commit method, and then from there a forward back to the browse page.
    This seems to work fine for edit and create, but when I try to do something similar for delete, it behaves unpredictably - sometimes the delete is committed to the database, sometimes not.
    To be more specific, the way I have tried to implement the auto commit delete is as follows:
    There is a UIX submitButton on the browse page called Delete. When clicked, this button triggers an event, which is caught by an event handler inside the page. The event handler causes the UIX servlet to take a forward to an ADF DataAction bound to the Delete method on the relevant view object. It thens follows a forward from the previously mentioned DataAction to another ADF DataAction bound to the Commit method for the application module. There is then a forward leading back to the browse page.
    Has anyone else encountered similar problems?

    did you figure this out?

  • Bug:  Multiple Struts modules and DataPages

    There is a bug with multiple struts config files, and the "DataAction" Struts/UIX component. for example:
    New DataAction, UIX file is at ...app.../portal/Login.uix.
    The DataAction shows "/Login.uix".
    In that form, I get an awful "404" error that has NO description at all.
    If I go into the struts-portal-config.xml, and change the DataAction to have the link of: "/portal/Login.uix", the page works, but the struts-config editor shows and error.

    Is there a bug number registered for this issue? Are there any reasonable workarounds?
    Mihkel Nõges

  • JSR 168 and Struts support sample error

    I'm trying to get the sample webapp for JSR 168 and Struts support working with
    WebLogic 8.1, and I'm having problems with the struts portlet. The other portlets
    seem to work fine, but the Struts portlet gives the following error after clicking
    "Save" on most of the forms:
    Page Flow Error - Action Not Found
    Page Flow: Global.app
    Action: html-setters.do
    Unable to find action html-setters.do.
    That error appears in the browser. At the same time, the following exception
    appears in the server window:
    <Aug 18, 2003 4:34:12 PM EDT> <Error> <netui> <BEA-420012> <There was an error
    while running a lifecycle stage :: Lifecycle: UIControl.render :: for the control
    :: null ::.
    com.bea.netuix.nf.UIControlException: For portlet [strutsPortlet], could not do
    page flow lookup for the given action [html-setters.do] in the given PageFlow:
    [struts/exercise-taglib].
    This exception is followed by hundreds of lines of the following:
    at com.bea.wlw.netui.pageflow.scoping.ScopedServletUtils.strutsLookup(ScopedServletUtils.java:363)
    as well as several stack overflow errors.
    I believe I have installed the JSR168 and Struts support package according to
    the instructions, and have copied the required jars into the samples WEB-INF/lib
    directory. I also have tried to write my own Struts application in a portlet,
    and it gets the exact same errors when I try to submit a form to my actions.
    Any insight would be much appreciated!
    Thanks,
    Patrick

    Hi Brodi,
    I am having the same problem as Patrick. The problem is not in the struts portlet,
    but in the forms the portlet navigates to. After the struts portlet loads, I
    am able to use the html:links and navigate through the pages. Though when I try
    to submit a form I get the action not found error. For example the html-select
    page has a form. This page loads fine, but when I hit the save button I get the
    following error.
    <Aug 25, 2003 11:00:00 AM EDT> <Error> <netui> <BEA-420012> <There was an error
    while running a lifecycle stage :: Lifecycle: UIControl.render :: for the contro
    l :: null ::.
    com.bea.netuix.nf.UIControlException: For portlet [strutsPortlet], could not do
    page flow lookup for the given action [html-select.do] in the given PageFlow:
    struts/exercise-taglib].
    The application appears to loose the struts context. It tries to find the localhost:7001/samples/html-select.do
    action instead of localhost:7001/samples/struts/exercise-taglib/html-select.do
    action. How do I keep the application from loosing context?
    Thank you,
    Karen
    "Brodi Beartusk" <[email protected]> wrote:
    >
    Patrick-
    I've seen similar things happen when the module name is either not specified
    correctly
    in the StrutsContent element in the portlet, or when the module is misconfigured,
    usually because of either a mising config file or a mis-named config
    file.
    Ensure that you have a the struts config file for the exercise-taglib
    module in
    WEB-INF, named jpf-struts-config-struts-exercise-taglib.xml.
    -Brodi Beartusk
    "Patrick Callis" <[email protected]> wrote:
    I'm trying to get the sample webapp for JSR 168 and Struts support working
    with
    WebLogic 8.1, and I'm having problems with the struts portlet. Theother
    portlets
    seem to work fine, but the Struts portlet gives the following errorafter
    clicking
    "Save" on most of the forms:
    Page Flow Error - Action Not Found
    Page Flow: Global.app
    Action: html-setters.do
    Unable to find action html-setters.do.
    That error appears in the browser. At the same time, the followingexception
    appears in the server window:
    <Aug 18, 2003 4:34:12 PM EDT> <Error> <netui> <BEA-420012> <There was
    an error
    while running a lifecycle stage :: Lifecycle: UIControl.render :: for
    the control
    :: null ::.
    com.bea.netuix.nf.UIControlException: For portlet [strutsPortlet], could
    not do
    page flow lookup for the given action [html-setters.do] in the given
    PageFlow:
    [struts/exercise-taglib].
    This exception is followed by hundreds of lines of the following:
    at com.bea.wlw.netui.pageflow.scoping.ScopedServletUtils.strutsLookup(ScopedServletUtils.java:363)
    as well as several stack overflow errors.
    I believe I have installed the JSR168 and Struts support package according
    to
    the instructions, and have copied the required jars into the samples
    WEB-INF/lib
    directory. I also have tried to write my own Struts application ina
    portlet,
    and it gets the exact same errors when I try to submit a form to myactions.
    Any insight would be much appreciated!
    Thanks,
    Patrick

Maybe you are looking for

  • How do I make a bootable clone (with Lion already installed on my Mac)?

    Hi all, I'm hoping someone can help clarify with a step-by-step on this.  Here's the deal: I have a 2008 MacBook Pro, which I updated from Snow Leopard to Lion via the App Store.  I have decided to upgrade my internal hard drive (which I've done befo

  • Move all newly take pics to iCloud?

    I am interested in learning how to make iOS automatically move (not copy) all my pictures to a cloud service to free up space on my phone. So when i take a picture the iOS 8 will move my picture directly to the cloud either on the 3G/4G net or when i

  • Capacity Leveling(CM25 Transaction)

    Xperts, could you please give us some documentation/online material on Capacity Leveling(CM25 Transaction)? Rewards for your inputs.

  • Why has my iphone 4g been crashing in apps and camera wont open?

    I will be playing in an app and it will randomly crash and the camera once open it shows the shutters closed and i can leave it open for as long as it takes for my phone to relock and it still wont open. I need to know whats wrong. thanks all.

  • Global parameter value change in biacm

    Hi friends, When i tried to change the global currency code 2 from 'EUR' to 'USD', im not able to edit the value 'EUR' value in the configuration manager. When i try to edit the currency code 2 it is not returning any parameter currency value in the