amol k wrote:

Here is what I am trying to achieve:

http://myserver/Login.do --> (maps to) LoginAction
http://myserver/Logout.do --> (maps to) LogoutAction
http://myserver/user/blahblah --> UserPageAction (notice that there is
no .do in this case. blahblah can be replaced by anything at runtime)

http://myserver/pages/blahblah.jsp --> not handled by ActionServlet (obviously)

I am trying various combinations in web.xml and struts-config.xml
(including configuring /user as a module) but havent yet found a
decent solution.
Any thoughts?
I wrote a request processor that took URLS of the form

http://myserver/admin/foo/bar and sometimes
http://myserver/admin/foo/bar/baz

and did the appropriate things (it was for the table maintainence of a website; "foo" was the name of the table, "bar" was the command (edit, delete, create, etc.) and "baz" was the key used to look up the item (when necessary).

I used two wildcard action mappings /admin/* and /admin/*/* (I think, this was awhile ago) then inside the action performed the expected things (deciding what page to show based on the table name, etc.) I also subclassed the request processor to get the appropriate ActionForm for the Action.

It's pretty un-Strutslike, but I needed the URLs to look like that fo various non-technical reasons (and they're prettier), and I wanted to write the smallest amount of code possible.

Using a wildcard mapping might be enough to do what you need it to, but you can do a fair amount more with only marginally more work.

Dave



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

Reply via email to