This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mapping URL's to files

 
Johnny Gara
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 83
Java Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try making it



instead of

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic