Link to home
Start Free TrialLog in
Avatar of Nuno
Nuno

asked on

Cannot find bean formCriarTopologiaCompostaGlobal in scope request

Hello, i'm receiving the error: Cannot find bean formCriarTopologiaCompostaGlobal in scope request

my bean formCriarTopologiaCompostaGlobal is defined in the following:

<bean:define name="formCriarTopologiaCompostaGlobal" id="formCriarTopologiaCompostaGlobal" type="pt.ptinovacao.sicrem.transmissao.form.gerirTopologiaComposta.FormCriarTopologiaCompostaGlobal" scope="request" toScope="page"/>

Any help would be apreciated.

Thanks
Avatar of muthu_tigerfire
muthu_tigerfire

Hi NUNOPALMA,
If you want to create a new bean then you have to supply the class attribute with the class type(example class="pt.ptinovacao.sicrem.transmissao.formCriarTopologiaCompostaGlobal"
Cheers!
Avatar of Nuno

ASKER

It didn't solve my problem.

Now i receive the following error:

Attribute class invalid for tag define according to TLD

Avatar of Nuno

ASKER

I tried to change the scope of the bean like this:

<bean:define name="formCriarTopologiaCompostaGlobal" id="formCriarTopologiaCompostaGlobal" type="pt.ptinovacao.sicrem.transmissao.form.gerirTopologiaComposta.FormCriarTopologiaCompostaGlobal"  toScope="page"/>

and received the following error:

"Cannot find bean formCriarTopologiaCompostaGlobal in any scope"

In struts-config.xml file i have:

        <form-bean name="FormCriarTopologiaCompostaGlobal"
            type="pt.ptinovacao.sicrem.transmissao.form.gerirTopologiaComposta.FormCriarTopologiaCompostaGlobal">
        </form-bean>

       <action
            path="/CriarTopologiaCompostaGlobal"
            type="pt.ptinovacao.sicrem.transmissao.action.gerirTopologiaComposta.ActionCriarTopologiaCompostaGlobal"
            name="FormCriarTopologiaCompostaGlobal"
            scope="request"
            validate="true">
            <forward
                name="continue"
                path="/gerir/topologiasCompostas/topologiaCompostaGlobalCriar.jsp"/>
        </action>

and in struts-bean.tld :

<tag>
<name>define</name>
<tagclass>org.apache.struts.taglib.bean.DefineTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.DefineTei</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>toScope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>type</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>

I don't understand what is wrong. Can anyone help me?

Avatar of Nuno

ASKER

I already found the problem. The problem was in my Action, i was not using the form formCriarTopologiaCompostaGlobal like i my JSP. Its name was wrong

Thanks anyway
ASKER CERTIFIED SOLUTION
Avatar of GhostMod
GhostMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial