L.John

Greenhorn
+ Follow
since Aug 29, 2001
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 L.John

Hi Cindy,
Thanks for replying back to my query. You are absolutely right.
The message
"[java.sql.SQLException: Fail to convert to internal representation]" was caused due to incompatibility issue.
i.e I was trying to retrieve a CHAR(1) type from Oracle by using rs.getInt(1);
To resolve this I used rs.getString(1) and then converted it into 'int' using Integer class.
Thanks Once again Cindy.
Wishing you a Merry Christmas and Happy New Year.
Regards,
L.John
17 years ago
Hi To All,
While working on couple of stack trace I came across the follwing Message :
weblogic.rmi.RemoteException: DB failed - with nested exception:
[java.sql.SQLException: Fail to convert to internal representation] at
netnames.server.CommonRegistrationsContextImpl.getEmailForwardingItem(Common
RegistrationsContextImpl.java:1926)
Fail to convert to internal representation
It would be kind to let me know , under what circumstances these exceptions can occur , what does this mean ? and what can be done to resolve this .
Thanks,
John
17 years ago
Hi to All,
It would be kind to let me know how i could resolve the following problem:
The user enters an expiry date as MM/dd/yyyy i.e 07/14/2002.
This date I would like to store in the database in the following format:
'07/14/02 3:41:31 PM'
I am able to store '7/14/02' but not the hour,minute,second and AM/PM part. How can i do so ?

I have done it in this way :-
------------------------------
String sExpiryDate = "07/14/2003"; // an example
DateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
/* Here I tried adding ' hh:mm:ss 'but i got ParseException */
java.util.Date dExpiryDate = formatter.parse(sExpiryDate);
long lexp_date = dExpiryDate.getTime();
java.util.Date dExpireDate = new java.util.Date(lexp_date);
This sExpireDate when printed comes as " Mon Jul 14 00:00:00 BST 2003 "
How could i also add hour, minute and seconds to this expiry date?
Any response will be appreciated.

Thanks

Regards,
John
18 years ago
Hi to all,
It would be kind to let me know , how could i do the debugging in javascript . In java we can do that by using System.out.println statements , but how to do it in java script , for example , how can i know what would be the value of 'auth_infos'.
var auth_infos = "";
auth_infos += arrayOfStrings[i].substr(arrayOfStrings[i].indexOf(",") + 1, (arrayOfStrings[i].length - (arrayOfStrings[i].indexOf(",") + 2))) + ",";

Thanking in advance ,
Regards,

L.John
Hi to all,
It would be kind to let me know what is the difference between the following :
i.e with and without quotes :
<FORM name="deleteOrder" action=/abcd/xyz.client.OrderDomain METHOD=POST>
<input type=hidden name=orderstep value=1>
<input type=hidden name=PName
value="$$additionalProcess$$">
<input type="hidden" name="drop_pname" value="">
<input type="hidden" name="drop_type" value="">
</FORM>
Thanking in advance
regards,
L.John
Thanking all who have replied back to my query.
Hi Arun,
Thanks for replying back to me .
Asu advised i have changed the condition here :
if (name_serversA_IP[i] != null && !name_serversA_IP[i].equals(""))
using this would indeed be a better way.
Thanks once again for your valued solution.
Kind Regards
L.John
18 years ago
Thanking for reply.
yes its true that it will never be null in this case. It can only if the named parameter does not exists.
How could i proceed further and validate the textbox then. I mean , if the user leaves the nameserver text box blank , then i would like to return it back to the user with a out.println statement .
Kindly let me know about it.
Many Thanks
Kind Regards,
L.John
18 years ago
Hi to All,
I am having a problem here. It would be kind of you to let me know how i vcould proceed further
how to execute a file(jsp) from main method?
a jsp file will publish the content to the database, actually some database
updation has to be done .
this jsp has to run every day at particular
time automatically .
The unix scheduler is already there now i have to prepare a java main
class to execute the jsp file......
I am new to JSP and dont have knowledge about it .
Any reply woul dbe highly appreciated .
Many Thanks
Bye
L.John
18 years ago
JSP
Dear all,
I wanted to clear this doubt. It would be kind if anyone could help me with this doubt.
====This is the html part==========
<TR><TD>domain name </TD><TD><input name="dname"></TD></TR>
<TR><TD>nameserver 1</TD><TD><input name="nameserver"></TD></TR>
<TR><TD>nameserver 2</TD><TD><input name="nameserver"></TD></TR>
<TR><TD><input type="submit" value="redelegate domain"></TD></TR>
<input type="hidden" name="command" value="REDELDOMAIN">
====This is the servlet part========
String domainname = request.getParameter("dname");
String command = request.getParameter("command");
String nameServersA[] = request.getParameterValues ("nameserver");

if (command.equalsIgnoreCase("REDELDOMAIN")) {
domainRed(domainname, nameServersA);
}
public void domainRed(String domainame,String name_serversA[] {

if (domainname == null || domainname.length() == 0 {
out.println(" name is empty ");
return;
}else if(name_serversA == null || name_serversA.length
== 0 ){
out.println("No nameServers provided ");
return;
}
Now here even if i dont give any nameservers in the html form still the above message is not printed . then to test it, I did the following:
System.out.println(" name_serversA = " + name_serversA + " name_serversA[] = " + name_serversA.length);
the output is :::::: name_serversA = [Ljava.lang.String;@fbdc74d6
and name_serversA[] = 4
WHY?
If i have not entered any values for nameserver then i want to return the page back to the user to provide the nameservers .
Kindly let me know how can this be done.
Many Thanks
Kind Regards,
L.John
18 years ago
Hi to all,
It would be kind to let me know , if anyone have used org.xbill package for zone transfer.
I have a domain name and the name of nameserver with me and then using the xbill packages(classes) i would like to get the zone transfer done for that domain name and then populate the DNS and other DNS tables .
I couldnt get much help from the web. Also let me know , if there are any sample code relating to this .
All replies would be appreciated.
Thanks,
Regards,

John
18 years ago
Hi to all,
It would be kind to let me know , if anyone have used org.xbill package for zone transfer.
I have a domain name and the and the name of nameserver with me and then using the xbill packages(classes) i would like to get the zone transfer done for that domain name and then populate the DNS and other DNS tables .
I couldnt get much help from the web. Also let meknow , if there are any sample code relating to this .
All replies would be appreciated.
Thanks,
Regards,

John
18 years ago
Thanking both of you for your help and sending me the reply.
Kind Regards ,

L.John
18 years ago
Hi to all,
It would be kind to let me know , how this one could be resolved.
I would like to separate map values with same value for example
if a map contains
{984156695344=984626555759, 984156694966=984626555759,
984156695232=984626555759
, 984156692990=984626556372}
how to seperate the keys with same values
All responses will be appreciated .
Thanks ,

Regards,
John
18 years ago
Hi To all,
it would kind to let me know , what exactly dnsjava / dig is .
I have read some of it , but havent understood reallly where we can use this and what are the functionalities .
Ant response would be appreciated?
Thanks,
Regards,
John
18 years ago
Hi to all,
It would be kind of you if anyone could let me know how this problem could be solved.
I am taking a http Url from the database for eg. http://cou10.mydomain.co.uk/dnrs/rprfrservlet
I need to send an Http request to the above address.
What i need to do is use the URL and URL Connection class for this purpose because right now i jad been specifying the url path by hand, but it need to be fetched from the database.
The actual URL where the request is to be sent is : http://cou10.netbenefit.co.uk/dnrs/rprfrservlet
The follwoing is the existing code and now i have to use URL Connection class to implement the same functionality.
existing one.
-------------
String shost = "cou10.mydomain.co.uk";
int iport = 80;
clientsocket = new Socket(shost,iport);
InputStream in = clientsocket.getInputStream();
OutputStream out = clientsocket.getOutputStream();
String url = "GET /dnrs/rprfrservlet?name="+s_name+"&requestid="+lreq_id+"&status="+lRPStatus+"&msg="+encodedMessage+"&trackingid="+sTrackingId+"&date="+sDate+"&command="+sCommand+HttpVersion;
byte buf[] = url.getBytes();
out.write(buf);
out.flush();
logDebug("After getting the bytes ** "+new java.util.Date());
StringBuffer response = new StringBuffer();
int chr;

logDebug("Before the while loop " +new java.util.Date());
while((chr=in.read())!=-1) {
response.append((char)chr);
}

String sResponse = response.toString();
System.out.println(sResponse);

NOW I WANT TO USE THE URL CONNECTION CLASS. HOW CAN THE SAME BE IMPLEMENTED USING THE URLCONNECTION CLASS.
Kindly LET ME KNOW,
Many Thanks
John