| | |
Problem with remote applications interaction using URL
Thread Solved |
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
sorry don't have time to debug it right now,
are you getting an ioexception in the server from the first trycatch?
are you getting an ioexception in the server from the first trycatch?
Last edited by dickersonka; Nov 17th, 2008 at 5:38 pm.
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
sorry to bombard you with links, but here is another server example
http://fragments.turtlemeat.com/javawebserver.php
http://fragments.turtlemeat.com/javawebserver.php
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
and also just to make sure you aren't running client and server on the same machine are you?
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
•
•
and also just to make sure you aren't running client and server on the same machine are you?
Looking at where it says Host: localhost:2604 led me to believe it is being run on the same machine.
Last edited by jasimp; Nov 17th, 2008 at 8:29 pm.
"Argyou not with the hand you are dealt in cards or life." ---- Wizard and Glass
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
ah hah, forgot to look at the previous post, i've had some trouble, normally not, but sometimes yes, just want to try and eliminate all possibilities
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
Oh ... it never ends
Thanks a lot for spending time working with me and my problem. I have tried new variant - same trouble. I found the way to pass through this problem:
I add "\n\n" in the end of request and then when reading from stream I'm checking, if the string ends on "\n\n" i break the cycle.
Here is updated server code (reading part):
It is workibg!
Just interesting, what is wrong? Have any ideas what is that?
P.S. about client and server on same machine: this is 3rd home work. Previous 2 also used interacting remote and I tested them on my machine and all works normally.
Thanks a lot for spending time working with me and my problem. I have tried new variant - same trouble. I found the way to pass through this problem:I add "\n\n" in the end of request and then when reading from stream I'm checking, if the string ends on "\n\n" i break the cycle.
Here is updated server code (reading part):
java Syntax (Toggle Plain Text)
while (true) { int b = is.read(); if (b == -1) break; request += (char)b; if(request.endsWith("\n\n")) break; }
Just interesting, what is wrong? Have any ideas what is that?

P.S. about client and server on same machine: this is 3rd home work. Previous 2 also used interacting remote and I tested them on my machine and all works normally.
Last edited by Antenka; Nov 18th, 2008 at 4:33 pm.
So what if you can see the darkest side of me?
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
lol it is working and you are asking what is wrong?
what part doesn't work? or you mean why it didn't work before?
what part doesn't work? or you mean why it didn't work before?
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
i believe its because you have to "tell" the server when you are done sending, since you want the server to send the request back you have to say i'm done, now send the information
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
![]() |
Similar Threads
- Cannot find server or DNS Error - please help! (Viruses, Spyware and other Nasties)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
Other Threads in the Java Forum
- Previous Thread: Listing questions
- Next Thread: need working code in java of SMTP and pop3
| Thread Tools | Search this Thread |
911 addball addressbook android api append applet application apps array arrays automation binary bluetooth businessintelligence button card class client code collision component crashcourse css csv database eclipse ee error fractal free ftp game gis givemetehcodez graphics gui html ide image integer integration j2me japplet java javaarraylist javadoc javafx javaprojects jni jpanel julia jvm linked linux list loan machine map method methods migrate mobile netbeans objects oriented output phone physics printf problem program programming project projects radio recursion replaydirector reporting researchinmotion rotatetext scanner se server service set sms software sort sql string swing test textfield threads tree trolltech ubuntu utility windows






