Velocity setup in a .war deployment?

Questions and answers on developing, deploying and using plugins and JavaBeans

Velocity setup in a .war deployment?

Postby joe26 » Wed Oct 21, 2020 7:50 pm

Hi all,

The velocityreport.serverURL is http://localhost:8183 and I'm getting an error indicating the URL is using the Servoy container URL of http://localhost:8183/STSX/eastwood/genbc.....

The returned URL should read http://localhost:8183/eastwood/genbc... (generating barcodes)

when called with 'plugins.VelocityReport.getPDFReport('infoSheet.html',context);'

I have the configuration incorrect for the .war deployment and not sure where to do with this error.

eastwood.war is in the main Apache Tomcat webapps directory.

Is a rewrite rule necessary to remove the "STSX\" from the URL on the eastwood side?

Finally, redeployed .war as ROOT.war instead of STSX.war and deployed eastwood.war. It functions but get a
SEVERE: Item at URI http://localhost:8183/eastwood/eastwood ... styles.css not found

Not sure how this would be deployed on an existing server.


Code: Select all
Oct 21, 2020 2:04:39 PM com.servoy.j2db.util.Debug error
SEVERE: IO problem for http://localhost:8183/eastwood/reports/css/styles.css
   at jobsts/scopes/globals/setSampleBarsContext:13646 (setSampleBarsContext)
   at STS3/forms/MWBase/onActionClickInfoSheet:1659 (onActionClickInfoSheet)

Code: Select all
Velocity v3.5.84
velocityreport.serverURL:     http://localhost:8183/
velocityreport.reportfolder:     \\P2VM02\STSXTemp
Posts: 172
Joined: Wed Jun 19, 2013 10:30 pm

Re: Velocity setup in a .war deployment?

Postby ptalbot » Thu Oct 22, 2020 3:04 pm

What you could try to do is to put a full URL (instead of a relative URL) for your CSS styles.css, or place it in ROOT/css/ and put the reference in your "infoSheet.html" template as:
Code: Select all
<link rel="stylesheet" href="http://localhost:8183/css/style.css" type="text/css"/>
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
Posts: 1636
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Return to Plugins and Beans

Who is online

Users browsing this forum: Bing [Bot] and 6 guests