This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem deploying hello world web application on weblogic 12

 
pino astarita
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok , if i create an enterprise java project deploying an ear with a war inside it's ok.. why?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic