|
teknKAL wrote: because I am inexperienced in this area, the solution I have may not be robust and secure enough In which case it would not be a good solution. A much better idea whould be to use the interface from a commercial and professional payment gateway such as PayPal.
Use the best guess
|
|
|
|
|
i want to retrieve the database table values as the options of the select box in a jsp form
|
|
|
|
|
Fine, go ahead. But if you are having problems then you need to explain in better detail.
Use the best guess
|
|
|
|
|
Hello Swamy,
Here are few examples. I wonder why you did not find these links?
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
thank u all for helping me....
|
|
|
|
|
hi prasad,
actually i am a new programmer i dont know what site to refer thanks for your suggestions.what actually i need id dropdown list population that is suppose i heve two dropdown lists if we select the first dropdown list value as district (example as one of the district name) in the second dropdown list has to diplay the mondal list(that is all the mondals in that district). this is my concept i am really thank full to you if you get me out of this problem. thank
i need this project in jsp.
|
|
|
|
|
Hello,
A very simple to do this on client side as opposed to server side, is to output all the required data in form of javascript. Since you are talking about javascript the obvious choice is to output it as a JSON. PLease find below a sample JSON and the code to use it to populate the listboxes.
<html>
<head>
<title>List Demo</title>
<script type="text/javascript">
var lstData = {
"key1" : {,
"value":"value1",
"sublist": [
{
"key": "key1_1",
"value":"value1_1",
},
...
]
},
...
};
function fillList1() {
var ctrl = document.getElementById('list1');
ctrl.options.length = 0;
for (var key : lstData) {
var data = lstData[key];
var opt = document.createElement('option');
opt.value = key;
opt.text = data.value;
ctrl.options.add(opt);
}
}
function fillList2(lstOne) {
if (lstOne.selectedIndex < 1) return;
var data = lstData[ctrl.value];
var ctrl = document.getElementById('list2');
ctrl.options.length = 0;
for (var key : data.sublist) {
var subitem = data.sublist[key];
var opt = document.createElement('option');
opt.value = subitem.key;
opt.text = subitem.value;
ctrl.options.add(opt);
}
}
</script>
</head>
<body onload="fillList1();">
<form name="frmMain" id="frmMain" method="post">
<label for="list1">List 1 : </labl>
<select name="list1" id="list1" size="1" onchange="fillList1(this);">
<option value="">Select</option><br/>
</select>
<label for="list2">List 2 : </labl>
<select name="list2" id="list2" size="1">
<option value="">Select</option><br/>
</select>
</form>
</body>
</html>
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
hi ,how are you
I have Question ,how to create timetable schedule using Genetic Algorithm for all university
I try with it but it not work with me can any one help me on it?
|
|
|
|
|
hi,I'd like to bring you some useful stuffs,but I really don't know what the concrete problem you are puzzled.So any codes to show me or tell me the concrete topic you are trying to figure out .
|
|
|
|
|
I don't know how to start with JAVA to create random timetable without any conflict in Classes
How to start with it using Genetic Algorithm
|
|
|
|
|
You need to use Google to find references for this subject. There are many problems to be resolved in creating automatic schedules such as this, and the question is too broad for a technical forum.
Use the best guess
|
|
|
|
|
|
|
|
I want to create a server socket(TCP) in which I want that server shouldn't be closed if
client is closed.
What I'm doing: I'm able to connect to client but when client is closed then server is throwing exception : Connection Reset and crashes
How can I do it?
|
|
|
|
|
Trap the exception and dispose of it.
Use the best guess
|
|
|
|
|
I'm getting this exception:
Exception in thread "main" java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.readLine(BufferedReader.java:317)
at java.io.BufferedReader.readLine(BufferedReader.java:382)
at combined.Combined.dostuff(Combined.java:64)
at combined.Combined.main(Combined.java:30)
But not getting the way to dispose it.
|
|
|
|
|
Well, you need to catch it first.
Use the best guess
|
|
|
|
|
try{
}catch(SocketException e){
Sytem.err.println(e);
}
|
|
|
|
|
Indian Coder1989 wrote: I want to create a server socket(TCP) in which I want that server shouldn't be
closed if client is closed.
As stated that of course is illogical. Once the client terminates, regardless of how it happened, the server side connection can no longer be used.
|
|
|
|
|
OfCourse the server will be disconnected and connection will be closed but program shouldn't be crashed.
Isn't it possible that next time when client will again connected there will not be a need to start the server again(means server shouldn't be crashed)?
|
|
|
|
|
I already told you twice what to do: catch the exception and dispose it, so the server continues to listen in an idle state. How do you think the rest of the internet works?
Use the best guess
|
|
|
|
|
I think you should make a loop in your server code.
Just like the test code below.
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
public class Test {
public static void main(String[] args) throws Exception {
ServerSocket server = new ServerSocket(888);
while(true) {
Socket s = server.accept();
Processer p = new Processer(s);
Thread t = new Thread(p);
t.start();
}
}
}
class Processer implements Runnable {
private Socket socket;
public Processer(Socket s) {
this.socket = s;
}
@Override
public void run() {
try {
PrintWriter out=new PrintWriter(socket.getOutputStream(),true);
out.println("HTTP/1.0 200 OK");
out.println("Content-Type:text/html;charset=utf-8");
out.println();
out.println("<h1> web service test sucess!</h1>");
out.close();
} catch(Exception ex) {
ex.printStackTrace();
} finally {
try {
socket.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
To test the result,using http://127.0.0.1:888 in yor brower
Try it !
|
|
|
|
|
Thanks!
This is the thing, I was looking for.
Let me try this in my project.
|
|
|
|
|
Hello,
I have installed tomcat 6 with eclipse but now i want to install tomcat 7 with eclipse . But I keep getting the error
The Apache Tomcat installation at this directory is version 6. A tomcat 7 installation is expected.
Any idea how should i go about it.
Pritha
|
|
|
|