web-inf

CLASSPATH, Java Buld Path (eclipse), and WEB-INF\\LIB : what to use, when, and why?

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I recently switched to J2EE from .NET, and am confused about where to put JAR files. I know that the CLASSPATH, WEB-INF, and Eclipse's Java Web Path are all places where JARs can be stored, but I'm confused about which folder to use, when, and why. First off, we have the CLASSPATH. I usually set this by going into "Environment Variables" inside "My Computer." I know that this is the default place where the Java compiler looks for JAR files. When I add a folder or a JAR to my CLASSPATH environment variable, why is it ignored by Eclipse, the

Can not connect JAX-RS service to MVC template

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm attempting to make use of JAX-RS' (Jersey) MVC pattern. Attempts to reach http://localhost:8080/myproject/foos/test result in an error that reads: java.io.IOException: The template name, /view, could not be resolved to a fully qualified template name http://localhost:8080/myproject/foos results in the same error. What am I missing? Resource: package resources; import com.sun.jersey.api.view.Viewable; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core

JSP in /WEB-INF returns “HTTP Status 404 The requested resource is not available”

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I created a JSP file. sample.jsp Insert title here This is jsp program I placed it here in the samplejsp project. samplejsp `-- WebContent ` -- WEB - INF `-- sample.jsp I opened it on the following URL. http://localhost:8080/samplejsp/sample.jsp But it shows the following error in browser. 404 ERROR The requested resource (/sample.jsp) is not available. 回答1: 404 simply means "Not Found" . Either the URL is wrong (note: case sensitive!), or the resource is not there where you think it is. Just verify the URL and/or verify if the

Spring MVC ViewResolver not mapping to HTML files

匿名 (未验证) 提交于 2019-12-03 01:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I cannot get spring mvc to resolve .html view files. I have the following view folder structure: WEB-INF `-views |- home.jsp `- home.html I have a simple hello world controller method that just prints a message and returns the view name "home". I have a home.jsp file, but would like to use the home.html instead. spaceShips / When I hit spaceships/home the controller prints the hello world message and I see the home.jsp view without a problem. The problem is when I change the suffix to .html. After changing the suffix and navigating to /home,

Why point “[INFO] WEB-INF/web.xml already added, skipping” when packaging(war) the project using maven?

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: When packaging the project using maven, the maven-war-plugin:war goal has the following information. [ INFO ] Packaging webapp [ INFO ] Assembling webapp [ xxx ] in [ /Users/ zhangna13 / Workspace / xxx / xxx / target / xxx - release - 1.0 - SNAPSHOT ] [ INFO ] Processing war project [ INFO ] Copying webapp resources [ /Users/ zhangna13 / Workspace / xxx / xxx / src / main / webapp ] [ INFO ] Webapp assembled in [ 2230 msecs ] [ INFO ] Building war : /Users/ zhangna13 / Workspace / xxx / xxx / target / xxx - release - 1.0 -

Eclipse Deployment Assembly - Creates .war of dependency project inside main project WEB-INF/lib?

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a main web project that contains all the things required to deploy and hit the page via a browser. Then I have several "functions" each as a separate project that can be included into the main project. To take an example, I have MainApp and functions.reportsApp . When building these with ant the following happens: - MainApp.war - mainApp/jsf/Pages.faces, etc - reportsApp/jsf/Reports.faces, etc - WEB-INF/web.xml, mainapp-faces-config.xml, reportsApp-faces.config.xml, etc - WEB-INF/lib - MainApp.jar - META-INF/* (MainApp's) - my/company

Java: Could not resolve view with name in Spring MVC

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am facing this error while I am clicking on a link to display a page. I'm using Spring MVC Tiles. Error: javax.servlet.ServletException: Could not resolve view with name 'contact' in servlet with name 'dispatcher' Below is the code. tiles.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"> <tiles-definitions> <definition name="base.definition" template="/WEB-INF/jsp/layout.jsp"> <put-attribute

I can&#039;t start tomcat 7 server on linux openshift - Failed to start end point associated with ProtocolHandler [“http-nio-12345”]

匿名 (未验证) 提交于 2019-12-03 00:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've checked out this question which is very similar to mine, however the difference is I'm using a port > 1024 (i.e. I'm using port 12345) which is what the answerer said to do. I'm trying to run a Tomcat instance on an Openshift server.. Any help is appreciated! Thanks! My execution script is as follows: nohup java -Xms384m -Xmx412m -jar target/*.war --server.port=12345 Note the "-jar" is this right? I am deploying a .war file not a .jar? I think.. Sorry, a little new to this. The important part of my error output is as follows: 2015-10-07

IntelliJ idea 2017创建Web项目后web文件夹下没有WEB-INF的解决方法

匿名 (未验证) 提交于 2019-12-03 00:34:01
使用idea创建一个Web项目后发现并没有网上教程所说的web文件夹下有WEB-INF文件夹以及web.xml,查看 刘荣星的博客 解决办法: Ctrl+Shift+Alt+S快捷键进入Project structure(项目结构)管理的界面 选择左边菜单栏里的Facet,点击后能看到有Deployment Descriptors的输入框 文章来源: IntelliJ idea 2017创建Web项目后web文件夹下没有WEB-INF的解决方法

WEB-INF目录下js访问问题。

匿名 (未验证) 提交于 2019-12-03 00:32:02
ssm跳转好了jsp调用不到WEBINF下的js目录文件。 之前调用不到的原因是因为访问的都是WebRoot下的js。 解决办法: 配置:springmvc.xml 这里配置的时候写上 WEB-INF /WEB-INF /js/" mapping="/js/**"/> /WEB-INF /img/" mapping="/img/**"/> 文章来源: WEB-INF目录下js访问问题。