File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Mapping URL's to files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Mapping URL Watch "Mapping URL New topic
Author

Mapping URL's to files

Johnny Gara
Ranch Hand

Joined: Mar 09, 2007
Posts: 43
using spring2.5, and just trying to map a url to a file

ie.
http://localhost:8080/myapp/testme/yahyou

I want it to actually retrieve
http://localhost:8080/myapp/results/yahyou.xml

I know how I'd do it if I was generating my xml file, but if the file exists I can't seem to make it work. I tried implementing the UrlFilenameViewController and basically



and while it will return what I think I want (ie, with a prefix=results, a suffix=.xml, i get /results/youwin.xml) but I get an exception:

org.apache.tiles.definition.NoSuchDefinitionException: /results/youwin.xml
Sachin Joshi
Ranch Hand

Joined: Aug 06, 2008
Posts: 83

Try making it



instead of



Web Development Tips and Tutorials - By Sachin
 
 
subject: Mapping URL's to files