Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes problem in retreiving value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem in retreiving value" Watch "problem in retreiving value" New topic
Author

problem in retreiving value

abhishek rathur
Ranch Hand

Joined: Jan 14, 2010
Posts: 66

Is the function i.putValue() is correct.

The the following code is working for integer.
Malatesh Karabisti
Ranch Hand

Joined: Jul 28, 2010
Posts: 153



Can you check this one what is wrong ?

check api here
abhishek rathur
Ranch Hand

Joined: Jan 14, 2010
Posts: 66
its showing an error, i.putValue() is not found.
there is my complete code



Malatesh Karabisti
Ranch Hand

Joined: Jul 28, 2010
Posts: 153

I wanted you to try a stand alone program with following code



analyse what error you are getting.

on the string referece you can call only the methods available in String class. check the api to know what are methods you can call on String class referece.
abhishek rathur
Ranch Hand

Joined: Jan 14, 2010
Posts: 66
same error,can not find symbol.
Malatesh Karabisti
Ranch Hand

Joined: Jul 28, 2010
Posts: 153

Please post the complete exact error. answer is there in error only
abhishek rathur
Ranch Hand

Joined: Jan 14, 2010
Posts: 66
error


[Thumbnail for error.JPG]

Ashutosh M Kulkarni
Ranch Hand

Joined: Jun 07, 2010
Posts: 41

You are looking in all the wrong places! The answer isn't in the Javadocs for String class or elsewhere.

You are using a scriptlet tag which means you only put Pure Java Code in there (between <% and %> tags.)
You are trying to print a String value, which can be simply achieved through
putValue() method belongs to interface HttpSession and is deprecated (i.e. replaced by setAttribute(java.lang.String, java.lang.Object) method).
As far as your printing-the-string-value problem is concerned, there's your answer. A call to putValue() won't work because the method doesn't belong to String class as already mentioned in an earlier post.


SCJP 6, next stop - OCPJWCD!
Malatesh Karabisti
Ranch Hand

Joined: Jul 28, 2010
Posts: 153

What the error is

cannot find symbol
symbol: Mehtod putValue()
location class java.lang.String

If you analyse this you will come to know compiler is not able to find the method putValue in the class java.lang.Stirng
 
Consider Paul's rocket mass heater.
 
subject: problem in retreiving value
 
Similar Threads
problem with sessions - urgent please
Frameset in JSP not displaying
Scope of an HttpSession
JSP can't pass Session to a servlet?
Session Tracking using HttpSession