Error load , File not found

 

Error loading "GameThumbnail.png". File not found.

Texture2D  mBG = Content.Load<Texture2D>("GameThumbnail.png");

我不论是把图片放到项目根目录还是Debug/Release下,依然是这么说:

图片只有放在项目资源管理器内的"Content"内才能找到AssetName属性。然后要注意的就是Content.Load针对的是Content内的AssetName来读取图片信息的。方法就是把图片放到Content下右键点“属性”。希望这点以后能给各位和我遇到同样困扰的人一个捷径。

1. 资源都是通过Asset Name来访问的,不是通过文件名.

2. 这样写资源管理器

  ContentManager content;

 content = new ContentManager(Services, "Content");

 

展开阅读全文

Internal Error: File /WEB-INF/web.xml not found

08-26

一个自己的小项目.rn在Eclipse里tomcat中运行的时候,完全没有问题. rn但是当export成war布置在tomcat下的时候,就会出错. rn会出现 Internal Error: File /WEB-INF/web.xml not found 的警告.rnrnjsp解析也出错.rn这里贴出某jsp错误.rn[code=HTML]rnorg.apache.jasper.JasperException: /corporation_culture.jsp(2,0) File "/WEB-INF/page/share/taglib.jsp" not foundrn org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)rn org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)rn org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)rn org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:345)rn org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:378)rn org.apache.jasper.compiler.Parser.parseDirective(Parser.java:486)rn org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)rn org.apache.jasper.compiler.Parser.parse(Parser.java:138)rn org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)rn org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)rn org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn[/code]rnrn我的web.xml 在WEB-INF目录下存在着. rn贴出我的web.xmlrn[code=XML]rnrnrn rn contextConfigLocationrn classpath:beans.xmlrn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn rn rn Spring OpenEntityManagerInViewFilterrn org.springframework.orm.jpa.support.OpenEntityManagerInViewFilterrn rn rn Spring OpenEntityManagerInViewFilterrn /*rn rn rn rn rn codeFilterrn com.sjzx.web.filter.SetCodeFilterrn rn charset rn utf-8 rn rn rn rn codeFilterrn *.dorn rn rn codeFilterrn *.jsprn rn rn rn strutsrn org.apache.struts.action.ActionServletrn rn configrn /WEB-INF/struts-config.xmlrn rn 0rn rn rn strutsrn *.do rn rn rn rn rightPanelSessionFilterrn com.sjzx.web.filter.RightPanelSessionFilterrn rn rn rightPanelSessionFilterrn /*rn rn rn rn indexPageFilterrn com.sjzx.web.filter.IndexPageFilterrn rn rn indexPageFilterrn /index.jsprn rn rn rn adminAuthorityFilterrn com.sjzx.web.filter.AdminAuthorityFilterrn rn rn adminAuthorityFilterrn *.dorn rn rn rn Connectorrn net.fckeditor.connector.ConnectorServletrn 1rn rn rn Connectorrn /fckeditor/editor/filemanager/connectors/*rn rn rn rn WebInitializationServletrn WebInitializationServletrn WebInitializationServletrn com.sjzx.web.servlet.WebInitializationServletrn rn rn WebInitializationServletrn /WebInitializationServletrn rn rn rn 500rn /WEB-INF/page/share/error.jsprn rn rn 404rn /WEB-INF/page/share/notfound.jsprn rn rn rn index.jsprn rnrnrn[/code]rnrn觉得奇怪的就是在eclipse里都是正常的 用eclipse export war包后就出现这奇怪的问题.我也google过,试了好久没有解决.rn请各位帮忙看看.感激! 论坛

没有更多推荐了,返回首页