Re: How to add a link to a file stored in directory?

2013-06-05 Thread Lance Java
Tapestry has built in support for serving classpath assets. http://tapestry.apache.org/assets.html Option1 TML Option2 Java @Inject AssetSource assetSource; public String getAssetUrl() { return assetSource.getClasspathAsset("regoznapp/enterprise/src/main/resources/return.txt", n

Re: How to add a link to a file stored in directory?

2013-06-04 Thread mailingl...@j-b-s.de
Hi Petr! You are really refering to a file in your src directory? When you use maven to build it the file is copied to target/ and you access it simply by "return.txt" using the classloader because target/resources is stripped when building the jar/war. Set a break point and check if you reall

Re: How to add a link to a file stored in directory?

2013-06-04 Thread Geoff Callender
1. What happens? Is an exception thrown? 2. If you upload to the file system, like the jumpstart example does; then you should download from the file system - but your example, below, is downloading from a path relative to the classpath of the web app. Try this instead: inputStream = ne

How to add a link to a file stored in directory?

2013-06-04 Thread Petr Janata
Hi, thanks for links with ideas. I am new in Tapestry I use Example App from Jumpstart tutorial . I added File Upload to Example App and HSQL table for up

Re: How to add a link to a file stored in directory

2013-05-30 Thread Boris Horvat
Put your files in the web app , or some external source (e.g. Amazon S3). Putting the files in some arbitary folder in the host is not auto suported by tapestry. You could write a file factory and there was a few topics around this. For the time I wanted to the same but in the end I decided to use

Re: How to add a link to a file stored in directory?

2013-05-30 Thread mailingl...@j-b-s.de
Hi Petr! Have a look at: http://tawus.wordpress.com/2011/07/30/tapestry-jfreechart-integration/ Here you can see how to stream any kind of data. StreamResponse was discussed here before: http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/T5-1-Return-a-file-as-response-of-a-Actio

How to add a link to a file stored in directory?

2013-05-30 Thread Petr Janata
Hi I have table with file names. I need to add link for files stored in directory to download them. Any idea? Petr - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tap

How to add a link to a file stored in directory

2013-05-30 Thread Petr Janata
Hi I have table with file names. I need to add link for files stored in directory to download them. Any idea? Petr - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tap