sábado, 23 de diciembre de 2017

Como crear un proyecto web dinamico en Java

Hola, ya vimos como configurar nuestro entorno de desarrollo para JEE, también hablamos sobre las principales características y definimos que usaremos JSF para nuestros proyectos haciendo una comparativa rápida con respecto a JSP y Servlets, también hablamos un poco de los componentes JSF que usaremos, ahora es momento de construir nuestro primer proyecto web... veamos!

Creación Proyecto Web.

En esta guía veremos cómo crear un proyecto java web, se mostrarán 2 formas que dependen de si se tiene o no el plugin JBoss Tools configurado, para esto debemos haber realizado lo siguiente.


•    Configurado Eclipse
•    Configurado el Servidor de Aplicaciones WildFly
•    Agregado el pluggin JBOSS Tools (ideal)


Después de dejar listo nuestro ambiente  podemos crear el primer proyecto web en java, para esto hacemos el proceso de creación de un proyecto normal pero de la siguiente manera.


Inicialmente debemos verificar que nos encontramos en la perspectiva para JEE

Si no, esta debe ser agregada desde Windows/Perspective/Open Perspective/Other y seleccionamos Java EE


En vez de crear un Java Project buscamos Dynamic Web Project.


Se debe diligenciar el formulario indicando el nombre del proyecto, cual es el servidor con el que vamos a trabajar, dejamos “Dynamic web module version” con el valor por defecto y presionamos en el botón “Modify” de la configuración




Al hacerlo se carga una nueva ventana donde debemos seleccionar el check para “JavaServer Faces”

Después de seleccionar la opción anterior presionamos en “ok” para confirmar la configuración.




Posteriormente presionamos en “Next”



Se presenta la ventana anterior la cual dejaremos de la misma manera y confirmamos con “next”
Al hacerlo se carga una nueva ventana indicándonos la configuración del módulo web, en este caso seleccionamos la opción que permitirá construir el descriptor de despliegue “web.xml” y damos clic en “next”

Al hacerlo se presenta una nueva ventana donde definimos el soporte para jsf, Damos next y de ser necesario eliminamos la opción definida en la sección URL mapping Patterns y luego agregamos soporte para jsf haciendo add y *.jsf y damos finish.
 


Al finalizar verificamos que el proyecto fue creado con los diferentes directorios y archivos de configuración.



Creación Primer Página Web.

Después de haber creado el proyecto podemos proceder a crear nuestra primera página web, dependiendo de si tenemos instalado o no el plugin jboss tools podremos crear archivos xhtml directamente o por medio de archivos jsp.


Forma 1.


Si no tenemos instalado el plugin jboss tools no podremos crear archivos xhtml directamente por esa razón lo realizamos mediante un jsp


Al crear el proyecto podemos dar clic en el directorio WebContent y agregar un nuevo archivo JSP.




Como va a ser la primer página podemos llamarla index.jsp, damos clic en Next.



Verificamos que tengamos seleccionado el chec Use JSP Template y seleccionamos “New JavaServer Faces (JSF) Page” y damos finish.

Desde el index.jsp eliminamos el soporte jsp ya que lo convertiremos en una página con soporte jsf.

Nos cercioramos de que tenga agregado los import requeridos del jsf y creamos la estructura de nuestra primera página.


Cerramos la página y le cambiamos la extensión de jsp a xhtml



Ahora vamos al web.xml y agregamos soporte para la página index.xhtml




Forma 2.

Si tenemos instalado el plugin jboss tools podremos crear la página con extensión xhtml directamente.


Damos clic derecho en el directorio WebContent y seleccionamos “XHTML Page”




Posteriormente creamos la primera página a la que llamaremos index.html, damos clic en Next.


Verificamos que tengamos seleccionado el check “Use XHTML Template”, seleccionamos “Blank JSF Page” y presionamos “Next”


En la ventana siguiente dejamos la configuración por defecto y damos clic en “Finish”


Al hacerlo se crea el archivo index.xhtml con los respectivos soportes para jsf


Posteriormente creamos la estructura de nuestra primera página.



Adicionalmente podemos abrir el archivo dando clic derecho, abrir con Web Page Editor


Lo que permitirá abrir el archivo con una vista previa.


Despliegue del sistema.

Después de haber creado el archivo index.xhtml podemos desplegar el sistema en el servidor configurado, para esto damos clic derecho en el servidor y presionamos start



Luego de iniciar el servidor se verifica que en la consola aparezca “started” lo cual indicará que el servidor está listo para el despliegue.

Posteriormente damos clic derecho al archivo index.xhtml/Run As/Run on Server


Luego de esto se debe confirmar el despliegue en el servidor previamente iniciado y damos next.

Asociamos el proyecto que queremos desplegar y damos clic en finish


Después de esto se carga un explorador en nuestro entorno donde podemos ver nuestro sistema en funcionamiento.




Y Listo!!!

En las próximas entradas seguiremos trabajando en nuestro proyecto, agregando nuevas funcionalidades y verificando sus diferentes componentes graficos.
 
En mi blog y en mi canal les he venido compartiendo material en torno a este gran lenguaje de programación, pueden encontrar muchos artículos y vídeos desde cero, les muestro como descargar las herramientas necesarias para empezar a programar, vamos subiendo cada vez más por los conceptos básicos, pasando por los conceptos de programación orientada a objetos, patrones, hilos, estructuras de datos, acceso a bases de datos entre otros,  hasta construir aplicaciones con interfaces grafías de usuario.

Además podrán encontrar un curso desde cero donde les enseño a crear aplicaciones móviles en android mediante una secuencia de vídeos paso a paso que constantemente se está actualizando.


Y ahora iniciaré la secuencia también desde cero donde nos adentraremos al mundo del java Enterprise edition, les mostraré como configurar el ambiente de desarrollo y como crear sus primeras aplicaciones web con java.


Por eso los invito a que visiten a codejavu.blogspot.com, que visiten mi canal Cristian Henao y que estén muy pendientes de las nuevas secuencias




También te podría Interesar. 

¿Hay algo que quieras anexar o comentar sobre esta entrada?  no dudes en hacerlo.....y si te gustó, te invito a compartir y Suscribirte ingresando al botón "Participar en este sitio" para darte cuenta de mas entradas como esta ;) 




 

91 comentarios:

  1. Excelente post, muy bien explicado. Sigo el blog y tu canal de Youtube. Podrías indicar cómo agregar la persistencia para el proyecto web?(crear un abm sencillo, por ejemplo). Saludos y éxitos!

    ResponderEliminar
    Respuestas
    1. Hola, estoy en el proceso, voy a retomar el curso espero que te pueda servir!

      Eliminar
    2. The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Projects for CSE.

      Software management seeks for decision support to identify technologies like JavaScript that meet best the goals and characteristics of a software project or improvement programme. JavaScript Training in Chennai Accessible experiences and repositories that effectively guide that technology selection are still lacking.

      Aim of technology domain analysis is to describe the class of context situations (e.g., kinds of JavaScript software projects) in which a software engineering technology JavaScript Training in Chennai can be applied successfully

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Eliminar
  2. Hola, recién estoy comenzando a ver tus vídeos e intento hacer todos a tus pasos pero Te hago una consulta básica sobre Android Studio, cuando abro el primer proyecto puedo ver la previsualizacion y usarla para agregar botones y demás pero si apagó la PC y la vuelvo a encender para continuar trabajando ya no puedo ver esa previsualización. Que puedo hacer para solucionarlo, gracias y disculpas por ser una inquietud tan básica

    ResponderEliminar
  3. Este comentario ha sido eliminado por el autor.

    ResponderEliminar
  4. Este comentario ha sido eliminado por el autor.

    ResponderEliminar
  5. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    rpa training in chennai | rpa training in chennai | rpa training in pune | rpa online training | rpa training in bangalore

    ResponderEliminar
  6. I always enjoy reading quality articles by an individual who is obviously knowledgeable on their chosen subject. Ill be watching this post with much interest. Keep up the great work, I will be back
    Data Science Training in Chennai | Data Science training in anna nagar
    Data Science training in chennai | Data science training in Bangalore
    Data Science training in marathahalli | Data Science training in btm

    ResponderEliminar
  7. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
    python training in pune | python training institute in chennai | python training in Bangalore

    ResponderEliminar
  8. This is beyond doubt a blog significant to follow. You’ve dig up a great deal to say about this topic, and so much awareness. I believe that you recognize how to construct people pay attention to what you have to pronounce, particularly with a concern that’s so vital. I am pleased to suggest this blog.

    Data Science course in rajaji nagar | Data Science with Python course in chenni
    Data Science course in electronic city | Data Science course in USA
    Data science course in pune | Data science course in kalyan nagar

    ResponderEliminar
  9. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    online Python certification course | python training in OMR | python training course in chennai

    ResponderEliminar
  10. Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
    Best Devops Training in pune
    Devops interview questions and answers

    ResponderEliminar
  11. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    rpa training in velachery| rpa training in tambaram |rpa training in sholinganallur | rpa training in annanagar| rpa training in kalyannagar

    ResponderEliminar
  12. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 

    best rpa training in chennai | rpa online training |
    rpa training in chennai |
    rpa training in bangalore
    rpa training in pune

    ResponderEliminar
  13. Very wonderful article! I read your post regularly. It is very interesting and very helpful for improve myself. Please posting.....
    PHP Classes in Bangalore
    PHP Training Center in Bangalore
    PHP Course in Annanagar
    PHP Course in Aminjikarai
    PHP Training in Karappakkam

    ResponderEliminar
  14. Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
    python training in bangalore

    ResponderEliminar
  15. I like viewing web sites which comprehend the price of delivering the excellent useful resource Python classes in pune free of charge. I truly adored reading your posting. Thank you!

    ResponderEliminar
  16. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    Dot Net training in Electronic City

    ResponderEliminar
  17. I have express a few of the articles on your website now, and I really like your style of Python training in pune blogging. I added it to my favorite’s blog site list and will be checking back soon…

    ResponderEliminar
  18. I have visited this blog first time and i got a lot of informative data from here which is quiet helpful for me indeed.Really nice experience you have. Thank you for sharing!!
    machine learning training in bangalore

    ResponderEliminar
  19. Attend The Data Analytics Course Bangalore From ExcelR. Practical Data Analytics Course Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analytics Course Bangalore.
    ExcelR Data Analytics Course Bangalore

    ResponderEliminar
  20. Awesome Blog, Very useful information and also easily understandable.Thanks for sharing this information. Keep Blogging!!​ Machine Learning Training In Bangalore

    ResponderEliminar
  21. I learned World's Trending Technology from certified experts for free of cost. I Got a job in decent Top MNC Company with handsome 14 LPA salary, I have learned the World's Trending Technology from python training in btm layout experts who know advanced concepts which can help to solve any type of Real-time issues in the field of Python. Really worth trying hkbk group of institutions

    ResponderEliminar
  22. Thanks for sharing this blog. Keep it up and best of luck for your future blogs and posts.
    Digital Marketing Course in Kolkata

    ResponderEliminar
  23. Excellent Blog!!! The blog which you have shared here is more informative, This is really too useful and have more ideas and keep sharing many techniques about java. Thanks for giving a such a wonderful blog.
    Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

    ResponderEliminar


  24. Thanks for sharing such informative guide on .Net technology. This post gives me detailed information about the .net technology. I am working as trainer in leading IT training academy offering Dot Net Training in Chennai and i use your guide to educate my students.


    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery







    ResponderEliminar
  25. Are you looking for a maid for your home to care your baby,patient care taker, cook service or a japa maid for your pregnent wife we are allso providing maid to take care of your old parents.we are the best and cheapest service provider in delhi for more info visit our site and get all info. thanks
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

    ResponderEliminar
  26. As always your articles do inspire me. Every single detail you have posted was great. ExcelR Machine Learning Course

    ResponderEliminar
  27. Attend The Business Analytics Courses From ExcelR. Practical Business Analytics Courses Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analytics Courses.
    Business Analytics Courses

    ResponderEliminar
  28. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    Php projects with source code
    Online examination system in php
    Student management system in php
    Php projects for students
    Free source code for academic
    Academic projects provider in nashik
    Academic project free download

    ResponderEliminar
  29. I have to search sites with relevant information on given topic ExcelR Machine Learning Course and provide them to teacher our opinion and the article.

    ResponderEliminar
  30. https://cbpbenitez.blogspot.com/2013/11/how-to-get-audio-file-of-audio-recorder.html?showComment=1610555160185#c8385028244307916101

    ResponderEliminar
  31. It was really nice blog with lot of innovative thing inside this, I really enjoyable i would like to thank for sharing this valuable content. I was so glad to see this wonderful blog. keep updating this type of blog.amazon web services aws training in chennai . amazon web services aws training in chennai

    microsoft azure training in chennai

    workday training in chennai

    android-training-in chennai

    ios training in chennai

    ResponderEliminar
  32. Thanks for posting the best information and the blog is very helpful.python course in Bangalore

    ResponderEliminar
  33. Really wonderful blog completely enjoyed reading and learning to gain the vast knowledge. Eventually, this blog helps in developing certain skills which in turn helpful in implementing those skills. Thanking the blogger for delivering such a beautiful content and keep posting the contents in upcoming days.

    data science training institute in bangalore

    ResponderEliminar
  34. I read your article it is very interesting and every concept is very clear, thank you so much for sharing. AWS Certification Course in Chennai

    ResponderEliminar
  35. Hey, great blog, but I don’t understand how to add your site in my rss reader. Can you Help me please?
    data scientist training and placement

    ResponderEliminar
  36. This blog was really great, never seen a great blog like this before. i think im gonna share this to my friends..
    data scientist training and placement in hyderabad

    ResponderEliminar
  37. Learn Amazon Web Services for excellent job opportunities from Infycle Technologies, the Excellent AWS Training in Chennai. Infycle Technologies gives the most trustworthy AWS course in Chennai, with full hands-on practical training from professional trainers in the field. Along with that, the placement interviews will be arranged for the candidates, so that, they can meet the job interviews without missing them. To transform your career to the next level, call 7502633633 to Infycle Technologies and grab a free demo to know more

    ResponderEliminar
  38. I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end.
    Python Training In Pune

    ResponderEliminar
  39. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!data scientist course in ghaziabad

    ResponderEliminar
  40. I truly appreciate just perusing the entirety of your weblogs. Just needed to educate you that you have individuals like me who value your work. Unquestionably an extraordinary post. Caps off to you! The data that you have given is exceptionally useful.data scientist course in bhopal

    ResponderEliminar
  41. I really like and appreciate your article.Really thank you! Keep writing. 토토

    ResponderEliminar
  42. I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. 경마사이트

    ResponderEliminar
  43. Simply desire to say your article is as amazing. The clearness on your post is simply spectacular and that i could assume you are a professional on this subject.
    바카라사이트

    ResponderEliminar
  44. Wow, great article.Really looking forward to read more. 릴게임

    ResponderEliminar
  45. There is perceptibly a bundle to realize about this.토토사이트

    ResponderEliminar
  46. All your hard work is much appreciated. This content data gives truly quality and unique information. I’m definitely going to look into it. Really very beneficial tips are provided here and, Thank you so much. Keep up the good works.
    토토

    ResponderEliminar
  47. After I initially left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and now every time a comment is added I get 4 emails with the same comment. There has to be a means you are able to remove me from that service? Thanks!

    야한동영상
    대딸방
    타이마사지
    출장마사지
    바카라사이트

    ResponderEliminar
  48. Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one.
    Continue posting. A debt of gratitude is in order for sharing.
    data science training in gwalior

    ResponderEliminar
  49. I am truly thankful to the holder of this site who has shared this great post at here. 메이저사이트

    ResponderEliminar
  50. I blog frequently and i really thank you for your content. The article has truly peaked my interest.
    경마사이트
    경마

    ResponderEliminar
  51. I don’t even know how I ended up here, but I thought this post was great.
    I do not know who you are but certainly you’re going to a famous blogger if you are not already 바카라

    ResponderEliminar
  52. You were great and everyone received so much from your experience and knowledge
    Absolutely amazing, thank you for sharing your knowledge with me. 사설토토

    ResponderEliminar
  53. I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. data science course in kanpur

    ResponderEliminar
  54. I truly appreciate just perusing the entirety of your weblogs. Just needed to educate you that you have individuals like me who value your work. Unquestionably an extraordinary post. Caps off to you! The data that you have given is exceptionally useful.data science course in bhopal

    ResponderEliminar
  55. I really like your writing so so much! percentage we keep in touch more about your post on AOL? I require a specialist in this house to solve my problem. May be that is you! Having a look ahead to peer you. 바카라사이트탑

    ResponderEliminar
  56. I will recommend your website to everyone. You have a very good gloss. Write more high-quality articles. I support you. 바카라사이트비즈

    ResponderEliminar
  57. Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing.data science course in bhubaneswar

    ResponderEliminar
  58. That's a really impressive new idea! 메이저토토사이트추천 It touched me a lot. I would love to hear your opinion on my site. Please come to the site I run once and leave a comment. Thank you.

    ResponderEliminar

Eres libre de realizar cualquier comentario, desde que pueda ayudar con gusto lo atenderé, y si es un critica, bienvenida sea!!!