Dave Newton wrote:
--- "jignesh.patel" <[EMAIL PROTECTED]> wrote:
    I am having struts2 + hibernate application.It uses static
namespace(crud)  like http://hax.mysite.com/crud/createUser.action.

I want it to be dynamic like, i can be able to set it with my algorithm
which is unique for each session ... e.g for 1 session)

http://hax.mysite.com/2345RA234/createUser.action....http://hax.mysite.com/2345RA234/showUser.action...etc
for 2 session)

http://hax.mysite.com/2323F3B2S/createUser.action....http://hax.mysite.com/2323F3B2S/showUser.action...etc
for 3 session)

http://hax.mysite.com/E3459A531/createUser.action....http://hax.mysite.com/E3459A531/showUser.action...etc
...
...
etc.

Is it possible in struts2 and if yes how ?

You might be able to do something with a wildcard mapping, although I don't
think it would be a real namespace.

Why would you want to do this?

Dave


If you're prepared to use an alpha version of a new plugin you'll be able to do this easily with the following modification to struts.xml:

<package name="crud" namespace="/{userId}"/>

where userId is a property that will be set on your action. The plugin's placeholder is on googlecode but I haven't had time to write the userguide/wiki so it's not announced yet.
If you're interested I can post a binary and example early.

http://code.google.com/p/struts2urlplugin/




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to