Jump to content

Nullpointerexception On Java/jsp


rec0

Recommended Posts

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.6

for 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...