« first day (532 days earlier)      last day (4396 days later) » 

9:49 AM
@Hi..
frieds I need some help from you
I am trying to redirect the jsp to other jsp page from my java class
I am using the below code to redirect to other jsp
request.getRequestDispatcher("/index.jsp").forward(request, response);
but when I see in my firefug it shows me the content of the page I am forwarding request
but my jsp page didn't get opened
 
 
5 hours later…
2:25 PM
[Display different images from an action in a JSP ](stackoverflow.com/questions/10045983/…)
 
 
7 hours later…
9:49 PM
sup people
 
how are you lewis
seems we are the only people left here
 
Yup
Java is always empty like that
 
why that
which room is always active
 
Wish I knew
 
9:55 PM
i hardly chat online
i think this is my second time chatting here
 
I am always online.. lol
and thus chat online
 
thats great
i guessed you are experienced in Java programming
 
Not really.. I just know a tad bit
 
i have a problem writing and even testing JXTA java codes
 
Jxta?
 
10:01 PM
yea
for peer to peer programming
 
Don't know much about Java sorry
Good luck though
 
ok
what do u know then c++
?
 
yeah and c#. More c# than most
 
oh i see .net
 
Still learning..
@JideobiBenedineOfomah Yeah
 
10:04 PM
ok
am a learner too dont know c#
i use php, java and currently am learning scala
 
php nice.. scala is that for a phone?
 
no, its a functional programming language that runs on jvm just like f# and it can also be used to develop on .net platform
 
mmn ok
I will avoid it
Sounds like Haskell
 
yea
but ehm it closer to java, its a functional object oriented language hybrid language
 
Lol
Functional languages put me off
 
10:14 PM
me too
just learning for learning sake
its a whole new experience and way of thinking
 
yeah.. I'm going to when I get better at coding
 
10:40 PM
hello
 
plz i have a jlist with a names of files, i want to get the selected name and used in other class
its posible?
i try to change Object toString but its not working .. i need a sting
 
Yeah
object.toString()?
 
Object[] selected = jList1.getSelectedValues();
 
What does getSelectedValues return?
 
10:48 PM
and then i have to do String selec = sobject.String();
 
getSelectedValue returns index of the item selected i think
 
ok wait plz a will try
now
 
Ok I see what it does
 
the problem that i need to send a string nod Object? you know what i mean
not
 
int index[] = jlistObj.getSelectedValues(); will return list of selected indices
 
10:54 PM
Yes
 
now you have to map indices to string
 
how?
 
It's pretty unclear whether it returns an int or string
The use Object is over the top as the return type
My bad
 
why not do somthing link
 
an array of values
@JideobiBenedineOfomah .toString() is printing the reference isn't it?
 
10:57 PM
for(int i = 0, i<index.length; i++){
system.out.println(index[i]);
}
and see what it print int or string of file name of int to indicate file position
in the jlist
 
its print string
 
Isn't that what you wanted?
 
no
 
the file names
?
what do you want
 
ok
 
11:03 PM
you want to transfer the list of selected file names to another class right?
 
yes
ye
look in my jlist i have a name of folderes
i wana to use the "name" of the selected folder for to use in other class
 
im working in a galery of pictures
 
Right
 
depending on how you structured your classes, the class that contains the jlist can have a class method or object method which can be called from another class
 
11:07 PM
im working with class method
 
ok
then you can create a method in the class that contains jlist which returns a string array
 
for that i need to send to public void DisplayPictures(String namealbum)
 
ok and the nameAlbum is the string you got from selected jlist filename?
 
exactly
this is what i want
 
ok then first in the class that contains the jlist, you have to create a method that you call call in the class that contains the displayPictures() method
in the class that contains jlist you can create something like
public static String[] getSelectedFileName(){
return jlist.getSelectedValues();
}
 
11:13 PM
ok
 
i hope you got the concept or idea
you can as well make it an object method depending on how you structured your codes
 
ok thanx u so much
for ur help
 
you are welcome
 
11:37 PM
@JideobiBenedineOfomah im sorry but its no working i think that i have to change my code im newbie in java, its so hard
 
plz can tell me how can i disply en jlist a content of o folder
without using objetc just with string....
 
you have to use java File Class to get the list of files in a folder
File fileFolder = new File("folder-path");
File[] listOfFiles = selectedFolder.listFiles();
for (int i = 0; i < listOfFiles.length; i++){
if (listOfFiles[i].isFile()) {

String files = listOfFiles[i].getName();

}
 
ok
:)
 
if (listOfFiles[i].isFile()) {

String files = listOfFiles[i].getName();
//add file name to jlist here
}
 
11:41 PM
okk
 
i hope you know how to add string or int etc to jlist?
 
yes yes i know
 
ok
how soon do you need to get this working you can mail me your codes at osdevseries at gmail.com
 
in 20days
yes you can help me?
thank so much
 
then mail me the codes and keep working on it sha lemme see what i can do for u
 
11:48 PM
give if u want ur gmail
 
you are welcome
osdevseries@gmail.com
 
sorry for my english :)
 
me too
where are you from?
am a Nigerian?you?
 
im from spain
 
11:51 PM
:D
 
will be waiting for the mail
 
ok
now
 
one more thing in ur spare time, try and read up design patterns, it helps you to organise programs i used to have problem doing that
 
ok
i want to learn more java, i find in net do many prgm like what i want to do
but i need to
do it step by step
 
design patterns are for all languages
 
11:55 PM
yes
 
try and get introduction to java by david liang
 
how is?
ok
 
its a good book for introducing one to programming and java
i used it to learn programming
Java programming
 

« first day (532 days earlier)      last day (4396 days later) »