<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with tips]]></title><description><![CDATA[A list of topics that have been tagged with tips]]></description><link>https://forum.uwyn.com/tags/tips</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 09:30:33 GMT</lastBuildDate><atom:link href="https://forum.uwyn.com/tags/tips.rss" rel="self" type="application/rss+xml"/><pubDate>Invalid Date</pubDate><ttl>60</ttl><item><title><![CDATA[RIFE2 Tips &amp; Tricks]]></title><description><![CDATA[<p dir="auto">When converting an existing website, you will most likely want to redirect old URLs to the new ones. RIFE2 makes it pretty simple. For example, to redirect:</p>
<p dir="auto"><code>https://example.com/news/2023/09/11</code></p>
<p dir="auto">to</p>
<p dir="auto"><code>https://example.com/search?year=2023&amp;month=09&amp;day=11</code></p>
<p dir="auto">You can easily convert the path info into parameters, by doing something like:</p>
<pre><code class="language-java">public class ExampleSite extends Site {
    //...
    private void redirectMoved(Context c, String url) {
        c.setStatus(301);
        c.addHeader("Location", url);
    }

    private void setRedirects() {
        //.. 
        get("/news", PathInfoHandling.MAP(
                        m -&gt; m.p("year"),
                        m -&gt; m.p("year").s().p("month"),
                        m -&gt; m.p("year").s().p("month").s().p("day")),
                c -&gt; redirectMoved(c, c.urlFor(searchUrl).params(c.parameters()).toString()));
    }

    @Override
    public void setup() {
        //..
        setRedirects();
    }
}</code></pre>
]]></description><link>https://forum.uwyn.com/topic/46/rife2-tips-tricks</link><guid isPermaLink="true">https://forum.uwyn.com/topic/46/rife2-tips-tricks</guid><dc:creator><![CDATA[ethauvin]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[bld Tips &amp; Tricks]]></title><description><![CDATA[Annotation processors are easy to use with bld. Generally, you'll just need to include the processor as a dependency, for example:
public class ExampleBuild extends Project {
    public ExampleBuild() {
        // ...
        scope(provided)
                .include(dependency("com.example", "annotator", version(1, 0, 0)));
    }
}

If the processor is generating source files, you can easily specify where they should be saved, using the sourceOutput compile option, for example:
// Saves generated source files in the build/generated directory.
var generated = new File(buildDirectory(), "generated");
var ignore = generated.mkdir();
compileOperation().compileOptions().process(Processing.FULL).sourceOutput(generated);

To incorporate the generated source code into the source tree, add this directory as an additional source location in your IDE.
[image: 1692592654170-screenshot-from-2023-08-20-21-27-10.png]
]]></description><link>https://forum.uwyn.com/topic/30/bld-tips-tricks</link><guid isPermaLink="true">https://forum.uwyn.com/topic/30/bld-tips-tricks</guid><dc:creator><![CDATA[ethauvin]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>