Please use u...@camel.apache.org to ask this kind of question. dev is used to discuss the development issue of camel.
-- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On December 20, 2013 at 11:21:16 AM, yudiao123 (417726...@qq.com) wrote: > > I do as below,I can get sessionId of the request,but I cant not > get the > context of request,also I can not get the header of the request.Is > there any > way to get the context of the session,or the header of the request? > Thank > you very much. > > > uri="jetty://http://192.168.0.154:8181/mymanager/?matchOnUriPrefix=true"/> > > > uri="http://192.168.0.156:8181/mymanager/?bridgeEndpoint=true&throwExceptionOnFailure=false" > > > /> > > > > > ${header.sessionId} == '0' > > > "http://192.168.0.154:8181/uiserver/index.jsp" > > > uri="ahc://http://192.168.0.154:8181/uiserver/index.jsp" > /> > > > > uri="http://192.168.0.156:8181/mymanager/?bridgeEndpoint=true&throwExceptionOnFailure=false" > > > /> > > > > > > > > > public void process(Exchange exchange) throws Exception { > String sessionId = > exchange.getIn(HttpMessage.class).getRequest().getRequestedSessionId(); > String contextPath = > exchange.getIn(HttpMessage.class).getRequest().getContextPath(); > if (null==sessionId) > { > exchange.getIn().setHeader("sessionId", "0"); > exchange.getIn().setHeader("path", contextPath); > } > else > { > exchange.getIn().setHeader("sessionId", sessionId);; > } > } > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/can-camel-get-the-context-of-session-the-request-or-the-context-of-header-of-the-reques-tp5745080.html > > Sent from the Camel Development mailing list archive at Nabble.com. >