• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

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

 
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
 
author & internet detective
Posts: 39664
785
Eclipse IDE VI Editor Java
  • 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
Posts: 39664
785
Eclipse IDE VI Editor Java
  • 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.
 
Proudly marching to the beat of a different kettle of fish... while reading this tiny ad
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!