0
votes

I've got this error after deploying .war in Tomcat 7.0 using Azure server. But, it's ok when I deploy in localhost XAMPP by using the same file .war.

Here's my web.xml

http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">

<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>

<filter>
    <filter-name>filter</filter-name>
    <filter-class>servlet.filter</filter-class>
</filter>

<filter-mapping>
    <filter-name>filter</filter-name>
    <url-pattern>/buku.jsp</url-pattern>
    <url-pattern>/profile.jsp</url-pattern>
    <url-pattern>/updateBuku.jsp</url-pattern>
    <url-pattern>/daftarBuku.jsp</url-pattern>
    <url-pattern>/daftarPeminjaman.jsp</url-pattern>
    <url-pattern>/pengguna.jsp</url-pattern>
    <url-pattern>/updatePengguna.jsp</url-pattern>
    <url-pattern>/penggunaBaru.jsp</url-pattern>
    <url-pattern>/daftarPengguna.jsp</url-pattern>
    <url-pattern>/daftarPengguna.jsp</url-pattern>
</filter-mapping>

<servlet>
    <servlet-name>logout</servlet-name>
    <servlet-class>servlet.logout</servlet-class>
</servlet>

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

<servlet>
    <servlet-name>deleteBuku</servlet-name>
    <servlet-class>servlet.deleteBuku</servlet-class>
</servlet>

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

1
What is your actual question?Cleb
Can you post the stacktrace? Maybe you are getting some config error like DB user/pass or something like that.Fernando Garcia
As it stands, it's a bit difficult to help you figure this out, as you haven't provided much. For instance: Is this a web app? Cloud service? Virtual Machine? Please edit your question and provide additional details, including the actual error (which you failed to include in the question).David Makogon

1 Answers

0
votes

I tried to create a new Java Web App using my local environment and deploy my war file on Azure Tomcat Server to reproduce the failure in using your web.xml.

I found the content below in my Azure log file “localhost.2015-xx-xx.log”.

Jul 14, 2015 7:55:30 AM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter filter java.lang.UnsupportedClassVersionError: servlet/filter : Unsupported major.minor version 52.0 (unable to load class servlet.filter)

My local Java version is jdk1.8.0_45, but the java version on Azure is 1.7.0_51. So if your JDK version is higher than Azure’s, the fail “FAIL - Application at context path / could not be started” will be happened in server starting.

The solution is that you need to configure JDK1.8 compatible mode from 1.8 to 1.7 at Eclipse Project Properties(“Java Build Path”->”Edit(JRE System Library)”). The pictures as follows:

enter image description here

enter image description here

Then, you should rebuild project, export war file and deploy it into Azure again. Please check your logfile and confirm your expection before you follow the steps above.

Note: By convention, Java type names usually start with an uppercase letter.