cancel
Showing results for 
Search instead for 
Did you mean: 

"id" field in jsp

Former Member
0 Kudos

Hello,

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="app.sap.testclass" />

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

Siva

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Answers (0)