• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Imange as submit button using struts tags

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
I am trying to implement login application by image as submit button using struts tags like <html:image>.
but couldn't find the best way to do it.Is it necessary to write Image button details in action class



please help on this

thanks in advance
 
naresh kumar k
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys can any one please help me on this
I tried to use image as submit button in struts using html:image tag but it showing the following error

code:<html:image src="D:/Metaway/CSWorkSpace/CSWeb/WebContent/images/go.gif" property="Login" value="Login"></html:image>

Error:ERROR [org.apache.struts.actions.DispatchAction] Request[/coldStorageLogin] does not contain handler parameter named 'Login'. This may be caused by whitespace in the label text.


please help on this
regards
naresh k
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you use the html:image tag with a property tag, the Struts library is going to look for getters/setters for that property:

The property name of this image tag. The parameter names for the request will appear as "property.x" and "property.y", the x and y representing the coordinates of the mouse click for the image. A way of retrieving these values through a form bean is to define getX(), getY(), setX(), and setY() methods, and specify your property as a blank string (property="").


Struts Taglib Documentation
 
naresh kumar k
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Joe Ess,
thanks for the reply
I done what you suggested i defined getters and setters method in form class and made property="" but no use same error i am facing.
could you give me the code regarding jsp page for <html:image> tag and for action class if needed.

with regards
naresh kumar k
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic