Solved

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

Posted on 2004-08-18
1
181 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SimpleDateFormat.parse examples 19 92
How to set default webapp for host 6 45
spring example non maven 4 87
throw exception 21 42
Learn how the use of a bunch of disparate tools requiring a lot of manual attention led to a series of unfortunate backup events for one company.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

813 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

10 Experts available now in Live!

Get 1:1 Help Now