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



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


thruba nandhini
Display helloworld using servlet in jboss
1 Answer(s)      2 years and 2 months 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
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
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
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
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
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
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
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
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
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
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
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 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
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> <
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
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
 

 

 

DMCA.com