| |

VerySource

 Forgot password?
 Register
Search
View: 896|Reply: 4

Struts bean: write label problem, ask experts

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Unknown

Post time: 2020-2-21 19:00:01
| Show all posts |Read mode
There is a hashtable on the jsp page
I want to get the corresponding value with the key value
But the key is written by the bean: write tag
I wrote this in the program:
<% (String) rateht.get <bean: write name = "rs" property = "RATING" />)%>
The system prompts that the label cannot be found
How do I deal with this situation
Thank you
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-5-29 22:30:02
| Show all posts
Formbean seems to be able to define a property of type hashtable
Reply

Use magic Report

2

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-6-27 11:00:01
| Show all posts
You can put your hashTable in javabean, it may be set as follows:
<jsp:userBean id="test" scope="page" class="The path where your java bean class is located"/>
  <logic:iterate id="element" name="test" property="hashTable" indexId="index">
                      <TR bgcolor="#FFFFFF">
<TD align=center height="40">
<bean:write name="element"/>
</TD>
                    </TR>
               </logic:iterate>
Reply

Use magic Report

1

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-7-16 19:00:01
| Show all posts
Landlord, if you can write code like this and compile it, I won't live~~~

How can STRUTS tags be written in <% %>?
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-18 12:15:01
| Show all posts
I have never seen the struts tag written in the java code, it is estimated that no tags have your advanced
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list