Mike, Great. Thanks for the help. That worked great.
On 7/6/07, Michael Horwitz <[EMAIL PROTECTED]> wrote:
On 7/6/07, Eric Fitzsimmons <[EMAIL PROTECTED]> wrote: > I am currently using Appfuse 2.0-m5 and am having some issues trying > to map my actions in a RESTful manner. > EX: I would like http://localhost:8080/employee/ > to map to a list of employees with links to specific employees > EX: I would like http://localhost:8080/employee/0012/ > to map to a specific employee with id 0012. > > A few specific questions: > 1) How can I map url's without extensions to actions? The URL rewrite filter is what you are looking for. It is already built into AppFuse and allows you to map between the restful URLs and URLs that are understood by the application. So as an example you could have a rewrite rule of: <rule> <from>^/employee/(.*)$</from> <to type="redirect">/employee.html?id=$1</to> </rule> Which would more or less give you what you want above. Full instructions can be found here: http://www.tuckey.org/urlrewrite/ The URL rewrite configuration file is called urlrewrite.xml and is stored just below WEB-INF > 2) How can I put dynamic links to other pages not as parameters, but > as actually part of the url? (ex. not .../employee?id=0012 but rather > as .../employee/0012) As above. > 3) How can I map url's with "/"s to actions and not a namespace and an > action as is the default? In order for this to work your application will have to be the root application in your container. This is the default if you use Jetty, but you will have to configure it to be the root in Tomcat. Mike. > Any help to any of these questions would be greatly appreciated. > Thanks in advance. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
