Title: [waffle-scm] [806] trunk/examples/jruby-example/src/main/ruby: Fixed ruby path to work with jetty.
Revision
806
Author
mauro
Date
2008-09-03 08:08:09 -0500 (Wed, 03 Sep 2008)

Log Message

Fixed ruby path to work with jetty.
Fixed ruby webapp views.

Modified Paths


Added Paths

Removed Paths

Diff

Modified: trunk/examples/jruby-example/src/main/ruby/foobar.rb (805 => 806)

--- trunk/examples/jruby-example/src/main/ruby/foobar.rb	2008-09-03 12:23:58 UTC (rev 805)
+++ trunk/examples/jruby-example/src/main/ruby/foobar.rb	2008-09-03 13:08:09 UTC (rev 806)
@@ -2,7 +2,7 @@
 
   def index
     @var1 = "is cool and fast, right?"
-    render("foobar.jspx")
+    render("foobar.rhtml")
   end
 
   def hola
@@ -50,15 +50,15 @@
     "HELLO WORLD #{request.local_name} #{request.local_port}"
   end
 
-  def view_jspx
+  def view
     p "CALLED!"
     @var1 = "this is my variables value from jruby!!!!!!!!"
-    view = render("foobar.jspx")
+    view = render("foobar.rhtml")
     p "DONE"
     return view
   end
 
-  def redirect_to_jspx
+  def redirect
     @var1 = "this is my variables value from jruby xxx"
     return redirect_to("index.html")
   end

Modified: trunk/examples/jruby-example/src/main/webapp/WEB-INF/web.xml (805 => 806)

--- trunk/examples/jruby-example/src/main/webapp/WEB-INF/web.xml	2008-09-03 12:23:58 UTC (rev 805)
+++ trunk/examples/jruby-example/src/main/webapp/WEB-INF/web.xml	2008-09-03 13:08:09 UTC (rev 806)
@@ -45,10 +45,10 @@
   </context-param>
 
   <!-- Define a relative path to the ruby script directory (for development) -->
-  <!-- TODO: this needs to be more forgiving -->
+  <!-- NOTE:  this path work with jetty maven plugin; you may need to adapt it your dev environment -->
   <context-param>
     <param-name>org.codehaus.waffle.ruby.path</param-name>
-    <param-value>dir:../../../examples/jruby-example/src/main/ruby/</param-value>
+    <param-value>dir:../../../src/main/ruby/</param-value>
   </context-param>
 
   <listener>

Deleted: trunk/examples/jruby-example/src/main/webapp/fielderrors.jspx (805 => 806)

--- trunk/examples/jruby-example/src/main/webapp/fielderrors.jspx	2008-09-03 12:23:58 UTC (rev 805)
+++ trunk/examples/jruby-example/src/main/webapp/fielderrors.jspx	2008-09-03 13:08:09 UTC (rev 806)
@@ -1,7 +0,0 @@
-<c:forEach items="${errors.allErrorMessages}" var="error"
-           xmlns:c="http://java.sun.com/jsp/jstl/core">
-  <script type="text/_javascript_">
-    $('${error.name}').value = '${error.value}';
-    $('${error.name}').style.border = 'solid red 2px';
-  </script>
-</c:forEach>
\ No newline at end of file

Deleted: trunk/examples/jruby-example/src/main/webapp/foobar.jspx (805 => 806)

--- trunk/examples/jruby-example/src/main/webapp/foobar.jspx	2008-09-03 12:23:58 UTC (rev 805)
+++ trunk/examples/jruby-example/src/main/webapp/foobar.jspx	2008-09-03 13:08:09 UTC (rev 806)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:jsp="http://java.sun.com/JSP/Page"
-      xmlns:waffle="http://waffle.codehaus.org">
-
-<jsp:output doctype-root-element="html"
-            doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
-            doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-<jsp:directive.page contentType="text/html;charset=UTF-8"/>
-
-<head>
-  <title>From Ruby Script</title>
-</head>
-
-<body>
-<h2>Waffle and JRuby ${var1}</h2>
-</body>
-
-</html>
\ No newline at end of file

Copied: trunk/examples/jruby-example/src/main/webapp/foobar.rhtml (from rev 799, trunk/examples/jruby-example/src/main/webapp/foobar.jspx) (0 => 806)

--- trunk/examples/jruby-example/src/main/webapp/foobar.rhtml	                        (rev 0)
+++ trunk/examples/jruby-example/src/main/webapp/foobar.rhtml	2008-09-03 13:08:09 UTC (rev 806)
@@ -0,0 +1,11 @@
+<html>
+<head>
+  <title>From Ruby Script</title>
+</head>
+
+<body>
+<h2>Waffle and JRuby</h2>
+<%= @var1 %>
+</body>
+
+</html>
\ No newline at end of file

Property changes: trunk/examples/jruby-example/src/main/webapp/foobar.rhtml

Name: svn:mergeinfo
   + 


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to