For example on facebook when we post a comment, it appears right next to the earlier comment immediately. how does this happen? I don't think the entire page is reloading. I even don't think part of the page is refreshed. Is it Ajax? If so what are the steps involved in achieving this? If not Ajax, what is it and how is it being done?
One way to do this is : Write a comment and submit. when submit make an ajax call to the server. On the server capture the param and store it into the database. After storing in the database retrieve the stored messages based on the time stamp and send them as response. one the client (browser) receives the response as HTML, add this HTML is appended next to the recent message.
I would like to add comments at each method (like purpose, input params, return params etc.,) and at class level.
Should I do manually? or Can I use javadoc to generate something stuff? The thing is it's not like we're going to code now most of the project work is done. So, need to add comments for existing code.
I am unable to find a way to retrieve all the comments, likes and shares from a facebook page post using restfb. I know about the concept of paging but I am unable to do so. I get only first 25 comments and like.i get blank output as Comment: [] wen i try to get the comments on other pages. my code so far is:
public class FacebookAPI { String pageAccessToken; String pageID; FacebookClient fbClient; static User myuser = null; //Store references to myr user and page
There are two designation named admin and student. I just need to work in coding to open specific page by email of person like done in facebook or any other mail account.
well one thing I have done is that I have matched email,password and type(designation) in my servlet page to database and the program run and also open the page.If email,pass,type matched witn admin than admin.jsp opens up else student.jsp.But but I wants to open the specific pafe by email that shows the profile of logged in user like in facebook it opens.
I need to implement Oauth2 with facebook to get authencation. I tried to write a servlet with the method Service, and i got the code thah i have to use in a second request.
Now i need to send a request at this URL :
1) [URL] .....
and wait for a responce with an URL that have the access_token to use with facebook
2) [URL] ....
Is it Possible in a single Servlet after i receive the "code" to send a second request to the URL in 1 and get the response with URL in 2 to retrieve the access_token?? if yes....how??
This taglib will have to be installed on local environment. How is it referred in jsp ? I dont see any code in jsp, which refers to the location of JSTL. So how does jsp invoke these tags ? Is it through classpath ?If its so , how is classpath set for JSTL ? Is it just as classpath is set for java ?
i am doing a code using JSTL to fire a query. everything come fine except the resule is not sorted as desired. i am putting the code below--
String sort_order=(String)request.getAttribute("sort_order"); request.setAttribute("sort_order",sort_order); <sql:query var="viewQueryj" sql= "select USER_ID, PERMISSION_ID, USER_NAME from administrator order by ?"> <sql:param value="${sort_order}"/> </sql:query>
now the resule is always sorted by USER_ID. if i want to sort it using USER_NAME i pass parameter from controller to this page in sort_oredr variable which comes fine but the result doesn't sort by name, only by id. if i hardcode USER_NAME in query then the result is as desired.
I have a HashMap returned from the server. There are two conditions
1. HashMap returned with only one set of key value pair or
2. HashMap with multiple set of data key value pairs.
Now in UI I have to display either text box or drop down box depending upon the size of map for that I am using length method
Java Code:
<c:choose> <c:when test="${fn:length(myDto.mayMapInDto) eq 1}"> display text box </c:when> <c:otherwise> display drop box </c:otherwise> </c:choose> mh_sh_highlight_all('java');
I can display drop box by looping but not sure how I can get only one element for text box. Tricky is I can't use key value to access since UI don't know what key will be returned.
Is there a way we can open a .chm file stored at server through jsp application without downloading the file and saving it to the local machine.
What I googled is : we cannot download .chm files from a web browser and simply click Open. Download the .chm file to your computer first, right-mouse click it in Windows Explorer and select Properties. Then click Unblock.
But I want my users to simply view the file without downloading it.
Why will this NOT validate correctly in my IF Statement? Basically, a user chooses an option from the drop down list. The value is passed to t.jsp (itself) and if the option "All" is chosen, then it does something. If any of the years are chosen, then it does something else.
I have a variable <c:set var="var1" value = "myvalue" /> , I want to pass var1 as <%= new customclass().method1(var1) %>.what is the syntax to pass this value.
I am creating a webapp project , in which i have loaded my JSP page having JSTL tags in a DIV tag successfully but when user clicks on a radio button a jquery fires which loads that perticular div tag , and the html content in that div tag is then loaded again but not the JSTL content..
I create a binary tree and now I would like to display the result in my jsp with conditions.
Each node has 4 elements (id, question, answer, and leftnode rightnode)
If the user clicks "Yes", the program goes to the left of the tree and if he answers "no" to the right of the tree.
For example, the initial question is "you're a man?" If he answers "yes" we will go to the left and page view "you're a singer?" If he answers "no" page displays "you're French? ".
In java, it would
cursor [i]. GetQuestion ()
to the original question.
Then
cursor [i] getQuestion. GetLeftnode () For yes and cursor [i]. GetRightnode (). GetQuestion for no.
Until the, everything works normally, but when I want to loop until there is no longer any issue by