小编use*_*060的帖子

Maven - 在当前项目中找不到前缀'tomcat7'的插件

我用原型"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)

java maven

9
推荐指数
2
解决办法
3万
查看次数

绝对的uri:http://www.springsource.org/tags/form无法在web.xml或使用此应用程序部署的jar文件中解析

目前,我使用'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)

java spring jsp maven

8
推荐指数
1
解决办法
3万
查看次数

Maven - 无法执行目标org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean

我的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)

java spring spring-mvc maven

7
推荐指数
5
解决办法
8万
查看次数

使用'无法加载资源的Ajax调用:服务器响应状态为500'

我创建了一个执行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)

c# ajax

2
推荐指数
1
解决办法
5万
查看次数

Visual Studio-Nuget-无法加载源的服务索引

这是我的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

你有什么解决方案 ?

先感谢您

visual-studio nuget nuget-package

2
推荐指数
2
解决办法
4585
查看次数

java.io.FileNotFoundException:无法打开[WEB-INF/spring-servlet.xml],因为它不存在

/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)

在我的记忆中,我知道我们可以使用函数来获取项目的当前目录,但我不记得了.

否则,你有什么解决方案吗?

谢谢

java spring spring-mvc

1
推荐指数
1
解决办法
7959
查看次数

标签 统计

java ×4

maven ×3

spring ×3

spring-mvc ×2

ajax ×1

c# ×1

jsp ×1

nuget ×1

nuget-package ×1

visual-studio ×1