File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts 1 -- Wrong data displaying in my JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1 -- Wrong data displaying in my JSP page" Watch "Struts 1 -- Wrong data displaying in my JSP page" New topic
Author

Struts 1 -- Wrong data displaying in my JSP page

Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 110


Hello everybody!

I am using Struts 1.
This is my jsp page.




I am facing a strange problem in my application.
In the JSP Scriplet tag you could see that I am dynamically
creating a few html text input with the help of a for-loop
When using it display the correct data on the page(As no html elements is being used). But when I want to display the value in .. It displays the data from the bottom 5 struts html properties and not the correct value from the List,i.e, value of


Can someone please help me out and explain why these things are happening in my application?
F1 please..
--
Regards
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

Manoj Paul wrote:
But when I want to display the value in .. It displays the data from the bottom 5 struts html properties and not the correct value from the List,i.e, value of

I'm unable to understand what you mean here. Does it display the value of the 5 text boxes instead of the result of your scriptlet expression <%=vals.get("tariff_Category_Id")%>??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 110
Hi,
Thanks for the reply..

Does it display the value of the 5 text boxes instead of the result of your scriptlet expression <%=vals.get("tariff_Category_Id")%>??

Yes exactly you got the problem. That's exactly where the problem is.


Regards
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17


So this line of code results in text fields which have a different value for the id and value attribute?? I can't see any situation in which this can happen. This seems impossible to me...
Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 110
Ankit Garg wrote:
So this line of code results in text fields which have a different value for the id and value attribute?? I can't see any situation in which this can happen. This seems impossible to me...


Hi Ankit,

Its not like that as you thought.
I mean to say both the id and value will have the same data value. But the problem is not there but why the value of


display value of
 
 
subject: Struts 1 -- Wrong data displaying in my JSP page
 
Similar Threads
headache with validation framework
problem with <logic:iterate> and with onload function in javascript
Iterator in Struts 1
JSP Action Buttons freez after returning from ajax call
bean value persists on clicking back