2016-09-30 4 views
0

githubに2つのブランチがありました。 2つ目はフロント統合のためのもので、マスターとマージするまで完全に機能しました。マージ後にCSSファイルがhtmlファイルとして処理される

マイindex.jspをファイル:

<%@ page contentType="text/html;charset=UTF-8" language="java" %> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@ taglib prefix="ex" uri="/WEB-INF/custom.tld" %> 

<html> 
<jsp:include page="pages/headFragment.jsp"/> 

<body> 
<body> 
... 
</body> 
</html> 

headFragment.jspは次のとおりです。ブラウザのコンソールで

<%@ page contentType="text/html;charset=UTF-8" language="java" %> 
<head> 
<!-- Animate.css --> 
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/animate.css"> 
    <!-- Icomoon Icon Fonts--> 
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icomoon.css"> 
    <!-- Simple Line Icons --> 
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/simple-line-icons.css"> 
</head> 

私はいくつかのエラーを持っている: にSyntaxError:期待表現、 '<' しかし、彼らはcssファイルではないcssファイルに接続されています。私のanimate.cssは、ページ全体の本体を持つhtmlファイルとしてブラウザによって解釈されます。リンクは正常に解釈されますが、リンクは正常に解釈されません。

私はそれがCSSのスタイルシートをリンクすることに問題があると思っていますが、私はグーグルで検索し、多くのオプションを試してみました。興味深いのは、フロント統合部分では通常動作していますが、マージ後にはcssファイルが含まれていないことです。

は私ののpom.xmlファイルもありjsのファイルとの問題もありますが、私はまずCSSをrepareしようとした...

そして、ところで、私はのIntelliJ 2016年2月4日に取り組みます

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns="http://maven.apache.org/POM/4.0.0" 
     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>webpage</groupId> 
    <artifactId>web_page</artifactId> 
    <version>1.0-SNAPSHOT</version> 
    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <configuration> 
        <source>1.8</source> 
        <target>1.8</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <configuration> 
        <warSourceDirectory>web</warSourceDirectory> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
    <packaging>war</packaging> 

    <dependencies> 
     <!-- https://mvnrepository.com/artifact/postgresql/postgresql --> 
     <dependency> 
      <groupId>postgresql</groupId> 
      <artifactId>postgresql</artifactId> 
      <version>9.1-901.jdbc4</version> 
     </dependency> 

     <!-- http://repo1.maven.org/maven --> 
     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>jstl</artifactId> 
      <version>1.2</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --> 
     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>javax.servlet-api</artifactId> 
      <version>3.1.0</version> 
     </dependency> 

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

     <dependency> 
      <groupId>javax</groupId> 
      <artifactId>javaee-web-api</artifactId> 
      <version>7.0</version> 
      <scope>provided</scope> 
     </dependency> 

    </dependencies> 

</project> 

答えて

0

お困りの方

グローバル・ウェルカム・パス '/'がロードされたサーブレットに問題が発生しました。この経路のf.eへの変更。 '/ yolo'はすべての衝突を解決します。

関連する問題