Jeff Thorne wrote:
I have noticed that many sites use virtual URLs such as
http://www.imdb.com/title/tt0244244/ to point to some sort of
profile on their website whether it be a movie, product, or user homepage. I
was wondering what is the most
efficient way to accomplish this programmatically in struts. I will have
thousands of these URL/profiles on my site.
Do I just create a directory on the file system with a JSP page that pulls
the data from the DB when the user hits the link?
Would this scale for thousands of directories? Any insight or help would be
appreciated.
No need to create 'thousands of directories', just set up an action
mapping using a wildcard in the path:
<action path="/title/*" type="MyAction" parameter="{1}"/>
In your action you can then use getParameter() to find what matched the
'*'. See the documentation [1] for details.
L.
[1]
http://struts.apache.org/struts-doc-1.2.x/userGuide/building_controller.html#action_mapping_wildcards
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]