lani1234 Posted December 18, 2013 Posted December 18, 2013 I created the most minimal project to narrow down the problem of deploying my war on your server. It works on my machine, so I don't understand why deploying it on your server would make it stop working. The main jsp page is trying to access a Servlet and the Servlet is not being found. Any ideas why? Have other people been having this problem? I'm not sure what to change since I have it working on my computer.
Ice IT Support Posted December 18, 2013 Posted December 18, 2013 I see this: http://heliohost.dev.iceitsupport.net/screenshots/Screenshot%20from%202013-12-17%2020:50:08.png (please ignore the green) What specifically isn't working?
lani1234 Posted December 18, 2013 Author Posted December 18, 2013 When you type in a username and password and hit submit, the form is submitted to a Servlet called LoginServlet to handle the "login". The servlet will then search for the username and password in a MySQL database, and send a message to another jsp page to display the results. The servlet should be reached whether the username and password are in the database or not but it is giving a 404 error /LoginServlet not found. I haven't gotten as far as checking if the database is being accessed because it's not getting to the servlet. More details: The error I am getting when I click submit looks like this: Not Found The requested URL /LoginServlet was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_mono/2.6.3 mod_jk/1.2.35 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1 mod_wsgi/3.4 Python/2.7.4 Server at lani1234.heliohost.org Port 80
lani1234 Posted December 18, 2013 Author Posted December 18, 2013 Any ideas why it isn't working? I am working on somewhat of a deadline. I would really appreciate any input you might have. It seems that it would have to do with the mappings. Do they have to be reconfigured some how to work when deployed on the heliohost server versus my local tomat?
Krydos Posted December 19, 2013 Posted December 19, 2013 What version of tomcat are you running on your computer?
lani1234 Posted December 19, 2013 Author Posted December 19, 2013 I have Tomcat 7 on my computer. And I believe Java 7 as well (1.7). Would this effect the mapping?
Krydos Posted December 20, 2013 Posted December 20, 2013 We are currently running tomcat version 7.0.32 and java 1.6. Perhaps the java version mismatch is causing the problem. Can you try rewriting your .war targeted for java 1.6?
lani1234 Posted December 21, 2013 Author Posted December 21, 2013 Can you please help me to figure out why this isn't working on your server? Does anyone else running a java web application have this problem using JSP's and Servlets? I don't understand why it would work on other servers and not yours. Do you have error logs somewhere? This is the error that I get when you click the submit button from the main page: Not Found The requested URL /LoginServlet was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_mono/2.6.3 mod_jk/1.2.35 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1 mod_wsgi/3.4 Python/2.7.4 Server at lani1234.heliohost.org Port 80
Krydos Posted December 21, 2013 Posted December 21, 2013 No, as far as I know no one has had this problem before, and there are many working .war servlets on the server. The user with the username infopar has had a lot of issues with his applications too, but since he's Italian it seems like we may have had some communication issues both him understanding us and him explaining what it was he was doing to fix the issues he was having. I even asked him to try to help Heliohost as a whole http://www.helionet.org/index/topic/15488-problem-with-struts/page__view__findpost__p__91223 by posting what changes he made to get things working, but it seems he was only interested in getting his .war working not helping future users.
lani1234 Posted December 21, 2013 Author Posted December 21, 2013 This is very frustrating. How does one debug without seeing any error messages??
Krydos Posted December 22, 2013 Posted December 22, 2013 Are you asking about an error log? If so which one? As long as you're fairly specific I can post an excerpt of entries related to your application.
lani1234 Posted December 22, 2013 Author Posted December 22, 2013 I am looking for anything that would explain why I am getting the error that says "The requested URL /LoginServlet was not found on this server."If it works on my machine and on another server, why doesn't it work on your server? Something is blocking the application from reaching the servlet. Another possibility is that access to the database is being blocked. So any error logs that say anything about the servlet path or about database access would be helpful. Thank you
Krydos Posted December 22, 2013 Posted December 22, 2013 Ok, I played around with your servlet a bit and I may have some ideas for you. If you go to http://lani1234.heliohost.org/TestingWarFileOnHelioNEW it displays the username and password boxes correctly, but when you click submit it goes to something like http://lani1234.heliohost.org/LoginServlet?username=admin&password=pass See how the TestingWarFileOnHelioNEW disappears? That's why it give you the 404. If we manually reenter the missing servlet name you get a useful error message at http://lani1234.heliohost.org/TestingWarFileOnHelioNEW/LoginServlet?username=admin&password=pass So, you have two errors to fix: 1. Make sure the servlet name doesn't disappear when switching between pages.2. That "unsupported major.minor version 51.0" error means that you're compiling your classes for java 1.7 still when I already asked you to compile for 1.6 (50). Hopefully that helps you a bit. 1.8 = 52 1.7 = 51 1.6 = 50 1.5 = 49 1.4 = 48 1.3 = 47 1.2 = 46 1.1 = 45
lani1234 Posted December 22, 2013 Author Posted December 22, 2013 Thank you so much, this is much more helpful. I am going to try to tackle one problem at a time. Because of the unsupported major/minor version error, I was able to discover that while I did change my project build path to use java 1.6, my IDE didn't automatically change the compiler version, so it was still compiling with 1.7. I have fixed that now and dropped a new war into my home directory. For the issue where you're saying the servlet name disappears, I think that that is just because in my form with the submit button, I am using method=get as opposed to method=post. When you use method=get, you'll see the parameters in the URL. So let's start with debugging the java version first and see if that gets us somewhere. I really appreciate your help looking in to this.
lani1234 Posted December 23, 2013 Author Posted December 23, 2013 Can you please let me know what errors you are seeing now? Although I changed the java version to 1.6, the war is still not working.
Recommended Posts