on 07-17-2007 1:03 PM
Hi All,
I am facing problems while using <b>HttpsURLConnection</b>.
I have added library <b>com.sun.net.ssl</b> in my project and imported <b>com.sun.net.ssl.HttpsURLConnection.</b>
Then I made an object of HttpsURLConnection.... say con.
Then I have used the following code in the component controller..
////////////////////////////////////////////////////////////////////////////////////////////
HttpsURLConnection con = (HttpsURLConnection) new URL (<b>URLName</b>). openConnection() ;
///// <b>URLName</b> is any https url of type string////
con.setRequestMethod("HEAD") ;
wdComponentAPI.getMessageManager().reportSuccess("con.getResponseCode= "+ con.getResponseCode()) ;
////////////////////////////////////////////////////////////////////////////////////////////
upon executing the code I am getting an error
<b>" java.lang.NoClassDefFoundError: com.sun.net.ssl.HttpsURLConnection "</b>
Please help me out in this regard...
Thanks and Regards,
Sayan
HI Sayan,
Put the jar file inside Project\src\mimes\Components\Package\ and set the build path to this jar file.Then deploy and run the application
If it is not working, then u have to deploy the jar file to server using this weblog
/people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to package this jar inside a external library DC and then deploy it on the portal. You should then have a library reference from your WD project to this library. Having this jar only in the build path will not work.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satyajit,
Thanks for the suggestion... can you please also guide how do I package the jar inside the external library DC and then deploy it on the portal ??? Also how to have a library reference from the WD project to this library ??
I am new in WD coding... So do not know much about these stuff...
Thanks and Regards,
Sayan
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.