[jboss-user] [JBoss Tools (users)] - Re: deployment error 404

bmuralirao1980 do-not-reply at jboss.com
Wed Jun 25 09:34:46 EDT 2008


iam using jboss ide 2,0 beta version and jboss server 4.0.
These are the steps i followed while creating my simple application

(1)FILE>>NEW>>>JBOSS ECLIPSE IDE>>>J2EE1.4 projects
(2)Right-click on your project in the Package Explorer. 
Go to Properties—>Java Build Path. 
Click on the Source tab. 
Click on Add Folder. 
Click on Create New Folder. 
Set the folder name to "src". 
Select Yes when it asks you to remove the project as a source folder and to create a "bin" folder. 

(3)Click on the Libraries Tab (while still under Properties—>Java Build Path). 
Click Add Variable. 
Select ECLIPSE_HOME and click Extend. 
Navigate to the plugins/org.eclipse.tomcat.4.1.x directory. 
Select servlet.jar and click OK. 
Click OK to exit the properties dialog. 


Now, create a class called HelloWorldSerlvet in the com.devx.example package, using the following code in your servlet

and my servlets class was like this 


package com.devx.example;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HelloWorldServlet extends HttpServlet
{	

               protected void service(HttpServletRequest request, HttpServletResponse response)		
                           throws ServletException, IOException	
    {		
                           ServletOutputStream out = response.getOutputStream();		
                           out.println("<h1>Hello World!</h1>");




then created a folder under src called WEB-INF. Then, created a file called web.xml in that folder, using the following source. 

This was my xml file 

<!DOCTYPE web-app PUBLIC
 	'-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'
	'http://java.sun.com/j2ee/dtds/web-app_2.2.dtd'>
<web-app>
		
		<servlet-name>HelloWorldServlet</servlet-name>
		<servlet-class>com.devx.example.HelloWorldServlet</servlet-class>
	
		<servlet-mapping>
		<servlet-name>HelloWorldServlet</servlet-name>
		<url-pattern>/Hello</url-pattern>
	</servlet-mapping>
</web-app>



(5)Right clicked on the project in the Package Explorer. 
Select Properties—>Packaging Configurations. 
Right click in the right frame and click Add Std. Archive. 
Select Standard-WAR.war and click OK. 
Right click on the configuration and click Edit. 
Rename it to helloworld.war. 
Expand the configuration. 
Right click on the line with Manifest.MF and remove it. 

when i clicked ok packaging-build.xml file got created..

(6)Created a WAR file by right-clicking on the project and clicking Run Packaging.
(7)Right click on the WAR file, select Deployment, and then Deploy To...
It deployed sucessfully...but when i opened browser and tyed the url i got status code error 404....

please help me how to trace this.


murali rao
 




	



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160547#4160547

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160547




More information about the jboss-user mailing list