Arvind Chari

Greenhorn
+ Follow
since Jul 26, 2011
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 Arvind Chari

Hello all,

Is it possible to first compile a set of Java source code files into Byte code, and later run that bytecode-- not directly, but by adding commands to another java program-- such that this new java program (in its various classes/functions) runs the previously compiled java bytecode?

If this is possible, then what is/are the required command(s) to do this?

Thanks,
Arvind.

6 years ago
Hello

I want to access content in an iframe of the swt browser that I have embedded in my java desktop application.

The domain of the content in iframe is different from the main iframe's content.

Will i be able to get this content? How do I do this?

Regards,
Arvind.
7 years ago
Hello,

I am trying to automate submission of same/similar data to some websites. What i am doing is, create a single page containing multiple web forms, with each form's submission and response being targeted to a new window.

I want to use SWT Browser (or any other) to initially display multiple windows, and in one window this single page (containing all forms) is displayed... When user submits all the forms, then each form's submission opens in the other windows in Browser. Then lmy application goes through the content of each response and determines if the submission was successful or not.

I want to implement this using SWT or any other browser that can be embedded in Java desktop app.... Is this doable? Any pointers would be appreciated.

Thanks,
Arvind.
7 years ago
Hi Bill,

Sorry thats my mistake...I want to use HTTPUrlConnection to emulate a POST request

Regards,
Arvind.
There is a good code sample given at http://code.google.com/appengine/docs/java/urlfetch/usingjavanet.html that gives an example of how to make a post request to post comments on a web page.

The relevant code is given below-


I want to submit a post request to a form that contains some text fields, a drop down list box, as well as a captcha field with text box named "Captcha". While the form action="http://domain.com/submit.php" the captcha field is linked to captcha image that is generated by page "http://domain.com/captcha.php".

I already have all details about the form with me, now I want to make post request to this form by modifying the above code sample... What I am unable to figure out, is how to map the captcha field with the file "captcha.php"? Ideally I want to display the captcha on screen and ask the end user to fill it in... Once user fills it in, this field along with rest of the values can be submitted to the form... I particularly like this way of submission because the response to submission will also be available to the program directly...Is it possible to submit data to such a form? How do I do this. For now you can take for example total 3 fields in the form "UserID" (Text) "Password" (Text) and "Captcha". How do I treat the captcha value, show it and then submit it? If the captcha is shown on screen, then wont this be a unique value only for that occurence of form? And we are trying to directly submit to form by encoding various parameters, how do we decide on a value for captcha in such a scenario?

Any help/pointers in this regard would be highly appreciated.
I am trying to authenticate a user using OpenID Providers like Gmail/Hotmail/Yahoo. In this process, a form is shown which when submitted, redirects the user to the 3rd party site for actual authentication. (Like Gmail etc).

Now, just before the redirect, there is code in java to store in session the custom object 'manager'.

This code is given below--



After user has signed in at the openid provider, he is redirected to a jsp page within the same web app. The specific page he is redirected to is "loggedin.jsp".

In "loggedin.jsp" I am trying to retrieve the custom object 'manager' with the following code-




However when I do a simple check for value of Manager, I am getting output that manager is storing a NULL value.

What have I done wrong here? Why am I not getting the session variable? The open id auth is happening perfectly, only I am unable to retrieve the session variable.
8 years ago
JSP
Hello

I am creating a web app in jsp/java where a report will be generated which will be in HTML... What I want is that the user can view an HTML Report through my web app, but he cannot just access the report by typing in URL through browser or any other way...

Do tell me how to implement this- my web server is configured so that the url www.domain.com/webapp maps to the Tomcat Java web app, while other urls under www.domain.com are taken care of by Apache Web Server (ie can serve php/html or java)...

Regards,
Arvind.
8 years ago
JSP
Hello,

I am trying to implement openid based login for a web application. I am able to login succesfully, however for some reason, when I try and retrieve the session variable's data (for email id of user who logged on) I am not getting any text. I put in a if condition to check if the value is null (and then print on screen that it is a null value).

However for some reason only the title and first line of text are being printed on the page. Am I doing something wrong during initialisation of the session variable? Also, the flow is that from Login Page(HTML Form) the browser next goes to a Java page which processes the user id and password-- This java page sends the login data to Windows Live (or whatever OPENID provider was selected by user)-- Before this java page redirects to the Windows Live page, at that stage the session variable is stored. From Windows Live auth page the browser (on successful login) goes to the second page of my web application (This is a java page that denotes login successful)...I am not able to display the email ID of user, and what is surprising is that even the plain text "Email Address" is not getting printed on screen...I hope somebody can help figure out the problem here.

Kindly take a look at the code given below and tell me where I am doing it wrong-

CODE------------------------------------------------


//initialise the session object

HttpSession session = request.getSession(true);

// get the auth provider manager from session
SocialAuthManager manager = (SocialAuthManager)session.getAttribute("authManager");
// call connect method of manager which returns the provider object.
// Pass request parameter map while calling connect method.
Map<String, String> paramsMap = SocialAuthUtil.getRequestParametersMap(request);
AuthProvider provider = manager.connect(paramsMap);

// get profile
Profile p = provider.getUserProfile();
if(p.getEmail()==null)
out.println(" <br/><h4>Value of email ID is NULL??</h4><br/>");
else

// you can obtain profile information
out.println("<br/><br/><h4>Email Address: " + p.getEmail()+ "</h4><br/>");

----------------------END OF CODE



Thanks,
Arvind.
8 years ago