[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

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
0
NUNOPALMA
Asked:
NUNOPALMA
  • 3
1 Solution
 
muthu_tigerfireCommented:
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!
0
 
NUNOPALMAAuthor Commented:
It didn't solve my problem.

Now i receive the following error:

Attribute class invalid for tag define according to TLD

0
 
NUNOPALMAAuthor Commented:
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?

0
 
NUNOPALMAAuthor Commented:
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
0
 
GhostModCommented:
PAQed with points refunded (500)

GhostMod
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now