User development, A new message was posted in the thread "[beginner] Deploying a ear file under JBoss AS 5":
http://community.jboss.org/message/519121#519121 Author : Sarko Zio Profile : http://community.jboss.org/people/sarko86 Message: -------------------------------------------------------------- Hi and thank you for your kind reply! So, in the console the following error is displayed: *** DEPLOYMENTS IN ERROR: Name -> Error vfszip:/C:/Programmi/jBoss/server/default/deploy/example2.ear/ -> org.jboss.depl oyers.spi.DeploymentException: Error creating managed object for vfszip:/C:/Prog rammi/jBoss/server/default/deploy/example2.ear/example2.war/ DEPLOYMENTS IN ERROR: Deployment "vfszip:/C:/Programmi/jBoss/server/default/deploy/example2.ear/" is in error due to the following reason(s): org.xml.sax.SAXException: The content of element type "servlet-mapping" must match "(servlet-name,url-pattern)". @ vfs zip:/C:/Programmi/jBoss/server/default/deploy/example2.ear/example2.war/WEB-INF/ web.xml[16,21] at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(Dep loyersImpl.java:993) Ok, I know default package is discouraged, but it was just a test. I don't really think this is the an error cause (but I may be wrong ) No, I don't use Eclipse, at least for the first projects. I want to understand step-by-step how the whole thing works. The only strange thing I did was to modify the listening port from 8080 to 8070 (in order to avoid conflicts with Tomcat). And, as I wrote, I developed it also in the manal way after JBoss started but nothing to do, always the same error. Well, all the configuration files are contained in the .ear I attached. Anyway, the class reads: import java.io.*; import java.text.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void service(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{ response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head>"); out.println("<title>Hello World Servlet!</title>"); out.println("</head>"); out.println("<body>"); out.println("<p align=\"center\"><font size=\"5\" color=\"#000080\">Hello World!</font></p>"); out.println("<p align=\"center\"><a href=\"javascript:history.back()\">Go to Home</a></p>"); out.println("</body>"); out.println("</html>"); } } >From the error message it seems there is an error in web.xml but I don't >really understand this magic code. I have knowledge of servlets but I don't >know the hidden mechanisms behind JBoss deployment so I wouldn't know where to >modify the file. <?xml version="1.0" encoding="ISO-8859-1"?> <!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> <servlet-name>HelloWorld</servlet-name> <servlet-class>HelloWorld</servlet-class> </servlet> <servlet-mapping> <url-pattern>/servlet/HelloWorld</url-pattern> <servlet-name>HelloWorld</servlet-name> </servlet-mapping> </web-app> Hope this will make the problem clearer... Thank you again! -------------------------------------------------------------- To reply to this message visit the message page: http://community.jboss.org/message/519121#519121
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user