resource-loading

ERROR [org.apache.velocity] ResourceManager : unable to find resource 'layout.vm' in any resource loader

我与影子孤独终老i 提交于 2019-12-25 06:44:42
问题 MyController.java: @Controller public class ForemanController { @RequestMapping({"/index", "/"}) public ModelAndView home(Model model){ Map<String, String> map = new HashMap<String, String>(); // .. fill map return new ModelAndView("index", "map", map); } } ServletInitializer.java: public class ServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { @Override protected Class<?>[] getRootConfigClasses() { return new Class<?>[0]; } @Override protected Class<?>[]

Alternatives to YepNope and LabJS

不羁岁月 提交于 2019-12-21 02:28:10
问题 I am wanting to load javascript and css files via a resource loader. I was originally using LabJs but I found YepNope more elegant and easier to work with in my scenario. However I am finding it devastatingly slow, which is odd as apparently it is comparable to LabJs in speed on most things. One thing I do have are Etags which I am sure will slow everything down as its still requesting from the server rather than just working off the client cache. Anyway there isnt much outside of the main

How can I make the Topbar extension work with the newest MediaWiki?

爱⌒轻易说出口 提交于 2019-12-13 01:27:49
问题 I run a MediaWiki site which uses the Topbar extension. I recently upgraded the installation to the bleeding edge version from MediaWiki's master branch: version 1.28.0-alpha (91e56cc). Afterwards, the Topbar extension no longer works: Usually, the topbar div is not inserted at all. Occasionally, the topbar div appears but the links are nonfunctional. The latter issue may be a problem with my CSS (I do not know), but the intermittent behavior concerns me. So the first order of business is to

Why does the loading of a POSModel file not work from inside the WEB-INF folder?

左心房为你撑大大i 提交于 2019-12-04 06:39:55
问题 I'm using Spring MVC for my web project. I placed the model files inside the WEB-INF directory String taggerModelPath = "/WEB-INF/lib/en-pos-maxent.bin"; String chunkerModelPath = "/WEB-INF/lib/en-chunker.bin"; POSModel model = new POSModelLoader() .load(new File(servletContext.getResource(taggerModelPath).toURI().getPath())); This worked Windows environment. However when I deployed it on my remote Linux server I got an error HTTP Status 500 - Request processing failed; nested exception is

Alternatives to YepNope and LabJS

非 Y 不嫁゛ 提交于 2019-12-03 08:53:28
I am wanting to load javascript and css files via a resource loader. I was originally using LabJs but I found YepNope more elegant and easier to work with in my scenario. However I am finding it devastatingly slow, which is odd as apparently it is comparable to LabJs in speed on most things. One thing I do have are Etags which I am sure will slow everything down as its still requesting from the server rather than just working off the client cache. Anyway there isnt much outside of the main YepNope site, and they havent released a new version with the fixes on their issues list in a while, so I

Why does the loading of a POSModel file not work from inside the WEB-INF folder?

跟風遠走 提交于 2019-12-02 13:27:37
I'm using Spring MVC for my web project. I placed the model files inside the WEB-INF directory String taggerModelPath = "/WEB-INF/lib/en-pos-maxent.bin"; String chunkerModelPath = "/WEB-INF/lib/en-chunker.bin"; POSModel model = new POSModelLoader() .load(new File(servletContext.getResource(taggerModelPath).toURI().getPath())); This worked Windows environment. However when I deployed it on my remote Linux server I got an error HTTP Status 500 - Request processing failed; nested exception is opennlp.tools.cmdline.TerminateToolException: The POS Tagger model file does not exist! Path: /localhost