vertx-web icon indicating copy to clipboard operation
vertx-web copied to clipboard

some problem when use vertx4.x

Open smwg opened this issue 2 years ago • 6 comments

I'm using freemarker in my project and everything works fine in 3.x. However, after I upgraded to 4.2.4, static files such as css and js cannot be accessed, and 404 is always returned. router.route().handler(StaticHandler.create("school"));

smwg avatar Feb 22 '22 05:02 smwg

@smwg the description isn't enough to troubleshoot the problem. The example you wrote is used often in our test suite and seems to be valid. Can you provide a small project with the error and let us know which request is returning 404?

pmlopes avatar Mar 23 '22 13:03 pmlopes

@smwg the description isn't enough to troubleshoot the problem. The example you wrote is used often in our test suite and seems to be valid. Can you provide a small project with the error and let us know which request is returning 404?

20220806160518

This is the result obtained by using remote debug. Could you please help me to find out the cause

smwg avatar Aug 06 '22 08:08 smwg

@smwg the description isn't enough to troubleshoot the problem. The example you wrote is used often in our test suite and seems to be valid. Can you provide a small project with the error and let us know which request is returning 404?

smwg avatar Aug 08 '22 00:08 smwg

I have this problem too!

hectorqin avatar Aug 11 '22 03:08 hectorqin

@smwg @hectorqin a simple reproducer will help us understanding your problem. The image in above comment is not clear, like why the localFile does not start with school since you were creating the handler using StaticHandler.create("school")

gaol avatar Aug 11 '22 06:08 gaol

@gaol It doesn't have much to do with 'StaticHandler.create("school")'. It is the same problem with the issues( https://github.com/vert-x3/vertx-web/issues/2183). In fact, I have located the issues. As long as I use the Caching capability of io.vertx.ext.web.common.template.Cacheingtemplateengine, static resources cannot be accessed after packaging

smwg avatar Aug 11 '22 10:08 smwg