Solved

Easy Question - Which one of these is invalid?!?

Posted on 2004-08-18
1
179 Views
Last Modified: 2010-04-01
In a JSP, which of these would be invalid?

1. String value = request.getAttribute("value");
2. request.setAttribute("value", value);
3. String value = request.getParameter("value");
4. Object value = request.getAttribute("value");

I think it is 4 since the object type of "value" will probably be a type that is not of "Object" type...But then isn't a type like "String" an "Object" so then 4 would be valid...Ok, now i am not sure again.  Can someone tell me which is the invalid one and why?

Thanks
0
Comment
Question by:aniston
1 Comment
 
LVL 92

Accepted Solution

by:
objects earned 20 total points
ID: 11837504
1. because getAttribute returns an Object
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now