SlideShare una empresa de Scribd logo
1 de 10
Introduction to
     Java Enterprise
         Edition

    Configuring JBoss within Eclipse
        
            Write your first Servlet

                       Fernando Gil
                   lobho.gil@gmail.com
                       Marzo 2012
Agenda


    How to configure JBoss AS within Eclipse in
    order to start the develop of JavaEE
    applications.

    We'll write our first Servlet class.

    We'll discuss the deployment descriptor.
JBoss AS 6.1 & Eclipse Indigo

        First download Eclipse IDE for Java Developers from:
        http://www.eclipse.org/downloads and JBoss 6.1 from:
        http://www.jboss.org/jbossas/downloads/

        Open Eclipse.

        Create a New Server:
    Go to File/New/Other
    



    Select Server Option
    



    Search JBoss 6.x
    



    Browse JBoss Home
    



    Directory (the folder
    where you saved
    JBoss)
    Click Finish
    
Important

        If you can not find JBoss 6.x in the servers list,
        try to Download additional server adapters:

    
     Sometimes eclipse can
    not find the JBoss
    adapters, in that case
    check this video tutorial
    to solve the problem:
    Eclipse & JBoss AS 6
Dynamic Web
         Project


    Open Eclipse and select File/New/
    Dynamic Web Project

    Set the Project Name and the
    location

    In Target Runtime we must select
    the runtime of JBoss 6.x

    The Dynamic web module version
    will be set automatically

    We can Click Finish
Creating our
          Servlet

    In order to keep the
    example simple, we'll
    create     a    servlet
    selecting
    File/New/Class and set
    the values like in the
    picture:
The Code
package com.dss.tut;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class FirstServlet extends HttpServlet {
      /* The service() method handles requests and creates responses.
       * The servlet container automatically calls this method when
       * it gets any request for this servlet.*/
      public void service(HttpServletRequest req, HttpServletResponse resp)
                   throws IOException, ServletException{
             PrintWriter pw = resp.getWriter();
           pw.println("<html>");
           pw.println(" <head></head>");
           pw.println(" <body>");
           pw.println(" <h1>Hello! this is my first
Servlet</h1>");
           pw.println(" </body>");
           pw.println("</html>");
      }
}
Deployment Descriptor

    We must indicate to the Application Server the configurations of our Servlets. The Deployment
    descriptor is a XML file to accomplish this task. We will talk more about this file later. By the moment
    we need to create a new file called web.xml in the directory: WebContent/WEB-INF of our project.

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
                  id="WebApp_ID" version="3.0">

           <servlet>
                  <!-- Define our servlet indicating one name to identify it and
                         the class which represent it including the package -->
                  <servlet-name>First</servlet-name>
                  <servlet-class>com.dss.tut.FirstServlet</servlet-class>
           </servlet>
        <servlet-mapping>
           <!-- Link one existent servlet with an url. Whit this we can specify
                  the way we can access the Servlet by the browser-->
                  <servlet-name>First</servlet-name>
                  <url-pattern>/MyServlet</url-pattern>
           </servlet-mapping>
    </web-app>
Compilation and Deployment

    Now we just need to select our project, right click, Run As.., Run on Server,
    Select our JBoss Server and wait.

    Remember the url pattern that we specified in the deployment descriptor,
    because that is the way we'll access to the Servlet.
Next Lesson:
JPS Technology
         Fernando Gil
     lobho.gil@gmail.com
         Marzo 2012

Más contenido relacionado

La actualidad más candente

Deploying and running mule standalone
Deploying and running mule standaloneDeploying and running mule standalone
Deploying and running mule standalonemdfkhan625
 
Getting started with Selenium 2
Getting started with Selenium 2Getting started with Selenium 2
Getting started with Selenium 2Sebastiano Armeli
 
Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUIPLM Mechanic .
 
Api webservice setupinstructions
Api webservice setupinstructionsApi webservice setupinstructions
Api webservice setupinstructionsShivaling Sannalli
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumAdam Christian
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in MuleF K
 
Maven tools & archetypes
Maven tools & archetypesMaven tools & archetypes
Maven tools & archetypesSon Nguyen
 
Mule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutesMule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutesGennaro Spagnoli
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standaloneAnirban Sen Chowdhary
 
Integration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBIntegration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBRupesh Sinha
 
Mule with drools
Mule with droolsMule with drools
Mule with droolsF K
 
The WordPress developer's toolkit
The WordPress developer's toolkit The WordPress developer's toolkit
The WordPress developer's toolkit Ivelina Dimova
 
Mule management console installation with Tomcat
Mule management console installation with TomcatMule management console installation with Tomcat
Mule management console installation with TomcatSudha Ch
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesGennaro Spagnoli
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mulemdfkhan625
 

La actualidad más candente (20)

Deploying and running mule standalone
Deploying and running mule standaloneDeploying and running mule standalone
Deploying and running mule standalone
 
Getting started with Selenium 2
Getting started with Selenium 2Getting started with Selenium 2
Getting started with Selenium 2
 
Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUI
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Api webservice setupinstructions
Api webservice setupinstructionsApi webservice setupinstructions
Api webservice setupinstructions
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA Selenium
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
 
Spring Boot Showcase
Spring Boot ShowcaseSpring Boot Showcase
Spring Boot Showcase
 
Maven tools & archetypes
Maven tools & archetypesMaven tools & archetypes
Maven tools & archetypes
 
Mule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutesMule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutes
 
Example mule
Example muleExample mule
Example mule
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Integration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBIntegration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESB
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
 
Sails.js Intro
Sails.js IntroSails.js Intro
Sails.js Intro
 
The WordPress developer's toolkit
The WordPress developer's toolkit The WordPress developer's toolkit
The WordPress developer's toolkit
 
Mule management console installation with Tomcat
Mule management console installation with TomcatMule management console installation with Tomcat
Mule management console installation with Tomcat
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutes
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Mule velocity
Mule velocityMule velocity
Mule velocity
 

Similar a Java EE 02-First Servlet

Html servlet example
Html   servlet exampleHtml   servlet example
Html servlet examplervpprash
 
Jboss App Server
Jboss App ServerJboss App Server
Jboss App Serveracosdt
 
Servlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpServlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpodilodif
 
Writing simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorWriting simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorSantosh Kumar Kar
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 serversMark Myers
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Geoserver GIS Mapping Solution
Geoserver GIS Mapping SolutionGeoserver GIS Mapping Solution
Geoserver GIS Mapping SolutionKeshavSharma274
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and ServletsRaghu nath
 
Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows webservicesm
 
12c weblogic installation steps for Windows
12c weblogic installation steps for Windows12c weblogic installation steps for Windows
12c weblogic installation steps for WindowsCognizant
 
Jsp and servlet_netbeans-webapps
Jsp and servlet_netbeans-webappsJsp and servlet_netbeans-webapps
Jsp and servlet_netbeans-webappsOPENLANE
 

Similar a Java EE 02-First Servlet (20)

Tomcat + other things
Tomcat + other thingsTomcat + other things
Tomcat + other things
 
Servlet Demo (2).pptx
Servlet Demo (2).pptxServlet Demo (2).pptx
Servlet Demo (2).pptx
 
Html servlet example
Html   servlet exampleHtml   servlet example
Html servlet example
 
Jboss App Server
Jboss App ServerJboss App Server
Jboss App Server
 
Servlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpServlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtp
 
Writing simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorWriting simple web services in java using eclipse editor
Writing simple web services in java using eclipse editor
 
Jsf tutorial
Jsf tutorialJsf tutorial
Jsf tutorial
 
Jsp chapter 1
Jsp chapter 1Jsp chapter 1
Jsp chapter 1
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
Cis 274 intro
Cis 274   introCis 274   intro
Cis 274 intro
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Geoserver GIS Mapping Solution
Geoserver GIS Mapping SolutionGeoserver GIS Mapping Solution
Geoserver GIS Mapping Solution
 
Jdbc
JdbcJdbc
Jdbc
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and Servlets
 
Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows
 
12c weblogic installation steps for Windows
12c weblogic installation steps for Windows12c weblogic installation steps for Windows
12c weblogic installation steps for Windows
 
Jboss Tutorial Basics
Jboss Tutorial BasicsJboss Tutorial Basics
Jboss Tutorial Basics
 
Jsp and servlet_netbeans-webapps
Jsp and servlet_netbeans-webappsJsp and servlet_netbeans-webapps
Jsp and servlet_netbeans-webapps
 

Último

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Último (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

Java EE 02-First Servlet

  • 1. Introduction to Java Enterprise Edition  Configuring JBoss within Eclipse  Write your first Servlet Fernando Gil lobho.gil@gmail.com Marzo 2012
  • 2. Agenda  How to configure JBoss AS within Eclipse in order to start the develop of JavaEE applications.  We'll write our first Servlet class.  We'll discuss the deployment descriptor.
  • 3. JBoss AS 6.1 & Eclipse Indigo  First download Eclipse IDE for Java Developers from: http://www.eclipse.org/downloads and JBoss 6.1 from: http://www.jboss.org/jbossas/downloads/  Open Eclipse.  Create a New Server: Go to File/New/Other  Select Server Option  Search JBoss 6.x  Browse JBoss Home  Directory (the folder where you saved JBoss) Click Finish 
  • 4. Important  If you can not find JBoss 6.x in the servers list, try to Download additional server adapters:  Sometimes eclipse can not find the JBoss adapters, in that case check this video tutorial to solve the problem: Eclipse & JBoss AS 6
  • 5. Dynamic Web Project  Open Eclipse and select File/New/ Dynamic Web Project  Set the Project Name and the location  In Target Runtime we must select the runtime of JBoss 6.x  The Dynamic web module version will be set automatically  We can Click Finish
  • 6. Creating our Servlet  In order to keep the example simple, we'll create a servlet selecting File/New/Class and set the values like in the picture:
  • 7. The Code package com.dss.tut; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class FirstServlet extends HttpServlet { /* The service() method handles requests and creates responses. * The servlet container automatically calls this method when * it gets any request for this servlet.*/ public void service(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{ PrintWriter pw = resp.getWriter(); pw.println("<html>"); pw.println(" <head></head>"); pw.println(" <body>"); pw.println(" <h1>Hello! this is my first Servlet</h1>"); pw.println(" </body>"); pw.println("</html>"); } }
  • 8. Deployment Descriptor  We must indicate to the Application Server the configurations of our Servlets. The Deployment descriptor is a XML file to accomplish this task. We will talk more about this file later. By the moment we need to create a new file called web.xml in the directory: WebContent/WEB-INF of our project. <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <servlet> <!-- Define our servlet indicating one name to identify it and the class which represent it including the package --> <servlet-name>First</servlet-name> <servlet-class>com.dss.tut.FirstServlet</servlet-class> </servlet> <servlet-mapping> <!-- Link one existent servlet with an url. Whit this we can specify the way we can access the Servlet by the browser--> <servlet-name>First</servlet-name> <url-pattern>/MyServlet</url-pattern> </servlet-mapping> </web-app>
  • 9. Compilation and Deployment  Now we just need to select our project, right click, Run As.., Run on Server, Select our JBoss Server and wait.  Remember the url pattern that we specified in the deployment descriptor, because that is the way we'll access to the Servlet.
  • 10. Next Lesson: JPS Technology Fernando Gil lobho.gil@gmail.com Marzo 2012