Aplicaciones Web Autónomas con Java
Jetty + ORMLite + Derby + Click
###
-
[[[http://www.eclipse.org/downloads/ Eclipse IDE for Java EE]]] (Helios o Indigo). -
[[[http://www.eclipse.org/webtools/ Eclipse Web Tools Platform]]] -
[[[http://wiki.eclipse.org/Jetty_WTP_Plugin Eclipse Jetty WTP Plugin]]] -
[[http://www.eclipse.org/jetty/ Jetty]] (7.2) -
[[[http://db.apache.org/derby/integrate/derby_plugin.html Eclipse Derby 10 Core plugin]]] -
[[http://ormlite.com/ ORMLite]] -
[[[http://click.apache.org Apache Click]]] (2.3.0)
### {i} Helios e Indigo
- ’'’Help->Install new software’’’ agrega ‘‘http://download.eclipse.org/jetty/updates/jetty-wtp’’
- Selecciona ‘’– All Available Sites –’’ y en el filtro busca ‘‘Web Tools Platform’’, marca la casilla de ‘'’Web Tools Platform (WTP 3.x)’’’
- Selecciona ‘’– All Available Sites –’’ y en el filtro busca ‘‘jetty’’, marca la casilla ‘'’Jetty WTP Adaptor Site’’’
- ’'’Click Finish’’’ y ‘'’acepta las licencias’’’.
- ’'’Reinicia Eclipse’’’ cuando la instalación te lo pida. #!wiki red/solid {i} Indigo Incorrecto
- ’'’Windows->Preferences->Server->Runtime environment’’’
- Click ‘'’Add…’’’ button
- Click ‘'’Download additional server adapters’’’
- Selecciona ‘'’Jetty Generic Server Adaptator’’’ de la lista e instala el adaptador.
- Reinicia Eclipse
- ’'’Windows->Preferences->Server->Runtime environment’’’
- Click ‘'’Add…’’’ button
- }}}
{OK} Genérico
- ’'’Descomprime clickide-2.3.0.zip’’’ en ‘‘$ECLIPSE_HOME’’
- ’'’Descomprime derby_core_plugin_10.8.1.zip’’’ y ‘'’derby_ui_plugin_1.1.3.zip’’’ en ‘‘$ECLIPSE_HOME’’
- ’'’Descomprime jetty-distribution-7.2.2.v20101205.zip’’’ en algún lugar que será ‘‘$JETTY_HOME’’.
- ’'’Window->Preferences->Server->Runtime Environments’’’, ‘'’Click botón Add’’’ y selecciona ‘‘Jetty v7.2’’.
- ’'’File->New->Dynamic Web Project’’’
- ’'’Click derecho al proyecto’’’, ‘'’Apache Derby->Add Derby Nature’’’
- ’'’Copia los siguientes jars en’’’: ‘‘WebContent/WEB-INF/lib’’
- '’derby.jar’’
- '’derbyclient.jar’’
- '’ormlite-core-4.23.jar’’
- '’ormlite-jdbc-4.23.jar’’
- ’’‘¡Empieza a construir tu aplicación!’’’
###
StandAloneApp ├── src │ └── StandAloneApp │ ├── entity │ │ ├── ExistenciaProducto.java │ │ ├── Producto.java │ │ └── Proveedor.java │ ├── page │ │ ├── BasePage.java │ │ ├── BorderTemplate.java │ │ ├── HomePage.java │ │ ├── ProductoPage.java │ │ └── ProveedorPage.java │ ├── service │ ├── test │ └── util │ └── StartServer.java └── WebContent ├── border-template.htm ├── css │ └── ruby.css ├── home.htm ├── images ├── index.html ├── META-INF │ └── MANIFEST.MF ├── producto.htm ├── proveedor.htm └── WEB-INF ├── click.xml ├── lib │ ├── click-2.3.0.jar │ ├── click-extras-2.3.0.jar │ ├── derbyclient.jar │ ├── derby.jar │ ├── ormlite-core-4.22.jar │ └── ormlite-jdbc-4.22.jar └── web.xml }}}
ClassNotFoundException: org.objectweb.asm.ClassVisitor Add jetty/lib/annotations/asm jar to server config (F3)
java.lang.NoClassDefFoundError: javax/annotation/security/RunAs Add jetty/lib/annotations/annotations.jar
Referencias
-
[[[http://github.com/ecelis/Ruby-Glass/|Versión|completa de la aplicación de ejemplo]]]
CategoryProgramacion