• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is Namespace in struts.xml  RSS feed

 
Ranch Hand
Posts: 39
  • 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...
 
Greenhorn
Posts: 27
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks swapnil

now i cleared about it .

have a knowledgeable day.

 
Greenhorn
Posts: 14
  • 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.
 
I think I'll just lie down here for a second. And ponder this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!