Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts
Friday, November 17, 2017
How to create war file for tomcat without eclipse
references:
[1] https://stackoverflow.com/questions/1001714/how-to-create-war-files
Thursday, July 25, 2013
Host File Browser
Some times you need explore your files in your host server, here you have tools for that.
References:
[1] http://www.vonloesch.de/filebrowser.html
[2] Download http://www.4shared.com/zip/B2XFPfrI/jspbrowser.html
References:
[1] http://www.vonloesch.de/filebrowser.html
[2] Download http://www.4shared.com/zip/B2XFPfrI/jspbrowser.html
Thursday, September 22, 2011
Dynamic Java Web Start App (JNLP) Using Servlet
Remember sign jar files main and libraries before publish/upload
set path=%path%;c:\J2EE\Java\jdk1.6.0\bin
keytool -genkey -keystore OlvaKeys -alias Olva
jarsigner -keystore OlvaKeys vsislocal.importer.jar Olva
jarsigner -keystore OlvaKeys postgresql-8.4-701.jdbc4.jar Olva
Notes:
The jardiff tool, jnlp-servlet.jar file, and jnlp.jar file http://www.blogger.com/img/blank.gifcan be found in the samples directory of the JDK.
reference:
[1] http://download.oracle.com/javase/1.4.2/docs/guide/jws/downloadservletguide.html
[2] http://portal.krypthonas.de/2010/10/11/passing-dynamically-parameters-to-a-java-web-start-app-jnlp/
[3] Distribute JWS Application http://www1.oan.es/informes/archivos/IT-OAN-2006-8.pdf
[4] Automatically Signing http://ezzatron.com/2009/09/29/automatically-signing-jar-files-in-netbeans/
[5] Netbeans + Webstart + Auto-signing http://netbeans-org.1045718.n5.nabble.com/Webstart-High-Learning-Curve-td2912653.html
set path=%path%;c:\J2EE\Java\jdk1.6.0\bin
keytool -genkey -keystore OlvaKeys -alias Olva
jarsigner -keystore OlvaKeys vsislocal.importer.jar Olva
jarsigner -keystore OlvaKeys postgresql-8.4-701.jdbc4.jar Olva
Notes:
The jardiff tool, jnlp-servlet.jar file, and jnlp.jar file http://www.blogger.com/img/blank.gifcan be found in the samples directory of the JDK.
reference:
[1] http://download.oracle.com/javase/1.4.2/docs/guide/jws/downloadservletguide.html
[2] http://portal.krypthonas.de/2010/10/11/passing-dynamically-parameters-to-a-java-web-start-app-jnlp/
[3] Distribute JWS Application http://www1.oan.es/informes/archivos/IT-OAN-2006-8.pdf
[4] Automatically Signing http://ezzatron.com/2009/09/29/automatically-signing-jar-files-in-netbeans/
[5] Netbeans + Webstart + Auto-signing http://netbeans-org.1045718.n5.nabble.com/Webstart-High-Learning-Curve-td2912653.html
Wednesday, April 27, 2011
OpenSUSE::Install JRE1.6
Step 1:Download JRE from [2]
#wget ....
Step 2: Executing installer
#chmod +x jre-6-linux-i586.bin
#./jre-6-linux-i586.bin
Step 3:Move directory to common
#mv jre1.6.0 /usr/lib/jvm
Step 4:Set new Java to "alternatives of java":
#update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0/bin/java" 1
Step 5:Verify version
#java -version
references:
[1] Instalar JAVA JRE 1.6.0 en Firefox http://www.ubuntu-es.org/node/33116
[2] JRE repository
EShttp://www.java.com/es/download/linux_manual.jsp
ENhttp://www.java.com/en/download/linux_manual.jsp
#wget ....
Step 2: Executing installer
#chmod +x jre-6-linux-i586.bin
#./jre-6-linux-i586.bin
Step 3:Move directory to common
#mv jre1.6.0 /usr/lib/jvm
Step 4:Set new Java to "alternatives of java":
#update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0/bin/java" 1
Step 5:Verify version
#java -version
references:
[1] Instalar JAVA JRE 1.6.0 en Firefox http://www.ubuntu-es.org/node/33116
[2] JRE repository
EShttp://www.java.com/es/download/linux_manual.jsp
ENhttp://www.java.com/en/download/linux_manual.jsp
Tuesday, April 19, 2011
Monday, March 28, 2011
Install Java + Tomcat on Linux CentOS
I. Installing Java
#yum install jpackage-utils
#wget url/jdk-6u13-linux-i586-rpm.bin [1]
#chmod +x jdk-6u13-linux-i586-rpm.bin
#./jdk-6u13-linux-i586-rpm.bin
#java -version
II. Installing Tomcat
#wget http://apache.mirror.testserver.li/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz
#cp apache-tomcat-6.0.32.tar.gz /var/
#cd /var
#tar -zxvf apache-tomcat-6.0.32.tar.gz
# ln -s /var/apache-tomcat-6.0.32 tomcat
#/var/tomcat/bin/startup.sh
References:
[1]Java Download http://www.oracle.com/technetwork/java/javase/downloads/index.html
[2]Java + Tomcat + startup in CentOS
http://wiki.openbluedragon.org/wiki/index.php/Apache_Tomcat_on_CentOS/RedHat
[3]Java 6 + Tomcat in CentOS
http://www.satollo.net/how-to-install-tomcat-and-java-6-on-centos-5-2
[4]Java SE
http://www.oracle.com/technetwork/java/javase/downloads/index.html
[5]Tomcat (download core tar.gz)
http://tomcat.apache.org/download-60.cgi
[6]Mirror
http://apache.mirror.testserver.li/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz
#yum install jpackage-utils
#wget url/jdk-6u13-linux-i586-rpm.bin [1]
#chmod +x jdk-6u13-linux-i586-rpm.bin
#./jdk-6u13-linux-i586-rpm.bin
#java -version
II. Installing Tomcat
#wget http://apache.mirror.testserver.li/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz
#cp apache-tomcat-6.0.32.tar.gz /var/
#cd /var
#tar -zxvf apache-tomcat-6.0.32.tar.gz
# ln -s /var/apache-tomcat-6.0.32 tomcat
#/var/tomcat/bin/startup.sh
References:
[1]Java Download http://www.oracle.com/technetwork/java/javase/downloads/index.html
[2]Java + Tomcat + startup in CentOS
http://wiki.openbluedragon.org/wiki/index.php/Apache_Tomcat_on_CentOS/RedHat
[3]Java 6 + Tomcat in CentOS
http://www.satollo.net/how-to-install-tomcat-and-java-6-on-centos-5-2
[4]Java SE
http://www.oracle.com/technetwork/java/javase/downloads/index.html
[5]Tomcat (download core tar.gz)
http://tomcat.apache.org/download-60.cgi
[6]Mirror
http://apache.mirror.testserver.li/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz
Tuesday, March 15, 2011
Monday, March 14, 2011
JasperReport::Export to Text
CHAR_WIDTH = REPORT_WIDTH / MAX_CHAR_PER_ROW=524 / 80 = 6.55 //6
CHAR_HEIGHT = REPORT_HEIGHT / MAX_CHAR_PER_COL =524 / 44 = 11.9 //11//10
JRTextExporter exporter = new JRTextExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "c:\\textreport1.txt");
exporter.setParameter(JRTextExporterParameter.CHARACTER_WIDTH, new Integer(6));
exporter.setParameter(JRTextExporterParameter.CHARACTER_HEIGHT, new Integer(11));
exporter.exportReport();
References
[1]http://www.coderanch.com/t/62982/open-source/Jasper-Report-Text-Exporter
[2] http://www.cepeu.edu.py/LIBROS_ELECTRONICOS_3/lpcu089%20-%2001.pdf
[3] http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
CHAR_HEIGHT = REPORT_HEIGHT / MAX_CHAR_PER_COL =524 / 44 = 11.9 //11//10
JRTextExporter exporter = new JRTextExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "c:\\textreport1.txt");
exporter.setParameter(JRTextExporterParameter.CHARACTER_WIDTH, new Integer(6));
exporter.setParameter(JRTextExporterParameter.CHARACTER_HEIGHT, new Integer(11));
exporter.exportReport();
References
[1]http://www.coderanch.com/t/62982/open-source/Jasper-Report-Text-Exporter
[2] http://www.cepeu.edu.py/LIBROS_ELECTRONICOS_3/lpcu089%20-%2001.pdf
[3] http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
Saturday, March 05, 2011
Thursday, February 24, 2011
Friday, December 03, 2010
Jasper Report Netbeans todo lo necesario
http://www.blogger.com/home?pli=1
Lo unico que hay que saber aparte de descargar el software es crear una Libreria y agregar los .jar necesario ubicados en la carpeta de instalación:
[1] C:\Archivos de programa\JasperSoft\iReport-2.0.2\lib o
[2] C:\Archivos de programa\JasperSoft\iReport-3.7.6\ireport\modules\ext
Tutoriales
http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
http://mundobyte.wordpress.com/2008/01/06/creacion-de-reportes-en-java-parte-iii/
http://javatutoriales.blogspot.com/2009/02/creacion-de-reportes-con-jasperrepots-y.html
http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/samples.html
Recursos:
[1] jasper software http://sourceforge.net/projects/jasperreports
[2] ireport software http://sourceforge.net/projects/ireport/files/iReport%20%28classic%29/
Lo unico que hay que saber aparte de descargar el software es crear una Libreria y agregar los .jar necesario ubicados en la carpeta de instalación:
[1] C:\Archivos de programa\JasperSoft\iReport-2.0.2\lib o
[2] C:\Archivos de programa\JasperSoft\iReport-3.7.6\ireport\modules\ext
Tutoriales
http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
http://mundobyte.wordpress.com/2008/01/06/creacion-de-reportes-en-java-parte-iii/
http://javatutoriales.blogspot.com/2009/02/creacion-de-reportes-con-jasperrepots-y.html
http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/samples.html
Recursos:
[1] jasper software http://sourceforge.net/projects/jasperreports
[2] ireport software http://sourceforge.net/projects/ireport/files/iReport%20%28classic%29/
Friday, November 12, 2010
Postgres DEBUG
Errors and Messages
RAISE level 'format' [, expression [, ...]];
levels-> DEBUG, LOG, INFO, NOTICE, WARNING, and EXCEPTION(raises an error).
format-> string, % is replaced by the next optional argument's string representation.
usages:
RAISE NOTICE 'Calling cs_create_job(%)', v_job_id;
--This example replace % with v_job_id
RAISE EXCEPTION 'Nonexistent ID --> %', user_id;
--This example will abort the transaction with the given error message:
references:
[1] http://www.postgresql.org/docs/8.1/static/plpgsql-errors-and-messages.html
RAISE level 'format' [, expression [, ...]];
levels-> DEBUG, LOG, INFO, NOTICE, WARNING, and EXCEPTION(raises an error).
format-> string, % is replaced by the next optional argument's string representation.
usages:
RAISE NOTICE 'Calling cs_create_job(%)', v_job_id;
--This example replace % with v_job_id
RAISE EXCEPTION 'Nonexistent ID --> %', user_id;
--This example will abort the transaction with the given error message:
references:
[1] http://www.postgresql.org/docs/8.1/static/plpgsql-errors-and-messages.html
Labels:
J2EE,
Java,
Linux.Developer,
Postgres,
Windows.Developer
Thursday, October 14, 2010
tomcat & servlet resource
Tomcat::configuration of system properties from webapp
SystemPropertiesListener.java
import java.util.Enumeration;
import javax.servlet.*;
public class SystemPropertiesListener implements
javax.servlet.ServletContextListener {
private ServletContext context = null;
public void contextInitialized(ServletContextEvent event) {
context = event.getServletContext();
Enumeration params = context.getInitParameterNames();
while (params.hasMoreElements()) {
String param = (String) params.nextElement();
String value = context.getInitParameter(param);
if (param.startsWith("prefix.")) {
System.setProperty(param, value);
}
}
}
public void contextDestroyed(ServletContextEvent event) {
}
}
web.xml
Resources
[1] http://stackoverflow.com/questions/372686/how-can-i-specify-system-properties-in-tomcat-configuration-on-startup
[2] http://stackoverflow.com/questions/558502/how-a-servlet-can-get-the-absolute-path-to-a-file-outside-of-the-servlet
[3] http://stackoverflow.com/questions/2194930/tomcat-how-can-i-place-parameters-in-web-xml-and-fetch-them-in-my-application
SystemPropertiesListener.java
import java.util.Enumeration;
import javax.servlet.*;
public class SystemPropertiesListener implements
javax.servlet.ServletContextListener {
private ServletContext context = null;
public void contextInitialized(ServletContextEvent event) {
context = event.getServletContext();
Enumeration
while (params.hasMoreElements()) {
String param = (String) params.nextElement();
String value = context.getInitParameter(param);
if (param.startsWith("prefix.")) {
System.setProperty(param, value);
}
}
}
public void contextDestroyed(ServletContextEvent event) {
}
}
web.xml
<context-param>
<param-name>prefix.property</param-name>
<param-value>value</param-value>
<param-type>java.lang.String</param-type>
</context-param>
<listener>
<listener-class>servletUtils.SystemPropertiesHelper</listener-class>
</listener>
Resources
[1] http://stackoverflow.com/questions/372686/how-can-i-specify-system-properties-in-tomcat-configuration-on-startup
[2] http://stackoverflow.com/questions/558502/how-a-servlet-can-get-the-absolute-path-to-a-file-outside-of-the-servlet
[3] http://stackoverflow.com/questions/2194930/tomcat-how-can-i-place-parameters-in-web-xml-and-fetch-them-in-my-application
Wednesday, October 13, 2010
Jasper Report
Ejemplo básico(src)
http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
Resources
http://abeishbabu.blogspot.com/2009/06/printing-txt-file-directly-to-printer.html
http://www.thatsjava.com/java-core-apis/46844/
http://java.itags.org/java-core-apis/46844/
http://jasperetl.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=34840
http://forums.java.net/jive/message.jspa?messageID=227537
http://www.coderanch.com/t/62982/open-source/Jasper-Report-Text-Exporter
http://helptodeveloper.blogspot.com/2010/02/exporting-jasper-reports-with-save-as.html
http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
Resources
http://abeishbabu.blogspot.com/2009/06/printing-txt-file-directly-to-printer.html
http://www.thatsjava.com/java-core-apis/46844/
http://java.itags.org/java-core-apis/46844/
http://jasperetl.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=34840
http://forums.java.net/jive/message.jspa?messageID=227537
http://www.coderanch.com/t/62982/open-source/Jasper-Report-Text-Exporter
http://helptodeveloper.blogspot.com/2010/02/exporting-jasper-reports-with-save-as.html
Thursday, August 05, 2010
Friday, April 23, 2010
El API de Java
http://www.scribd.com/doc/2621827/Tutorial05api
Shared Library
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
http://java.sun.com/j2se/1.5.0/docs/guide/vm/class-data-sharing.html
On Windows too
http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/stepbystep/step5.html
http://www.javaworld.com/javaworld/javatips/jw-javatip23.html
Load C++ LIbrary from Java
http://www.nag.co.uk/industryArticles/CallingCLibraryRoutinesfromJava.pdf
How to write shared Library
http://people.redhat.com/drepper/dsohowto.pdf
Shared Library
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
http://java.sun.com/j2se/1.5.0/docs/guide/vm/class-data-sharing.html
On Windows too
http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/stepbystep/step5.html
http://www.javaworld.com/javaworld/javatips/jw-javatip23.html
Load C++ LIbrary from Java
http://www.nag.co.uk/industryArticles/CallingCLibraryRoutinesfromJava.pdf
How to write shared Library
http://people.redhat.com/drepper/dsohowto.pdf
Friday, April 16, 2010
Wednesday, October 21, 2009
J2EE Primeros pasos
Muchos de nosotros alguna vez hemos intentado crear EJB (Enterprise Java Beans), pero nos hemos sentido frustados, porque es complicado entender la interfaz remota, local, el beans y todas esas vainas. Pero otra vez NetBeans y las anotaciones al rescate, es así que desde la sección de Noticias y tutoriales de mi NetBeans me he enterado de un pequeño tutorial que muestra las bondades que nos ofrece NetBeans en éstos temas y cómo aprovecha las características de Glassfish para crear EJB de sesión sin la necesidad de JNDI.
Además que se nos muestra cómo podemos invocar al EJB desde un cliente Web y Desktop
Les comparto el link: Creating EJB3 Sessions Beans using Netbeans 6.1 and Glassfish
EJB 3.0 Session Bean
http://www.perevillega.com/java/ejb-30-session-beans/
EJB 3.0 Plugins
http://www.javabeat.net/articles/ejb3/1/
EJB 3.0
http://www.netbeans.org/kb/55/ejb30.html
Despliegue de EJB
http://www.proactiva-calidad.com/java/ejb/ejemplo1.html
Codigo Ejemplo
http://ccia.ei.uvigo.es/docencia/SCS/practicas0809/
EJB en Netbeans con Postgres
http://nachxs.wordpress.com/2009/04/28/tutorial-ejb-persistencia-y-postgresql-en-netbeans-65/
Hibernate
http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=hibernateAnnotations
Hibernate vs Ejb
http://www.javahispano.org/forum/j2ee/es/hibernate_vs__ejb/
Integrar Hibernate Ejb
https://www.hibernate.org/82.html
Hibernate y las anotaciones de EJB 3.0
http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=hibernateAnnotations
The Simple Logging Facade for Java or (SLF4J) http://www.slf4j.org/manual.html
http://openejb.apache.org/ejb3-tutorial.html
http://www.roseindia.net/ejb/
http://www.caucho.com/resin-3.0/ejb3/tutorial/index.xtp
http://wiki.netbeans.org/CreatingEJB3UsingNetbeansAndGlassfish
http://www.dosideas.com/cursos/course/view.php?id=5
http://www.dosideas.com/cursos/mod/resource/index.php?id=5
http://www.roseindia.net/ejb/examples-of-StatelessBean.shtml
Otras Referencias:
EJB con Hiberante
http://www.theserverside.com/discussions/thread.tss?thread_id=35663
http://www.velocityreviews.com/forums/t293538-hibernate-vs-ejb-or-jdbc.html
http://www.jtech.ua.es/j2ee/ejemplos/ejb/sesion01-apuntes.htm
http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=orionejb
http://www.forosdelweb.com/f45/ejb-forma-local-247730/
Además que se nos muestra cómo podemos invocar al EJB desde un cliente Web y Desktop
Les comparto el link: Creating EJB3 Sessions Beans using Netbeans 6.1 and Glassfish
EJB 3.0 Session Bean
http://www.perevillega.com/java/ejb-30-session-beans/
EJB 3.0 Plugins
http://www.javabeat.net/articles/ejb3/1/
EJB 3.0
http://www.netbeans.org/kb/55/ejb30.html
Despliegue de EJB
http://www.proactiva-calidad.com/java/ejb/ejemplo1.html
Codigo Ejemplo
http://ccia.ei.uvigo.es/docencia/SCS/practicas0809/
EJB en Netbeans con Postgres
http://nachxs.wordpress.com/2009/04/28/tutorial-ejb-persistencia-y-postgresql-en-netbeans-65/
Hibernate
http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=hibernateAnnotations
Hibernate vs Ejb
http://www.javahispano.org/forum/j2ee/es/hibernate_vs__ejb/
Integrar Hibernate Ejb
https://www.hibernate.org/82.html
Hibernate y las anotaciones de EJB 3.0
http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=hibernateAnnotations
The Simple Logging Facade for Java or (SLF4J) http://www.slf4j.org/manual.html
import org.slf4j.Logger;Implementaciones
import org.slf4j.LoggerFactory;
public class HelloWorld {
public static void main(String[] args) {
Logger logger = LoggerFactory.getLogger(HelloWorld.class);
logger.info("Hello World");
}
}
http://openejb.apache.org/ejb3-tutorial.html
http://www.roseindia.net/ejb/
http://www.caucho.com/resin-3.0/ejb3/tutorial/index.xtp
http://wiki.netbeans.org/CreatingEJB3UsingNetbeansAndGlassfish
http://www.dosideas.com/cursos/course/view.php?id=5
http://www.dosideas.com/cursos/mod/resource/index.php?id=5
http://www.roseindia.net/ejb/examples-of-StatelessBean.shtml
Otras Referencias:
EJB con Hiberante
http://www.theserverside.com/discussions/thread.tss?thread_id=35663
http://www.velocityreviews.com/forums/t293538-hibernate-vs-ejb-or-jdbc.html
http://www.jtech.ua.es/j2ee/ejemplos/ejb/sesion01-apuntes.htm
http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=orionejb
http://www.forosdelweb.com/f45/ejb-forma-local-247730/
Wednesday, September 02, 2009
Struts v2 HelloWorld en NetBeans v6
Video tutorial de como crear nuestra primera aplicación con Struts v2, basado en las referencias indicadas debajo.
Links:
Sitio oficial: http://struts.apache.org/2.x/index.html
Tutoriales oficiales: http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-tutorial.html
Links:
Sitio oficial: http://struts.apache.org/2.x/index.html
Tutoriales oficiales: http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-tutorial.html
Subscribe to:
Posts (Atom)
-
Resources: [1] Hela https://ome.grc.nia.nih.gov/iicbu2008/hela/index.html
-
en inglés se llama “A potentially dangerous Request.Form value was detected from the client”. varias páginas indican dos cosas: 1. agrega...
-
mas plugins http://devsnippets.com/reviews/using-jquery-to-style-design-elements-20-impressive-plugins.html http://www.extjs.com/deploy/dev/...
Odoo 17 - Custom adds
[1] Diario/Seq https://apps.odoo.com/apps/modules/17.0/sequence_for_journal