org.apache.jasper.JasperException: useBean: Duplicate Bean

I have a jsp the defines a useBean

(<jsp:useBean id="cardChoice" class="com.metris.oa.fields.ChooseFieldObject" scope="session" />), which then includes another jsp that also has it defined.

I understand this is not exactly proper, however it works when running under oracle app server if, the global-web-application.xml has an entry to set check_page_scope to true.

Does Sun Java System Application Server Platform Edition 9.0 (build b48) have a similiar setting? If so, where is the setting set.

It seems it should be somewhere in domain.xml, but I cannot figure out where, if so.

More of the exception received at runtime, when the page is being loaded;

org.apache.jasper.JasperException: /applicationProc2.jsp(739,0) useBean: Duplicate bean name: cardChoiceorg.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.jav a:49)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:461)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:161)

org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:610)

org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1136)

org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2244)

[1286 byte] By [kiss1] at [2007-11-26 8:02:04]
# 1

According to JSP.5.1 ("<jsp:useBean>"), "The id attribute", of the JSP 2.1 spec:

"Duplicate id's found in the same translation unit shall result in a fatal

translation error."

Providing a flag that avoids this translation error would lead to spec non-compliant behaviour, which is why SJSAS 9.0 does not provide any such flag, and reports the required translation error instead.

jluehe at 2007-7-6 20:34:16 > top of Java-index,Application & Integration Servers,Application Servers...
# 2

So the answer is no, the app server does not provide this functionality. I awarded you the dukes.

However, I would like to comment that, if the reason you provided is the true reason the app server does not offer this functionality, it is not a very good reason to not offer it. I can understand providing default behaviour that is in line with specs or guidelines.

kiss1 at 2007-7-6 20:34:16 > top of Java-index,Application & Integration Servers,Application Servers...
# 3
Notice that it would be against the Java EE compatibility rules for any appserver to provide a flag that would allow it to be run in non-spec compliant mode.
jluehe at 2007-7-6 20:34:16 > top of Java-index,Application & Integration Servers,Application Servers...