vaneHW / dyuproject

Automatically exported from code.google.com/p/dyuproject
0 stars 0 forks source link

Prob with json serialization of OpenIdUser in cookie #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Test the servlet demo using jetty 6.1.x

What is the expected output? What do you see instead?

OpenIdUserManager class use JSON.toString(user);
having org.mortbay.util.ajax.JSON comming from Jetty.

If you test the demo servlet using jetty 6.1.x, it loads the JSON classes
from jetty 6.1.x instead of Jetty 7.0.0-pre3 (as expected).

The resulting json serialization is not as expected (it seems that my
version of jetty cannot serialize properly OpenIdUser) and return a
toString() value instead.

You could say that this has nothing to have with dyuproject (and is on
Jetty side) but I would argue that it would be nice to avoid dependency
hell using Jetty libs (especially if webapp container is jetty).

I would rather suggest using (for example)
<dependency>
 <groupId>net.sf.json-lib</groupId>
 <artifactId>json-lib</artifactId>
 <version>2.2.2</version>
 <classifier>jdk15</classifier>
</dependency>

What version of the product are you using? On what operating system?
Using dyuproject 1.1.0.

Original issue reported on code.google.com by alexis.a...@gmail.com on 30 Dec 2008 at 11:28

GoogleCodeExporter commented 8 years ago
I haven't encountered any problems wrt JSON serialization with jetty6.
Whats the exact version of jetty6 are you using?  I'll try to replicate it.
Also, was the webapp deployed using the jetty-maven-plugin or jetty's
WebAppDeployer/ContextDeployer?

Thanks,
David

Original comment by david.yu...@gmail.com on 30 Dec 2008 at 1:45

GoogleCodeExporter commented 8 years ago
I'm using jetty-6.1.5
I did not deploy the webapp using deployer. I just cut&paste the servletdemo in 
my
own WAR test project.

I've checkout the 1.1-SNAP code from trunk and changed the JSON part and it 
works now.

Original comment by alexis.a...@gmail.com on 30 Dec 2008 at 3:46

GoogleCodeExporter commented 8 years ago
A HttpSessionBasedUserManager is now provided and is the default.

Original comment by dyuproj...@gmail.com on 8 Jan 2009 at 3:20