Reputation: 3704
I tried to deploy my app using auth this instructions as :
<application>mytestapp</application>
<version>1</version>
<sessions-enabled>true</sessions-enabled>
<security-constraint>
<web-resource-collection>
<web-resource-name></web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
and I tried this code as well to make user login:
public class GuestbookServlet extends HttpServlet {
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
if (user != null) {
resp.setContentType("text/plain");
resp.getWriter().println("Hello, " + user.getNickname());
} else {
resp.sendRedirect(userService.createLoginURL(req.getRequestURI()));
}
}
}
... but for some reason I get exception thrown as XML error validating :
An internal error occurred during: "Deploying testapp to Google". XML error validating C:...\testapp\war\WEB-INF\appengine-web.xml against C:...\eclipse-jee-indigo-win32\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.5.2.r37v201107211953\appengine-java-sdk-1.5.2\docs\appengine-web.xsd
I am not pretty sure what that means so I dearly need your advise how to fix it? Any useful idea is much appreciated.
Thanks
P.S. GWT SDK 2.3
Upvotes: 0
Views: 113
Reputation: 80340
You are mixing the app config file: appengine-web.xml
with deployment descriptor: web.xml
.
Upvotes: 1