문제

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.

도움이 되었습니까?

해결책 2

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top