• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

normal input tag with strus 2

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a struts 2 form in which all the fields are mapped with the bean and are working perfect . the moment i added this html tag
<input type="text" name="customername" id="customername" > and i tried to submit the form ..it is not going to the desired add method ..but it goes to the listing page where it should suppose to come after adding.......but the most strange thing is when i remove the name attribute of the above input tag i.e <input type="text" id="customername" > ..its working fine but now of no use because i coudnt get any thing from request.getParameter("customername") in add method...i have tried many names in place of customername ..but no success.
............any idea whats going on ...........
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a reason why you don't just use a Struts tag?
 
mudassir shahab
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes i have tried this also ..no luck ...actually i have 5 textboxes like this

<input name="one" id="one" type="text"/>
<input name="two" id="two" type="text"/>
<input name="three" id="three" type="text"/>
<input name="four" id="four" type="text"/>
<input name="five" id="five" type="text"/>

i have tried changed the names also ...but what i have caught after hours...
is that when i delete four text boxes and remain only with one ...it works ...
another thing if i delete the name attribute of all the tags ..it works also fine.................sick n tired of this problems ..any idea or bug posted before like caching problem with ie or ???
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by mudassir shahab:
yes i have tried this also ..no luck


"no luck" doesn't tell me anything.

Here's what I'd recommend: Try again implementing this with Struts <s:textfield> tags. If you get an error message or other problem, describe it in detail. Also show us your full JSP, Action class, and the entries in your struts.xml file as well as any other xml config files you might be using. Given this information, we might be able to help you figure out what's going wrong.
[ July 25, 2007: Message edited by: Merrill Higginson ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic