Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

70 Zeilen
1.8KB

  1. <?xml version="1.0"?>
  2. <?component error="true" debug="false"?>
  3. <component>
  4. <registration
  5. description="WscMvc Application bootstrap"
  6. progid="WscMvc.Application"
  7. version="1.00"
  8. classid="{851C7763-1638-42FE-A166-BF3DD3A96A88}">
  9. </registration>
  10. <public>
  11. <method name="Run">
  12. <parameter name="pathInfo"/>
  13. <parameter name="statusLine"/>
  14. <parameter name="contentType"/>
  15. <parameter name="body"/>
  16. </method>
  17. </public>
  18. <script language="VBScript">
  19. <![CDATA[
  20. Option Explicit
  21. ' Primitive-only contract: scalars in, scalars out by reference.
  22. ' No ASP intrinsic objects (Request/Response/Server/Session) are referenced here.
  23. Sub Run(pathInfo, statusLine, contentType, body)
  24. Dim ctrl, helloBody
  25. If pathInfo = "/hello" Then
  26. Set ctrl = Nothing
  27. On Error Resume Next
  28. Set ctrl = CreateObject("WscMvc.HomeController")
  29. If Err.Number <> 0 Then
  30. Err.Clear
  31. On Error Goto 0
  32. statusLine = "500 Internal Server Error"
  33. contentType = "text/plain; charset=utf-8"
  34. body = "Internal Server Error"
  35. Exit Sub
  36. End If
  37. On Error Goto 0
  38. helloBody = ""
  39. On Error Resume Next
  40. ctrl.Hello helloBody
  41. If Err.Number <> 0 Then
  42. Err.Clear
  43. On Error Goto 0
  44. statusLine = "500 Internal Server Error"
  45. contentType = "text/plain; charset=utf-8"
  46. body = "Internal Server Error"
  47. Set ctrl = Nothing
  48. Exit Sub
  49. End If
  50. On Error Goto 0
  51. statusLine = "200 OK"
  52. contentType = "text/html; charset=utf-8"
  53. body = helloBody
  54. Set ctrl = Nothing
  55. Else
  56. statusLine = "404 Not Found"
  57. contentType = "text/plain; charset=utf-8"
  58. body = "Not Found"
  59. End If
  60. End Sub
  61. ]]>
  62. </script>
  63. </component>

Powered by TurnKey Linux.