top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Tomcat upgrade from 7 to latest 8

0 votes
616 views

I am just trying upgrade tomcat 7 to latest GA 8 for my application, I am seeing quite lots of change in web dav functionality.

The org.apache.naming.resources.ProxyDirContext do not exists do anybody know where I can find the alternative? in the past we got use resource to lookup something but now is not this one, can anybody know any doc?

posted May 14, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

There is a new resources abstraction (and configuration) in Tomcat 8. The old one based on JNDI interfaces (org.apache,naming) is gone.

http://tomcat.apache.org/migration.html

What changes do you mean when you are talking about "web dav"?

answer May 14, 2015 by Sonu Jindal
Similar Questions
+1 vote

I want to access the JNDI Directory context in Tomcat8. I've used DirContextURLStreamHandler class which was in Tomcat 7. But now that has been removed.

Can someone tell me how can I access the JNDI Directory Context in Tomcat 8?

+1 vote

I'm trying to figure out how to get access to the cookies and headers passed up in the Websocket handshake request on Tomcat 8.

In Tomcat 7 the whole HttpServletRequest was passed into the WebSocketServlet. createWebSocketInbound method so it was easy to grab from the request headers. In Tomcat 8 the querystring and URI are both exposed by the javax.websocket.Session passed to ServerEndPoint.onOpen, but I don't see a mechanism for getting the cookies or headers.

We are integrating Websocket connections into an existing web app and want to use the cookies set by our web app in the Websocket connection process.

0 votes

I have a questions regarding the Non Blocking API introduced in Tomcat 8. I'm looking at the TestNonBlockingAPI test as an example, specifically the NBReadServlet class.

@WebServlet(asyncSupported = true)
public class NBReadServlet extends TesterServlet {
 private static final long serialVersionUID = 1L;
 public volatile TestReadListener listener;
 @Override
 protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
 // step 1 - start async
 AsyncContext actx = req.startAsync();
 actx.setTimeout(Long.MAX_VALUE);
 actx.addListener(new AsyncListener() {
 // removed for brevity 
 });
 // step 2 - notify on read
 ServletInputStream in = req.getInputStream();
 listener = new TestReadListener(actx);
 in.setReadListener(listener);

 listener.onDataAvailable();
 }
}

My question is why does the test call "listener.onDataAvailable()" at the end?

In regards to the "onDataAvailable()" method, Section 3.7 of the spec says…

"The onDataAvailable method is invoked on the ReadListener when data is available to read from the incoming request stream. The container will invoke the method the first time when data is available to read. The container will subsequently invoke the onDataAvailable method if and only if isReady method on ServletInputStream, described below, returns false."

...which leads me to believe that the container should be calling onDataAvailable and not the servlet.

As a side note, my test works if I call "onDataAvailable()" from my test servlet. Otherwise it fails and times out.

+1 vote

I'm trying to figure out how I can create custom session cookies. I've found the Manager interface for creating the sessions, but there's nothing about the actual session cookie. I don't see anything in the Valve interface that will let me do this either. Is this possible in Tomcat 7 (or 8?).

...