Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 41944
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 41944
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
We begin by testing your absorbancy by exposing you to this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic