file to use the same Bean, will go wrong?, java problems tips" /> file to use the same Bean, will go wrong?. Get java problems tips from javaproblemstips.info" />

Why do you call <% @ include file = "2.jsp"%> file to use the same Bean, will go wrong?

Category: Web Develop
 
zhxin007
2010-07-27 12:18:37

Sponsored Links
I have a 1.jsp used inside:
<jsp:useBean id="broadInfoObj" class="bean.broad.BroadInfo" scope="page"/>

left menu invoked in his file, <% @ include file = "2.jsp"%>, which also used:
< jsp: useBean id = "broadInfoObj" class = "bean.broad.BroadInfo" scope = "page" />

on the wrong one, you can execute these files separately not wrong. Why asp jsp not like that. The file in the call which can be used in any component or code without conflict like this?

Sponsored Links

coolwind8210
2010-07-27 12:38:28
<jsp:useBean id="broadInfoObj" class="bean.broad.BroadInfo" scope="page"/> to
< jsp: useBean id = "broadInfoObj" class = "bean.broad.BroadInfo" scope = "request" />
then 2.jsp in can no longer be used directly broadInfoObj Write
<jsp:useBean id="broadInfoObj" class="bean.broad.BroadInfo" scope="page"/>
or naming two different id problems will be solved
mannged
2010-07-27 12:46:43
duplicate definition, if 1.jsp first define the <jsp: useBean id = "broadInfoObj" class = "bean.broad.BroadInfo" scope = "page" />, is not defined in the 2.jsp refer directly to try. On the contrary, like, the first try. Conditions reasons, I have not tried.
forcms2
2010-07-27 12:54:56
jsp has its own characteristics
m291025196
2010-07-27 01:11:50
then how can I do? called file called file and need to use the same Bean, created objects are the same. I how to make them the right to call, the error does not occur?
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.