Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Please help get basics working
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Zakaluka  
View profile  
 More options Dec 5 2010, 1:22 am
From: Zakaluka <zakal...@gmail.com>
Date: Sat, 4 Dec 2010 22:22:00 -0800 (PST)
Subject: Please help get basics working
Hello Everyone,

I have been working for the last week to get dyuproject working and
have, so far, been unsuccessful.  I am able to get Google's OpenID
implementation (Federated Login) working, but want to use something
that isn't tied to GAE.  To try and find the problem, I created a
barebones verification servlet and corresponding web.xml entries to
prevent access to a certain page.  I am trying to build this into the
default application that is created by the Eclipse plugin.  However,
it doesn't look like it is working at all and I am not sure why.  Any
help is greatly appreciated.

Relevant contents of web.xml:
========================================
  <servlet>
    <servlet-name>verify-servlet</servlet-name>
    <servlet-class>zn.projects.zneve.server.VerifyServlet</servlet-
class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>verify-servlet</servlet-name>
    <url-pattern>/verify</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>news.html</welcome-file>
  </welcome-file-list>

  <filter>
    <filter-name>security-all</filter-name>
    <filter-class>com.dyuproject.openid.OpenIdServletFilter</filter-
class>
    <init-param>
      <param-name>forwardUri</param-name>
      <param-value>/news.html</param-value>
    </init-param>
  </filter>

  <filter-mapping>
    <filter-name>security-all</filter-name>
    <url-pattern>*</url-pattern>
  </filter-mapping>
========================================

Relevant contents of VerifyServlet.java
========================================
public class VerifyServlet extends HttpServlet {
  final RelyingParty _relyingParty = RelyingParty.getInstance();

  public void doPost(HttpServletRequest request, HttpServletResponse
response)
      throws IOException, ServletException {
    doGet(request, response);
  }

  public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws IOException, ServletException {
    resp.setContentType("text/html");
    req.getRequestDispatcher("/news.html").forward(req, resp);
    return;
  }

}

========================================

As you can see, all I am trying to do is force the Servlet to take me
to a login page no matter what.  However, no matter how complex/simple
the variation I try or how I modify web.xml, when I click on the link
in news.html (to take me to mainpage.html), it goes through without
seemingly hitting the Servlet.  Hopefully, someone can offer some
insight into what the problem is.  If I should post the entire files,
please let me know.

Thank you in advance,

z.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Yu  
View profile  
 More options Dec 5 2010, 6:20 am
From: David Yu <david.yu....@gmail.com>
Date: Sun, 5 Dec 2010 19:20:03 +0800
Local: Sun, Dec 5 2010 6:20 am
Subject: Re: [dyuproject] Please help get basics working

It would be better if you post the sample app.
Have you looked at the bare-bones servlet demo at
modules/demos/openid-servlet ?

--
When the cat is away, the mouse is alone.
- David Yu

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zakaluka  
View profile  
 More options Dec 5 2010, 7:35 pm
From: Zakaluka <zakal...@gmail.com>
Date: Sun, 5 Dec 2010 16:35:38 -0800 (PST)
Local: Sun, Dec 5 2010 7:35 pm
Subject: Re: Please help get basics working
David,

Thanks for the quick reply.  I've studied the demos extensively, but
they were initially too complicated for me (I've done a lot of plain
java programming, but never web-based stuff).

I finally figured it out the solution (at 3am).  Apparently, the issue
was that I am using HTML files (not JSP) and HTML files are considered
static files by Google App Engine.  GAE always serves static files,
regardless of what filters are applied to it.  I was able to insert an
exclusion to appengine-web.xml for the specific HTML file I'm
protecting, which allowed the filter to work on it.  Hopefully, the
rest of the OpenID integration will go more smoothly.

Regards,

z.

On Dec 5, 3:20 am, David Yu <david.yu....@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »