Ok, you are right.  It doesn't work out of the box after the archetype build.  
The fix seems simple, but is likely to end up being more complex as it might 
have side effects.

The issue is in struts.xml.   

    <constant name="struts.action.extension" value="html"/>

This tells struts to only look at URL's with a .html extension.  Really want 
Struts to look at extension-less URLs as well.  So we change it to:

    <constant name="struts.action.extension" value="html,"/>

The comma adds a new blank "entry" for the extension and you should be good to 
go.  The problem is now you are going to route requests to Struts when there is 
no .html extension and I am not sure how other stock Appfuse filters or 
functions may feel about that.  It could have no immediate effect, but have a 
longer term issue.  It looks like we need to update the Struts2 archetypes to 
reflect the latest action/config patterns out there in the wild.

But this should resolve your immediate issue.

-D
 

On Mar 22, 2010, at 1:46 AM, taltu-2 wrote:

> 
> Thanks for your reply!
> 
> For now I just tried the action-less result example with hello-world.jsp
> 
> I don't have REST plugin integrated either.
> 
> I simply used the archtype of 2.1.0-M1 (Struts 2.18 modular), build and run
> with jetty:run.
> 
> Put a hello-world.jsp inside /WEB-INF/content/ and tried to access with 
> 
> http://localhost:8080/hello-world
> 
> where it says the page is not found.
> 
> The struts-convention-plugin.jar is located in the classpath too.
> 
> Everything should be ok. I thing the Appfuse is simply the reason why it is
> not work, maybe due to security access right etc ?
> 
> It could be nice if some could try the way I did with 
> 
> Using the 
> * archtype of 2.1.0-M1 (Struts 2.18 modular), 
> * build and run with jetty:run, 
> * put a hello-world.jsp inside /WEB-INF/content/ and try to access with
> http://localhost:8080/hello-world
> 
> -taltu
> 
> -- 
> View this message in context: 
> http://n4.nabble.com/Struts-2-convention-plugin-tp1676689p1677324.html
> Sent from the AppFuse - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
> For additional commands, e-mail: users-h...@appfuse.dev.java.net
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to