Inspecting the HTTP requests:
 update returns a 404 with an iframe referencing "/missing"
 the get of /missing returns a 302 containing the index page
subsequent requests are successfully performed within the /missing namespace
ie.
http://localhost:8080//missing/edit?id=0

Note the double / as well.

Note that Crud-validation.xml uses a RequiredStringValidator but not a StringLengthvalidator so I think it passes edit. I'm not sure why update fails though.

As per my prior emails, http://localhost:8080/an/arbitary/url/index also executes the index action.

Looking at the savant config, my test environment does differ from yours in that I'm using Struts core 2.0.9 rather than 2.0.6. I'm testing with Tomcat 5.5.23 from an exploded directory via IntelliJ.

Let me know if there's anything you'd like me to investigate further if you're unable to reproduce this.
Okay, I reproduced this pretty easily. The environment differences didn't matter. The /missing rendering /index is due to the default handling of missing actions that is performed by Struts/XWork I think. I'll have to figure out exactly which interceptor does this, but I'm not a big fan of that behavior. These should be 404s.
I'm still tracking this down. I'd like to be able to disable this because it can really become a very nasty situation with relative paths. For example, if /index has a link like this:

<a href="support">Get some support dude</a>

And you enter a bunk URL like:

http://www.example.com/bunk

The use will attempt to click on the link and they'll get:

http://www.example.com/bunk/support


As for the /missing problem, that's because I forgot to set those JSPs up and using an iframe was the only way I could get SiteMesh to work with 404s and 500s. I'll fix that today.
Fixed this to not use the iframe since this example doesn't use sitemesh.

Lastly, I have no clue at all why edit is failing validation. The Update class extends the Crud action, which has the validation XML. It should be validating, but something is not working. I'll step through this in a debugger and see what is going on.
Fixed this. The Result annotation in the Update class was referencing update.jsp, which doesn't exist. It should be edit.jsp. Now everything works as expected.

-bp

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

Reply via email to