• 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
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Weird problem with Servlets 4A...

 
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having a Pull My Hair Out problem with VideoServlet. The worst part is, I don't think it has anything directly to do with the assignment.
When I fill in the addvideo form and press submit, I get sent to the AddVideoServlet. The screen, however, is blank. When I view source, I see source that most definitely is not mine:

I guess that this is coming out of LogServlet somehow, but I cannot find it.
I am overriding doGet and doPost. The code looks the same as Reverse2Servlet in that regard (which I've passed).
I have a similar problem with ListVideoServlet. I am overriding doGet to point to doPost, but when I click the link I get an exception message instead:

I'm thinking that somehow these two are related. I have not had any problem like this working in Servlets up til now. Can someone please help?
TIA,
Joel
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Strange. Your AddVideoServlet uses a PrintWriter to produce some html, right?
 
Joel Cochran
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is correct. I'm thinking it must be in the way I'm overriding methods, but I can't find anything wrong...
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've already passed the assignment. If you will send me your code ([email protected]) I will look it over and see if anything jumps out at me.
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also had the same problem, it seemed to lock up every so often. The only i could get out of it was to close and reopen explorer, i think it is to do with the server not logging an initial page but i am still not sure why it does it.
ctrl+alt refesh also sometime helps its a bugger though when it doesn't fix itself
But it only came every so often so i just put it down as a bug in my program
 
Joel Cochran
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I tried it but no change.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you are seeing is a blank html page. As far as I can tell, this is not related to any output of LogServlet. I can get this error in the JDBC assignment if the connection to the database fails, but I've never run into it in the servlets assignments (at least not so far).
 
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had the same problem yesterday but found the reason here:
The problem was to be seen in the orion DOS window: Nullpointer exeception!
And where did that come from? The radiobuttons
should be checked correctly! use: the method from LogServlet that checks for blank fields
And the checkboxes too!
Debugging help: place some out.println(" bla bla");
to see how far your servlet comes
Not sure if it was necessary, but removed some code to be on the safe side. -Pauline
[ July 04, 2002: Message edited by: Pauline McNamara ]
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just looked through some threads in servlets and here in the cattle drive (searched servlets + blank + page).
Apparently a null pointer exception in your servlet will give you a blank page. Looks like Peter's got you headed in the right direction. LogServlet does have a nifty method to check for that - whether you use that or not you will have to make sure the parms you're getting aren't null.
Hope you still got some hair left...
 
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think i had the same problem... and like peter said, it has something to do with the radio buttons. either you have to select them before submitting, or you have to check their status when you submit.
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joel,
Let me know if you received my email or not. I seem to be having problems so I don't know if the message actually went out.
 
Joel Cochran
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Matthew,
Yes I got it (four times ). I found what you were referring to and that helped on the ListVideoServlet, but I'm still having the same problem with AddVideoServlet, but I think I'm on the right trail now.
Two cow skulls really are better than one!
Thanks!
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Joel Cochran:
Hey Matthew,
Yes I got it (four times ).


Wow, my mail was really screwed up. I only sent it twice. I received your email today. I'll see if I can find a hint to give you on the ListVideoServlet.
 
When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic