繁体   English   中英

xsbt-web:启动容器后,我无法访问该网页

[英]xsbt-web: after start the container, I cannot access the webpage

我的build.sbt:

name := "admin"

version := "1.0"

scalaVersion := "2.9.1"

seq(webSettings: _*)

scanDirectories in Compile := Nil

/************************************************************************/
// Jetty configurations
port in container.Configuration := 9091
/************************************************************************/

resolvers ++= Seq(
  "Scala Tools Releases" at "http://scala-tools.org/repo-releases/",
  "Java.net Maven2 Repository" at "http://download.java.net/maven/2/"
)

libraryDependencies ++= {
  val liftVersion = "2.4" // Put the current/latest lift version here
  Seq(
    "net.liftweb" %% "lift-webkit" % liftVersion % "compile->default",
    "net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",
    "net.liftweb" %% "lift-wizard" % liftVersion % "compile->default"
  )
}

libraryDependencies ++= Seq(
  "org.apache.httpcomponents" % "httpclient" % "4.1.2",
  "javax.servlet" % "servlet-api" % "2.5" % "provided",
  "junit" % "junit" % "3.8" % "test",
  "org.eclipse.jetty" % "jetty-webapp" % "7.3.0.v20110203" % "container",
  "ch.qos.logback" % "logback-classic" % "0.9.26"
)

项目/plugins.sbt

resolvers += "Web plugin repo" at "http://siasia.github.com/maven2"

libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v + "-0.2.11"))

从命令行重新加载配置后,我尝试执行container:start ,然后访问http://localhost:9091但失败。

容器的日志信息:开始

> container:start
[info] jetty-7.3.0.v20110203
[info] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
[info] started o.e.j.w.WebAppContext{/,[file:/D:/codebase/project/almeet-web/src
/main/webapp/]}
[info] Started SelectChannelConnector@0.0.0.0:9091
[success] Total time: 1 s, completed Feb 15, 2012 1:46:18 PM

所以我想知道我是否错过了一些配置?

./src/main/webapp/META-INF/web.xml什么?

该插件包括许多测试项目。 这是一个简单的servlet项目:

https://github.com/siasia/xsbt-web-plugin/blob/master/src/sbt-test

在其中, web.xml

https://github.com/siasia/xsbt-web-plugin/blob/master/src/sbt-test/web/servlet/src/main/webapp/WEB-INF/web.xml

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM