Struts, using html:image link to submit

Posted on 2005-05-10
Last Modified: 2008-02-07
I have a jsp page using struts tags...  i have two buttons  a submit and a cancel.
in the action how do I find out which image was clicked by the user?

<html:image page="/images/btn_Submit.gif" property="submit" value="submit" alt="submit" />
<html:image page="/images/btn_Cancel.gif" property="cancel" value="cancel" alt="cancel" />
Question by:Ilan_Moorthy
    LVL 14

    Accepted Solution

    Image name will be ended with '.x' and '.y'.
    Eg. request.getParameter("submit.x") and request.getParameter("submit.y")

    Boon Leng
    LVL 29

    Expert Comment

    or you could have an onClick() dhtml/javascript handler

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now