I've made a website using JSP's using Netbeans. I want to get this site online so I've bought a VPS (linux) as well as setting up tomcat and apache.
I can get the site to work, but no functionality works such as login, register etc (which all goes through commands in java). When I try to login it redirects me to sitename.com/ServletName and comes up with a message saying:
Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Additionally, a 503 Service Temporarily Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
I've looked this up online and it seems like it's a problem with my web.xml file which means that my .war file doesn't get deployed correctly.
Here's my current web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
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"
version="2.5">
<!--<servlet>
<servlet-name>ServletName</servlet-name>
<servlet-class>Servlet.ServletName</servlet-class>
</servlet>-->
<!-- The mapping for the JSP servlet Commented out-->
<!--servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>-->
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<error-page>
<error-code>404</error-code>
<location>/error-404.jsp</location>
</error-page>
</web-app>
Does anyone have any idea of what I need to have in here? Every time I try to log in or whatever it makes my entire site have the same error 503 message so I have to reboot the server etc. and then the same thing happens!
Thanks
Update: Still not working though
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<servlet>
<servlet-name>UserActionServlet</servlet-name>
<displayable-name xml:lang="en">My Servlet</displayable-name>
<description>The Servlet</description>
<servlet-class>Servlet.ServletName</servlet-class>
</servlet>
<!-- The mapping for the JSP servlet -->
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<error-page>
<error-code>404</error-code>
<location>/error-404.jsp</location>
</error-page>
</web-app>