You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by sk...@apache.org on 2016/04/08 21:48:38 UTC

cayenne git commit: some fixes for tutorial;

Repository: cayenne
Updated Branches:
  refs/heads/master b45147399 -> 5043d7bed


some fixes for tutorial;


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/5043d7be
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/5043d7be
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/5043d7be

Branch: refs/heads/master
Commit: 5043d7bedfb6ffdee98d7a826c5af9112c37bc25
Parents: b451473
Author: Savva Kolbachev <s....@gmail.com>
Authored: Fri Apr 8 22:47:36 2016 +0300
Committer: Savva Kolbachev <s....@gmail.com>
Committed: Fri Apr 8 22:47:36 2016 +0300

----------------------------------------------------------------------
 .../cayenne-guide/src/docbkx/rop-deployment.xml     |  2 +-
 docs/docbook/getting-started/src/docbkx/webapp.xml  | 16 ++++++++++++----
 tutorials/tutorial/pom.xml                          |  4 ++++
 tutorials/tutorial/src/main/webapp/detail.jsp       |  1 -
 tutorials/tutorial/src/main/webapp/index.jsp        |  3 +--
 5 files changed, 18 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/5043d7be/docs/docbook/cayenne-guide/src/docbkx/rop-deployment.xml
----------------------------------------------------------------------
diff --git a/docs/docbook/cayenne-guide/src/docbkx/rop-deployment.xml b/docs/docbook/cayenne-guide/src/docbkx/rop-deployment.xml
index 3c327da..4fdc932 100644
--- a/docs/docbook/cayenne-guide/src/docbkx/rop-deployment.xml
+++ b/docs/docbook/cayenne-guide/src/docbkx/rop-deployment.xml
@@ -23,7 +23,7 @@
         <note><para>Recent versions of Tomcat and Jetty containers (e.g. Tomcat 6 and 7, Jetty 8) contain code
                 addressing a security concern related to "session fixation problem" by resetting the
                 existing session ID of any request that requires BASIC authentcaition. If ROP
-                service is protected with declarative security (see the the ROP tutorial and the
+                service is protected with declarative security (see the ROP tutorial and the
                 following chapters on security), this feature prevents the ROP client from attaching
                 to its session, resulting in MissingSessionExceptions. To solve that you will need
                 to either switch to an alternative security mechanism, or disable "session fixation

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5043d7be/docs/docbook/getting-started/src/docbkx/webapp.xml
----------------------------------------------------------------------
diff --git a/docs/docbook/getting-started/src/docbkx/webapp.xml b/docs/docbook/getting-started/src/docbkx/webapp.xml
index 8882b87..bec1e8b 100644
--- a/docs/docbook/getting-started/src/docbkx/webapp.xml
+++ b/docs/docbook/getting-started/src/docbkx/webapp.xml
@@ -90,7 +90,7 @@
 
 &lt;% 
     SelectQuery query = new SelectQuery(Artist.class);
-    query.addOrdering(Artist.NAME_PROPERTY, SortOrder.ASCENDING);
+    query.addOrdering(Artist.NAME.getName(), SortOrder.ASCENDING);
 
     ObjectContext context = BaseContext.getThreadObjectContext();
     List&lt;Artist&gt; artists = context.performQuery(query);
@@ -192,9 +192,17 @@
     </section>
     <section xml:id="running-webapp">
         <title>Running Web Application</title>
-        <para>To run the web application we'll use "maven-jetty-plugin". To activate it, let's add
-            the following piece of code to the "pom.xml" file, following the "dependencies" section
-            and save the POM:</para>
+        <para>We need to provide javax servlet-api for our application.</para>
+        <programlisting>&lt;dependency&gt;
+        &lt;groupId>javax.servlet&lt;/groupId&gt;
+        &lt;artifactId>javax.servlet-api&lt;/artifactId&gt;
+        &lt;version>3.1.0&lt;/version&gt;
+        &lt;scope>provided&lt;/scope&gt;
+&lt;/dependency&gt;</programlisting>
+
+        <para>Also to run the web application we'll use "maven-jetty-plugin". To activate it,
+            let's add the following piece of code to the "pom.xml" file, following the "dependencies"
+            section and save the POM:</para>
         <programlisting>&lt;build&gt;
     &lt;plugins&gt;
         &lt;plugin&gt;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5043d7be/tutorials/tutorial/pom.xml
----------------------------------------------------------------------
diff --git a/tutorials/tutorial/pom.xml b/tutorials/tutorial/pom.xml
index a258df5..88d2a19 100644
--- a/tutorials/tutorial/pom.xml
+++ b/tutorials/tutorial/pom.xml
@@ -31,6 +31,10 @@
 			<version>${project.version}</version>
 		</dependency>
 		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+		</dependency>
+		<dependency>
 			<groupId>org.apache.derby</groupId>
 			<artifactId>derby</artifactId>
 			<scope>compile</scope>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5043d7be/tutorials/tutorial/src/main/webapp/detail.jsp
----------------------------------------------------------------------
diff --git a/tutorials/tutorial/src/main/webapp/detail.jsp b/tutorials/tutorial/src/main/webapp/detail.jsp
index d031a8d..d012be0 100644
--- a/tutorials/tutorial/src/main/webapp/detail.jsp
+++ b/tutorials/tutorial/src/main/webapp/detail.jsp
@@ -21,7 +21,6 @@
 <%@ page language="java" contentType="text/html" %>
 <%@ page import="org.apache.cayenne.tutorial.persistent.*" %>
 <%@ page import="org.apache.cayenne.*" %>
-<%@ page import="java.util.*" %>
 <%@ page import="java.text.*" %>
 
 <% 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5043d7be/tutorials/tutorial/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/tutorials/tutorial/src/main/webapp/index.jsp b/tutorials/tutorial/src/main/webapp/index.jsp
index da44af1..b2de13e 100644
--- a/tutorials/tutorial/src/main/webapp/index.jsp
+++ b/tutorials/tutorial/src/main/webapp/index.jsp
@@ -22,12 +22,11 @@
 <%@ page import="org.apache.cayenne.tutorial.persistent.*" %>
 <%@ page import="org.apache.cayenne.*" %>
 <%@ page import="org.apache.cayenne.query.*" %>
-<%@ page import="org.apache.cayenne.exp.*" %>
 <%@ page import="java.util.*" %>
 
 <% 
     SelectQuery query = new SelectQuery(Artist.class);
-    query.addOrdering(Artist.NAME_PROPERTY, SortOrder.ASCENDING);
+    query.addOrdering(Artist.NAME.getName(), SortOrder.ASCENDING);
 
     ObjectContext context = BaseContext.getThreadObjectContext();
     List<Artist> artists = context.performQuery(query);