Skip to content

Commit

Permalink
Calculate resource path with servlet context in mind.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpedemonte committed Feb 12, 2013
1 parent 8cf773e commit 1ef8ca1
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -15,6 +15,7 @@
import org.json.JSONObject;
import org.maqetta.server.IDavinciServerConstants;

@SuppressWarnings("restriction")
public class MaqettaProjectDecorator implements IWebResourceDecorator {

/*
Expand All @@ -26,7 +27,7 @@ public class MaqettaProjectDecorator implements IWebResourceDecorator {
*
*/
public void addAtributesFor(HttpServletRequest request, URI resource,JSONObject representation) {
IPath resourcePath = new Path(resource.getPath());
IPath resourcePath = new Path(request.getServletPath() + (request.getPathInfo() == null ? "" : request.getPathInfo()));

if ("/workspace".equals(request.getServletPath()) && resourcePath.segmentCount() == 2) {
try {
Expand Down

0 comments on commit 1ef8ca1

Please sign in to comment.