File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes SecureVideos (servlets 4b), videologin.jsp URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "SecureVideos (servlets 4b), videologin.jsp URL" Watch "SecureVideos (servlets 4b), videologin.jsp URL" New topic

SecureVideos (servlets 4b), videologin.jsp URL

Katrina Owen

Joined: Nov 03, 2006
Posts: 1367
On the description of this assignment the application starts at

When I do this, I get a "null" string showing on my page, because I am displaying a response attribute which obviously isn't there (first visit).

If I just go directly to the servlet, I don't get this, because that string defaults to an empty String in the servlet code.

Should I be putting some logic in the login page to not display the "null"?
Jon Anslow

Joined: May 05, 2006
Posts: 16

Hey Katrina,

Yes, I added some logic in my videologin.jsp to check for a null String.

However, the instructors solution showed a more elegant solution to check for this.

Check out Javaranch Code API to find a class you may have used on a previous assignment that contains a method that does what you need.

Katrina Owen

Joined: Nov 03, 2006
Posts: 1367
Aha! That class again Why do I keep not thinking of it? This is the third occasion on which I have had to be hinted at explicitly.
I agree. Here's the link:
subject: SecureVideos (servlets 4b), videologin.jsp URL
It's not a secret anymore!