This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.

nishad km

Greenhorn
+ Follow
since Oct 14, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by nishad km

Ya i am not able to connect any https urls, as the request goes through our proxy server and in proxy server https is not enabled. thanks for the help.

But can you tell me username and password for authentication should be in encrypted format or not when post the request? if we send the other values as query string(name=nishad) will it be fine?
i am able to connect to that Url through browser( https- http will not work)but through application i was not able to.

Can you tell me how to post the values? is it same as the urlparameter like
&name=nishad&action=queue.. Or we need to ecrypt the values
hi All,

From my applicaiton we need to access an external url for mail servcice.we will have to establish the connection with this server and POST the values to this server. The external Server URL is in HTTPS, and requires a basic authentication.

the code is given below. I am getting error :java.net.ConnectException: Tried all: 1 addresses, but could not connect over HTTPS to server: "domainname" port: 443

java.net.URL url = new URL("https:\\domainname\...\index.php");
HttpsURLConnection connection = new HttpsURLConnection(url);
String userNamePassword="username assword";
String encoding= new BASE64Encoder().encodeBuffer userNamePassword.getBytes());
connection.setRequestProperty("Authorization","Basic "+encoding);
connection.setTimeout(wom_connection_timeout);
connection.setRequestMethod("POST");
connection.setUseCaches(false);
connection.setDoOutput(true);

Can any body suggest a way to connect to a Server through https url and pass the post variables?

thanks,
Nishad

[ October 30, 2008: Message edited by: nishad km ]
[ October 30, 2008: Message edited by: nishad km ]
Hi ,

In struts validation.xml i have the following code.

<field property="emailId"
depends="isrequired,email,maxlength,validateEmail" page="1">
<arg0 key="global.prompt.emailaddress"/>
<arg1 key="${var:maxlength}" name="maxlength"
resource="false"/>
<var>
<var-name>maxlength</var-name>
<var-value>50</var-value>
</var>
</field>

I need to do the validation only if page =1. In action class before calling validator i am setting page =1. but validation is not happening. if i remove the page=1 then validation is happening.

Action class code follows.

profileForm.setPage(1);
ActionErrors errors = super.validateForm((ValidatorForm) form, mapping, request);

can any one help me on this
17 years ago
Hi,

I am using Weblogic 9.2 for my applications.we found one issue that once we access a url then access the same url in a different browser. but Weblogic returns same session ID. We gave given like this in our jsp to check the session ID

"out.println(request.getSession().getId());"

Even if we access the url in different broweser the session ID getting printed is the same.

can any one provide a solution for this.

thanks,
Nishad
[ August 10, 2007: Message edited by: nishad km ]
Hi,

my home page is loading in http.( we can access home page through https also).

if user is in http and submit the page we need to submit the page in https.
we need to do it from front end itself.

We are using struts for our application. when user clicks on the submit button an javascript will be called. form there we need to convert it to https. is it possible ? give me some solution to submit the page in https.
i have a jsp file in which i m calling a javascript in onload event, that java script method contain only one alert. but it doesnt work.
i called the same javascript fuction on click event of a button then the fuction get called.

i saved the same jsp file as html file then the every thing is ok , i m able to call the javascript function in onload event.

can any one say y one javacript method (onload)is not working in jsp and working in html