Solved

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

Posted on 2016-07-26
1
87 Views
1 Endorsement
Last Modified: 2016-08-01
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
Comment
Question by:itaakashcom
1 Comment
 
LVL 27

Accepted Solution

by:
rrz earned 500 total points
ID: 41729546
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now