NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

How to get FacebookSocialNetworkingServiceCallback to output a JSP

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
ru



Joined: 08 Jan 2010
Posts: 22

PostPosted: Sat Feb 27, 2010 5:22 am    Post subject: How to get FacebookSocialNetworkingServiceCallback to output a JSP Reply with quote

This is the next chapter in the ongoing tale of customizing the Callback servlet Sad

FacebookSocialNetworkingServiceCallback is executed after Facebook authentication completes, so to get a given page of HTML to be displayed, I replace the HTML contained in the out.println() statements with my own (actually, I replace the several println()s with a single one and concatenate all the lines in my HTML). So far, so good: with ordinary HTML, my page displays. But if I try to output a JSP, all that gets displayed is the text of the page:

Code:
<%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ page import="org.netbeans.saas., org.netbeans.saas.facebook." %> <%! String my_ID = "";%> <%! String session_ID = "";%> <%! String my_info = "";%> <%! String my_friends = "";%> <% try { String format = null; RestResponse result = ...


In other words, the browser doesn't parse the text, it just displays it as is.

Why should a page of HTML get displayed but a JSP does not? TIA!
Back to top
ru



Joined: 08 Jan 2010
Posts: 22

PostPosted: Sat Feb 27, 2010 3:43 pm    Post subject: Reply with quote

I should mention that the JSP in question consists entirely of scriptlets, if that makes a difference.
Back to top
ru



Joined: 08 Jan 2010
Posts: 22

PostPosted: Sat Feb 27, 2010 7:16 pm    Post subject: Reply with quote

Problem solved. All I needed to do was to copy the scriptlets into the servlet and voila! everything worked. Kind of obvious, in retrospect (both are just Java code).
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo