Kenneth Owino

Greenhorn
+ Follow
since Aug 09, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kenneth Owino

Hi! is there a way to manage the buttons of JOptionPane such that they do not just close when any of them is closed. For example I'm creating a program whereby the user enters username and password through JOptioPane which should only be dismissed if the user enters correct values and clicks ok or when the user clicks cancel. The problem is by default clicking any button dismisses the dialog. I've done all the necessary work of accessing the database and comparing database values with user values when ok is clicked but I don't know how to control the dialog not to dimiss after ok is clicked and username and password don't match. The code fragment for my JOptionPane is shown below
12 years ago
Ok. Thank you for the reply. Actually, I have a database table with 2 columns "firstname" and "lastname". All I need is to retrieve all the rows in these columns and display them in an html table in my JSP. I read that using JSTL is a good practice and I tried using forEach. In doing this I created 2 DTOs 1 that gets firstname and 1 that gets lastname and two respective DAOs to access the database and returns arrayLists for each of the columns. Now the problem is I'm only able to use one DAO and one DTO that displays the firstname column from the table. How can I make all the columns be displayed? This part of the JSP only displays a table with one column:


How do I add the column under header
13 years ago
JSP
Hi! I'm finding trouble on how to display more than one column from mysql database table into an html table in jsp. So far I can display rows of only one column using the code below. Someone help me on how I can display say table rows from more than one column.

This is the JSP:



And the DAO that accesses the database:



And the DTO:

13 years ago
JSP
Honestly I don't see what you are looking at. I expect you to see something more than what you are looking at. Thank you
13 years ago
JSP
Thank you for noticing that. But that was a minor change I did when trying to troubleshoot. It actually changes nothing. In fact the change made was just removing the
from "Form with texfield" and the dropdown could then display the elements. the question actually is why does it only display without textfield and how can i make it display with textfield?
13 years ago
JSP
Hi! I've written a JSP that has a form and the form contains a dropdown list and a texfield. The dropdown is populated from a mysql database using beans which act as DAOs and DTOs. Problem is the dropdown doesn't display the values from the database but when I remove the textfield from the form and leave only the dropdown, it displays fine. someone knows why? Please let me know what to do. The code for the forms is below:

Form without textfield:


Form with textfield
13 years ago
JSP
Thank you. I got it done. created a DAO, DTO and populated the JSP using JSTL forEach and EL
13 years ago
JSP
Hi! How can I get dropdown list items from mysql to my jsp page. Is it possible to use a servlet to connect to the database and fetch the values as an array and send them to the jsp which receives them in the dropdown list? some clue please cause this thing looks simple but I don't know how to go about with it
13 years ago
JSP
[size=12][size=12]Hi! I've written this code to login from jsp using a bean and servlet that checks username and password

from mysql database.

Code below:



The problem is the browser only displays a blank page of loginJsp.jsp and yet I expect it to display Hello World in

the adminHome.jsp. Where could the problem be? Please help me troubleshoot. [/size]
[/size]
13 years ago
JSP
Hi friends. I'm trying to send data from a midlet to a servlet and recieve back a response from the servlet but I

don't get any value in response. I've tried to print it on command window and it seems to be null yet I expect only

two values "ok" or "error". Please help me check the code and let me know what I should do to get the response right

on the midlet. My code is below:


13 years ago
Hi. I have a problem setting up mysql connector j so I can access my mysql database in linux. I already downloaded mysql-connector-java-5.1.15.tar.gz, extracted its contents and copied mysql-connector-java-5.1.15-bin.jar to /usr/lib/jvm/java-6-sun/ext/ but when i run my code I still get the error message below:

CONCEPT:Unable to Load Driver
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at LoadDriver1.main(LoadDriver1.java:14)
Connecting...
SQLException: No suitable driver found for jdbc:mysql://localhost/mysql?user=userid&password=password
SQLState: 08001
VendorError: 0

Some help on how to go over this is very much welcome.
Hi friends. I have thought of creating a mobile application where a user with a mobile phone can send an sms to an application and can also receive an sms from the application. I want this application to work in a way like applications work over a gsm network. I am not in position to use the mobile operators but would like to create my application in a simulation environment. I read in some site that i can create my application and use smppsim to simulate the SMSC. The problem is i don't know how to go about this stepwise. I just need some insight on the application components needed right from the mobile phone client to the server side and how to interconnect them. Basically if there is a way someone would tell me where the server application would be placed and how to access it from the mobile client, I'll be very grateful. Am really new to sms but really want to do an application that integrates it. Any help such as links to tutorials with clear illustrations as far as writing java applications that use SMSCs is highly welcome. Thank you
13 years ago
Hi everyone. I have an idea of creating an application to enable voting by students in a university using mobile phones. The university is a multi-campus model and i want to make an application whereby a student is able to vote using his or her phone from anywhere even remote from the university. I want to use java technologies basically but don't know what java networking technologies can be involved. Please help give an insight on what I am getting into. Thanks
13 years ago
Thank you very much for guiding me through. Am going to try out the configurations and will get back to you
13 years ago
I used bluetooth and successfully installed the midlet to the phone however the midlet can only display the midlet part of the program but is inactive when the command to access the servlet is selected. could there be any additional configuration needed for this bluetooth connection. please give some information on what is done to make the midlet access the servlet using bluetooth between the phone and the pc. thanks
13 years ago