Display helloworld using servlet in jboss

Display helloworld using servlet in jboss

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

public class HelloWorld extends HttpServlet{ 
  public void doGet(HttpServletRequest request, 
   HttpServletResponse response)
  throws ServletException,IOException{
  response.setContentType("text/html");
  PrintWriter pw = response.getWriter();
  pw.println("<html>");
  pw.println("<head><title>Hello World</title></title>");
  pw.println("<body>");
  pw.println("<h1>Hello World</h1>");
  pw.println("</body></html>");
  }
} I wrote this and saved as HelloWorld.java

<web-app>
 <servlet>
  <servlet-name>Hello</servlet-name>
  <servlet-class>HelloWorld</servlet-class>
 </servlet>
 <servlet-mapping>
 <servlet-name>Hello</servlet-name>
 <url-pattern>/HelloWorld</url-pattern>
 </servlet-mapping>
</web-app> 

Saved the above as web.xml in WEB-INF folder.later i wrote a deploy.cmd

@echo off
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_33
set JBossHome=C:\Program Files\software\jboss-5.0.1.GA\jboss-5.0.1.GA

"%JAVA_HOME%\bin\jar.exe" -cvf helloworld.war HelloWorld.java WEB-INF
copy helloworld.war "%JBossHome%\server\default\deploy"
pause. 

When i runned ma deploy.cmd, I get a message like NO SUCH FILE OR DIRECTORY,I'm not getting ma output

Where did i go wrong?
View Answers

July 23, 2012 at 11:09 AM









Related Tutorials/Questions & Answers:
Display helloworld using servlet in jboss
Display helloworld using servlet in jboss  import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld...;servlet-name>Hello</servlet-name> <servlet-class>HelloWorld<
display Helloworld through servlets using jboss
display Helloworld through servlets using jboss  I'm beginner,Can You please Write the code for this.Including WEB.INF   Please visit the following link: http://www.roseindia.net/jboss
Advertisements
how to display a table from database using servlet
how to display a table from database using servlet  how to display... the following link:ADS_TO_REPLACE_1 http://roseindia.net/jsp/servlet-jsp-data... the following link: http://roseindia.net/jsp/servlet-jsp-data-list.shtml ThanksADS
How to display image in jsp from database using Servlet?
How to display image in jsp from database using Servlet?  Hi, How to display image in jsp from database using Servlet? Thanks   Hi, You will find code and example program at Retrieve image from database using Servlet
Retrieve image from database using servlet and display in JSP
Retrieve image from database using servlet and display in JSP  Hi, I... to use MySQL Database from JSP page. How to retrieve image from database using servlet and display in JSP? Thanks
display combination of a stacked area chart and line chart in one iframe using jfree - JSP-Servlet
display combination of a stacked area chart and line chart in one iframe using... to display combination of a stacked area chart and line chart in one iframe. i m using struts1.1 servlet, jsp. please provide me the help or path
JBoss and Sevlet - JSP-Servlet
do or change to get this servlet to run on JBoss 4.2.3. Thank you!  ...JBoss and Sevlet  I am trying to get familar with JBoss. I package up... IsItWorking /gg/servlets I have JBoss installed and put my gg.war into G
How send different files to browser at same time ..example(pdf&html) want display in same request using servlet
at same time ..example(pdf&html) want display in same request using servlet...How send different files to browser at same time ..example(pdf&html) want display in same request using servlet  package com.readfiles; import
unable to display image using html tag in servlet.(image src is in a variable.....). i am using netbeans IDE. plz..........do help
unable to display image using html tag in servlet.(image src is in a variable.....). i am using netbeans IDE. plz..........do help  import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException
display image using jsp
display image using jsp  display image using jsp and phonegap on emulator of eclipse   Here is a simple jsp code that displays an image on browser. <%@ page import="java.io.*" %> <%@page contentType="image/gif
Deployment of jsp-servlet in JBoss - JSP-Servlet
Deployment of jsp-servlet in JBoss  hello, I unzipped the JBoss4.0.0. Now, I have saved the web application named "abhi" in the deployment folder . like this E:\JBOSS\jboss-4.0.0\server\default\deploy\abhi After starting
dynamic display - JSP-Servlet
dynamic display  hi, i want to display dynamic values in drop drown box in a jsp page.these values are in the form of arraylist's object which came form another servlet or bussiness logic after being validated
Time display - JSP-Servlet
Time display   In a web application or ina website if we display the time getting as system time, whether it is server' system time or client' system time. Is there any difference between getting time using java Date
Get and Display using JOptionPane
Get and Display using JOptionPane  Hello everyone, I have been asked by my lecturer to do a simple program. But, I don't have the idea how to start... from student, name and age, by using JOptionPane. Then display it. Really
image display - JSP-Servlet
image display  how to display image that store in mysql database... column have BLOB datatype....  Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/retrieve-image.shtml Thanks
By using Applet display a circle in a rectangle
By using Applet display a circle in a rectangle  Write a java applet to display a circle in a rectangle
Displaying Mysql clob data using Servlet
Displaying Mysql clob data using Servlet .In this Section, we will display a clob data from a table of database using servlet. A CLOB is a Character Large... any portion of the CLOB data. 2.Equallity of 2 CLOBs can  be check by using
Exporting to excel using display tag?
Exporting to excel using display tag?  Hai , I am implementing pagination in struts.It has export to excel option.When I am clicking on it ,it is displaying a alert box stating "the file you are trying to open
Display Mysql "Blob" data using servlet
Display Mysql  "Blob" data using servlet In this section, we will discuss about how to display a blob data stored in database table. A Blob stores a binary large object in the database table's row. Blob object
display of colors in a table - JSP-Servlet
display of colors in a table  Hi, If i have a table of 4 by 4 boxes, numbering from 1-16 in sequence, how do i make them display one column of one color and another column of another color? Thanks!  Hi Friend
display messages in short - JSP-Servlet
display messages in short  hi sir, i am getting a full text message and that is shown in the table after sending a email.But now i have to get a starting few words then dots like hi dear..... so tel me how to do
display messages in short - JSP-Servlet
display messages in short  dear sir, I am able to send a email and also i am able to getting a message from that email ,storing that in a data base and retrieving showing that in a table .But now i want to get
display messages in short - JSP-Servlet
display messages in short  dear sir, i am sending a mail and then displaying all subject, matter and attached file in the table .But in table i have to get a short message i.e starting few words then dots like that ,when a mouse
display messages in short - JSP-Servlet
display messages in short  dear sir, i am sending a mail and then dialaing all subject, matter and attached file in the table .But in table i have to ge a short message i.e starting few words then dots ,when a mouse
how to create a progarame using jboss drools rules
how to create a progarame using jboss drools rules  Using Jboss Drools develop a simple utility which will allow the following http://www.jboss.org/drools/ Assuming that we have a list of Citizens <ID, Name,<
org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec version 1.0.2.Final Maven dependency. How to use jboss-servlet-api_3.0_spec version 1.0.2.Final in pom.xml?
org.jboss.spec.javax.servlet  - Version 1.0.2.Final of jboss-servlet...; - Version 1.0.2.Final of jboss-servlet-api_3.0_spec in pom.xml? How to use jboss...  - Version 1.0.2.Final of jboss-servlet-api_3.0_spec in project by the help
Write a query to display a row using index
Write a query to display a row using index  Write a query to display a row using index
Using JFreeChart to display recent changes in a time series
Using JFreeChart to display recent changes in a time series  Using JFreeChart to display recent changes in a time series
How display a image on servlet from file upload - JSP-Servlet
How display a image on servlet from file upload   Dear Sir, My Question is: How display a image on servlet from file upload Your Answer: Hi... reason is inaccessible Thanks Sir, But Servlet page nothing display any type
Display Multiple Images in jscrollpane using Java Jpanel
Display Multiple Images in jscrollpane using Java Jpanel  Browse and Display multiple images in vertical view of java jscrollpane using jpanel
Display Image using Toolkit.getImage()
Display Image using Toolkit.getImage()       This section illustrates you how to display the specified image using Toolkit.getImage() method. To display the image, put an image
Servlet using Weblogic 8.1
Servlet using Weblogic 8.1  I am developing a simple application in servlet, Which will accept a name and after produce the name with Welcome Message. I am using Weblogic 8.1. My Html Page is <html> <head>
Login issue using Servlet
Login issue using Servlet  Hi all, I need a code for login using servlet where in I want to check and validate user name and password from database also I want to check candidate's class (for ex. FY, SY, TY) if candidate's class
display records with images problem - JSP-Servlet
with a unique id. Also i wrote i jsp that link to servlet in order to display...display records with images problem  hello, i am developing HR application whereby i want to display employee records and their pictures on web
Automatically display in text box - JSP-Servlet
Automatically display in text box  Dear Deepak Sir, When i enter some text in text box.That corresponding value in database,the value display in another text box using ajax. Thanks & Regards, VijayaBabu.M
How to display Jfreechart from servlet in jsp web page at specified location
How to display Jfreechart from servlet in jsp web page at specified... to display the chart in web page. I generated the chart using Jfreechart in Servlet which is in image format.plz sir give me the code to display this chart
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
download code using servlet - Servlet Interview Questions
download code using servlet  How to download a file from web to our system using Servlet
How display a image on servlet from file upload - JSP-Servlet
How display a image on servlet from file upload  Dear Sir, My issue is: How display a image on servlet from file upload I receive your answer today... then Error 403 is resolved. then I run this program But servlet page no display
read XML file and display it using java servlets
read XML file and display it using java servlets  sir, i can't access... me the things where i went wrong java servlet program protected void...; /** Handles the HTTP <code>GET</code> method. * @param request servlet
Jsp not display desired result - JSP-Servlet
Jsp not display desired result  Hello all, I want to be able to display picture from Ms Sql 2000 using JSP. Below is the code I used but does not display anything. Please assist me. Thanks
Display Errors using Message Resources - Struts
Display Errors using Message Resources  Hello.. I've a login page where i used applicationresources.properties to display errors for null values... required.. I want to display errors using message resources using
Maven Repository/Dependency: org.jboss.spec.javax.servlet | jboss-servlet-api_3.0_spec
Maven Repository/Dependency of Group ID org.jboss.spec.javax.servlet and Artifact ID jboss-servlet-api_3.0_spec. Latest version of org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec dependencies. # Version
Maven Repository/Dependency: org.jboss.spec.javax.servlet | jboss-servlet-api_4.0_spec
Maven Repository/Dependency of Group ID org.jboss.spec.javax.servlet and Artifact ID jboss-servlet-api_4.0_spec. Latest version of org.jboss.spec.javax.servlet:jboss-servlet-api_4.0_spec dependencies. # Version
Maven Repository/Dependency: org.jboss.spec.javax.servlet | jboss-servlet-api_3.1_spec
Maven Repository/Dependency of Group ID org.jboss.spec.javax.servlet and Artifact ID jboss-servlet-api_3.1_spec. Latest version of org.jboss.spec.javax.servlet:jboss-servlet-api_3.1_spec dependencies. # Version
Html form using JavaScript to display the table content
Html form using JavaScript to display the table content  HI There, Greetings, I am new to this java and I need your assistance. I have created... want to write a Html JavaScript coding to display the content from database
Name Display in alert box - JSP-Servlet
Name Display in alert box  Dear Sir, Please any one help me......... when i enter some value in text that value is already in database display the alert box but the value is not in data base alert box is not display
how to display selected checkboxes dynamically using jsp
how to display selected checkboxes dynamically using jsp  Hi friends i have a requirement that : in my JSP page i have radio buttons followed by the DB fields..when i click SUBMIT button,if the field(or record

Ads