aspose file tools*
The moose likes Struts and the fly likes What is Namespace in struts.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What is Namespace in struts.xml" Watch "What is Namespace in struts.xml" New topic
Author

What is Namespace in struts.xml

Mohan rvscas
Ranch Hand

Joined: Jul 03, 2010
Posts: 39
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

Joined: Feb 10, 2010
Posts: 27
<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

Joined: Jul 03, 2010
Posts: 39
Thanks swapnil

now i cleared about it .

have a knowledgeable day.

Sita Marivada
Greenhorn

Joined: Apr 01, 2010
Posts: 14
The namespace attribute subdivides action configurations into logical modules, each with its own identifying prefix.
Namespaces avoid conflicts between action names.


Sita Putta
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is Namespace in struts.xml