*
The moose likes Struts and the fly likes normal input tag with strus 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "normal input tag with strus 2" Watch "normal input tag with strus 2" New topic
Author

normal input tag with strus 2

mudassir shahab
Ranch Hand

Joined: Oct 13, 2003
Posts: 54
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 ...........
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Is there a reason why you don't just use a Struts tag?


Merrill
Consultant, Sima Solutions
mudassir shahab
Ranch Hand

Joined: Oct 13, 2003
Posts: 54
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

Joined: Feb 15, 2005
Posts: 4864
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 ]
 
Consider Paul's rocket mass heater.
 
subject: normal input tag with strus 2