[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

Posted on 2004-08-18
1
Medium Priority
?
191 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 80 total points
ID: 11837504
1. because getAttribute returns an Object
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

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

Take advantage of one of the most useful technologies available - virtualization!
A recent study by Google illustrates that almost 84% of patients go for both online and offline sources for hospital research. What do you think, “Is the Healthcare Industry the next to be disrupted by Digital Marketing?”
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

590 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