Tomcat error 403 with deployed solution.

Servoy 6.1.6, web-client only. Deployed on Windows Server 2008 R2.

Users need to be able to view/download PDFs from the server. plugins.file.writefile does not work I suspect because the server is behind a NAT router. This is borne out by ```
plugins.it2be_tools.server().IP


Anyway when a user clicks to view the PDF I am copying the PDF to a folder location that I created: **C:\Users\abourke\apps\Servoy\application_server\server\webapps\ROOT\pdfdownloads**. 

The copying part works fine.

I then use ```
application.showURL(newURL)
``` to view the PDF in the browser (what happens of course depends on the browser's PDF handling). 

... where newUrl would be like ```
http://99.99.99.99:8080/pdfdownloads/7305E3FA-52CB-47F9-BEF4-9CB5DFB4C367/IIN606505.PDF
``` for example.

This results in Tomcat throwing 403 - Forbidden 

This works fine on dev machine.

How do I grant permissions to allow read access to that pdfdownloads folder?

Thanks

Is this a Tomcat configuration thing? Anyone?

are you 100% sure that when you get the forbidden error that the folder(s) and file(s) are in the ROOT?

pdfdownloads/7305E3FA-52CB-47F9-BEF4-9CB5DFB4C367/IIN606505.PDF

You must be sure that user where Servoy runs under, has (full) access rights, to the Servoy folder.

Well, that’s relative to ROOT, i.e. the actual path on the server is:

D:\Servoy\application_server\server\webapps\ROOT\pdfdownloads/7305E3FA-52CB-47F9-BEF4-9CB5DFB4C367/IIN606505.PDF

yup I know, but i’s not quite clear… what you say works, and what does’nt work…
in case of the live app server, is the file created in the ROOT folder, yes or no?
So is it a writefile issue? or a read issue in Tomcat?

Harjo,

On the live app server, the file is created successfully by WriteFile as:

D:\Servoy\application_server\server\webapps\ROOT\pdfdownloads\7305E3FA-52CB-47F9-BEF4-9CB5DFB4C367\IIN606505.PDF

So when you say ‘in the ROOT’ folder, it is in a subdirectory below the ROOT location called pdfdownloads\7305E3FA-52CB-47F9-BEF4-9CB5DFB4C367

All that part is fine. It’s the fact that when I then do:

application.showURL(‘http://99.99.99.99:8080/pdfdownloads/7305E3FA-52CB-47F9-BEF4-9CB5DFB4C367/IIN606505.PDF’)

… I get a HTTP 403. Obviously the IP address there is not the real one, but the one that’s used is correct.

Which leads me to believe it is a Tomcat issue?

The Windows permissions to the folder in question seem correct.

I’ve made sure the Servoy server is running under an administrator account. Still won’t work.

From reading other posts this should be simple. Can anyone help at all ?

if you are on that server
and you do localhost:8080/pdfdownloads/7305E3FA-52CB-47F9-BEF4-9CB5DFB4C367/IIN606505.PDF

it doesnt work?