Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet Display helloworld using servlet in jboss

Have Programming Question? Ask it here!
 
 
 


thruba nandhini
Display helloworld using servlet in jboss
1 Answer(s)      2 years ago
Posted in : JSP-Servlet


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?

Advertisement
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
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 to display a table from database using servlet
how to display a table from database using servlet  how to display... the following link: http://roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks...://roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks
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
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,<
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
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
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
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
DOJO HelloWorld Example - Ajax
DOJO HelloWorld Example  Hi I am total in using DOJO for AJAX purpose From the HellowWorld example Hello World! The Button has already the onClick the helloPressed() function directly. SO what and when exactly does
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
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
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
program on helloworld :explain
program on helloworld :explain  class Hello { public static void main(String[] args) { System.out.println("hi hello hru "); } Blockquote }   Class is the building block in Java, each and every methods &
program on helloworld :explain
program on helloworld :explain  class Hello { public static void main(String[] args) { System.out.println("hi"); } }   Class is the building block in Java, each and every methods & variable exists within
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
jboss sever
jboss sever  Hi how to configure data source in jboss server and connection pooling Thanks Kalins naik   JBoss Tutorials
jsp-jboss
jsp-jboss  where to keep jsp in jboss
developing a Session Bean and a Servlet and deploy the web application on JBoss 3.0
;/servlet-name> <display-name>Simple Session Servlet</display... Writing Stateless Session Bean and Calling through Servlet... I will show you how to develop a Stateless Session Bean and a Servlet
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
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
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 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
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 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
Jboss MQ ConnectionFactory - JMS
Jboss MQ ConnectionFactory  Iam Using jboss-5.0.0.Beta4 my quetion is that iam not able to get Jboss MQ ConnectionFactory object pls any suggest me how to get it on jboss-5.0.0.Beta4
developing a Session Bean and a Servlet and deploy the web application on JBoss 3.0
Welcome to the Jboss 3.0 Tutorial   ... the web application on JBoss 3.0 Server. This example shows you how to write...;/description> <display-name>Example 3</display-name> <
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
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
Struts2 Helloworld problem -Please help - Struts
Struts2 Helloworld problem -Please help  Hi I am a beginner in Struts2. I tried some HelloWorld example in Struts2, to understand. But due to some... using Eclipse Europa, tomcat6.0.18. The following are the steps that I
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
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
JBoss AS Training
their knowledge to EJB3 and J2EE middleware programming using the JBoss Application... using Servlet & JSP. Creating basic web applications... JBoss AS Training     Description
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 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
how to install jboss drools
how to install jboss drools   how to install jboss drools
Welcome to the Jboss 3.0 Tutorial
Welcome to the Jboss 3.0 Tutorial  ...;  Building Web Application With Ant and Deploying on Jboss 3.0... on the Jboss 3.0 application server. After the completion of this lesson
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
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
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
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
JBoss Unix and Line Separator
JBoss Unix and Line Separator  Hi, I am trying to solve an critical problem. I have an application which write a batch file using the method println... the run.conf script from jboss I added the parameter -Dline.separator=separator I
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
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
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
Struts - Jboss - I-Report - Struts
Struts - Jboss - I-Report  Hi i am a beginner in Java programming and in my application i wanted to generate a report (based on database) using Struts, Jboss , I Report
Advertisements
 

 

 

DMCA.com