File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in retreiving value

 
abhishek rathur
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Is the function i.putValue() is correct.

The the following code is working for integer.
 
Malatesh Karabisti
Ranch Hand
Posts: 153
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Can you check this one what is wrong ?

check api here
 
abhishek rathur
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its showing an error, i.putValue() is not found.
there is my complete code



 
Malatesh Karabisti
Ranch Hand
Posts: 153
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
same error,can not find symbol.
 
Malatesh Karabisti
Ranch Hand
Posts: 153
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the complete exact error. answer is there in error only
 
abhishek rathur
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
error
error.JPG
[Thumbnail for error.JPG]
 
Ashutosh M Kulkarni
Ranch Hand
Posts: 41
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Malatesh Karabisti
Ranch Hand
Posts: 153
Java Oracle
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic