Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is Namespace in struts.xml

 
Mohan rvscas
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

what is namespace in struts.xml under struts 2 framework

how to use namespace in struts.xml?

give me the sample example ?

thanks in advance...
 
swapnil kachave
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<package name="web-package" namespace="/pk1"
extends="struts-default">

the name space you can define at package level. and it is get added into your URL.

for ex. your application name id testWeb then action come inside this package you can access like:

testWeb/pk1/test.action
 
Mohan rvscas
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks swapnil

now i cleared about it .

have a knowledgeable day.

 
Sita Marivada
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The namespace attribute subdivides action configurations into logical modules, each with its own identifying prefix.
Namespaces avoid conflicts between action names.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic