Pinda Ros

Ranch Hand
+ Follow
since Apr 14, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pinda Ros

nope its the same vector, i ll try to post some code

i checked it with the debugger too .

excetly vefore the end of the end document method the v vector has 19 elements after then its 0!

thank you for the reply.
18 years ago
Hello ,

I have built an xml parser that uses a vector to store the values of each tag.

while the class is parsing i can see the vector getting bigger and filling up with values.

However i noticed that after endDocument everything in the vector is lost.
That is i have an empty vector.

Any suggestions why this might be happening?

thank you in advance.

pinda
Hello ,

I have built an xml parser that pusers a vector to store each tag.

However i noticed that after endDocument everything in the vector is lost.

Any suggestions why this might be happening?

thank you in advance.

pinda
18 years ago
Finally problem was solved by changing the object that i wanted to transfer from document to stringbuffer.

Thank you all for the replies.

pinda
19 years ago
Basically My tests are locally on the same machine.

Furthermore, when I was using rmi in my remote tests, were included several and different vms all working fine.

So this message is kind of strange.

Anyway I'll have a better look to check what you say.

But still its strange using an applet it fails when using the same code from within an application class it works!!!
19 years ago
Hello and thank you for the replies.

I run the serialver command and from the workspace in eclipse classes in web-inf and from the extracted jar i got the exact same serial version.


com.ext.portlet.notepad.transferable.RemoteDocument: static final long serial VersionUID = 100991064940334783L;

com.ext.portlet.notepad.transferable.RemoteDocumentImpl: static final long serial VersionUID = -3875362439486193205L;



however it worries me the fact that the exception contains "AbstractDocument" Since Im not using that object anywhere...
I implement Document and inherit from plainDocument

Could it be because my applets are signed?(the transferable classes though are in a different jar...)
19 years ago
Hello all,

I have developed a small notepad applet that (supposedly)saves notes remotely using RMI.

I noticed the known RMI firewall problems, so instead of using http tunnelling i found out the javaranchcommon.jar and started making changes.

Now, my problem is a bit weird. When i try to connect to a servlet and retireve a Document object it does so successfully however when i try from within my applets I get an Invalid Class Exception from class HTTP, from method sendAndRecv , the complete exception follows:



HTTP: java.io.InvalidClassException: javax.swing.text.AbstractDocument; local class incompatible: stream classdesc serialVersionUID = -116069779446114664, local class serialVersionUID = 6842927725919637215



furthermore i have developed a wrappper for document class named remotedocument that also extends serializable as well as an implementation remotedocument.

The Objects send are remote document or remotedocumentImpl or Document so I found it weird that i Get AbstractDocument in the exception and that i get the exception from http and not from one of my classes...

Here are the two different ways i use the sendAndreceive.

1)works:


2)fails:

menu applet and notepad are two different applets

Any suggestions??

Thank you in advance

pinda
19 years ago
Hello and thank you for the reply.


Applets and Servlet/JSP has no any default connection between each other.


I have developed a connnection using rmi I omit to mention that this notepad is remote notepad everything that the user does it happens at the server.

For example each logged in user views its own folder with each own files and can open /save file from / to the server.

Thats why I have to minitor when the user really logged out or jsut refreshed the page

Any suggestions on a better practice?


Regards

19 years ago
Hello and thank you for the reply.


Applets and Servlet/JSP has no any default connection between each other.


I have developed a connnection using rmi I omit to mention that this notepad is remote notepad everything that the user does it happens at the server.

For example each logged in user views its own folder with each own files and can open /save file from / to the server.

Thats why I have to minitor when the user really logged out or jsut refreshed the page

Any suggestions on a better practice?


Regards

19 years ago
JSP


If page is readonly, then you can load it in applet from the same record
for each user.




What exactly do you mean by same record for each user?



As I said before life cycles of applet and html page are almost the same.
So you can create persistent page (that don't reloads) by using frames or popup windows.



I'm not talking about simple html pages but servlets and jsp pages using sessions.

Are you suggesting that jsp using sessions it is not a good practice?
19 years ago


If page is readonly, then you can load it in applet from the same record
for each user.




What exactly do you mean by same record for each user?



As I said before life cycles of applet and html page are almost the same.
So you can create persistent page (that don't reloads) by using frames or popup windows.



I'm not talking about simple html pages but servlets and jsp pages using sessions.

Are you suggesting that jsp using sessions it is not a good practice?
19 years ago
JSP
Hello and thank you for the reply.

Why save it on the server? If the page is being viewed by 2000 users at the same time this means i should keep 2000 records....

What if the applet was persisted in the clients side for each user and if the session is valid to try and load the persistent state?

Which do you think it is better?

Thank you
19 years ago
JSP
Hello and thank you for the reply.

Why save it on the server? If the page is being viewed by 2000 users at the same time this means i should keep 2000 records....

What if the applet was persisted in the clients side for each user and if the session is valid to try and load the persistent state?

Which do you think it is better?

Thank you
19 years ago
Hello,

I do not know if this question should be here or in the applets forum but I 'll write it here since I believe its a jsp issue.

I have developed a small notepad applet that works fine with the following problem.

Let's say I open a document (works ok)
If then for some reason the page has to be refreshed, the changes will be lost.

For example the textArea object will be empty instead of having the contents of the document that was open.

The reason for the refresh might be that this applet is part of a portlet portlet itself or part of a bigger web application.

So if the applet for exaple is a portlet maximizing it or restoring it will cause the whole page to refresh causing the applet to lose its "state"

Any suggestions?

Thank in advance

pinda
19 years ago
JSP
Hello,

I do not know if this question should be here or in the applets forum but I 'll write it here since I believe its a jsp issue.

I have developed a small notepad applet that works fine with the following problem.

Let's say I open a document (works ok)
If then for some reason the page has to be refreshed, the changes will be lost.

For example the textArea object will be empty instead of having the contents of the document that was open.

The reason for the refresh might be that this applet is part of a portlet portlet itself or part of a bigger web application.

So if the applet for exaple is a portlet maximizing it or restoring it will cause the whole page to refresh causing the applet to lose its "state"

Any suggestions?

Thank in advance

pinda
19 years ago