Changes between Version 1 and Version 2 of DJWS


Ignore:
Timestamp:
2011-02-01T14:33:11+01:00 (14 years ago)
Author:
jvelde
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DJWS

    v1 v2  
    88''Say you are working on an application named "My Application", or 'myapp' for short.''
    99
    10 1) The default way of getting the datasource is in Tomcat is from the servlet context. In order to use DJWS, you must add the following line to your 'myapp.properties' file:
     10=== '''1) The default way of getting the datasource is in Tomcat is from the servlet context''' ===
     11In order to use DJWS, you must add the following line to your 'myapp.properties' file:
    1112
    1213{{{
    1314db_mode = standalone
    1415}}}
    15 This places the datasource settings inside your MolgenisServlet. (see how this works: [wiki:MolgenisServletGen http://www.molgenis.org/svn/molgenis/trunk/src/org/molgenis/generators/server/MolgenisServletGen.ftl]) This ALSO works for deploying on Tomcat, so there is no backward compatibility issue :)
     16This places the datasource settings inside your MolgenisServlet. (see how this works: [http://www.molgenis.org/svn/molgenis/trunk/src/org/molgenis/generators/server/MolgenisServletGen.ftl MolgenisServletGen]) This ALSO works for deploying on Tomcat, so there is no backward compatibility issue.
    1617
    17 2) Your MOLGENIS name determines the deploy URL.
    18 
     18=== 2) Your MOLGENIS name determines the deploy URL. ===
    1919The so-called MOLGENIS name of your application is used to form the URL on which it is server. This name taken from the datamodel files, the last one encountered is used. Since our datamodels are shared, you can't just put your app name in one of them.
    2020
     
    2828{{{
    2929model_database =        handwritten/datamodel/shared/auth.xml,\
    30                                         handwritten/datamodel/shared/core.xml,\
    31                                         -- all my datamodel files etc --
    32                                         handwritten/apps/org/molgenis/myapp/myapp_deployname.xml
     30                        handwritten/datamodel/shared/core.xml,\
     31                        #### all my datamodel files etc ####
     32                        handwritten/apps/org/molgenis/myapp/myapp_deployname.xml
    3333}}}
    3434Which typically contains:
     
    3838</molgenis>
    3939}}}
    40 The MOLGENIS name is now 'myapp', retrieved from the MolgenisServlet by ''MolgenisServlet.getMolgenisVariantID()'' in the [[mappings http://www.molgenis.org/svn/gcc/trunk/handwritten/webserver/WWWServer.java].
     40The MOLGENIS name is now 'myapp', retrieved from the MolgenisServlet by ''MolgenisServlet.getMolgenisVariantID()'' in the [http://www.molgenis.org/svn/gcc/trunk/handwritten/webserver/WWWServer.java mapper].
    4141
    42 3) Custom servlets.
     42=== 3) Custom servlets ===
     43To avoid editing hardcoded mappings in the WWWServer [http://www.molgenis.org/svn/gcc/trunk/handwritten/webserver/WWWServer.java mapper] class, we decided to add a dynamic component. Any Java class in handwritten/java/servlets ([http://www.molgenis.org/svn/gcc/trunk/handwritten/java/servlets/ link]) is considered a servlet, and automatically loaded.
    4344
    44 To avoid editing hardcoded mappings in the [WWWServer http://www.molgenis.org/svn/gcc/trunk/handwritten/webserver/WWWServer.java] class, we decided to add a dynamic component. Any Java class in handwritten/java/servlets ([http://www.molgenis.org/svn/gcc/trunk/handwritten/java/servlets/ link]) is considered a servlet, and automatically loaded.
    45 
    46 The filename is used as the servlet name! So for example, 'AddEventMenuServlet' will be served on http://localhost:8080/myapp/AddEventMenuServlet.
     45The filename is used as the servlet name! So for example, '!AddEventMenuServlet.java' will be served on !http://localhost:8080/myapp/AddEventMenuServlet.
    4746
    4847The mapping recurses through all packages within handwritten/java/servlets, so this can be kept tidy in e.g. a package for each application. (though not needed maybe)