<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 15 Aug 2019 at 02:17, Brad Wood <<a href="mailto:bdw429s@gmail.com">bdw429s@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Can you give a specific example of a mapping, and what happens with the welcome file that is unexpected? </blockquote><div><br></div><div>Presently, I'm setting require welcome files to true for all mappings since it seemed to be required for the CFML servlet to work (which, so far as I can tell, is very similar to how JSPs work), but then the /flex2gateway/* mapping I mentioned above gets changed to /flex2gateway/index.cfm when I hit it which means the default welcome file is inserted in, but it shouldn't be for that mapping. <br></div><div><br></div><div>I just did a quick test commenting out this line that has always run for each servlet</div><div><br></div><div><font face="monospace">servlet.setRequireWelcomeFileMapping(true);</font><br></div><div><font face="monospace"><br></font></div><div>and while welcome files to seem to still work at first glance (which is good), and the flex2gateway mapping no longer tries to force a welcome file (which is also good), my directory listings stopped working in folders that don't have a welcome file (which is bad). That last item is actually sort of puzzling. Why would NOT requiring a welcome file mapping make my directory listing URL try and force a welcome file even though it doesn't exist?</div></div></blockquote><div><br></div><div>That is odd, how are you doing the directory listing? Is it just via the default servlet?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br clear="all"><div><div dir="ltr" class="gmail-m_-4590550328029381426m_3057722505526531119gmail_signature"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019 at 9:38 AM Stuart Douglas <<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Can you give a specific example of a mapping, and what happens with the welcome file that is unexpected? <div dir="auto"><br></div><div dir="auto">This is basically an internal flag to deal with two things that are treated differently by the spec.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 15 Aug. 2019, 12:26 am Brad Wood, <<a href="mailto:bdw429s@gmail.com" rel="noreferrer" target="_blank">bdw429s@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm not sure you're understanding the problem domain. The web.xml I provided was just an example, but I'm not creating the web.xml files nor do I have any control over them. My users provide their own war to run on my Undertow-powered server tool and it's my job to parse their web.xml (with whatever they have in it) and create the proper deployment on-the-fly without any mind reading.<div><br></div><div>You seem to be describing an impossible scenario. If Undertow has chosen to require a special setting, unique to it and not a part of the web.xml spec, yet there is no algorithm to externally decide when to use this setting, how am I to use Undertow to dynamically start wars up without insider knowledge on their mappings? How does Wildfly handle this? </div><div><br clear="all"><div><div dir="ltr" class="gmail-m_-4590550328029381426gmail-m_3057722505526531119gmail-m_7856331782334116383m_8887231785153951119m_-4895887251146862891gmail_signature"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" rel="noreferrer noreferrer" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" rel="noreferrer noreferrer" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" rel="noreferrer noreferrer" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019 at 9:04 AM Stuart Douglas <<a href="mailto:sdouglas@redhat.com" rel="noreferrer noreferrer" target="_blank">sdouglas@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 14 Aug 2019 at 23:26, Brad Wood <<a href="mailto:bdw429s@gmail.com" rel="noreferrer noreferrer" target="_blank">bdw429s@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks for the reply Stuart. The javadoc isn't really prescriptive enough however. I'm parsing a web.xml and adding servlets dynamically. In that manner, how would I know if a given servlet was going to serve JSPs or was the default servlet? </div></blockquote><div><br></div><div>This does not have a web.xml equivalent. JSP and default servlets have special behaviour as per the spec, but there is no spec defined way of having similar behaviour for other servlets.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You are unlikely to ever need this unless you have a servlet that processes or serves resources and want to perform welcome file mappings. </blockquote><div><br></div><div>Well, yes, that actually applies to me :) I'm using Undertow to start up ColdFusion servers which in addition to usually running JSP if you want, use wildcard mappings and have welcome files. A ColdFusion server has several mappings in place though. In addition to the wildcard ones similar to *.cfm or /index.cfm/* it also has mappings for /flex2gateway/* and I'm seeing incorrect behavior where my welcome files are getting crammed into the flex gateway URLs where they don't belong, thus my question. </div><div><br></div><div>But my code isn't manually creating the mappings. Like I said above, I'm parsing a web.xml and adding the mappings dynamically, which puts me back to my original question. I don't think RequireWelcomeFileMapping should be set for all mappings, but I'm unclear on how to tell the difference programmatically. How do other servlets such as Tomcat handle this when loading my mappings from my web.xml?<br></div><div><br></div><div>I'm attaching an example web.xml so you can see what I'm talking about. </div></div></blockquote><div><br></div><div>This is an Undertow specific thing, I assume other containers have their own internal way of handling it.</div><div><br></div><div>If you really want something like this define a special init param that servlets can use in web.xml to enable the behaviour.</div><div><br></div><div>Stuart</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br clear="all"><div><div dir="ltr" class="gmail-m_-4590550328029381426gmail-m_3057722505526531119gmail-m_7856331782334116383m_8887231785153951119m_-4895887251146862891gmail-m_2239080786871108751gmail-m_1729325568706926593gmail_signature"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" rel="noreferrer noreferrer" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" rel="noreferrer noreferrer" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" rel="noreferrer noreferrer" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019 at 12:57 AM Stuart Douglas <<a href="mailto:sdouglas@redhat.com" rel="noreferrer noreferrer" target="_blank">sdouglas@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This is mostly for JSP, as per the javadoc on the field: <a href="https://jar-download.com/artifacts/io.undertow/undertow-servlet/2.0.24.Final/source-code/io/undertow/servlet/api/ServletInfo.java" rel="noreferrer noreferrer" target="_blank">https://jar-download.com/artifacts/io.undertow/undertow-servlet/2.0.24.Final/source-code/io/undertow/servlet/api/ServletInfo.java</a></div><div><br></div><div><br></div><div>Say we have mapped a JSP servlet to /jsp/*, and this directory contains a file called index.jsp. Even though we have technically mapped to a servlet we still want to perform a welcome file match to actually serve /jsp/index.jsp via the welcome file mechanism. It's a similar story for the default servlet, if there is an index.html it should serve that via a welcome file.</div><div><br></div><div>You are unlikely to ever need this unless you have a servlet that processes or serves resources and want to perform welcome file mappings.</div><div><br></div><div>Stuart</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 1 Aug 2019 at 07:28, Brad Wood <<a href="mailto:bdw429s@gmail.com" rel="noreferrer noreferrer" target="_blank">bdw429s@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I have some questions about when I should be using the following:<div><br></div><div><font face="courier new, monospace">servletInfo.setRequireWelcomeFileMapping(true)</font></div><div><br></div><div>I can't find any documentation or comments in the code that help me answer exactly what that setting does and when to use it. I'm parsing a web.xml file and creating the proper deployment from it, but I'm unsure when to set the option above since there is no corresponding attribute or tag in a web.xml along those lines. </div><div><br></div><div>I did find this comment in a code sample online</div><div><pre class="gmail-m_-4590550328029381426gmail-m_3057722505526531119gmail-m_7856331782334116383m_8887231785153951119m_-4895887251146862891gmail-m_2239080786871108751gmail-m_1729325568706926593gmail-m_-8680829305538213527gmail-m_-9066212490797251871m_-8818110839628423113gmail-c-mrkdwn__pre" style="box-sizing:inherit;margin-top:4px;margin-bottom:4px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border:1px solid rgba(0,0,0,0.15);border-radius:4px;background:rgb(248,248,248);color:rgb(29,28,29);font-family:Monaco,Menlo,Consolas,"Courier New",monospace">//if the JSP servlet is mapped to a path that ends in /*<br style="box-sizing:inherit">//we want to perform welcome file matches if the directory is requested</pre><div><div dir="ltr" class="gmail-m_-4590550328029381426gmail-m_3057722505526531119gmail-m_7856331782334116383m_8887231785153951119m_-4895887251146862891gmail-m_2239080786871108751gmail-m_1729325568706926593gmail-m_-8680829305538213527gmail-m_-9066212490797251871m_-8818110839628423113gmail_signature"><div dir="ltr"><div><div dir="ltr"><div></div><div><i>( <a href="https://jar-download.com/artifacts/io.undertow/undertow-jsp/1.0.0.Beta27/source-code/io/undertow/jsp/JspServletBuilder.java" rel="noreferrer noreferrer" target="_blank">https://jar-download.com/artifacts/io.undertow/undertow-jsp/1.0.0.Beta27/source-code/io/undertow/jsp/JspServletBuilder.java</a> )</i></div><div><br></div><div>but my app server has more than one servlet mapping with URL filters ending with /* and the welcome file list should only apply to one of them so it doesn't seem correct that ALL url filters ending in /* should set that. I'm unclear on whether the welcome files are attempted up front or only if a matching url filter isn't found. </div><div><br></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" rel="noreferrer noreferrer" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" rel="noreferrer noreferrer" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" rel="noreferrer noreferrer" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div></div></div>
_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" rel="noreferrer noreferrer" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a></blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>