<% ' Classic ASP splices #include files together as raw text before compiling, ' and Option Explicit is only legal once, as the literal first statement of ' the resulting page. Default.asp pulls in the entire application (core/*, ' app/controllers/*, app/views/*) via autoload_core.asp below, so this single ' declaration enforces explicit variable declaration across all of it. Do not ' add another Option Explicit to any included file - see AGENTS.md. Option Explicit %> <% ' Define starter application routes router.AddRoute "GET", "/home", "HomeController", "Index" router.AddRoute "GET", "/", "HomeController", "Index" router.AddRoute "GET", "", "HomeController", "Index" router.AddRoute "GET", "/404", "ErrorController", "NotFound" ' Resolve the route/controller/action. MVC is a Windows Script Component ' and (per AGENTS.md's "Controllers Coordinate; They Do Not Render") never ' writes HTML itself - Resolve()/ExecuteAction() only ever report success ' or populate LastError, and rendering happens here. It also cannot use ' Server-Side Includes, so the layout wrapping that used to happen inside ' Dispatch() now happens here, guarded by MVC.UseLayout. Dim requestResolved requestResolved = MVC.Resolve(Request.ServerVariables("REQUEST_METHOD"), _ TrimQueryParams(Request.ServerVariables("HTTP_X_ORIGINAL_URL"))) If Not requestResolved Then RenderMvcError MVC.LastError Else If MVC.UseLayout Then %><% End If MVC.ExecuteAction() If Not (MVC.LastError Is Nothing) Then RenderMvcError MVC.LastError End If If MVC.UseLayout Then %><% End If End If %>