In the 3.1.x version, the server didn't fail to start without the src/main/webapp path,
but in the 4.1.1 version, the src/main/webapp path must be present for it to run properly.
The following example project uses thymeleaf and does not have a src/main/webapp path because the viewfiles are in src/resources/templates or src/resources/statics.
Is the src/main/webapp path absolutely necessary in Gretty?
exception log (When I removed the webapp path.)
Exception in thread "Thread-1769" java.lang.IllegalStateException: java.nio.file.NoSuchFileException: F:\test\requestMatchers-example-jakarta\src\main\webapp
at org.eclipse.jetty.util.Scanner.addFile(Scanner.java:434)
at org.eclipse.jetty.util.Scanner.setScanDirs(Scanner.java:406)
at org.akhikhl.gretty.JettyScannerManager.startScanner(JettyScannerManager.groovy:70)
at org.akhikhl.gretty.ScannerManager$startScanner.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:88)
at org.akhikhl.gretty.DefaultLauncher.beforeJavaExec(DefaultLauncher.groovy:59)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:362)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:176)
at org.akhikhl.gretty.LauncherBase$_launchThread_closure3.doCall$original(LauncherBase.groovy:180)
at org.akhikhl.gretty.LauncherBase$_launchThread_closure3.doCall(LauncherBase.groovy)
at org.akhikhl.gretty.LauncherBase$_launchThread_closure3.doCall$original(LauncherBase.groovy)
at org.akhikhl.gretty.LauncherBase$_launchThread_closure3.doCall(LauncherBase.groovy)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
at groovy.lang.Closure.call(Closure.java:412)
at groovy.lang.Closure.call(Closure.java:406)
at groovy.lang.Closure.run(Closure.java:493)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.nio.file.NoSuchFileException: F:\test\requestMatchers-example-jakarta\src\main\webapp
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:96)
at java.base/sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:258)
at java.base/sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:933)
hello.
In the 3.1.x version, the server didn't fail to start without the src/main/webapp path, but in the 4.1.1 version, the src/main/webapp path must be present for it to run properly.
The following example project uses thymeleaf and does not have a src/main/webapp path because the viewfiles are in src/resources/templates or src/resources/statics.
Example project
Gretty needs src/main/webapp, so I put a dummy path and file in the example project.
Is the src/main/webapp path absolutely necessary in Gretty?
exception log (When I removed the webapp path.)
Eample Project Zip
thank you have a good day. 👍