Twitter bootstrap WebSphere—资源被解释为样式表/脚本,但使用MIME类型text/html传输

Twitter bootstrap WebSphere—资源被解释为样式表/脚本,但使用MIME类型text/html传输,twitter-bootstrap,websphere,websphere-liberty,Twitter Bootstrap,Websphere,Websphere Liberty,这是一个非常令人沮丧的问题。我有一个web应用程序的登录页面,HTML如下所示。如您所见,我使用的是WebSphere Application Server提供的基于表单的auth auth method=form,因此表单action=j_security_check 这可以在我的本地WAS Liberty Edition服务器v8.5上本地工作,所有CSS都正确呈现。但当我将其部署到远程服务器IBM WAS v8.0.0.5并使用Chrome/FF/IE8打开应用程序时,会发生以下情况:,

这是一个非常令人沮丧的问题。我有一个web应用程序的登录页面,HTML如下所示。如您所见,我使用的是WebSphere Application Server提供的基于表单的auth auth method=form,因此表单action=j_security_check

这可以在我的本地WAS Liberty Edition服务器v8.5上本地工作,所有CSS都正确呈现。但当我将其部署到远程服务器IBM WAS v8.0.0.5并使用Chrome/FF/IE8打开应用程序时,会发生以下情况:, A.未应用样式表 B我在Chrome web工具中看到以下错误-资源被解释为样式表,但使用MIME类型text/html传输:。login2.html: C即使我尝试登录,broswer显示的也是bootstrap.css文件 B其他HTML页面使用stling可以很好地呈现

我检查了服务器VirtualHosts中的MIME类型,可以看到application/javascript for.js和text/css for.css的定义

我是不是遗漏了什么?如有任何建议/帮助,将不胜感激

PS:在Tomcat容器中的行为也是相同的


在Tomcat容器中的行为是相同的——哪种行为与Liberty概要文件一样正确地呈现CSS?或者在WAS 8.0.0.5上看到的样式表呈现错误…我使用openshift得到了相同的答案-有帮助吗?@user456563您解决过这个问题吗?面临类似的问题。
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Sign in ...</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="assets/css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
      body {
        padding-top: 40px;
        padding-bottom: 40px;
        background-color: #f5f5f5;
      }

      .form-signin {
        max-width: 300px;
        padding: 19px 29px 29px;
        margin: 0 auto 20px;
        background-color: #fff;
        border: 1px solid #e5e5e5;
        -webkit-border-radius: 5px;
           -moz-border-radius: 5px;
                border-radius: 5px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                box-shadow: 0 1px 2px rgba(0,0,0,.05);
      }
      .form-signin .form-signin-heading,
      .form-signin .checkbox {
        margin-bottom: 10px;
      }
      .form-signin input[type="text"],
      .form-signin input[type="password"] {
        font-size: 16px;
        height: auto;
        margin-bottom: 15px;
        padding: 7px 9px;
      }

    </style>
    <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  </head>

  <body>
    <div class="container">
      <form class="form-signin" action="j_security_check" method="post">
        <h2 class="form-signin-heading">Please sign in</h2>
        <input id="j_username" name="j_username" type="text" class="input-block-level" placeholder="Email address">
        <input id="j_password" name="j_password" type="password" class="input-block-level" placeholder="Password">
        <button class="btn btn-large btn-primary" type="submit">Sign in</button>
      </form>
    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="assets/js/jquery-1.8.3.js"></script>
    <script src="assets/js/bootstrap-transition.js"></script>
    <script src="assets/js/bootstrap-alert.js"></script>
    <script src="assets/js/bootstrap-modal.js"></script>
    <script src="assets/js/bootstrap-dropdown.js"></script>
    <script src="assets/js/bootstrap-scrollspy.js"></script>
    <script src="assets/js/bootstrap-tab.js"></script>
    <script src="assets/js/bootstrap-tooltip.js"></script>
    <script src="assets/js/bootstrap-popover.js"></script>
    <script src="assets/js/bootstrap-button.js"></script>
    <script src="assets/js/bootstrap-collapse.js"></script>
    <script src="assets/js/bootstrap-carousel.js"></script>
    <script src="assets/js/bootstrap-typeahead.js"></script>
  </body>
</html>