On 12/13/12 3:56 AM, Rick Mann wrote:
> Hi guys.
>
> The .33 snapshot is instantiating my initializer correctly, and that code is 
> calling this:
>
>      ServletRegistration.Dynamic registration = 
> servletContext.addServlet(servletName, dispatcherServlet);
>      registration.setLoadOnStartup(1);
>      registration.addMapping(new String["/"]);

That behavior is part of the spec.

If the mapping already exists, the addMapping does nothing. It's not an 
override.

I've added a bug report so we might special case the Resin defaults 
somehow, so those are overridable.

-- Scott

>
> However, I don't see anything in the Caucho logging indicating that it 
> registered a servlet (not sure if there is anything). I did see this, which 
> doesn't seem right:
>
> [12-12-13 03:50:11.038] CONFIG com.caucho.server.dispatch.ServletMapper 
> addUrlMapping: servlet-mapping / -> resin-file
>
>
> It also doesn't respond to a request for http://localhost:8080/. I see this 
> much:
>
> [12-12-13 03:50:22.636] FINER com.caucho.network.listen.TcpSocketLink 
> requestAccept: TcpSocketLink[id=http://*:8080-5,http://*:8080,INIT] 
> request-accept http://*:8080-5 (count=4, idle=3)
> [12-12-13 03:50:22.636] FINEST com.caucho.network.listen.TcpSocketLink 
> startThread: TcpSocketLink[id=http://*:8080-5,http://*:8080,INIT] start 
> thread resin-port-8080-22 (count=5, idle=4)
> [12-12-13 03:50:22.637] FINEST com.caucho.network.listen.TcpSocketLink 
> initSocket: TcpSocketLink[id=1,app-0] starting connection 
> TcpSocketLink[id=http://*:8080-1,http://*:8080,ACCEPT], total=5
> [12-12-13 03:50:22.637] FINER com.caucho.network.listen.TcpSocketLink 
> handleAcceptTaskImpl: TcpSocketLink[id=http://*:8080-1,http://*:8080,ACCEPT] 
> accept from [::1]:8080
> [12-12-13 03:50:22.645] FINE com.caucho.server.http.HttpRequest parseRequest: 
> Http[app-0, 1] GET / HTTP/1.1
> [12-12-13 03:50:22.645] FINE com.caucho.server.http.HttpRequest parseRequest: 
> Http[app-0, 1] Remote-IP: [::1]:8080
> [12-12-13 03:50:22.645] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] Host: localhost:8080
> [12-12-13 03:50:22.645] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) 
> AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17
> [12-12-13 03:50:22.645] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] Accept: 
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> [12-12-13 03:50:22.646] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] DNT: 1
> [12-12-13 03:50:22.646] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] Cache-Control: max-age=0
> [12-12-13 03:50:22.646] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] Accept-Language: en-us
> [12-12-13 03:50:22.646] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] Accept-Encoding: gzip, deflate
> [12-12-13 03:50:22.646] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] Cookie: 
> __utma=111872281.1148524109.1354299737.1354304258.1355118330.3; 
> __utmz=111872281.1354299737.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
>  JSESSIONID=aaaCemYsZ1z9x6D_VaoUt; uid=1; crucibleprefs1="D%3D1343201447093"; 
> remember=rmann:0:cb76f8d95c02b5fae41a3fa0206a927c
> [12-12-13 03:50:22.647] FINE com.caucho.server.http.HttpRequest parseHeaders: 
> Http[app-0, 1] Connection: keep-alive
> [12-12-13 03:50:22.651] FINEST com.caucho.server.webapp.WebApp getRealPath: 
> real-path / -> 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/
> [12-12-13 03:50:22.651] FINEST com.caucho.server.webapp.ServletContextImpl 
> getResourceAsStream: java.io.FileNotFoundException: 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/
>                               at 
> com.caucho.vfs.JniFilePathImpl.openReadImpl(JniFilePathImpl.java:402)
>                               at com.caucho.vfs.Path.openRead(Path.java:1149)
>                               at 
> com.caucho.server.webapp.ServletContextImpl.getResourceAsStream(ServletContextImpl.java:404)
>                               at 
> com.caucho.server.dispatch.ServletMapper.mapServlet(ServletMapper.java:252)
>                               at 
> com.caucho.server.webapp.WebApp.buildInvocation(WebApp.java:3906)
>                               at 
> com.caucho.server.webapp.WebAppContainer.buildInvocation(WebAppContainer.java:781)
>                               at 
> com.caucho.server.host.Host.buildInvocation(Host.java:752)
>                               at 
> com.caucho.server.host.HostContainer.buildInvocation(HostContainer.java:319)
>                               at 
> com.caucho.server.cluster.ServletService.buildInvocation(ServletService.java:1014)
>                               at 
> com.caucho.server.dispatch.InvocationServer.buildInvocation(InvocationServer.java:247)
>                               at 
> com.caucho.server.dispatch.InvocationServer.buildInvocation(InvocationServer.java:220)
>                               at 
> com.caucho.server.http.AbstractHttpRequest.buildInvocation(AbstractHttpRequest.java:1597)
>                               at 
> com.caucho.server.http.AbstractHttpRequest.getInvocation(AbstractHttpRequest.java:1570)
>                               at 
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:820)
>                               at 
> com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1345)
>                               at 
> com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1301)
>                               at 
> com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1285)
>                               at 
> com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1193)
>                               at 
> com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:992)
>                               at 
> com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
>                               at 
> com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
>                               at 
> com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
>                               at 
> com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
>                               at 
> com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
>                               at 
> com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
>                         
> [12-12-13 03:50:22.652] FINEST com.caucho.server.webapp.WebApp getRealPath: 
> real-path //index.jsp -> 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/index.jsp
> [12-12-13 03:50:22.652] FINEST com.caucho.server.webapp.WebApp getRealPath: 
> real-path //index.php -> 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/index.php
> [12-12-13 03:50:22.652] FINEST com.caucho.server.webapp.WebApp getRealPath: 
> real-path //index.html -> 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/index.html
> [12-12-13 03:50:22.652] FINER com.caucho.server.dispatch.ServletMapper 
> mapServlet: WebApp[production/webapp/default/ROOT] map (uri:/ -> resin-file)
> [12-12-13 03:50:22.654] FINEST com.caucho.server.webapp.ServletContextImpl 
> getResourceAsStream: java.io.FileNotFoundException: 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/
>                               at 
> com.caucho.vfs.JniFilePathImpl.openReadImpl(JniFilePathImpl.java:402)
>                               at com.caucho.vfs.Path.openRead(Path.java:1149)
>                               at 
> com.caucho.server.webapp.ServletContextImpl.getResourceAsStream(ServletContextImpl.java:404)
>                               at 
> com.caucho.rewrite.WelcomeFile.matchWelcomeUri(WelcomeFile.java:207)
>                               at 
> com.caucho.rewrite.WelcomeFile.matchWelcomeFileResource(WelcomeFile.java:150)
>                               at 
> com.caucho.rewrite.WelcomeFile.map(WelcomeFile.java:125)
>                               at 
> com.caucho.server.webapp.WebApp.applyWelcomeFile(WebApp.java:3986)
>                               at 
> com.caucho.server.webapp.WebApp.buildInvocation(WebApp.java:3912)
>                               at 
> com.caucho.server.webapp.WebAppContainer.buildInvocation(WebAppContainer.java:781)
>                               at 
> com.caucho.server.host.Host.buildInvocation(Host.java:752)
>                               at 
> com.caucho.server.host.HostContainer.buildInvocation(HostContainer.java:319)
>                               at 
> com.caucho.server.cluster.ServletService.buildInvocation(ServletService.java:1014)
>                               at 
> com.caucho.server.dispatch.InvocationServer.buildInvocation(InvocationServer.java:247)
>                               at 
> com.caucho.server.dispatch.InvocationServer.buildInvocation(InvocationServer.java:220)
>                               at 
> com.caucho.server.http.AbstractHttpRequest.buildInvocation(AbstractHttpRequest.java:1597)
>                               at 
> com.caucho.server.http.AbstractHttpRequest.getInvocation(AbstractHttpRequest.java:1570)
>                               at 
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:820)
>                               at 
> com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1345)
>                               at 
> com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1301)
>                               at 
> com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1285)
>                               at 
> com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1193)
>                               at 
> com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:992)
>                               at 
> com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
>                               at 
> com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
>                               at 
> com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
>                               at 
> com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
>                               at 
> com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
>                               at 
> com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
>                         
> [12-12-13 03:50:22.655] FINEST com.caucho.server.webapp.WebApp getRealPath: 
> real-path /index.jsp -> 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/index.jsp
> [12-12-13 03:50:22.656] FINEST com.caucho.server.webapp.WebApp getRealPath: 
> real-path /index.php -> 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/index.php
> [12-12-13 03:50:22.656] FINEST com.caucho.server.webapp.WebApp getRealPath: 
> real-path /index.html -> 
> /Users/rmann/Projects/Clients/RedBirdStudios/repo/web/trunk/target/build/index.html
> [12-12-13 03:50:22.658] FINER com.caucho.server.dispatch.ServletInvocation 
> service: Dispatch '/' to AccessLogFilterChain[http://localhost:8080, 
> next=WebAppFilterChain[http://localhost:8080, 
> next=ServletFilterChain[resin-file]]]
> [12-12-13 03:50:22.661] FINEST com.caucho.config.inject.InjectManager 
> resolveRec: InjectManager[web-app:production/webapp/default/ROOT] 
> bind(FileServlet,[@Default()]) -> [ManagedBeanImpl[FileServlet, {@Default(), 
> @Any()}]]
> [12-12-13 03:50:22.665] FINER com.caucho.server.dispatch.ServletConfigImpl 
> createServlet: Servlet[resin-file] active
> [12-12-13 03:50:22.666] FINER com.caucho.server.dispatch.ServletConfigImpl 
> createServlet: Servlet[resin-file] active
> [12-12-13 03:50:22.667] FINEST com.caucho.config.inject.InjectManager 
> resolveRec: InjectManager[web-app:production/webapp/default/ROOT] 
> bind(DirectoryServlet,[@Default()]) -> [ManagedBeanImpl[DirectoryServlet, 
> {@Default(), @Any()}]]
> [12-12-13 03:50:22.669] FINER com.caucho.server.dispatch.ServletConfigImpl 
> createServlet: Servlet[directory] active
> [12-12-13 03:50:22.669] FINER com.caucho.server.dispatch.ServletConfigImpl 
> createServlet: Servlet[directory] active
> [12-12-13 03:50:22.671] FINE com.caucho.server.http.HttpResponse 
> writeHeadersInt: Http[app-0, 1] HTTP/1.1 404 Not Found
> [12-12-13 03:50:22.671] FINE com.caucho.server.http.HttpResponse 
> writeHeadersInt: Http[app-0, 1] Content-Type: text/html; charset=utf-8
> [12-12-13 03:50:22.671] FINE com.caucho.server.http.HttpResponse 
> writeHeadersInt: Http[app-0, 1] Content-Length: 184
> [12-12-13 03:50:22.671] FINER com.caucho.server.http.HttpResponseStream 
> setNextBufferOffsetImpl: Http[app-0, 1] write-set-offset(330)
> [12-12-13 03:50:22.672] FINE com.caucho.server.http.HttpResponseStream 
> closeNextImpl: Http[app-0, 1] finish/keepalive
> [12-12-13 03:50:22.688] FINER com.caucho.db.Database parseQuery: 
> Database[/Library/Resin/current/resin-data/app-0/distcache]: SELECT 
> value_hash,value_data_id,value_length,     cache_id,flags,     
> item_version,server_version,     access_timeout,modified_timeout,     
> access_time,modified_time FROM mnode WHERE id=?
> [12-12-13 03:50:22.689] FINEST com.caucho.db.sql.Query generateWhere: 
> where-1: static null
> [12-12-13 03:50:22.690] FINEST com.caucho.db.sql.Query generateWhere: 
> index-0: FromItem[mnode AS mnode] (mnode.id = ?1)
> [12-12-13 03:50:22.690] FINEST com.caucho.db.sql.Query generateWhere: 
> where-0: FromItem[mnode AS mnode] null
> [12-12-13 03:50:22.691] FINEST com.caucho.server.distcache.MnodeStore load: 
> MnodeStore[app-0] load: no mnode for cache key HashKey[231b7531]
> [12-12-13 03:50:22.692] FINEST com.caucho.server.distcache.MnodeStore load: 
> MnodeStore[app-0] load: no mnode for cache key HashKey[231b7531]
> [12-12-13 03:50:22.693] FINE com.caucho.network.listen.TcpSocketLink 
> threadKeepalive: TcpSocketLink[id=1,app-0]  keepalive (thread)
> [12-12-13 03:51:13.085] FINER com.caucho.network.listen.TcpSocketLink 
> closeConnection: TcpSocketLink[id=1,app-0] closing connection 
> TcpSocketLink[id=http://*:8080-1,http://*:8080,CLOSED], total=5
>
> Near the end there you can see
>
> [12-12-13 03:50:22.658] FINER com.caucho.server.dispatch.ServletInvocation 
> service: Dispatch '/' to AccessLogFilterChain[http://localhost:8080, 
> next=WebAppFilterChain[http://localhost:8080, 
> next=ServletFilterChain[resin-file]]]
>


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to