rec0 Posted October 19, 2017 Posted October 19, 2017 Hello, I have a problem with my java/jsp application. I created it in eclipse as it was described here http://wiki.helionet.org/Java_Servlet. I have tested it on Apache 7 and selected Java 1.6for this project. It runs ok on my local machine. I deployed it on server (rec0.heliohost.org/xmascard) and it doesn't work as it should. The problem occurs everytime I try to get object from java in jsp site. I'm trying to do it like: <% Card card = (Card) session.getAttribute("card"); %> And when I try to use this object <%= card.getUsername()%>I allways get NullPointerException like this object is never loaded. As I said it works on my local tomcat 7 server so I doubt it is implementation problem. Mabye there are some version differences so I don't ask you to fix this. I would only like to know how should I pass objects (or eventually simple variables) from java code to jsp the way it works on your servers. I'd love to try it myself but long deploying times make it hard. I hope you can help me Regards,rec0 Quote
Krydos Posted October 20, 2017 Posted October 20, 2017 Since you're on Tommy you're actually using Tomcat version 8.5 and java 1.8. Maybe try updating your local environment to closer to these values? Johnny has Tomcat 7 and java 1.7. Quote
rec0 Posted October 24, 2017 Author Posted October 24, 2017 I updated project and uploaded it again and it still returns nulls. I uploaded same project on Google Cloud Platform tomcat server which is in same version as yours and it runs well. Quote
Krydos Posted October 24, 2017 Posted October 24, 2017 I guess just use Google Cloud Platform tomcat server or a VPS then. I'm not sure why it would do that and you're the first person to report it. The only other thing I can think of is I can try deploying your .war on my Johnny account if you want so you can see if it works there. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.