Tomcat error 403 with deployed solution.

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Tomcat error 403 with deployed solution.

Postby alan.bourke » Thu Oct 16, 2014 4:18 pm

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.
Code: Select all
plugins.file.writefile
does not work I suspect because the server is behind a NAT router. This is borne out by
Code: Select all
plugins.it2be_tools.server().IP
always returning a 192.168 IP address.

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
Code: Select all
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
Code: Select all
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
alan.bourke
 
Posts: 30
Joined: Thu Sep 05, 2013 2:08 pm

Re: Tomcat error 403 with deployed solution.

Postby alan.bourke » Fri Oct 17, 2014 12:33 pm

Is this a Tomcat configuration thing? Anyone?
alan.bourke
 
Posts: 30
Joined: Thu Sep 05, 2013 2:08 pm

Re: Tomcat error 403 with deployed solution.

Postby Harjo » Fri Oct 17, 2014 3:11 pm

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.
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4269
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Tomcat error 403 with deployed solution.

Postby alan.bourke » Fri Oct 17, 2014 3:51 pm

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
alan.bourke
 
Posts: 30
Joined: Thu Sep 05, 2013 2:08 pm

Re: Tomcat error 403 with deployed solution.

Postby Harjo » Fri Oct 17, 2014 4:54 pm

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 Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4269
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Tomcat error 403 with deployed solution.

Postby alan.bourke » Fri Oct 17, 2014 5:07 pm

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.
alan.bourke
 
Posts: 30
Joined: Thu Sep 05, 2013 2:08 pm

Re: Tomcat error 403 with deployed solution.

Postby alan.bourke » Mon Oct 20, 2014 12:49 pm

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 ?
alan.bourke
 
Posts: 30
Joined: Thu Sep 05, 2013 2:08 pm

Re: Tomcat error 403 with deployed solution.

Postby jcompagner » Wed Dec 31, 2014 5:47 pm

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

it doesnt work?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7974
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Web Development

Who is online

Users browsing this forum: No registered users and 3 guests