This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to convert integer variable to string representation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to convert integer variable to string representation" Watch "How to convert integer variable to string representation" New topic
Author

How to convert integer variable to string representation

vernon mweetwa
Greenhorn

Joined: Nov 26, 2004
Posts: 24
hi all

i have the servlet that gets the site number in integer form.what i would like to do is this integer variable must be converted to a string giving the exact name of site. once this is done it should be used by the setter and getter methods of a java bean which in turn supplies the jsp with the string name of the site to be displayed.

at the moment i can not display the string name of the site cause the conversion fron an int to a string is refusing and therefore i cannot use the integer representation cause the java beans's setter and getter methods only make use of strings.

i really need your help on this.
Jessica Doe
Ranch Hand

Joined: Dec 11, 2003
Posts: 32
Let us see some code snippets and sample data.


Jessica Doe<br /> <br />C# Online.NET<br /> <a href="http://wiki.csharp-online.net/" target="_blank" rel="nofollow">http://wiki.csharp-online.net/</a>
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

errr...



The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
Babar Qadri
Ranch Hand

Joined: Oct 12, 2004
Posts: 51
int i=5;
String iAsString=Integer.toString(i);


babar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert integer variable to string representation
 
Similar Threads
Bean --- AVOID duplicate SETTER / GETTER
JDK Upgrade to 1.3.1_10
Class With Getter and Setter Methods
How to get s:hidden value to java class
Cannot find symbol...