• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

I get error: useBean: Duplicate bean name: {0}

I get error: ..useBean: Duplicate bean name: {0}..
for this tag
<jsp:useBean id="abc" class="java.util.HashMap" scope="request" />

the id="abc" is only once in the whole jsp page.
1
itaakashcom
Asked:
itaakashcom
1 Solution
 
rrzCommented:
Please post a JSP that produces the error. That way we can use it to reproduce the error on our machines.  For example, here is a JSP that demonstrates use of the tag(I assume that you are using a current container such as Tomcat 8).  
<jsp:useBean id="abc" class="java.util.HashMap" scope="request" />    
${abc.put("test1","hello")}
${abc.get("test1")}
${abc["test1"]}

Open in new window

The output is   hello hello
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now