我用原型"webapp"创建了一个Maven项目但是当我启动命令"mvn tomcat7:start"时,我出现以下错误:
No plugin found for prefix 'tomcat7' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\dark\.m2\repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
Run Code Online (Sandbox Code Playgroud)
我的项目结构:
-src
-main
-resources
-webapp
-WEB-INF
-web.xml
-index.jsp
-target
-classes
-dependency
- // the 'dependency' directory contains all the jar files …Run Code Online (Sandbox Code Playgroud) 目前,我使用'Maven'项目,我在我的pom.xml中放入当前的依赖项来使用Spring Framework,其中org.springframework.version = 3.1.0.RELEASE:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<!-- Spring MVC framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>${org.springframework.version}</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
所有jar依赖项都位于target/myGoogleAppEngine-0.0.1-SNAPSHOT/WEB-INF/lib中.该目录包含:
spring-aop-3.1.0.RELEASE.jar
spring-beans-3.1.0.RELEASE.jar
spring-webmvc-3.1.0.RELEASE.jar
spring-web-3.1.0.RELEASE.jar
spring-security-taglibs-3.1.0.RELEASE.jar
spring-security-web-3.1.0.RELEASE.jar
...
Run Code Online (Sandbox Code Playgroud)
在我的address.jsp的开头,我有以下几行:
<%@ taglib prefix="form" uri="http://www.springsource.org/tags/form" %>
Run Code Online (Sandbox Code Playgroud)
但是当我执行address.jsp时,我遇到以下错误:
Error 500
org.apache.jasper.JasperException: The absolute uri: http://www.springsource.org/tags/form cannot be resolved in either web.xml or the jar files deployed with this application
Run Code Online (Sandbox Code Playgroud) 我的pom.xml中的以下依赖项存在问题,其中org.springframework.version = 3.1.0.RELEASE:
<!-- Spring MVC framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
当我执行命令行'mvn clean install'时,我遇到以下错误:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.052s
[INFO] Finished at: Sat Dec 07 15:49:04 CET 2013
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project myGoogleAppEngine: Failed to clean project: Failed to delete C:\EclipseProjects\myGoogleAppEngine\target\myGoogleAppEngine-0.0.1-SNAPSHOT\WEB-INF\lib\spring-webmvc-3.1.0.RELEASE.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run …Run Code Online (Sandbox Code Playgroud) 我创建了一个执行ajax调用的函数,但是当我在C#中调用我的GetTempData方法时出现此错误:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
function restoreDatas() {
$.ajax({
url: "/AddRecipe/GetTempData",
type: 'GET',
dataType: 'json',
contentType: 'application/json',
cache: false,
processData: false,
success: function (result) {
}
});
}
Run Code Online (Sandbox Code Playgroud)
ajax调用调用的C#方法:
public ActionResult GetTempData()
{
return Json(
new
{
title = Session["title"],
cookingTime = Session["cookingTime"],
preparationTime = Session["preparationTime"],
IngredientList = Session["IngredientList"],
ingredientsDescription = Session["ingredientsDescription"],
nbPersons = Session["nbPersons"],
Category = Session["Category"],
difficulty = Session["difficulty"],
nbStars = Session["nbStars"],
file = Session["file"]
}, …Run Code Online (Sandbox Code Playgroud) 这是我的NuGet.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<disabledPackageSources>
<add key="Microsoft and .NET" value="true" />
</disabledPackageSources>
</configuration>
Run Code Online (Sandbox Code Playgroud)
现在,在Visual Studio中,当我尝试安装'geckofx45'软件包时,出现以下错误:
install-package geckofx45 install-package:无法加载源https://api.nuget.org/v3/index.json的服务索引。在第1行:char:1 + install-package geckofx45 + ~~~~~~~~~~~~~~~~~~~~~~~ + + CategoryInfo:未指定:(:) [Install-Package ],异常+ FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
你有什么解决方案 ?
先感谢您
在/src/main/java/com/application/myGoogleAppEngine/controller/AddressController.java,我想使用此说明在以下后面使用bean:
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("/WEB-INF/spring-servlet.xml");
Run Code Online (Sandbox Code Playgroud)
我的spring-servlet.xml文件位于/src/main/webapp/WEB-INF/目录中.
当我执行我的spring应用程序时,我遇到以下错误:
java.io.FileNotFoundException: class path resource [WEB-INF/spring-servlet.xml] cannot be opened because it does not exist
Run Code Online (Sandbox Code Playgroud)
在我的记忆中,我知道我们可以使用函数来获取项目的当前目录,但我不记得了.
否则,你有什么解决方案吗?
谢谢