wolstech Posted July 9, 2018 Posted July 9, 2018 Honestly, I don't think anyone here knows. Nobody here (including us) really know much about Java programming. The only example that we know works is the dummy MyHelioServlet that's floating around (search the forum for it). I know several users on here do use Java successfully though. Perhaps one of them would know why this doesn't work for you.
Amoss Posted July 10, 2018 Author Posted July 10, 2018 (edited) It worked until not long time ago...Krydos posted here something about missing files/bad structure. Now that I finished my changes, I can get deep into finding out what is missing but I need to know what is it exactly Edited July 10, 2018 by Amoss
Krydos Posted July 10, 2018 Posted July 10, 2018 Here's what is deployed on the server. Note there is no index.jsp or anything so that's why you're seeing the 404 error:stockdi1_MyHelioServlet . ├── META-INF ... └── WEB-INF ... You still don't have an index file. See https://wiki.helionet.org/Java_Servlet#Create_index.jsp for an example index.jsp.
Amoss Posted July 11, 2018 Author Posted July 11, 2018 I followed the instructions, redeployed the war and again I get 404What am I missing this time?Thanks
Krydos Posted July 11, 2018 Posted July 11, 2018 root@tommy [/opt/tomcat/live/webapps/stockdi1_MyHelioServlet]# ls -la total 4 drwxr-x---. 4 nobody nobody 35 Jul 11 16:49 . drwxr-xr--. 27 nobody nobody 4096 Jul 11 16:49 .. drwxr-x---. 3 nobody nobody 54 Jul 11 16:49 META-INF drwxr-x---. 4 nobody nobody 44 Jul 11 16:49 WEB-INF root@tommy [/opt/tomcat/live/webapps/stockdi1_MyHelioServlet]# Still don't see an index.jsp.
Amoss Posted July 11, 2018 Author Posted July 11, 2018 (edited) Did I put it in the wrong place in the project? Edited July 11, 2018 by Amoss
wolstech Posted July 12, 2018 Posted July 12, 2018 Seeing that the project contains the file, there is probably something wrong with the way it's being compiled. Start over using a new project.
Amoss Posted July 12, 2018 Author Posted July 12, 2018 Maybe it's in the wrong folder in the project?Should I start the project in a specific way? Because the file was not there, I created it manually.
Krydos Posted July 12, 2018 Posted July 12, 2018 In the servlet guide you have to manually create it too: However, there is currently no index file in the root of your servlet so if you were to deploy this as is and access username.heliohost.org/MyHelioServlet it would return a 404 error. Let's fix that next. Create index.jspSource: https://wiki.helionet.org/Java_Servlet
Amoss Posted July 13, 2018 Author Posted July 13, 2018 Apparently the problem was that the WAR didn't finish uploading. It got up to 100% and stayed there for some time so I closed the tab and deployed. Only now I realized that I should have waited longer for the progress to become green. Now I waited for it to become green and re-deployed, index.jsp should be there now but I still get 404.Any ideas?
Krydos Posted July 13, 2018 Posted July 13, 2018 Well, that's bizarre. The index.jsp file is showing up on the server now, but it still gives the 404 error. I would recommend starting a new project with a different name in Eclipse like Wolstech suggested and see if it has the same problem.
Recommended Posts