You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by Apache Wiki <wi...@apache.org> on 2012/04/02 12:46:13 UTC

[Thrift Wiki] Trivial Update of "Thrift & Eclipse & JUnit with TServlet" by DJDaveMark

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Thrift Wiki" for change notification.

The "Thrift & Eclipse & JUnit with TServlet" page has been changed by DJDaveMark:
http://wiki.apache.org/thrift/Thrift%20%26%20Eclipse%20%26%20JUnit%20with%20TServlet?action=diff&rev1=1&rev2=2

Comment:
Table of contents and Headers update

- == Installation ==
  If you haven't downloaded thrift yet: http://thrift.apache.org/download/
  
   1. Download `thrift-`''`version`''`.tar.gz` and extract it somewhere, eg. "thrift-''version''" (from here referred to as `$thrift-`''`version`'').
@@ -8, +7 @@

   1. For Linux: http://wiki.apache.org/thrift/ThriftInstallation
   1. At the command prompt, go to `thrift-`''`version`''`/lib/java` and execute `ant` to compile the source code into the generated `build` folder.
  
- == Installation Editeur Eclipse ==
+ <<TableOfContents(3)>>
+ 
+ == Eclipse Editor ==
   1. Help` --> `Software Updates` --> `Add Site...
   1. URL: http://thrift4eclipse.sourceforge.net/updatesite/
   1. Tick: Thrift4Eclipse
@@ -23, +24 @@

   1. In `thrift-`''`version`''`/lib/java/lib` copy all the jars into `ThriftExample/WebContent/WEB-INF/lib`
   1. In `ThriftExample/Java Resources/src` create the file `exemple.thrift` with the following content:
  
+ === exemple.thrift ===
  {{{
  namespace java example
  
@@ -50, +52 @@

   1. In the package `example` create the following files:
  
  
- ServiceExampleImpl.java
+ === ServiceExampleImpl.java ===
  {{{
  package example;
  
@@ -67, +69 @@

  }}}
  
  
- ClientExample.java
+ === ClientExample.java ===
  {{{
  package example;
  
@@ -101, +103 @@

  }}}
  
  
- ServerExample.java
+ === ServerExample.java ===
  {{{
  package example;
  
@@ -141, +143 @@

   1. In `test` create the package `example` then in there create the following file:
  
  
- TestExample.java
+ === TestExample.java ===
  {{{
  package example;
  
@@ -197, +199 @@

   1. Class name: `TServletExample`
  
  Replace the generated code with the following:
+ 
+ === TServletExample.java ===
  {{{
  package example;
  
@@ -231, +235 @@

  Note the URL if it's not the same as this one: `http://localhost:8080/ThriftExample/TServletExample`<<BR>>
  You'll have to replace it in the following code if it's different:
  
- == TServlet Test Unitaire ==
+ == TServlet Unit Test ==
  Declare the following fields at the top of the TestExample class:
  {{{
  private static BasicHttpParams params;