NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
ru
Joined: 08 Jan 2010 Posts: 22
|
Posted: Sat Feb 27, 2010 5:22 am Post subject: How to get FacebookSocialNetworkingServiceCallback to output a JSP |
|
|
This is the next chapter in the ongoing tale of customizing the Callback servlet
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
|
Posted: Sat Feb 27, 2010 3:43 pm Post subject: |
|
|
| 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
|
Posted: Sat Feb 27, 2010 7:16 pm Post subject: |
|
|
| 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 |
|
 |
|
|
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
|
|