' HTTP状态500 - 无法找到taglib" s"对于URI:/ struts-tags'在Ubuntu服务器上部署war文件时出错

时间:2018-02-06 08:57:39

标签: java maven ubuntu tomcat struts2

我用 Struts2 开发了maven项目。我在 Apache Tomcat 8.5.5 服务器上运行它。该项目的war文件在localhost上运行正常。但是当我在Ubuntu服务器上部署war文件时,它会出错。

我已经阅读了一些文章,他们建议检查我是否添加了struts2-core jar文件。但我已经添加了struts2-core-2.5.2.jar。

寻找解决此问题的一些建议

enter image description here

的pom.xml



<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.projectTest</groupId>
	<artifactId>webplatform</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>
	<name>projectA</name>

	<properties>
		<struts2.version>2.5.2</struts2.version>
		<log4j2.version>2.5</log4j2.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>

		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-core</artifactId>
			<version>${struts2.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-config-browser-plugin</artifactId>
			<version>${struts2.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-junit-plugin</artifactId>
			<version>${struts2.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j2.version}</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.5</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.1.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>tech.sqldao</groupId>
			<artifactId>sql_dao</artifactId>
			<version>0.3.1-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.apache.derby</groupId>
			<artifactId>derby</artifactId>
			<version>10.13.1.1</version>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>6.0.5</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging-api</artifactId>
			<version>1.1</version>
		</dependency>
		<dependency>
			<groupId>com.jgeppert.struts2.bootstrap</groupId>
			<artifactId>struts2-bootstrap-plugin</artifactId>
			<version>2.5.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-json-plugin</artifactId>
			<version>2.5.8</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>20030203.000129</version>
		</dependency>
		<dependency>
			<groupId>com.hynnet</groupId>
			<artifactId>json-lib</artifactId>
			<version>2.4</version>
		</dependency>
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>1.3.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.struts.xwork</groupId>
			<artifactId>xwork-core</artifactId>
			<version>2.3.32</version>
		</dependency>
		<dependency>
			<groupId>javamail</groupId>
			<artifactId>mail</artifactId>
			<version>1.3.2</version>
		</dependency>
		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
			<version>1.5.0-b01</version>
		</dependency>
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts-taglib</artifactId>
			<version>1.3.10</version>
		</dependency>
	</dependencies>

	<build>
		<finalName>ProjectA</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<encoding>UTF-8</encoding>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<url>http://localhost:8080/manager/text</url>
					<server>TomcatServer</server>					
					<username>xxxxx</username>
					<password>xxxxx</password>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<version>8.1.16.v20140903</version>
				<configuration>
					<stopKey>CTRL+C</stopKey>
					<stopPort>8999</stopPort>
					<systemProperties>
						<systemProperty>
							<name>xwork.loggerFactory</name>
							<value>com.opensymphony.xwork2.util.logging.log4j2.Log4j2LoggerFactory</value>
						</systemProperty>
					</systemProperties>
					<scanIntervalSeconds>10</scanIntervalSeconds>
					<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
					<webAppConfig>
						<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
					</webAppConfig>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
&#13;
&#13;
&#13;

0 个答案:

没有答案