In the PaymentsDemo included with PlayN, I get the following error:
iss is missing. Please add its value in the web.xml.
The error message comes as a callback response to failureHandler from inappPayments.encodeJWT. As far as I can tell, no source files or XML files explain what iss is, or how to add it to web.xml.
Any suggestions?
iss is the sellerIdentifier you get when creating a Google Wallet account. For bootstrapping you can use a sandbox account, or use Google's sandbox merchant (that page also shows how to create a sandbox customer). Do that by modifying the servlet tag in web.xml to the following:
<servlet>
<servlet-name>EncodeJWTServiceImpl</servlet-name>
<servlet-class>playn.payments.server.JWTEncodedServiceImp</servlet-class>
<init-param>
<param-name>aud</param-name>
<param-value>Google</param-value>
</init-param>
<init-param>
<param-name>typ</param-name>
<param-value>google/payments/inapp/item/v1</param-value>
</init-param>
<init-param>
<param-name>iss</param-name>
<param-value>14204953094352168571</param-value>
</init-param>
<init-param>
<param-name>secret</param-name>
<param-value>PWGknVgi6zt_BU1qrO1hXg</param-value>
</init-param>
</servlet>
The aud and typ parameters should always be like above. Change iss and secret to match your account details.
Related
I recently started using font-awesome v4.5.0. It was working like a charm until I upgraded to java 8 from java 7 and spring framework to v4.0 from v3.2
Now, font-awesome icons appear as squares. Browser console (firebug) shows-
NetworkError: 404 Not Found - http://localhost/myapp/fonts/fontawesome-webfont.woff2?v=4.5.0
and tomcat's catalina.out logs show following warnings-
No mapping found for HTTP request with URI [/myapp/fonts/fontawesome-webfont.woff2 in DispatcherServlet with name 'myappservlet'
No mapping found for HTTP request with URI [/myapp/fonts/fontawesome-webfont.woff] in DispatcherServlet with name 'myappservlet'
No mapping found for HTTP request with URI [/myapp/fonts/fontawesome-webfont.ttf] in DispatcherServlet with name 'myappservlet'
Location of 'fonts' folder is correctly specified in font-awesome.min.css's #font-face src. (There are no changes apart from java version and spring framework version. It suddenly stopped working)
I had the same issue.
do you have something like this in your web.xml?
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
Comment those lines solved the problem for me.
I am trying to authenticate a ticket against CAS. I have a working CAS server, and 2 services. Service A is an alfresco server, service B is my own Spring Web App.
I log into B and am redirecdted to CAS login, I login, and I am in Web App B just fine. All Happy.
I can SSO into Alfresco explorer just fine. (ie, I click on a link, and I am already loged in) All Happy.
In my web app B, I call a RESTful api in alfresco(A) and I am all sad.
I can put the REST url call into my browser and I get the expected result, and I am all confused.
How do I call this URL from my web app B? I add the ticket to the end of the URL like this:
https://example.org:8443/alfresco/service/workflow/getTaskList?userId=me&ticket=ST-6-ayiC6vVX3yEBQcFB12sj-xxx.org
My Web.xml is set up like this:
<filter>
<filter-name>Authentication Filter</filter-name>
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
<init-param>
<param-name>casServerLoginUrl</param-name>
<param-value>https://example.org:7443/cas/login</param-value>
</init-param>
<init-param>
<param-name>serverName</param-name>
<param-value>https://example.org:8443</param-value>
</init-param>
</filter>
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
<init-param>
<param-name>casServerUrlPrefix</param-name>
<param-value>https://example.org:7443/cas</param-value>
</init-param>
<init-param>
<param-name>serverName</param-name>
<param-value>https://example.org:8443</param-value>
</init-param>
</filter>
<filter>
<filter-name>Alfresco CAS Authentication Filter</filter-name>
<filter-class>org.xxx.alfresco.repository.extension.web.app.servlet.CASAuthenticationFilter</filter-class>
</filter>
with my filter mappings for the webservices like this:
<filter-mapping>
<filter-name>Authentication Filter</filter-name>
<url-pattern>/service/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Validation Filter</filter-name>
<url-pattern>/service/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Alfresco CAS Authentication Filter</filter-name>
<url-pattern>/service/*</url-pattern>
</filter-mapping>
But as I have debugging going on, I can see that I am not even getting to my CASAuthenticationFilter. The error is begin picked up by Cas20ProxyReceivingTicketValidationFilter. Here is the exception:
Feb 10, 2014 1:56:17 AM org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter doFilter
WARNING: org.jasig.cas.client.validation.TicketValidationException:
ticket 'ST-6-ayiC6vVX3yEBQcFB12sj-xxx.org' not recognized
Any Ideas?
I want to log in some users just with their login names (SSO). So I think http header authentication is the way to go.
I did everything what the doc says (http://help.adobe.com/en_US/connect/8.0/webservices/connect_8_webservi ces.pdf)
I added a line to custom.ini for HTTP_AUTH_HEADER (
HTTP_AUTH_HEADER=white50
)
My web.xml fil contains filter settings below.
I am requesting "https://example.com/api/xml?action=login&external-auth=use" with http header (white50=adobe_connect_loginname).
But I always get no-access error response from AC server. I could not authenticate user with its login name without password.
Could you help please.
web.xml:
<filter-name>HeaderAuthenticationFilter</filter-name>
<filter-class>com.macromedia.airspeed.servlet.filter.HeaderAuthentica tionFilter</filter-class>
<init-param>
<param-name>ignore-pattern-0</param-name>
<param-value>/api/</param-value>
</init-param>
<init-param>
<param-name>ignore-pattern-1</param-name>
<param-value>/common/</param-value>
</init-param>
<init-param>
<param-name>ignore-pattern-2</param-name>
<param-value>/servlet/gateway/</param-value>
</init-param>
<init-param>
<param-name>ignore-pattern-3</param-name>
<param-value>/servlet/mirror</param-value>
</init-param>
<init-param>
<param-name>ignore-pattern-4</param-name>
<param-value>/servlet/testbuilder</param-value>
</init-param>
<init-param>
<param-name>ignore-pattern-5</param-name>
<param-value>/main</param-value>
</init-param>
<filter-name>HeaderAuthenticationFilter</filter-name>
<url-pattern>/*</url-pattern>
This may not be your only problem, but the request you're testing with...
https://example.com/api/xml?action=login&external-auth=use
...will not be handled by the header authentication filter. It's configured to be ignored by this stanza in the web.xml:-
<param-name>ignore-pattern-0</param-name>
<param-value>/api/</param-value>
Try with the standard login page. If you still have troubles, it might be worth excerpting the relevant lines from the debug log.
I am using Spring MVC to handle my request and I need to send an String to do a search. I am sending, for example, Caçapava, but somewhere it was converting to this Caçapva, everywhere I was looking for my encoding is set to UTF-8. I am using Jackson to handle my JSON and ExtJs to build my view. My request is ok, so the problem is not with my ExtJs request.
Request parameters:
Query String Parameters
_dc:1363866108143
nomeCidade:Caçapava
page:1
start:0
limit:50
Anyone could help me?
Basically I use CharacterEncodingFilter to force Spring to use UTF-8 (web.xml):
<filter>
<filter-name>characterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>characterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
But, it may also depend on your server. Here is the discussion for tomcat. And see here for URIEncoding parameter.
I am new to glassfish server.I have used apache tomcat and changed the Built In Servlet Definitions(with param-name=listings) in web.xml like
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
from false to true to list the files in my html iframe.
How to do it in glassfish server. which file property i have to modify.Thanks in advance
Each of your netbeans projects for glassfish has a web.xml in:
project-name/web/WEB-INF/web.xml
All configurations in this file are used for the project only.
The default configuration (if no web.xml is in project folder) for all glassfish projects is
glassfish-install-dir/glassfish/domains/domain1/conf/default-web.xml
If your glassfish domain is not domain1 replace it with your domain's name.