File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Problem deploying hello world web application on weblogic 12 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Problem deploying hello world web application on weblogic 12" Watch "Problem deploying hello world web application on weblogic 12" New topic
Author

Problem deploying hello world web application on weblogic 12

pino astarita
Greenhorn

Joined: Nov 14, 2006
Posts: 15
Hi, i've write a web application and deployed on weblogic 12 but the console administration don't give me an error but not see the servlet in the war, this is my sources:

>>>>>>>>>>>>>>>>>>>>> servlet code:

package com.test.Hello;

import java.io.IOException;

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

public class HelloTestServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

public HelloTestServlet() {
super();

}


protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("called sevlet!");
}

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("called sevlet!");
}

}

>>>>>>>>>>>>>>>>>>>> my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">


<servlet>
<servlet-name>HelloTestServlet</servlet-name>
<servlet-class>com.test.Hello.HelloTestServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>HelloTestServlet</servlet-name>
<url-pattern>/HelloTestServlet</url-pattern>
</servlet-mapping>



<display-name>Nuovo</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

>>>>>>>>>>>>>>>>>> at least weblogic.xml:
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:weblogic-version>12.1.1</wls:weblogic-version>
<wls:context-root>TestAll</wls:context-root>
<wls:servlet-descriptor>
<wls:servlet-name>HelloTestServlet</wls:servlet-name>
</wls:servlet-descriptor>
</wls:weblogic-web-app>


the structure of archive war seem correct:

ROOT
|____ META-INF
|_____WEB-INF
|________ classes
|________ lib (empty)
|________ web.xml
|________weblogic.xml

please help me! THANKS!

pino astarita
Greenhorn

Joined: Nov 14, 2006
Posts: 15
ok , if i create an enterprise java project deploying an ear with a war inside it's ok.. why?
 
wood burning stoves
 
subject: Problem deploying hello world web application on weblogic 12
 
Similar Threads
WebLogic 9.2 clustering problem
Weblogic trying to load PersistenceProvider from wrong jar
Spring @Transaction Rollback problem
Need sample of weblogic.xml file for supporting HttpOnly
Deploying Struts 2 in weblogic