Re: best practice for temporary file

2018-07-17 Thread James Finnall
Thank you!

Had some problems but I was able to research the issues and find a
solution to what I was doing wrong.  I did not have a "/cdn/ROOT"
directory, mine is "/webapps/ROOT".  The Resource section needs to be
with-in the Context section and not after it.  My original context.xml
file only had two lines.  I had to use two different file paths, since
the application path (/opt/tomcat/..." is different from the client
path (/temp/...).

Once I had the issues corrected it worked great.  Thank you, again.
James

On Tue, 2018-07-17 at 10:36 -0400, Chris Cheshire wrote:
> 
> James, this can be done using something like the following
> configuration in your META-INF/context.xml (I use tomcat 8.5)
> 
> 
>    className="org.apache.catalina.webresources.DirResourceSet"
> base="${catalina.base}/cdn/ROOT/images"
> webAppMount="/images" />
> 
> 
> I use this to serve files at /images because they are dynamic content
> and not part of the war itself. Make sure the directory specified by
> "base" has read and write permission by the tomcat user at the OS
> level and then you can serve files with a uri starting with /images/.
> 
> HTH
> 
> Chris
> 
> On Tue, Jul 17, 2018 at 10:21 AM James Finnall 
> wrote:
> > 
> > 
> > 
> > Hello all,
> > 
> > What is the best practice under Tomcat to create a data file and
> > then
> > allow the client to download it?
> > 
> > So far all my attempts have failed.  If the Java app can write it
> > then
> > the client can not download, if client can download then the Java
> > app
> > can not write it.
> > 
> > Does Tomcat have a provision to create a directory that be shared
> > by
> > both the app and the client?
> > 
> > 
> > Thank you for your consideration,
> > James
> > 
> > 
> > -
> > 
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> > 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



best practice for temporary file

2018-07-17 Thread James Finnall
Hello all,

What is the best practice under Tomcat to create a data file and then
allow the client to download it?

So far all my attempts have failed.  If the Java app can write it then
the client can not download, if client can download then the Java app
can not write it.

Does Tomcat have a provision to create a directory that be shared by
both the app and the client?


Thank you for your consideration,
James


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



JFileChooser not working

2018-07-03 Thread James Finnall
Hello All,

Developed application that works locally on XAMPP using JFileChooser
(awt and swing).  I build the .war file, code sign it with jarsigner,
and deploy to Tomcat server.  The server expands it out and it
functions until it hits the JFileChooser section and then nothing.  No
dialog appears for the client to allow the created file to be
downloaded.  Maybe security?  That is why I setup to do code signing
thinking it would allow the operation if signed.  

Any thoughts here would be greatly appreciated.
James Finnall


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org