JSP file is located in my "war" directory (war/Caribbeanvisit.jsp):


<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
xmlns:v="urn:schemas-microsoft-com:vml">
<head>
        <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
        <title>Pavco</title>
        <link rel="stylesheet" type="text/css" href="css/caribbeanvisit.css"/>
        <link rel="stylesheet" type="text/css" href="css/jquery.jgrowl.css"/>
                
        <!-- Load the Google AJAX API Loader -->
    <script type="text/javascript" src="http://www.google.com/jsapi";></script>
    <!-- Load the Google Friend Connect javascript library. -->
        <script type="text/javascript">
        google.load('friendconnect', '0.8');
        </script>

    <script type="text/javascript">
            var SITE_ID = '04312132550820759615';
                google.friendconnect.container.setParentUrl('/');
                google.friendconnect.container.initOpenSocialApi({
                        id: 'gfc-signin',
                        site: SITE_ID,
                        onload: function(securityToken) { renderGfcSignin(); }
                });
    </script>
        
        <script type="text/javascript"
src="http://www.google.com/jsapi?key=ABQIAAAAporGMUZQY1wIQWgCBwmHahTnznCKwKvlBA0qLP7pqoQydu37nRR7FgBywU3xgJjWvob5YzYuF3QRVg";></script>
        <script type="text/javascript">
                google.load("maps", "2.x");
        </script>
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/jquery.jgrowl.js"></script>
        <script type="text/javascript" language="javascript"
src="caribbeanvisit/caribbeanvisit.nocache.js"></script>
</head>
<body onunload="GUnload()">
        <script type="text/javascript">
                function renderGfcSignin() {
                        var req = opensocial.newDataRequest();
                        var params = {};
                    
params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
                        [opensocial.Person.Field.ID,
                             opensocial.Person.Field.NAME,
                             opensocial.Person.Field.THUMBNAIL_URL,
                             opensocial.Person.Field.PROFILE_URL];
                        var viewer_idspec = new opensocial.IdSpec({
                                'userId' : 'VIEWER', // change this to VIEWER
                                'groupId' : 'FRIENDS'
                    });
                        var owner_idspec = new opensocial.IdSpec({
                                'userId' : 'OWNER',
                                'groupId' : 'FRIENDS'
                    });
                        req.add(req.newFetchPersonRequest("VIEWER", params), 
"viewer_data");
                        req.add(req.newFetchPeopleRequest(viewer_idspec, 
params), 'viewer_friends');
                        req.add(req.newFetchPeopleRequest(owner_idspec, 
params), 'site_friends');
                        req.send(onData);
                };

                function onData(data) {
                if (data.get("viewer_data").hadError()) {
                        
google.friendconnect.renderSignInButton({'id':'gfc-signin','style':'text'});
                } else {
                        var viewer = data.get("viewer_data").getData();
                        var viewer_info = document.getElementById("gfc-signin");
                                viewer_info.innerHTML = "Hello, " + 
viewer.getDisplayName() + " " +
                                "<a href='#'
onclick='google.friendconnect.requestSettings()'>Settings</a> | " +
                    "<a href='#'
onclick='google.friendconnect.requestInvite()'>Invite</a> | " +
                    "<a href='#'
onclick='google.friendconnect.requestSignOut()'>Sign out</a>";
                }

                if (!data.get("viewer_friends").hadError()) {
                        var viewers_friends = 
data.get("viewer_friends").getData();
                        var friends = new Array();
                        var index = 0;
                        viewers_friends.each(
                        function(friend) {
                                friends[index++] = {"friendId": friend.getId(),
                                                                "thumbnailUrl": 
friend.getField("thumbnailUrl"),
                                                                "profileUrl": 
friend.getField("profileUrl"),
                                                                "status": 
friend.getField("status"),
                                                                "displayName": 
friend.getDisplayName()
                                                                };
                        }
                    );
                    addViewerFriends(friends);
                }

                if (!data.get("site_friends").hadError()) {
                                var site_friends = 
data.get("site_friends").getData();
                                var friends = new Array();
                                var index = 0;
                                site_friends.each(
                                        function(friend) {
                                                friends[index++] = {"friendId": 
friend.getId(),
                                                                        
"thumbnailUrl": friend.getField("thumbnailUrl"),
                                                                        
"profileUrl": friend.getField("profileUrl"),
                                                                        
"status": friend.getField("status"),
                                                                        
"displayName": friend.getDisplayName()
                                                                        };
                                        }
                                );
                                addSiteFriends(friends);                        
        
                }
                };
        </script>
<div id="header">
</div>
<%
        String useragent = request.getHeader("user-agent");
        if (useragent.toLowerCase().contains("iphone")) {
          response.sendRedirect("/m/");
        }
%>
<div id="signinout">
<%
    UserService userService = UserServiceFactory.getUserService();
    User user = userService.getCurrentUser();
    if (user != null) {
%>
Welcome, <%= user.getNickname() %> (<a href="<%=
userService.createLogoutURL(request.getRequestURI()) %>">Sign Out</a>)
<%
    } else {
%>
        <a href="<%= userService.createLoginURL(request.getRequestURI())
%>">Sign In</a>
<%
    }
%>
</div>
<div id="gfc-signin"></div>
<div id="main"></div>
<div id="footer">
        &copy;2008 Pavel - Terms of Use - Privacy Policy - Program Policies - 
Home
</div>
</body>
</html>


On Fri, Jul 24, 2009 at 7:32 AM, Rajeev Dayal <[email protected]> wrote:

> Hey Pavel,
> Can you post the contents of your web.xml file, and also the contents of
> your JSP page?
>
> Also, where is your JSP page located?
>
>
> Thanks,
> Rajeev
>
>
> On Thu, Jul 23, 2009 at 1:08 PM, Pavel Byles <[email protected]> wrote:
>
>> I am using a JSP page as my startup page for my GWt/GAE project and hosted
>> mode used to work just fine.
>> Yesterday I started Eclipse and suddenly hosted mode doesn't work anymore.
>>
>> I only displays the html in the JSP page but doesn't run the linked
>> <myproject>.nocache.js file and I get no errors.
>> When I do "Run/Compile" everything works just fine in Firefox at url
>> http://localhost:8080/
>>
>> Any ideas?
>>
>> I'm using GWT SDK 1.7.0 and GAE SDK 1.2.2 on Ubuntu/Eclipse 3.4.2 w/ Sun
>> JDK 1.6.0_13
>>
>> --
>> -Pavel
>>
>>
>>
>
> >
>


-- 
-Pav

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to