Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Attribute "scope" is not allowed when attribute "name" is not specified...Error?

 
suja ganesan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to set up the web application in WSAD 5.0 which is working fine in WSAD 4.0.3. I imported that EAR file into WSAD 5.0 and set up the datasource configuration and Test Environment. Everything works OK.

But there is an error in the struts-config.xml file which shows in WSAD 5.0

"Attribute "scope" is not allowed when attribute "name" is not specified"

But in WSAD 4.0.3 there is no error in the same struts-config.xml file.

Can anybody came across this problem or can you please tell me anything I am doing wrong here.

Thanks,
Suja.G
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suja,
The message is correct that there is in error. The dtd requires a scope attribute. The difference is that WSAD 5 shows these errors by default where WSAD 4 does not.
 
suja ganesan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne

Thanks for your reply. I mentioned the "Scope" attribute in the struts-config.xml file.

WSAD 5.0 is giving an error for the below line... in the <action> tag.

<action path="/Search" type="searchAction" scope="session">
<forward name="success" path="searchresult.jsp"/>
</action>

Please tell me what I need to do to correct the above problem.

Thanks,
Kumaran.S
 
suja ganesan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Below is the action tag I mentioned in the struts-config.xml file. It has the "scope" attribute.

<action path = "/Example" type ="ExampleAction" scope="session">
<forward name = "success" path=myexample.jsp"/">
</action>

Please tell me whether I am doing wrong here. If not, what I need to do to correct the above error. Even I specified the scope attribute in the action tag.

Your response is appreciated.

Thanks,
Suja.G
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suja,
If you are specifying the scope attribute, you need to also set a form for the action (using the name attribute.) If you are not using a form, you can leave out the scope attribute entirely.

I'm moving this post to Web Application Frameworks as it is now a question about Struts, rather than WSAD.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic