• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Imange as submit button using struts tags

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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
  • 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: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic