Created
October 9, 2011 17:27
-
-
Save aolshevskiy/1273937 to your computer and use it in GitHub Desktop.
Hello world example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seq(webSettings :_*) | |
libraryDependencies ++= Seq( | |
"javax.servlet" % "servlet-api" % "2.5" % "provided", | |
"org.mortbay.jetty" % "jetty" % "6.1.22" % "container" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import java.io._ | |
import javax.servlet.http._ | |
import javax.servlet._ | |
class HelloWorld extends HttpServlet { | |
override def doGet (req: HttpServletRequest, res: HttpServletResponse) | |
{ | |
val out = res.getWriter() | |
out.println("Hello, world") | |
out.close() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v + "-0.2.4")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd"> | |
<servlet> | |
<servlet-name>hello</servlet-name> | |
<servlet-class>test.HelloWorld</servlet-class> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>hello</servlet-name> | |
<url-pattern>/hello</url-pattern> | |
</servlet-mapping> | |
</web-app> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment