Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems to save serialization Objects with Tomcat using XMLDecoder

 
matze ihnsein
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all together,

i want to save some Objects with JavaServlets using the XMLDecoder. But that does not work.

I have this Global function:


an this is the Serialtest Class


and i call the function this way


but all i got is an empty XML file looks like this:


what is my mistake?
he create an object serialtest but there must be some information - an the getter/setter are all set

thanks for your help!


 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch
matze ihnsein wrote: But that does not work.

TellTheDetails
 
matze ihnsein
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok... theres no exception. and the only data whitch is saved is the xml file i post.
to make the serialization work java need to know more --> exept this.


i try on linux and windows with java 1.5 and 1.6 on an tomcat 6 with

C:\Program Files\Java\jdk1.6.0_21\bin>javac.exe -classpath c:\classes\servlet-ap
i.jar;c:\classes\jsp-api.jar;c:\classes\el-api.jar "c:\classes\*.java"

but in my testcase there i not even "extends HttpServlet"

--- in the end i want to save data whitch is saved in Hashmaps (user-data username password etc) i have a class login with a static hashmap...

i hope you no what i mean because my english is not very well...
 
matze ihnsein
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i found my problem.

i had to save the static hashmap by its own.


in login



this works !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic