blob: eb3e24b4bfb46d424a6ee5898167fbc22e0783a0 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="Date-Revision-yyyymmdd" content="20140918"/>
<meta http-equiv="Content-Language" content="en"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Wildcard Mappings</title>
<link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic,600italic,700italic" rel="stylesheet" type="text/css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/css/main.css" rel="stylesheet">
<link href="/css/custom.css" rel="stylesheet">
<link href="/highlighter/github-theme.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/js/community.js"></script>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '41']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body>
<a href="https://github.com/apache/struts" class="github-ribbon">
<img decoding="async" loading="lazy" style="position: absolute; right: 0; border: 0;" width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_red_aa0000.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1">
</a>
<header>
<nav>
<div role="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" data-toggle="collapse" data-target="#struts-menu" class="navbar-toggle">
Menu
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/index.html" class="navbar-brand logo"><img src="/img/struts-logo.svg"></a>
</div>
<div id="struts-menu" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Home<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/index.html">Welcome</a></li>
<li><a href="/download.cgi">Download</a></li>
<li><a href="/releases.html">Releases</a></li>
<li><a href="/announce-2024.html">Announcements</a></li>
<li><a href="http://www.apache.org/licenses/">License</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html">Thanks!</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
<li><a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy Policy</a></li>
</ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Support<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/mail.html">User Mailing List</a></li>
<li><a href="https://issues.apache.org/jira/browse/WW">Issue Tracker</a></li>
<li><a href="/security.html">Reporting Security Issues</a></li>
<li><a href="/commercial-support.html">Commercial Support</a></li>
<li class="divider"></li>
<li><a href="https://cwiki.apache.org/confluence/display/WW/Migration+Guide">Version Notes</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/WW/Security+Bulletins">Security Bulletins</a></li>
<li class="divider"></li>
<li><a href="/maven/project-info.html">Maven Project Info</a></li>
<li><a href="/maven/struts2-core/dependencies.html">Struts Core Dependencies</a></li>
<li><a href="/maven/struts2-plugins/modules.html">Plugin Dependencies</a></li>
</ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Documentation<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/birdseye.html">Birds Eye</a></li>
<li><a href="/primer.html">Key Technologies</a></li>
<li><a href="/kickstart.html">Kickstart FAQ</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/WW/Home">Wiki</a></li>
<li class="divider"></li>
<li><a href="/getting-started/">Getting Started</a></li>
<li><a href="/security/">Security Guide</a></li>
<li><a href="/core-developers/">Core Developers Guide</a></li>
<li><a href="/tag-developers/">Tag Developers Guide</a></li>
<li><a href="/maven-archetypes/">Maven Archetypes</a></li>
<li><a href="/plugins/">Plugins</a></li>
<li><a href="/maven/struts2-core/apidocs/index.html">Struts Core API</a></li>
<li><a href="/tag-developers/tag-reference.html">Tag reference</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/WW/FAQs">FAQs</a></li>
<li><a href="http://cwiki.apache.org/S2PLUGINS/home.html">Plugin registry</a></li>
</ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Contributing<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/youatstruts.html">You at Struts</a></li>
<li><a href="/helping.html">How to Help FAQ</a></li>
<li><a href="/dev-mail.html">Development Lists</a></li>
<li class="divider"></li>
<li><a href="/submitting-patches.html">Submitting patches</a></li>
<li><a href="/builds.html">Source Code and Builds</a></li>
<li><a href="/coding-standards.html">Coding standards</a></li>
<li><a href="/contributors/">Contributors Guide</a></li>
<li class="divider"></li>
<li><a href="/release-guidelines.html">Release Guidelines</a></li>
<li><a href="/bylaws.html">PMC Charter</a></li>
<li><a href="/volunteers.html">Volunteers</a></li>
<li><a href="https://gitbox.apache.org/repos/asf?p=struts.git">Source Repository</a></li>
<li><a href="/updating-website.html">Updating the website</a></li>
</ul>
</li>
<li class="apache"><a href="http://www.apache.org/"><img src="/img/apache.png"></a></li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<article class="container">
<section class="col-md-12">
<a href="index.html" title="back to Core Developers Guide"><< back to Core Developers Guide</a>
<a class="edit-on-gh" href="https://github.com/apache/struts-site/edit/master/source/core-developers/wildcard-mappings.md" title="Edit this page on GitHub">Edit on GitHub</a>
<h1 class="no_toc" id="wildcard-mappings">Wildcard Mappings</h1>
<ul id="markdown-toc">
<li><a href="#wildcards" id="markdown-toc-wildcards">Wildcards</a></li>
<li><a href="#parameters-in-namespaces" id="markdown-toc-parameters-in-namespaces">Parameters in namespaces</a></li>
<li><a href="#parameters-after-the-action-name" id="markdown-toc-parameters-after-the-action-name">Parameters after the action name</a></li>
<li><a href="#advanced-wildcards" id="markdown-toc-advanced-wildcards">Advanced Wildcards</a></li>
</ul>
<h2 id="wildcards">Wildcards</h2>
<p>As an application grows in size, so will the number of action mappings. Wildcards can be used to combine similar
mappings into one more generic mapping.</p>
<p>The best way to explain wildcards is to show an example and walk through how it works. This example modifies
a conventional mapping to use wildcards to match all pages that start with <code class="language-plaintext highlighter-rouge">/edit</code>:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"/edit*"</span> <span class="na">class=</span><span class="s">"org.apache.struts.webapp.example.Edit{1}Action"</span><span class="nt">&gt;</span>
<span class="nt">&lt;result</span> <span class="na">name=</span><span class="s">"failure"</span><span class="nt">&gt;</span>/mainMenu.jsp<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;result&gt;</span>{1}.jsp<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;/action&gt;</span>
</code></pre></div></div>
<p>The “*” in the name attribute allows the mapping to match the request URIs <code class="language-plaintext highlighter-rouge">/editSubscription</code>, <code class="language-plaintext highlighter-rouge">editRegistration</code>,
or any other URI that starts with <code class="language-plaintext highlighter-rouge">/edit</code>, however <code class="language-plaintext highlighter-rouge">/editSubscription/add</code> would not be matched. The part of the URI
matched by the wildcard will then be substituted into various attributes of the action mapping and its action results
replacing <code class="language-plaintext highlighter-rouge">{1}</code>. For the rest of the request, the framework will see the action mapping and its action results containing
the new values.</p>
<p>Mappings are matched against the request in the order they appear in the framework’s configuration file. If more than
one pattern matches <strong>the last one wins</strong>, so less specific patterns must appear before more specific ones. However,
if the request URL can be matched against a path without any wildcards in it, no wildcard matching is performed
and order is not important. Also, note that wildcards are not greedy, meaning they only match until the first
occurrence of the following string pattern. For example, consider the following mapping:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"List*s"</span> <span class="na">class=</span><span class="s">"actions.List{1}s"</span><span class="nt">&gt;</span>
<span class="nt">&lt;result&gt;</span>list{1}s.jsp<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;/action&gt;</span>
</code></pre></div></div>
<p>This mapping would work correctly for the URI <code class="language-plaintext highlighter-rouge">ListAccounts</code> but not <code class="language-plaintext highlighter-rouge">ListSponsors</code>, because the latter would turn into
this configuration:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"ListSpons"</span> <span class="na">class=</span><span class="s">"actions.ListSpons"</span><span class="nt">&gt;</span>
<span class="nt">&lt;result&gt;</span>listSpons.jsp<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;/action&gt;</span>
</code></pre></div></div>
<p>Wildcard patterns can contain one or more of the following special tokens:</p>
<table>
<thead>
<tr>
<th>*</th>
<th>Matches zero or more characters excluding the slash (‘/’) character.</th>
</tr>
</thead>
<tbody>
<tr>
<td>**</td>
<td>Matches zero or more characters including the slash (‘/’) character.</td>
</tr>
<tr>
<td>\character</td>
<td>The backslash character is used as an escape sequence. Thus <code class="language-plaintext highlighter-rouge">\\*</code> matches the character asterisk (“*”), and <code class="language-plaintext highlighter-rouge">'\\'</code> matches the character backslash (“\”).</td>
</tr>
</tbody>
</table>
<p>Patterns can optionally be matched “loosely”. When the end of the pattern matches <code class="language-plaintext highlighter-rouge">*[^*]*$</code> (wildcard, no wildcard,
wildcard), if the pattern fails, it is also matched as if the last two characters didn’t exist. The goal is to support
the legacy <code class="language-plaintext highlighter-rouge">*!*</code> syntax, where the <code class="language-plaintext highlighter-rouge">!*</code> is optional.</p>
<p>In the action mapping and action results, the wildcard-matched values can be accessed with the token <code class="language-plaintext highlighter-rouge">{N}</code> where N is
a number from 1 to 9 indicating which wildcard-matched value to substitute. The whole request URI can be accessed with
the <code class="language-plaintext highlighter-rouge">{0}</code> token.</p>
<p>Also, the action mapping and action result properties will accept wildcard-matched strings in their value attribute, like:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"/edit/*"</span> <span class="na">class=</span><span class="s">"org.apache.struts.webapp.example.Edit{1}Action"</span><span class="nt">&gt;</span>
<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">"id"</span><span class="nt">&gt;</span>{1}<span class="nt">&lt;/param&gt;</span>
<span class="nt">&lt;result&gt;</span>
<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">"location"</span><span class="nt">&gt;</span>/mainMenu.jsp<span class="nt">&lt;/param&gt;</span>
<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">"id"</span><span class="nt">&gt;</span>{1}<span class="nt">&lt;/param&gt;</span>
<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;/action&gt;</span>
</code></pre></div></div>
<blockquote>
<p>See also <a href="../getting-started/wildcard-method-selection">Wildcard Method</a></p>
</blockquote>
<h2 id="parameters-in-namespaces">Parameters in namespaces</h2>
<p>From Struts 2.1+ namespace patterns can be extracted as request parameters and bound to the action. To enable this
feature, set the following constant in struts.xml:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;constant</span> <span class="na">name=</span><span class="s">"struts.patternMatcher"</span> <span class="na">value=</span><span class="s">"namedVariable"</span><span class="nt">/&gt;</span>
</code></pre></div></div>
<p>With that in place, namespace definitions can contain {PARAM_NAME} patterns which will be evaluated against the request
URL and extracted as parameters, for example:</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nd">@Namespace</span><span class="o">{</span><span class="s">"/users/{userID}"</span><span class="o">);</span>
<span class="kd">public</span> <span class="kd">class</span> <span class="nc">DetailsAction</span> <span class="n">exends</span> <span class="nc">ActionSupport</span> <span class="o">{</span>
<span class="kd">private</span> <span class="nc">Long</span> <span class="n">userID</span><span class="o">;</span>
<span class="nd">@StrutsParameter</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">setUserID</span><span class="o">(</span><span class="nc">Long</span> <span class="n">userID</span><span class="o">)</span> <span class="o">{...}</span>
<span class="o">}</span>
</code></pre></div></div>
<p>If the request URL is <code class="language-plaintext highlighter-rouge">/users/10/detail</code>, then the <code class="language-plaintext highlighter-rouge">DetailsAction</code> will be executed and its userID field will be set
to <em>10</em>.</p>
<blockquote>
<p>Only one <code class="language-plaintext highlighter-rouge">PatternMatcher</code> implementation can be used at a time. The two implementations included with Struts 2 are
mutually exclusive. You cannot use Wildcards and Named Variable patterns at the same application (if that were required,
you’d need to create a custom PatternMatcher implementation).</p>
</blockquote>
<blockquote>
<p>Some tags tags not are 100% compatible with variables in the namespace. For instance, they may write the literal
namespace into the HTML (eg.: <code class="language-plaintext highlighter-rouge">/{user}/2w</code>) instead of the path used in the request (ie. <code class="language-plaintext highlighter-rouge">/brett/24</code>). This usually
affects attributes that attempt to guess the namespace of an action (eg. Form tag, Action tag, action=). This problem
can be avoided by using HTML tags directly with relative paths or explicit URLs.</p>
</blockquote>
<p>Similar functionality can also be implemented using a custom <code class="language-plaintext highlighter-rouge">ActionMapper</code>. The <code class="language-plaintext highlighter-rouge">ActionMapper</code> will need to parse
the namespace and request itself to set parameters on the matched action. The default <code class="language-plaintext highlighter-rouge">ActonMapper</code> is responsible
for invoking the <code class="language-plaintext highlighter-rouge">PatternMatcher</code>.</p>
<h2 id="parameters-after-the-action-name">Parameters after the action name</h2>
<p>To use parameters in the URL, after the action name, make sure this is set:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;constant</span> <span class="na">name=</span><span class="s">"struts.enable.SlashesInActionNames"</span> <span class="na">value=</span><span class="s">"true"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;constant</span> <span class="na">name=</span><span class="s">"struts.mapper.alwaysSelectFullNamespace"</span> <span class="na">value=</span><span class="s">"false"</span><span class="nt">/&gt;</span>
</code></pre></div></div>
<p>Then the action mapping will look like:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;package</span> <span class="na">name=</span><span class="s">"edit"</span> <span class="na">extends=</span><span class="s">"struts-default"</span> <span class="na">namespace=</span><span class="s">"/edit"</span><span class="nt">&gt;</span>
<span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"/person/*"</span> <span class="na">class=</span><span class="s">"org.apache.struts.webapp.example.EditAction"</span><span class="nt">&gt;</span>
<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">"id"</span><span class="nt">&gt;</span>{1}<span class="nt">&lt;/param&gt;</span>
<span class="nt">&lt;result&gt;</span>/mainMenu.jsp<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;/action&gt;</span>
<span class="nt">&lt;/package&gt;</span>
</code></pre></div></div>
<p>When a URL like <code class="language-plaintext highlighter-rouge">/edit/person/123</code> is requested, <code class="language-plaintext highlighter-rouge">EditAction</code> will be called, and its “id” field will be set to 123.</p>
<h2 id="advanced-wildcards">Advanced Wildcards</h2>
<p>From 2.1.9+ regular expressions can be defined defined in the action name. To use this form of wild card, the following
constants must be set:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;constant</span> <span class="na">name=</span><span class="s">"struts.enable.SlashesInActionNames"</span> <span class="na">value=</span><span class="s">"true"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;constant</span> <span class="na">name=</span><span class="s">"struts.mapper.alwaysSelectFullNamespace"</span> <span class="na">value=</span><span class="s">"false"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;constant</span> <span class="na">name=</span><span class="s">"struts.patternMatcher"</span> <span class="na">value=</span><span class="s">"regex"</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;constant</span> <span class="na">name=</span><span class="s">"struts.matcher.appendNamedParameters"</span> <span class="na">value=</span><span class="s">"true"</span><span class="nt">/&gt;</span> <span class="c">&lt;!-- Required from 2.5.25+ --&gt;</span>
</code></pre></div></div>
<p>The regular expressions can be in two forms, the simplest one is <code class="language-plaintext highlighter-rouge">{FIELD_NAME}</code>, in which case the field with
the <code class="language-plaintext highlighter-rouge">FIELD_NAME</code> in the action will be populated with the matched text, for example:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;package</span> <span class="na">name=</span><span class="s">"books"</span> <span class="na">extends=</span><span class="s">"struts-default"</span> <span class="na">namespace=</span><span class="s">"/"</span><span class="nt">&gt;</span>
<span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"/{type}/content/{title}"</span> <span class="na">class=</span><span class="s">"example.BookAction"</span><span class="nt">&gt;</span>
<span class="nt">&lt;result&gt;</span>/books/content.jsp<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;/action&gt;</span>
<span class="nt">&lt;/package&gt;</span>
</code></pre></div></div>
<p>In this example, if the url <code class="language-plaintext highlighter-rouge">/fiction/content/Frankenstein</code> is requested, BookAction’s field “type” will be set to
“fiction”, and the field “title” will be set to “Frankenstein”.</p>
<p>The regular expression can also be in the form <code class="language-plaintext highlighter-rouge">{FIELD_NAME:REGULAR_EXPRESSION}</code>. The regular expression is a normal
Java regular expression. For example:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;package</span> <span class="na">name=</span><span class="s">"books"</span> <span class="na">extends=</span><span class="s">"struts-default"</span> <span class="na">namespace=</span><span class="s">"/"</span><span class="nt">&gt;</span>
<span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"/{type}/{author:.+}/list"</span> <span class="na">class=</span><span class="s">"example.ListBooksAction"</span><span class="nt">&gt;</span>
<span class="nt">&lt;result&gt;</span>/books/list.jsp<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;/action&gt;</span>
<span class="nt">&lt;/package&gt;</span>
</code></pre></div></div>
<p>In this example, if the url <code class="language-plaintext highlighter-rouge">/philosophy/AynRand/list</code> is requested, ListBooksAction’s field “type” will be set to
“philosophy” and “author” to “AynRand”.</p>
<p>The matched groups can still be accessed using the <code class="language-plaintext highlighter-rouge">{X}</code> notation, like:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;package</span> <span class="na">name=</span><span class="s">"books"</span> <span class="na">extends=</span><span class="s">"struts-default"</span> <span class="na">namespace=</span><span class="s">"/"</span><span class="nt">&gt;</span>
<span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"/books/{ISBN}/content"</span> <span class="na">class=</span><span class="s">"example.BookAction"</span><span class="nt">&gt;</span>
<span class="nt">&lt;result&gt;</span>/books/{1}.jsp<span class="nt">&lt;/result&gt;</span>
<span class="nt">&lt;/action&gt;</span>
<span class="nt">&lt;/package&gt;</span>
</code></pre></div></div>
</section>
</article>
<footer class="container">
<div class="col-md-12">
Copyright &copy; 2000-2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts project logos are
trademarks of The Apache Software Foundation. All Rights Reserved.
</div>
<div class="col-md-12">Logo and website design donated by <a href="https://softwaremill.com/">SoftwareMill</a>.</div>
</footer>
<script>!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");</script>
<script src="https://apis.google.com/js/platform.js" async="async" defer="defer"></script>
<div id="fb-root"></div>
<script>(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</body>
</html>