Problem with j_security_check - Error 404

Hi,
I am trying to modify an application that works with Apache and Tomcat server.
I tried to add basic form authentication, but when I enter a login-name/password I get an HTTP 404 Error about the requested page, that it was not found.
Here are my web.xml and logon.jsp files:
======================== web.xml ========================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- (c) 2001, RosettaNet; portions hereof (c) 2001, SAIC. -->
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"webapps/rosettanet/WEB-INF/web-app_2_2.dtd">
<web-app>
<!-- Security Constraint -->
<security-constraint>
     <display-name>SecurityConstraint</display-name>
     <web-resource-collection>
          <web-resource-name>STK</web-resource-name>
          <url-pattern>/RnsttHome.jsp</url-pattern>
          <http-method>DELETE</http-method>
          <http-method>GET</http-method>
          <http-method>POST</http-method>
          <http-method>PUT</http-method>
     </web-resource-collection>
     <auth-constraint>
          <role-name>customer</role-name>
     </auth-constraint>
     <user-data-constraint>
          <transport-guarantee>NONE</transport-guarantee>
     </user-data-constraint>
</security-constraint>
<login-config>
     <auth-method>FORM</auth-method>
     <realm-name>file</realm-name>
     <form-login-config>
          <form-login-page>/logon.jsp</form-login-page>
          <form-error-page>/logonError.jsp</form-error-page>
     </form-login-config>
</login-config>     
<!-- Security Roles -->
<security-role>
     <role-name>customer</role-name>
</security-role>
<welcome-file-list>
     <welcome-file>
          RnsttHome.jsp
     </welcome-file>
</welcome-file-list>
</web-app>
=======================================================
======================== logon.jsp =======================
<%@ page contentType="text/html" %>
<%-- Log-In Page --%>
<html>
<head><title></title></head>
<center>
<h3>This is a login page.</h3>
<br><br><form action="j_security_check" method=post>
<table>
<tr>
<td align="center">
<table border="0">
<tr>
<td><b>Enter your name: </b></td>
<td><input type="text" size="15" name="j_username"></td>
</tr>
<tr>
<td><b>Enter your password: </b></td>
<td><input type="password" size="15" name="j_password"></td>
</tr>
<tr>
<td></td>
<td align="right"><input type="submit" value="Submit"></td>
</tr>
<tr>
<td><br></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</center>
</html>
=======================================================
I also noticed the following messages in the mod_jk.log
=======================================================
[jk_ajp12_worker.c (596)]: ajpv12_handle_response, error writing back to server
[jk_ajp12_worker.c (596)]: ajpv12_handle_response, error writing back to server
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (596)]: ajpv12_handle_response, error writing back to server
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_ajp12_worker.c (498)]: ajpv12_handle_response, error reading header line
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61
[jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
[jk_ajp12_worker.c (517)]: ajpv12_handle_response, no value supplied
=======================================================
I know for sure that Tomcat is configured to handle all the .jsp pages. This is mod_jk.conf-auto
=======================================================
JkMount /*.jsp ajp12
JkMount /servlet/* ajp12
=======================================================
The application is located inside Tomcat folder webapps.Any suggestions or ideas?I honestly don't know how to solve this problem.I looked at other similar threads but none of the suggestions or solutions posted work for my case...
Arapakis Giannis
IT-Postgraduate Student

No, that's not the problem.I am sure that it finds the pages "logon.jsp" and "logonError.jsp".There is no need to remove the "/".
The problem is that after I am redirected to the logon.jsp and enter a login-name/password I press the submit button and then I get the 404 error.
Have you configured Apache to recognise the "j_security_check" URL to be forwarded to Tomcat appropriately? It probably does not do this by default.
That might be the problem.Could you please tell me how to check if Apache is configured appropriately?Which configuration file should I check and for what parameter should I look for?

Similar Messages

  • Hello, i need help i'm doing experiment on ilab i have managed to put my experiment on the platform but when i try to launch it fails with an error 404 that the page not found. any one with idea of what i should do to solve this problem. thank you

    hello, i need help i'm doing experiment on ilab i have managed to put my experiment on the platform but when i try to launch it fails with an error 404 that the page not found. any one with idea of what i should do to solve this problem. thank you

    hey Sally,
    Can you elaborate on the ilab and what you are trying to do? I have found this page to explain error 404, but I am not sure if it directly applies to  you
    http://digital.ni.com/public.nsf/allkb/D0998D3734926FA08625782300016E40?OpenDocument
    Regards,
    A. Zaatari
    National Instruments
    Applications Engineer

  • J_security_check / Error 404

    Hi,
    I am trying to modify an application that works with Apache and Tomcat server.
    I tried to add basic form authentication, but when I enter a login-name/password I get an HTTP 404 Error about the requested page, that it was not found.
    Here are my web.xml and logon.jsp files:
    ======================== web.xml ========================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- (c) 2001, RosettaNet; portions hereof (c) 2001, SAIC. -->
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "webapps/rosettanet/WEB-INF/web-app_2_2.dtd">
    <web-app>
    <!-- Security Constraint -->
    <security-constraint>
    <display-name>SecurityConstraint</display-name>
    <web-resource-collection>
    <web-resource-name>STK</web-resource-name>
    <url-pattern>/RnsttHome.jsp</url-pattern>
    <http-method>DELETE</http-method>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>customer</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>file</realm-name>
    <form-login-config>
    <form-login-page>/logon.jsp</form-login-page>
    <form-error-page>/logonError.jsp</form-error-page>
    </form-login-config>
    </login-config>
    <!-- Security Roles -->
    <security-role>
    <role-name>customer</role-name>
    </security-role>
    <welcome-file-list>
    <welcome-file>
    RnsttHome.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    =======================================================
    ======================== logon.jsp =======================
    <%@ page contentType="text/html" %>
    <%-- Log-In Page --%>
    <html>
    <head><title></title></head>
    <center>
    <h3>This is a login page.</h3>
    <br><br><form action="j_security_check" method=post>
    <table>
    <tr>
    <td align="center">
    <table border="0">
    <tr>
    <td><b>Enter your name: </b></td>
    <td><input type="text" size="15" name="j_username"></td>
    </tr>
    <tr>
    <td><b>Enter your password: </b></td>
    <td><input type="password" size="15" name="j_password"></td>
    </tr>
    <tr>
    <td></td>
    <td align="right"><input type="submit" value="Submit"></td>
    </tr>
    <tr>
    <td><br></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </form>
    </center>
    </html>
    =======================================================
    Tomcat is version 3.2 and Apache is version 1.3.19
    The application is located inside Tomcat, folder webapps.Any suggestions or ideas?I honestly don't know how to solve this problem.I looked at other similar threads but none of the suggestions or solutions posted work for my case...
    Arapakis Giannis
    IT-Postgraduate Student

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    what do you get when you enter in an invalid username/password - your logonError.jsp? page
    How do you access this page - is your destination page available, and working?
    I take it you are trying to access /RnsttHome.jsp
    Check the spelling of your URL - maybe try accessing another file under securlty to see if that one works?
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- It doesn't really matter whether I enter a correct username/password or an invalid one, cause I get the 404 Error. I am not re-directed to the logonError.jsp at all. I can only see that the browser is looking for J_security_check...at least that's what is written on the url when I get the 404 error.
    e.g.
    http://localhost/myapplication/j_security_check
    -- The destination page is RnsttHone.jsp and it is working fine.I don't think that this is the problem.
    -- I have tried accessing other files as well.That's not the problem.They all have the same problem with j_security_check...
    Arapakis Giannis

  • J_security_check error 404 login twice.

    Hi, i encountered a problem with authentication based on form and containter. I have a login.xhtml (later mapped to login.jsf) page that contains:
    <form action="j_security_check" method="post">
                            <div style="clear: both">
                                User:
                                <input type="text" name="j_username" size="25" class="textfield" tabindex="1"></input>
                                <input type="reset" value="Reset" class="button" tabindex="4"></input>
                            </div>
                            <div style="clear: both">
                                Password:
                                <input type="password" size="25" name="j_password" class="textfield" tabindex="2"></input>
                                <input type="submit" value="Submit" class="button" tabindex="3"></input>
                            </div>
                        </form>The authorisation is based on LDAP. The problem is when i open this login page in two separate tabs in the same browser. I log in to restricted page in the first tab, everything is ok. But when i try to log in in the second tab while still being logged in the first tab, i get error 404 service not available. Any ideas how to deal with such situation?

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    what do you get when you enter in an invalid username/password - your logonError.jsp? page
    How do you access this page - is your destination page available, and working?
    I take it you are trying to access /RnsttHome.jsp
    Check the spelling of your URL - maybe try accessing another file under securlty to see if that one works?
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- It doesn't really matter whether I enter a correct username/password or an invalid one, cause I get the 404 Error. I am not re-directed to the logonError.jsp at all. I can only see that the browser is looking for J_security_check...at least that's what is written on the url when I get the 404 error.
    e.g.
    http://localhost/myapplication/j_security_check
    -- The destination page is RnsttHone.jsp and it is working fine.I don't think that this is the problem.
    -- I have tried accessing other files as well.That's not the problem.They all have the same problem with j_security_check...
    Arapakis Giannis

  • Hello ! I'm using iphone 5 running ios 7.1.1 I have problem with Appstore error and also Safari don't work too. What can I do to fix this problem ?

    Hello ! I'm using iphone 5 running ios 7.1.1 and I have problem with appstore error and also Safari doesn't work. what can do I fix this problem ? I need help now my iphone can't do nothing

    Need more details. What is your appstore error exactly? and what happens when you try to use Safari?

  • When I go to yahoo mail. if i click on the email it goes to this a window with this error: 404 Not Found nginx/0.6.32

    When I go to yahoo.com or my yahoo, when I click on the email it goes to a blank page with the error message: 404 Not Found
    nginx/0.6.32. It only does it on my desktop pc. My IE allows me to acce email without this error.
    I can access it on my laptop with no problem. just on my desktop. it started about 3 weeks ago. I even uninstalled and reinstalled mozilla. I had the 5.0 and upgraded to 3.0 and is still doing the same thing.

    Go to Add or Remove Programs and look for Anti Phishing Domain Advisor. If you click on "Click here for support information" you'll see it is a Panda program. Uninstall it. Solves the problem. Don't know why the Firefox folks aren't telling people this!

  • After installing firefox 4.0 I've been having problems with rundll error on startup. Norton scan is finding a high risk malware.

    Last week I installed firefox 4.0 beta & the next time the computer was restarted a rundll error window appeared that said windows cannot locate file. This file showed up in the startup programs. When norton finds this which is every 1 or 2 days it removes it after a restart but the error & malware comes back. I went back to firefox 3.6 but still have this problem. Can you help?
    Thanks, Dennis

    It seems unusual that Norton should block and remove firefox updates. Having said that I was posting in a thread about problems with Norton a few days ago see [https://support.mozilla.com/en-US/questions/789617#answer-143767 thread] ''"I down loaded fromFFox the latest down - norton 360 - stopped the down load - stated not to use it - asked to stop running the program - I click yes thinking a problem now on my other computer I cant use FFox as a Browers -"''
    I use Norton (NIS) and received only a mild advisory on one Firefox update. I have Windows XP with Firefox3.6.15 & 4RC installed

  • Problem with call error / call restart

    If during a call with the Bluetooth car speakerphone on and - due to loss of signal, or anything else - I get a call error, in the lock screen there is a message of error with black color font and (!) icon, and until there is nothing strange, right? But next, if I try to unlock the iPhone the lost call restart automatically even if I would not to do it..
    Is there anyone with such a problem? Any solutions?

    I encounter a similar problem with 9.1.1.
    My problem is link to this bug ID : CSCtq10477.
    Mathieu

  • Problems with jsp-error page in web.xml

    Hello everybody, I have a confusing problem concerning the use of jsps as error pages for 404-errors.
    I inserted the following lines in my web.xml file:
    <error-page>
    <error-code>404</error-code>
    <location>/personal404.jsp</location>
    </error-page>
    The problem is: when an 404 occurs, instead of showin the personal404.jsp, the browser tells me that it tries to download a file which it can't (it tries to download the mis-spelled file). When I try to redirect the 404 to a static html-page, as in
    <error-page>
    <error-code>404</error-code>
    <location>/personal404.html</location>
    </error-page>
    everything works fine.
    Please, does anybody have any idea or suggestion, what I am doing wrong?
    Thanks in advance,
    Sebastian

    Hi Ivan,
    I tried it, but there wasn't any difference.
    I'll try to explain in more detail what happens:
    Imagine my application has the following root-path
    http://myServerName:port/mainRoot/
    When I try the following URL:
    http://myServerName:port/mainRoot/pageThatDoesNotExist.jsp, the browser tells me, it tries to download the file pageThatDoesNotExist.jsp from myServerName and that it can't find that file.
    The same happens, when I type http://myServerName:port/mainRoot/pathThatDoesNotExist/pageThatDOESExist.jsp, except that the browser tries to download the file pageThatDOESExist.jsp which (again) it can't.
    I have located the files 404.jsp and 404.html in the same directory, so I don't think this is a path-related problem, because everything works fine, when I specify the 404.html as the target error page (i.e. the browser displays the 404.html when I type the URLs shown above).
    I don't know if I'm making this clear, but maybe you get the idea.
    Sebastian

  • Problem with repair error 1311, and trouble reinstalling.

    I am having problems with reader, so I tried to do a repair but got error 1311. I uninstalled not im having trouble reinstalling...

    Error 1311, 1335, or 2350 "Source file not found...data1.cab" |Install Adobe products | Windows

  • Iphone problem with itunes error 1603 on restore

    I allowed my iphone battery to fully discharge and upon recharging got the error message with a large exclamation mark “please connect to itunes”. When I connected to itunes I was told that the phone was in recovery mode and needed to be reloaded. Itunes went out and downloaded the new firmware and began the install process after I approved the input screen that said it would wipe out all my data. 1/3 of the way through the process I received a message box that told me the process had failed to restore the iphone for an unknown error (number 1603).
    After looking online and calling ATT as well as Apple the best solution I received was to send the iphone in for replacement (i am 5 hours from an apple store). After fiddling around I have managed to solve the problem on my own.
    After trying everything else with no results, I pulled the SIM card out of the iphone and plugged the iphone into my computer. Itunes then reloaded the software and firmware successfully. I then put the SIM card back in and synced it up with itunes and it asked me to confirm the resync. Afterwards it just worked fine.
    My iphone works again!

    "1- suddenly my iPhone 5 lost mobile company signal and word searching appears instead but no signal for the hole day so I changed the sim with other provider and since it gave me the same result I searched the web and the seems no solution other than restore.
    I did restore and update to iOS 7.0.4 but at the restore takes at the last 1% in the last moment of restore it will take loooong time then gave me error 3. And now for more than a month the iPhone stuck with recovery logo. Almost I tried every trick in the book . Change USB cable, port, PC. PC with other OS . Even freezing the iPhone as I read here noooooo result the same happened again and again."
    I have exactly the same problem with my iPhone 5s!

  • Latest iTunes update problems with repeated error messages every 65 seconds??

    After this mornings' update of iTunes.  Problems with Applemobiledeviceservices.exe.  Error message every 65 seconds - software exception (oxc06d007e) occurred in the application at location 0x7c812fd3.
    How do I stop this?

    'The installer has insufficient privileges to modify this file C:\Program Files (x86)\Common Files\Apple\Apple Application Support\Web kit.resources\inspector\Images\Spinner Inactive Selected.gif.'
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • TS3694 what is a problem with this error (3194)

    I have a problem with my iphone. I want to update my version 5.0.1 to 6.0.1 and we see this error 3194. What I need to do?

    I'd start here
    http://support.apple.com/kb/TS3694

  • Problem with ipad error 9

    I'm having problems with restoring my ipad. Error 9

    Have you had a look at http://support.apple.com/kb/TS1275? It suggests Error 9 is a USB issue, so you can try other USB ports, perhaps a different cable, or even trying to restore on another computer, if you have one to hand.
    Hope that helps,

  • Problem with Imovie : error -50 when exporting

    I have a problem with Imovie, I am trying to export my video but i receive a message: error -50 .
    What should I do ?

    I have a problem with Imovie, I am trying to export my video but i receive a message: error -50 .
    What should I do ?

Maybe you are looking for

  • Error while starting essbase after Installation: Cannot load $DM_APP$

    Hi, I have installed Essbase on solaris. After installation when I start Essbase it started successfully but with an error: [Mon Sep 19 09:52:22 2009]Local/ESSBASE0///Error(1052003) Timed out reading from server [Mon Sep 19 09:52:22 2009]Local/ESSBAS

  • How to remove windows 7?

    How do I completely remove Windows 7 from my Mac? I've tried Boot Camp Assistant but I'm not able to select "Install or remove Windows 7 or later version". I tried erasing Boot Camp from Disk Utility but I've no idea what formal I should choose?

  • Problem calling applet method using IE

    I've searched through the forum and can't seem to find anything that can help me fix this. I'm trying to call an applet's method using Javascript. This is working fine under Netscape, but not IE. Everything I've read seems to indicate that I'm doing

  • Report Painter-To Bold a Text

    Hi,   Can we make a Text as Bold in Report Painters I have tried with formatting through colours but it is not working. Can anyone guide me. Regards Sunil

  • Audible Book file size?

    I have not purchased any audible books from ITMS yet. Is there some way to determine the file size that will be downloaded prior to purchase? There may be an obvious way but I haven't been able to find it and I want to get an idea of how much space o