Page 1 of 1

Velocity error status 404

PostPosted: Fri May 03, 2019 2:50 pm
by pasin
Hi, we are migrating the Servoy's versione from 5.2.18 to 2019.
The solution works "well" but i am not able to use the Velocity plugin. On my developer the plugin (version 3.5.67) works perfectly and if i call for example the URL "http://127.0.0.1:8080/eastwood/genbc?type=code39&fmt=png&msg=7-8B5334-2&res=384&hrsize=8pt&hrfont=Arial,Helvetica,Sans-serif&height=0.896cm" i get the image.
When i deploy my solution on the server (the plugin is installed correctly, i think) i can't use the plugin.. if i call the URL "http://<SERVER_IP>:8080/eastwood/genbc?type=code39&fmt=png&msg=7-8B5334-2&res=384&hrsize=8pt&hrfont=Arial,Helvetica,Sans-serif&height=0.896cm" return a 404 error. (Look the attached)
Am i doing something wrong?

PS: The situation doesn't change if i call "http://<SERVER_IP>:8080/eastwood/"

Thanks

Re: Velocity error status 404

PostPosted: Sat May 04, 2019 4:06 pm
by mboegem
Hi,

I suspect that the problem is the way tomcat handles the import.
Can you launch your solution or servoy-admin page and check what the url looks like?
Most likely it does have an additional 'context' name in the url and you need to modify the url as this:
http://<SERVER_IP>:8080/<SOLUTIONNAME>/eastwood/genbc?type=code39&fmt=png&msg=7-8B5334-2&res=384&hrsize=8pt&hrfont=Arial,Helvetica,Sans-serif&height=0.896cm

Hope that helps.

Re: Velocity error status 404

PostPosted: Wed May 08, 2019 12:02 am
by ptalbot
I haven't tested Tomcat 8.5.9 but there shouldn't be any problem.

Did you deploy the eastwood.war in /Tomcat/webapps/ ?
Does it look like the eastwood.war is loaded in the Tomcat manager?

The "http://<SERVER_IP>:8080/eastwood/genbc?type=code39&fmt=png&msg=7-8B5334-2&res=384&hrsize=8pt&hrfont=Arial,Helvetica,Sans-serif&height=0.896cm" URL looks correct to me (eastwood being it's own war, the context in this case is really "eastwood", not SOLUTIONNAME, Marc!)

Re: Velocity error status 404

PostPosted: Thu May 16, 2019 11:41 am
by pasin
Hi,
we solved the problem modifing the file "web.xml" inside the package eastood.war
The problem comes with the last Tomcat version.
Sobstitute the old header with the code below and it will works fine.

"<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">"