Setting different action urls to different buttons

Hello everyone
I have 2 buttons on my jsp page, 'submit' and 'reset'. I need to link each button to different urls when user clicks on it. For example, when user clicks on submit button, it should go to confirmation.jsp and when the user clicks on reset button, it should go to registration.jsp. I dont want to use javascript or any other programming language but rely only on jsp and html. Is there a way to do it? Thanks. I need to solve this for an assignment. Much appreciated.
Bawa

hope you use struts, put these action mapping in the struts-config file.
Call submitaction.do in 'submit' button click.
and call resetAction in 'reset' button click. You action class will forward the page.
       <action path="/submitAction"
            type="com.admin.manage.action.SubmitAction"
            name="manageForm"
            scope="request">
     <forward name="success" path="/jsp/confirmation.jsp" />     
       </action>                                       
       <action path="/resetAction"
            type="com.admin.manage.action.ResetAction"
            name="manageForm"
            scope="request">
     <forward name="error" path="/jsp/registration.jsp" />          
       </action>  If you don't use struts, call corressponding jsp's in each button click directly.

Similar Messages

  • Problem setting an action command

    If I create a JButton with an icon and no text, how do I set an action command for that button?

    well i created the button and added the action
    listener inside the constructor
    JButton bOne = new JButton();
              bOne.setIcon(back);
              bOne.setActionCommand("one");
              bOne.addActionListener(this);
              add(bOne);
    then inside the actionPerformed method I have:
    String actionCommand = e.getActionCommand();
    if(actionCommand.equals("one")){
                   bOne.setIcon("c1.gif");
    and it's giving me the compiler error:
    cannot find symbol
    symbol : variable bOne
    location: class Concentration
                   bOne.setIcon("c1.gif");bOne isn't in scope. It looks to me like it's local
    to some other methodI declared it inside the constructor

  • How to set different default interactive reports for different user groups?

    I'm probably overlooking an obvious solution, but how do I set different default interactive report for different user groups?
    For the same interactive report, I want one set of users to see a default where the default filter is based on column X. However, another group of users doesn't have authorization to see that column so I need to set the default filter to something else for them.
    Thanks

    You can set a filter on a report in a URL - would that help? I think with apex 4.x you can also link to a saved default report or alternative report...

  • Set different authentication mode for OWA (without 2 ip address)

    hi
    http://social.technet.microsoft.com/Forums/office/en-US/fda18a29-a484-4ed5-903b-aa06e8f7a032/set-different-authentication-mode-for-owa?forum=exchangesvrclients
    Step 1: IP Address
    Obtain a second IP address and add it to the NIC of your server.
    Step 2: DNS
    Add a DNS entry for That secondary IP address for the name we will want to use in the new FBA OWA Web site. I have chosen "testwebmail." Be sure there is a valid SSL certificate (recommended to have UC or SAN SSL certs) on the server Which has the
    new name "testwebmail" that will be used in the certificate.
    Step 3: New Web Site
    Create a new web site in IIS on the Client Access Server and bind it to the new IP address used in step 1.
    Step 4: Adding Exchange Virtual Directories
    The web site has been created and bound to the secondary IP address of our server. Also the DNS record That will be used to access the OWA FBA new page was added to DNS. The next step is to go into EMS and begin adding our virtual directories for OWA and ECP.
    Login to the Exchange server and open the Exchange Management Shell. Then run Get-Get-OWAVirtualDirectory and ECPVirtualDirectory to see the default OWA and ECP directories.
    New-OWAVirtualDirectory -WebSiteName FBA -InternalUrl https://url/owa
    New-ECPVirtualDirectory -WebSiteName FBA -InternalUrl https://url/ecp
    Step 5: Configure the Virtual Directories
    To configure the virtual directories we will disable FBA on the Default Web Site OWA and ECP virtual directories
    New-OWAVirtualDirectory -WebSiteName "FBA"
    Enable the Basic authentication via running the following command:
    Set-OWAVirtualDirectory -Identity "yourservername\owa (FBA)" -BasicAuthentication $true
    Set-OWAVirtualDirectory -Identity "OWA (Default Web Site)" -WindowsAuthentication $true -BasicAuthentication $false  -FormsBasedAuthentication $true
    Step 6: iisreset
    I want to set this settings; but I don't have 2 ip address and I want to set whit one ip address.
    can please tell me how can set this settings with one ip address?
    and please tell me about publishing whit tmg.
    thanks

    Hi,
    Based on my research on Host Header, it seems using Host Header can achive your goal.
    More details on Host Headers:
    1. Host headers let you assign more than one site to a
    single IP address on a Web server.
    2. To host more than one Web site on a Web server, you can assign a unique IP address to each Web site, designate a non-standard TCP port number for a Web site,
    or use host headers. Of the three methods, it is more common to use host headers than to assign unique IP addresses to Web sites or to use non-standard TCP port numbers.
    Configure a Host Header for a Web Site (IIS 7)
    http://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx
    Please correct me if there is anything misunderstand.
    However, Microsoft recommends creating the second OWA/ECP virtual directories in a new IIS web site with a different IP address, and using it for internal client access.
    Thanks
    Mavis Huang
    TechNet Community Support

  • Clicking a button set to open url is skipping pause in slide

    Hey there! I must be missing something that's right under my nose... I have two transparent buttons over images on a slide who's actions are set to Open URL or file with infinite attempts. I also am using back and next arrows with click boxes to continue and go back. The click box over the next arrow is set to pause the project until it is clicked. What is happening, though, is that when I play the project, clicking the buttons not only open the URL in a new window, as set, they also cause the project to continue to the next slide.
    What am I doing wrong? Am I going about this the wrong way?
    Thanks for your help!

    Hi there
    Look at the properties where you direct the link to a new window. There is an option there that governs whether a pause is released or not.
    Cheers... Rick

  • IPhone 4: Setting different ringtones for contacts not working.

    I can't add personal ringtones for each contact. I have followed all contact editing info to the letter, yet I still only get the same one ringtone for each contact (the default ringtone I set for the phone). Setting different ringtones for text messages works fine, but not for telephone contacts. Is this feature broken? Is anyone else having this issue? Thanks.

    It happened to me also when I first added specific ringtones to contacts, but just turning the phone off/on fixed it for me. You can try a reset also if that doesn't work (hold down the home and sleep/wake buttons at the same time until the Apple logo comes up)

  • Can you set different sounds for different incoming email accounts?

    Can you set different sounds for different incoming email accounts? Example, I have multiple email accounts on Mail. I would like the sound for my roadrunner account to be different from my .mac and personal website accounts. Is it possible to configure this or is there a script out there that someone knows about.
    Thanks

    You could choose None in Preferences > General > New Mail Sound and set up a rule for each account in Preferences > Rules as follows:
    If [any/all] of the following conditions are met:
    [Account] [AccountName]
    Perform the following actions:
    [Play Sound] [Sound]
    Problem is, that would cause the sound to be played for junk mail as well — probably not what you want.

  • Setting different pages widths in different sections - Pages 5.2

    In Pages 5.2, how does one set different page widths (margins) in different sections?

    You can't. Margins apply to the entire document.
    What you can do is set the margins to their max width and then use left and right indents for the sections you want narrower.
    Peter

  • Problem setting a hidden item value when button clicked with dynamic action or pl/sql process

    Apex 4.1
    Oracle 11g
    I have a page that consists of a main region and several sub regions.  I have a pl/sql process in After Header SET_DISPLAY(:P400_DISPLAY :='MAIN';)
    Three subregions have a contional display where P400_DISPLAY = STORE.  This works in hiding the sub regions.
    Now I want to change the P400_DISPLAY value to STORE to show the subregions when I hit a button.
    I tried creating a dynamic action for on click of the add button but get the following error:
    The selected button uses a 'Button Template' that does not contain the #BUTTON_ID# substitution string
    I went to the templates and found:
    Substitution Strings
    Substitution strings are used within sub templates to reference component values. This report details substitution string usage for this template.
    Substitution String
    Referenced
    From
    Description
    #LINK#
    Yes
    Template
    To be used in an "href" attribute
    #JAVASCRIPT#
    No
    To be used in an "onclick" attribute
    #LABEL#
    Yes
    Template
    Button Label
    #BUTTON_ATTRIBUTES#
    No
    Button Attributes
    #BUTTON_ID#
    No
    Generated button ID will be either the button's Static ID if defined, or if not will be an internally generated ID in the format 'B' || [Internal Button ID]
    I then tried creating a page process, pl/sql, :P400_DISPLAY :='STORE'; when the appropriate button is pressed.  The button action is submit page. However, it does not change the P400_DISPLAY value and the subregions stay hidden.
    Suggestions please on how to fix the template or change the P400_DISPLAY value?

    The root issue is that, although you change the value of your page item, it isn't visible to other areas of the page until it is in the session. So, any other action based on the value of your page item; the visibility of a control, a report based on the item's value, etc. will all be unaffected by changing the value of the page item until it has been changed in the session. Even after this the items are stored in the session, you must thereafter do something to cause the value to be reevaluated. To see the effect of this, observe that your page loads and evaluates the value of your page item, it sees that is "MAIN" and hides the regions. However, it doesn't reevaluate them after this.
    So; your choices to get this value set in the session are to either Submit the page, or use JavaScript to set the value in the session. If you use the latter of these, you'll have to do some further work to cause the visibility tests to be re-run, So, let's stick with with the submit method.
    What you've done above sounds correct for this but, there are a lot of decisions you could have made that might have caused things not to happen in the correct sequence.
    Firstly, let's confirm that what I describe above is your problem. From the development environment, load the page, click the button to change the value and submit. Now, click the link labelled Session. Is it still set to MAIN? If so; this is your issue.
    Let's start with the your After Header computation. Did you set it to *only* run if the current value of your page item is NULL??? If not, that's your problem.
    Load Page -> Item set to 'Main' by Computation -> Click Button -> Item set to STORE -> Submit -> Load Page -> Item set to 'Main' by Computation
    See the problem?
    Assuming this isn't the issue, you created a Branch to the same page, right? What is your process point for the Branch? Is it *After* Validation, Computation etc? Because if not, you aren't changing the value before the submit happens.
    I bet it is the first issue but, take a look at these.
    Cheers,
    -Joe

  • Status of SC set differently in System after Rejection!

    Hi all,
    We are working on SRM 5.0(Sp11),standalone scenario.
    We are usng the n level SC approval workflow for SC(WS14000133).In addition we areusing the offline approval functionality for the SC approval.When testing the below mentioned scenario,i found some differences in the system behavious:
    Scenario.
    Created a SC with 1 item with total value $300.It went for approval to 1 approver who rejected it.(The approver has no authorization to change the SC while the requsitioner has).
    1.When the SC is rejected via email(thorugh Outlook),the  the status is set to "IN YOUR INBOX"(Header level) and "AWAITING APPROVAL"(Item level).Then the requester recieves another email (after the approver approves the SC) to accept the chnages and then the status in SRM is updated as   "RELEASE REJECTED"(Header level) and "REJECTED"(Item level).
    2.When the SC is rejected from SRM,the status is set to "IN YOUR INBOX"(Header level) and "REJECTED"(Item level) and the value of the cart is reset to "0".
    Then when the requester (after the approver approves the SC)  accepts the chnages in transaction CEHCK STATUS ,the status in SRM is updated as   "RELEASE REJECTED"(Header level) and "REJECTED"(Item level) and also the price is set to the original value($300)
    Can anyone confirm this behaviour?Why is the status of the SC set differently when rejected from Outlook and SRM?Also is the reset of the price standard behaviour?
    regards,
    SRM Tech.

    Hello,
    what you describe is not the standard process: it is possible only for contracts (KBA 1860426 - Shopping Cart item has status "Cannot be ordered")
    Do you have any specific developments?
    Check OSS notes and also what's happened at runtime through break-point in /SAPSRM/CL_PDO_BO_RFQ /SAPSRM/IF_PDO_BO_RFQ~CHANGE_STATUS method from /SAPSRM/CL_PDO_BO_RFQ class.
    Regards.
    Laurent;

  • How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?

    Hi All,
    How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?
    Assume Material is Pen.
    While creating Sales Order in VA01 how to bring different price for the same material for Platinum,Gold and Silver Customers.
    Kindly help me out.
    Thanks,
    Renjith Jose

    A good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html
    Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.
    "Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:
    hidden=1&submit=ok(Of course, the variable names would depend on what the web server was expecting from the form.)
    Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded"

  • Setting different editors in different cells in a single column

    Hi,
    My approach to setting different editors like JTextField,JComboBox etc to different cells in a single column is not upto fully satisfactory. As compiling the same code lower than 1.5 gives error in that line. My approach is as follows:
    ..................// other implementations
    DefaultCellEditor comboeditor,texteditor;
    JTextField tf=new JTextField();
    texteditor=new DefaultCellEditor(tf);
    texteditor.setClickCountToStart(2);
    JComboBox cb=new JComboBox("its_value_is_already_set");
    comboeditor=new DefaultCellEditor(cb);
    comboeditor.setClickCountToStart(2);
    DefaultTableModel model=new DefaultTableModel(datas,colNames);
    JTable table=new JTable(model){
      public DefaultCellEditor getCellEditor(int row,int col)
         if ((row==0) && (col==1))
            setCellEditor(texteditor);
            return texteditor;
         else if ((row==1) && (col==1))
             setCellEditor(comboeditor);
             return comboeditor;
    };The thing wat shows error while compiling in version lesser than 1.5 is in the getCellEditor(int row,int col) return type as it should be TableCellEditor not the DefaultCellEditor. But anyhow it works with 1.5 but show error in lesser version as I already said. So, wat can be the perfect code for it please help me fix it.
    regards,
    Jay

    Sorry, I forgot to mention the return statement if neither of the conditions r met in the if..else clause. I've written return (DefaultCellEditor)super.getCellEditor(). Now wats the difference in using super.getCellEditor() & super.getCellEditor(row,col). Excluding the setCellEditor(...) method is my code fine. I mean is it acceptable for other versions as I'm still confused with the return type that I have included instead of the required one... like DefaultCellEditor instead of TableCellEditor.
    regards,
    Jay

  • How to set different renderers to different cells in same column of JTable?

    Hello Friends,
    I need your help again...
    Does any body knows, how to set different renderer's for different cells of same column in JTable..??
    For ex.
    Col1 Col2 Col3 Col4
    A       A       A      A
    A       A       A      B
    A       A       A      C
    A       A      A       D
    Where A B C D would be different Renderers.  I want set exactly same ,,, ie. one column with different renderer at different cell positions..
    Right now i m setting renderer using statement bellow :
    table.getColumnModel().getColumn(int).setCellRenderer(rederer_Instance);But with this, effect in the last renderer is applicable whole column....
    Can any body help me out ?????????
    please refer this thread for similar kind of discussion...
    http://forums.sun.com/thread.jspa?forumID=57&threadID=571445Thanks
    Suyog

    Please refer to the first reply of [this thread|http://forums.sun.com/thread.jspa?forumID=57&threadID=571445] for the answer. If you have a specific problem implementing it, post you code with a specific question.

  • How can i set different number of iterations for different scenario profiles that we add to "AutoPilot" in load testing of OATS

    Hi,
    I have few set of load test scenarios, I would like to add each of these test scenarios to "AutoPilot" and run each different scenario profile at different number of iterations.
    As in Oracle Load Testing the "Set Up AutoPilot" tab I see  a section like this "Iterations played by each user: ", which says run these many iterations for every virtual user of all profile added under "Submitted Profile Scenario". So is there any thing like that to set different iterations for every scenario profile added in Autopilot.
    Thanks in advance

    It's not a built-in feature to override a page's styles on a tab-by-tab or site-by-site basis, but perhaps someone has created an add-on for this?
    It also is possible to create style rules for particular sites and to apply them using either a userContent.css file or the Stylish extension. The Greasemonkey extension allows you to use JavaScript on a site-by-site basis, which provides further opportunity for customization. But these would take time and lots of testing to develop and perfect (and perfection might not be possible)...
    Regarding size, does the zoom feature help solve that part? In case you aren't familiar with the keyboard and mouse shortcuts for quickly changing the zoom level on a page, this article might be useful: [[Font size and zoom - increase the size of web pages]].

  • How to set different font for a particular row in jtables?

    How to set different font size and font type for a particular row in jtable?

    More than enough sample code here:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    db

  • How to set different nr of e.g dia wp for different op.modes when in instan

    I wander how to set different nr of e.g dia wp for different op.modes when in instance profile the nr of wp is fixed.
    thx in advance

    yes u can create the operation mode by using tcode rz04. the steps are:-
    1) run the tcode :- rz04
    2: select the operation mode then click on create instance (create ur instanace for eg :- day mode and night mode)
    3)click on operation mode select the timetable then select normal operation(24 hr)->assign the modes (means select the time by double click and then right click on that select assign and give the mode eg:- day mode ) same way give another modes.Incase if there is any problem then please let me know.
    4)go to back -> click on instance/operation mode ->select create new instance->give the host name & click on current setting and save it the diaglog window will appear give the operation mode name eg day mode then if you want to increase or decrease the work process by cliking on + and - tab u can change it after that save it the WP authorization some kind of this window will appear click on yes then new instance mode will appear give the instance name eg night mode then save it again dialog window will appear do changes in work process according to ur requriement and click on save again the same wp window will appear if u want to add more operation mode then click yes either no then save it . Now u will able to see ur all operation modes.
    operation mode setup
    http://help.sap.com/saphelp_nw70/helpdata/EN/c4/3a5e76505211d189550000e829fbbd/content.htm
    Operation Mode Switches
    http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a5f1f505211d189550000e829fbbd/content.htm
    Note 39412 - How many work processes to configure
    cheers
    dEE

Maybe you are looking for

  • Windows 7/8.1 lag/hang

    Toshiba Satellite A505 S6980. Windows 7 was starting to have issues. It would hesitate/hang when I went to type something, open a browser window, right-clicking, selecting an email in Thunderbird, etc. Task manager showed the disk going from 5% to 10

  • PLSQL_COMPILER_FLAGS and PLSQL_CODE_TYPE

    Why is the sql developer using plsql_compiler_flags parameter instead of plsql_code_type parameter for the debugger since the former has been deprecated?

  • RMAN Backup Failed.

    Hi Gurus, My RMAN backup failed with below error.Please suggest. RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =============================

  • Workflow for release strategy in PO

    Dear All, Will anybody tell me how to configure the workflow for release strategy for PO. Regards R Panda

  • TAXINJ condition types

    Hi Friends, WISH YOU ALL A HAPPY AND PROSPEROUS NEW YEAR. can any body send me the condition types of the standard tax procedure TAXINJ or TAXINN. if posiible screen shots. Thanx & Rgds Samatha