Skip to Content
author's profile photo Former Member
Former Member

"id" field in jsp


I'm working on a bug fix in EP 6.0. I have two jsp files that need to use the same id as in

<jsp:useBean id="myBean1" scope="application" class="" />

But I get an error that "Duplicated 'id' attribute value 'myBean1' in jsp:useBean action". Is there a possibility that I could use a destroy method or something so that this duplication doesnt occur in the 2 jsp files? The code is written such that it instantiates the testclass each time, but am not sure why it still gives me a duplication error. Thank you


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 03:53 AM

    Hi Siva,

    I am not sure but change the scope to request and then try it. because if the scope is application then the instance will exist through out its life cycle,it will destroy only when the application is exited from the server or the server is shut down.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Hari. I worked around it by removing the bean from the jsp creating duplication and inserted in a new common jsp. I'm still in the learning process in J2EE. Your suggestion was useful too.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.