Struts/Tiles: hiding implementation

A

Andy Jefferies

I'm using Tiles to construct a website and don't want my URLs to have
..do, .jsp extensions etc (or a /do/* structure). Is there a standard
way to do this?

I've mapped Stuts' ActionServlet to / and entered mappings for each of
my pages like so:
<action path="/AboutMe" type="org.apache.struts.actions.ForwardAction"
parameter="about"/>
which gets forwarded to Tiles which deals with the "about" definition
(a template with 2 includes: /menu.jsp and /about.html)

http://mysite/AboutMe will generate the template and happily insert
menu.jsp as the jsp servlet claims it and generates some html. But
for /about.html, Stuts' RequestProcessor complains the invalid path
/about was requested (note: missing .html) Same goes for .gif, .jpg,
..css...

I assume I need to use an action with the unknown="true" attribute but
can't get it to work.
Any help greatly appreciated, especially if I'm going wbout this all
wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top