Fixing the imports

The major difference between milton1.8 and milton2 is the package names. They moved from com.bradmcevoy and com.ettrema to just io.milton. But the class names themselves have stayed the same and do the same thing. So all you should need to do is remove the old import statements and let your IDE add the new ones.

For example, your old Resource implementation might look like this:

package com.mycompany;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;


import com.bradmcevoy.http.Range;

public class TTempResource extends TResource{

Then you would delete the Range import, do a fix imports, and then it would look like this:

package com.mycompany;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;


import io.milton.http.Range;

public class TTempResource extends TResource{

Next Article:

Replace MiltonServlet with MiltonFilter