• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Solved : Can someone help with Object Input/Output Stream...

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I am trying to capture 2 values from the browser/applet and using object input/output stream, pass them to the servlet on the app-server.
JAVA console is showing me meaningless error :

This is the code snippet from the applet in which I am trying to write to the outputstream, so that at the other end they can be read from the input stream :

and this is the code on the server side. The input stream should be able to read the two inbound parameters...

Somehow I believe the two paramaters
String usr = ois.readUTF();
String pwd = ois.readUTF();
caused this problem because the code worked well for one parameter of type integer.
Update:
I tried writeUTF() instead of writeObject() and got the same response code 500, pretty meaningless message for me.
Update:
readObject() one end
writeObject() other end


[ November 22, 2002: Message edited by: achana chan ]
[ November 22, 2002: Message edited by: achana chan ]

[ November 22, 2002: Message edited by: achana chan ]
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to streams.
 
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error is not meaningless. It is an HTTP code that tells you there is an exception being thrown in the servlet (or more generally, that there was an 'internal error' in the server).
The full stack trace should be in your servlet container's log file. With the small excerpt you've given, it's difficult to tell what the problem is. First you need to identify the precise problem, so either head to the log file or insert a try-catch around the servlet code and print the exception somewhere convenient to read.
 
I am displeased. You are no longer allowed to read this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic