This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
wood burning stoves
 
subject: Mapping URL's to files
 
Similar Threads
Tomcat 404 error
How to access gif files from servelets
Tomcat 404 Error - Still not working
Running servlet in tomcat
A Servlet That Uses Packages and Utilities