You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by klopfdreh <gi...@git.apache.org> on 2017/11/03 15:06:44 UTC

[GitHub] wicket pull request #242: WICKET-6490

GitHub user klopfdreh opened a pull request:

    https://github.com/apache/wicket/pull/242

    WICKET-6490

    * Changed resource management

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/klopfdreh/wicket WICKET-6490

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/wicket/pull/242.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #242
    
----
commit ee282c9353d4290dff688fb56143499905591225
Author: Tobias Soloschenko <ts...@sapient.com>
Date:   2017-11-03T15:01:46Z

    WICKET-6490
    
    * Changed resource management

----


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Very nice! 😸  - its working flawless with index.html! πŸ‘ 


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Hi @bitstorm - sure πŸ˜„ - please look at your last commit - there was the external link removed which leads to an issue if the context root is not /


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    πŸ˜„ - okay then I am going to test this and report back. Thanks @bitstorm 


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Hi @bitstorm 
    
    I just adjusted the resources management to also be available for other context roots then for / - when I start the examples using "StartExamples.java" I receive the following error - any idea?:
    
    ```java
    org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. Possible reasons could be that:
    	1) you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered),
    	2) if your components were added in a parent container then make sure the markup for the child container includes them in <wicket:extend>.
    
    1. [Component id = mainNavigation, page = org.apache.wicket.examples.homepage.HomePage, path = mainNavigation, type = org.apache.wicket.markup.html.basic.Label, isVisible = true, isVersioned = true]
    
    	at org.apache.wicket.Page.checkRendering(Page.java:662)
    	at org.apache.wicket.Page.onAfterRender(Page.java:805)
    	at org.apache.wicket.markup.html.WebPage.onAfterRender(WebPage.java:209)
    	at org.apache.wicket.Component.afterRender(Component.java:919)
    	at org.apache.wicket.Component.render(Component.java:2336)
    	at org.apache.wicket.Page.renderPage(Page.java:987)
    	at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
    	at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
    	at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:202)
    	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:912)
    	at org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:65)
    	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:283)
    	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:253)
    	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:221)
    	at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:262)
    	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:204)
    	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:286)
    	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
    	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:206)
    	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
    	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
    	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
    	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
    	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
    	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
    	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
    	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
    	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
    	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
    	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
    	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    	at org.eclipse.jetty.server.Server.handle(Server.java:561)
    	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334)
    	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
    	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
    	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
    	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
    	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
    	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
    	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
    	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
    	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
    	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
    	at java.base/java.lang.Thread.run(Thread.java:844)
    ```


---

[GitHub] wicket issue #242: WICKET-6490

Posted by bitstorm <gi...@git.apache.org>.
Github user bitstorm commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    @klopfdreh could you please close the pr? I've merged your changes.


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Hi @bitstorm ,
    
    ah ok! So my question then would be if there is a way to get the β€žrealβ€œ root path somehow.
    
    thanks a lot for clarification. πŸ‘ 


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    <img width="1106" alt="bildschirmfoto 2017-11-04 um 08 56 39" src="https://user-images.githubusercontent.com/980773/32403623-21b641b6-c13f-11e7-9d83-9434157af58b.png">



---

[GitHub] wicket issue #242: WICKET-6490

Posted by bitstorm <gi...@git.apache.org>.
Github user bitstorm commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Hi @klopfdreh ,
    with your solution I wasn't able to move back to the main page from a single example (clicking on 'weicket examples ' logo). I guess because most of the examples have their own WebApplication class mounted at a given path, so `WebApplication.get().getServletContext().getContextPath()` doesn't return the expected root path.


---

[GitHub] wicket issue #242: WICKET-6490

Posted by bitstorm <gi...@git.apache.org>.
Github user bitstorm commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    For some reason running the examples with Eclipse plug-in (http://eclipse-jetty.github.io/) doesn't throw this exception. From now on I will also use StartExamples.


---

[GitHub] wicket pull request #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh closed the pull request at:

    https://github.com/apache/wicket/pull/242


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Maybe we can use the filter path for the link - WDYT?


---

[GitHub] wicket issue #242: WICKET-6490

Posted by bitstorm <gi...@git.apache.org>.
Github user bitstorm commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    That's the DebugBar. Honestly  even to me It's not very clear who is using it and what its purpose is,but it was already there in the old examples version. We might consider to remove it if it is not used at all.  


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    One little question left - what is this:
    
    ![screen shot 2017-11-07 at 8 46 39 am](https://user-images.githubusercontent.com/980773/32482508-4e6bfe5c-c398-11e7-8b86-707a3218af0d.png)


---

[GitHub] wicket issue #242: WICKET-6490

Posted by bitstorm <gi...@git.apache.org>.
Github user bitstorm commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Filter path can be obtained from Request#getFilterPath(), which under the woods is used buy the current solution where the correct link to homepage (index.html) is resolved by markup filter RelativePathPrefixHandler.


---

[GitHub] wicket issue #242: WICKET-6490

Posted by klopfdreh <gi...@git.apache.org>.
Github user klopfdreh commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    If this is working like the external link I would be ok with it. I just want to achieve the examples working on each context root,


---

[GitHub] wicket issue #242: WICKET-6490

Posted by bitstorm <gi...@git.apache.org>.
Github user bitstorm commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Hi @klopfdreh,
    
    I think we should simply use the code we has so far for examples :stuck_out_tongue:, which is using a simple link like this:
    ` <a href="index.html" ...`



---

[GitHub] wicket issue #242: WICKET-6490

Posted by bitstorm <gi...@git.apache.org>.
Github user bitstorm commented on the issue:

    https://github.com/apache/wicket/pull/242
  
    Your are welcome! 


---