Struts application two submit button

Struts application two submit button

Hai, i'm new in struts application development , My code is

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title><bean:message key="label.login.title" locale="display"/></title>
    <!-- CSS -->
    <link rel="stylesheet" href="css/main.css" type="text/css" />
    <link rel="stylesheet" href="css/theme.css" type="text/css" />

</head>

<body id="public">

<div id="container">

    <%@ include file="/header_inc.jsp" %>

    <html:form action="/login" method="post" styleClass="javachap topLabel">
        <html:hidden property="action" value="login"/>
        <div class="info">
            <h2><bean:message key="label.login.heading" locale="display" />!</h2>
            <p><bean:message key="label.login.headingCaption" locale="display" />.</p>
        </div>

        <ul>
            <logic:messagesPresent >
                <li id="errorLi">
                    <h3 id="errorMsgLbl"><html:errors locale="display"/></h3>
                </li>
            </logic:messagesPresent>

            <li class="">
                <label for="email" class="desc">
                    <bean:message key="label.email" locale="display" />
                </label>
                <div>
                    <html:text property="email" maxlength="255"
                        tabindex="4" styleClass="field text medium"  style="autocomplete=\"off"/>
                </div>
            </li>

            <li class="" >
                <label for="password" class="desc">
                    <bean:message key="label.password" locale="display" />
                </label>
                <div>
                    <html:password property="password" maxlength="255"
                        tabindex="5" styleClass="field text medium" style="autocomplete=\"off"/>
                </div>
            </li>

            <li class="buttons">
                <html:submit tabindex="6" styleClass="btTxt">
                    <bean:message key="button.label.login" locale="display"/>
                </html:submit>

                 <html:submit tabindex="7" styleClass="btTxt">
                    <bean:message key="button.label.newuser" locale="display"/>
                </html:submit>
            </li>

        </ul>
    </html:form>
</div>

</body>
</html>

Here am using two submit button one is login and another one is new user registration . I want process one button is login purpose and another one new user registration purpose but the form name is "login" only . Any one help please

View Answers

May 5, 2013 at 3:14 PM

Hi ,

In struts we are using LookUpDispatchAction class to handle the form with multiple submit buttons.









Related Tutorials/Questions & Answers:
Struts application two submit button
Struts application two submit button  Hai, i'm new in struts application development , My code is <%@ taglib uri="http://struts.apache.org...;/html> Here am using two submit button one is login and another one is new
Facing Problem with submit and cancel button in same page - Struts
Facing Problem with submit and cancel button in same page  Hi, can u please help me out.I have placed submit and cancel button in the jsp page... friend, Read for more information. http://www.roseindia.net/struts
Advertisements
submit button
submit button  <p>hi I am trying to insert record in database using hibernate in JSP(Netbeans). When I click insert button it should go...; <input type="submit" value="Insert" name="login" /> <
JSP Submit Button
JSP Submit Button  Sir, I have a JSP page with 2 Submit button, both calls doPost method of same servlet. If I click any submit button the text box value get refreshed and set to null or blank, that should not happen. Plz help
image on submit button
image on submit button  i need to set an image on submit button. In javascript we can create a button like.. <a href="javascript:;" class="button...: transparent; cursor: pointer; or input[type=submit] { background: transparent
Submit button to MySQL database?
Submit button to MySQL database?  Need help linking html code...="text" name="Level" /> </form> <td><input type="submit" name="Submit" value="Submit"></td> </body> </html> <
Submit button to MySQL database?
Submit button to MySQL database?  Need help linking html code...="text" name="Level" /> </form> <td><input type="submit" name="Submit" value="Submit"></td> </body> </html> <
Disabling submit button using jQuery
Disabling submit button using jQuery  Hello Sir I want to know - is there any way or approach to disable client side form's "Submit" button. Please give code also.ADS_TO_REPLACE_1   For all submit buttons, via JQuery
How can we submit a form without a submit button?
How can we submit a form without a submit button?  How can we submit a form without a submit button
Struts + HTML:Button not workin - Struts
Struts + HTML:Button not workin  Hi, I am new to struts. So pls bare with me if my question is fundamental. I am trying to add 2 Submit buttons... ----------- System.out.println(searchForm.get_button_Clicked()); The above statement
On Click on Submit Button Display Data on Orderlist
On Click on Submit Button Display Data on Orderlist  How can retreive data from database on orderlist on Click on submit Button of same page
struts application
struts application  hi, how to retrive data from databse in struts application aand send the retrived data to corresponding form
Struts 2 Radio Button
Struts 2 Radio Button  I have a search functionlaity where i have two radio buttons and I am using Struts2 tag.I want first rado button to be selected by default.But when i select the second radio button and hit on search
Click On Images of Submit Button Perform Action
Click On Images of Submit Button Perform Action  I have login page in which insert of submit button i used image. Therefor on Click of image i have to validate form , link with database and goto the next page
Using radio button in struts - Struts
Using radio button in struts  Hello to all , I have a big problem... options to choose : Serial number 12345 radio button - selection 1 radio button - selection 2 Serial number 6789 radio button - selection 1 radio button
struts application - Struts
struts login application form code  Hi, As i'm new to struts can anyone send me the coding for developing a login form application which involves a database search like checking user name in database
struts application
struts application  hi, i can write a struts application in this first i can write enter data through form sidthen it will successfully saved into data base **but now i can apply to some validation to that form fileds
how to disable submit button after login in jsp
how to disable submit button after login in jsp  Hi, I have an application and when user logs in welcome page is displayed. When user clicks... to disable submit button after login in jsp? Thanks   Hi, You can
First Struts Application - Struts
First Struts Application  Hello, Hello, I have created a struts simple application by using struts 1.2.9 and Jboss 4.0.4. I am getting... for path /WEB -INF/struts-config.xml struts-config.xml and web.xml files
struts application
struts application  i want to display name on the browser throgh struts1.2 in java please give me snippet
storing details in database on clicking submit button - JSP-Servlet
database on clicking submit button. I am unable to do this.Can u tell me how to code...storing details in database on clicking submit button  I am using JSP in NetBeans and have developed an application form which has fileds naming
button actions in struts
button actions in struts  in my jsp page i have two buttons add and sub.when i clicking the add button one action is performed and clicking the sub button another action is performed.how i will handle it using struts.i am using
Why Struts in web Application - Struts
Why Struts in web Application  Hi Friends, why struts introduced in to web application. Plz dont send any links . Need main reason for implementing struts. Thanks Prakash
Struts application not working in LINUX - Struts
Struts application not working in LINUX  Hi ALL, I have a struts... in LINUX prodution system. The application is not recoginsed the web server is Tomcat5. I tryed with a sample servlet on linux tomcat its also not working
How to save form fields into the MySql Database without submit button in jsp?
How to save form fields into the MySql Database without submit button in jsp?  I want to store user inputs into the database using javasccript or ajax or jqury but without submit button. Form Contains three fields
Struts development application - Framework
Struts development application  hi friends, I want a source... regarding for struts framework,and what is difference b/w validation.xml and validation-rules.xml?when will use these two?  Read for more information
Submit comments in database when user clicks on submit button
Submit comments in database when user clicks on submit button... database when user clicks the submit button of the page. Create a database: First... be integer number then click submit button. If all the values are submitted
Struts application by using eclipse
Struts application by using eclipse  Can we develop struts application by using eclipse ? If no then please provide other development tools, if yes can you mail me the tutorial or provide the same in roseindia
login application - Struts
application using struts and database?  Hello, Here is good example of Login and User Registration Application using Struts Hibernate and Spring. In this tutorial you will learn 1. Develop application using Struts 2. Write
How to integrate Struts and Hibernate in an application?
How to integrate Struts and Hibernate in an application?  Hi, I am aware of both Struts and Hibernate framework. So, let's know how to integrate these two frameworks? Good example code will help me a lot. Thanks   
develop structs application - Struts
structs application in netbeans ide i need step by step process plz answer me  Hi friend, For more information,Examples and Tutorials on Struts visit to : http://www.roseindia.net/struts/ Thanks
Ajax for Struts with Hibernate Application - Struts
Ajax for Struts with Hibernate Application  Hi All, I have developed a registration page with country and state drop downs. I want to use ajax for these drop downs with hibernate support. Kindly help for this , thanks
PHP HTML Form Submit Button
Topic : HTML FORM SUBMIT BUTTON Part - 4 The another part which is important to covered that is Submit button. If you are following all the previous parts.... The Submit button in Html is used to submit form data to the page mentioned
Ajax in struts application - Ajax
Ajax in struts application  I have a running application using struts and now i want to implement Ajax(for populating some search box) in it.The problem is that my jsp page is able to send the request to my Struts Action process
Struts 2 Application
Struts 2 Application Developing user registration application based on Struts 2 Framework This Struts 2 Application is a simple user registration application.... Let's start developing user registration application on Struts 2 framework
struts hibernate integration application
Struts2 hibernate integration application. In this tutorial we are going to show how to Integrate Struts Hibernate and create an application. This struts... of the struts hibernate integration application example. Description
to get radio button value - Struts
two major problems:- 1.these radio button is not going to select also 2.i want to set the "value" attribute of radio button in the above code. Can u help...to get radio button value   hello friend, i have a problem regarding
struts - application missing something?
struts - application missing something?   Hello I added a parameter... in the struts working and all is great till I close JBoss or the server gets shut down..., struts-config.xml are all updated. I didn't use anything new that hasn't already
SwitchAction Application in struts 1.3.10
SwitchAction Application in struts 1.3.10  Hi,I am working on struts 1.3.10 and I have developed my module using switchaction application...' module. and 'action=/switchpath' is the action path to link struts-config.xml name
Managing Datasource in struts Application
Managing Datasource in struts Application  Hi i need to know how to do set up of Oracle data base with struts using Data source.I have defined datasource in struts-config.xml as data-sources> <data-source type
Changing from Struts 1.2 to Struts 2.0 in Application
Changing from Struts 1.2 to Struts 2.0 in Application  Hi All, We have a financial application which is running successfully on struts 1.2 and java... latest version of struts 2.0. I want to know following things 1.what
Struts 2 Login Application
Struts 2 Login Application       Developing Struts 2 Login Application In this section we are going to develop login application based on Struts 2 Framework. Our current login application
jsperexception in struts application
jsperexception in struts application  Iam getting the following error repeatedly can u explain the solution for this? HTTP Status 500 - type Exception report message description The server encountered an internal error
Save,Discard and Cancel button - Struts
Save,Discard and Cancel button   How can I create a confirm message with Save,Discard and Cancel button instead of OK/Cancel buttons in java script inside a jsp
how to disable submit button in jsp using servlet when some condition is satisfied
how to disable submit button in jsp using servlet when some condition is satisfied  how to disable submit button in jsp using servlet when some condition is satisfied
Java radio buttons and button groups two values
Java radio buttons and button groups two values  hi i have a problem. i have a system to input data from a jform to a mysql database. i have made... is clicked depending on which button was clicked male or female be sent
Java radio buttons and button groups two values
Java radio buttons and button groups two values  hi i have a problem. i have a system to input data from a jform to a mysql database. i have made... is clicked depending on which button was clicked male or female be sent
Intranet application - Struts
Intranet application  Sir,I am develping a Intranet web application for college which has its own ip address and etc.I dont know how to deploy an application into server,changes to be done inside application.I am using struts.plz
Struts2 blank application - Struts
Struts2 blank application  Hi I am new to struts2 and i am trying to run the strutsblank application by following the following Link; http... application) when i am trying to open the application by using the link http
how to by default chceckbox button is selected in struts
how to by default chceckbox button is selected in struts   i want to by default checkbox is selected please help me.. my is follwing <%@taglib uri="/struts-tags" prefix="s" %> in this iterator so many rows are there so

Ads