English 中文(简体)
How to resolve StandardWrapperValve error on Catalina?
原标题:

I am creating a signup application with validation and Captcha (using SimpleCaptcha). I am able to deploy my application on localhost and everything works perfectly inclusive of the captcha.

But when deployed the war file to a test server, my captcha is not working, and here s an output from the log file:

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:111) 
Servlet SimpleCaptchaServlet is currently unavailable

I did register my SimpleCaptchaServlet on the web.xml, and I can locate the class file for that Servlet, but still unable to locate the problem. May I know how can I fix this issue?

Here s the web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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">
<servlet>
    <servlet-name>SignupProcessServlet</servlet-name>
    <servlet-class>com.example.controller.SignupProcessServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>SignupSuccessServlet</servlet-name>
    <servlet-class>com.example.view.SignupSuccessServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>SignupServlet</servlet-name>
    <servlet-class>com.example.view.SignupServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>SimpleCaptchaServlet</servlet-name>
    <servlet-class>com.example.controller.SimpleCaptchaServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>SignupProcessServlet</servlet-name>
    <url-pattern>/signup_process.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>SignupSuccessServlet</servlet-name>
    <url-pattern>/signup_success.view</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>SignupServlet</servlet-name>
    <url-pattern>/signup.view</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>SimpleCaptchaServlet</servlet-name>
    <url-pattern>/captchaImg</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>
<welcome-file-list>
    <welcome-file>signup.html</welcome-file>
</welcome-file-list>

Thank you very much.

最佳回答

Thanks for helping me out. I managed to get my issue fixed. It is an issue with the existing java 2 sdk on the server, not running java ee 5. It s outdated, and using tomcat 5.5. Upon creating a new java and tomcat instance (as there are still some applications running on the old version), everything works well.

For anyone who have happened to meet with this similar issue as mine, it s either you upgrade the latest jave 2 sdk and tomcat, or downgrade your script to the old version compatible.

问题回答

Your servlet didn t deploy correctly, you should see a stack trace or message on the tomcat console during the deployment. If you posted your web.xml contents, that might give us a clue.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签