Commits

John Kodumal  committed 4778ab8

Added scala library as bundled artifact, created test servlet

  • Participants
  • Parent commits f337708

Comments (0)

Files changed (3)

                 <extensions>true</extensions>
                 <configuration>
                     <productVersion>${refapp.version}</productVersion>
+                    <bundledArtifacts>
+                        <bundledArtifact>
+                            <groupId>com.weiglewilczek.scala-lang-osgi</groupId>
+                            <artifactId>scala-library</artifactId>
+                        </bundledArtifact>
+                    </bundledArtifacts>
                 </configuration>
             </plugin>
             <plugin>

File src/main/resources/atlassian-plugin.xml

     <servlet name="HelloScala" class="com.atlassian.labs.ExampleServlet" key="test">
         <url-pattern>/test</url-pattern>
     </servlet>
+    <servlet name="HelloFromScala" class="com.atlassian.labs.ScalaServlet" key="scala">
+        <url-pattern>/scala</url-pattern>
+    </servlet>
+
 </atlassian-plugin>

File src/main/scala/com/atlassian/labs/ScalaServlet.scala

 package com.atlassian.labs
 
-class ScalaServlet {
-    
+import javax.servlet.http.{HttpServletResponse, HttpServletRequest, HttpServlet}
+
+class ScalaServlet extends HttpServlet {
+    override def doGet(request : HttpServletRequest, response : HttpServletResponse) = {
+        response.getWriter().write("Hello from scala");
+    }
 }