You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Stepan Koltsov (JIRA)" <ji...@apache.org> on 2007/02/03 16:41:17 UTC

[jira] Created: (WW-1699) Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing

Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing
---------------------------------------------------------------------------

                 Key: WW-1699
                 URL: https://issues.apache.org/struts/browse/WW-1699
             Project: Struts 2
          Issue Type: Bug
          Components: Tests
    Affects Versions: 2.0.5
            Reporter: Stepan Koltsov
            Priority: Trivial


Index: core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java
===================================================================
--- core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (revision 503218)
+++ core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (working copy)
@@ -158,4 +158,8 @@
     public void setServletInfo(String servletInfo) {
         this.servletInfo = servletInfo;
     }
+    
+    public String getContextPath() {
+       throw new UnsupportedOperationException();
+    }
 }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1699) Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing

Posted by "Stepan Koltsov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40010 ] 

Stepan Koltsov commented on WW-1699:
------------------------------------

If you add this method, this won't break anything.

I tried to build S2 using standard mvn scripts, and seems like I had Servlets 2.5 jars in .m2/repository.

BTW, SHALE-204 is similar problem.

> Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing
> ---------------------------------------------------------------------------
>
>                 Key: WW-1699
>                 URL: https://issues.apache.org/struts/browse/WW-1699
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 2.0.5
>            Reporter: Stepan Koltsov
>            Priority: Trivial
>             Fix For: 2.0.6
>
>
> Index: core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java
> ===================================================================
> --- core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (revision 503218)
> +++ core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (working copy)
> @@ -158,4 +158,8 @@
>      public void setServletInfo(String servletInfo) {
>          this.servletInfo = servletInfo;
>      }
> +    
> +    public String getContextPath() {
> +       throw new UnsupportedOperationException();
> +    }
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-1699) Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Husted updated WW-1699:
---------------------------

    Fix Version/s: 2.0.6

I'm not having any troubling building from source myself. 

Is this a method needed by one of your own tests?


> Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing
> ---------------------------------------------------------------------------
>
>                 Key: WW-1699
>                 URL: https://issues.apache.org/struts/browse/WW-1699
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 2.0.5
>            Reporter: Stepan Koltsov
>            Priority: Trivial
>             Fix For: 2.0.6
>
>
> Index: core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java
> ===================================================================
> --- core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (revision 503218)
> +++ core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (working copy)
> @@ -158,4 +158,8 @@
>      public void setServletInfo(String servletInfo) {
>          this.servletInfo = servletInfo;
>      }
> +    
> +    public String getContextPath() {
> +       throw new UnsupportedOperationException();
> +    }
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1699) Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing

Posted by "Stepan Koltsov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39970 ] 

Stepan Koltsov commented on WW-1699:
------------------------------------

No, this method is declared in Servlet 2.5 ServletContext interface:

http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getContextPath()

> Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing
> ---------------------------------------------------------------------------
>
>                 Key: WW-1699
>                 URL: https://issues.apache.org/struts/browse/WW-1699
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 2.0.5
>            Reporter: Stepan Koltsov
>            Priority: Trivial
>             Fix For: 2.0.6
>
>
> Index: core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java
> ===================================================================
> --- core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (revision 503218)
> +++ core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (working copy)
> @@ -158,4 +158,8 @@
>      public void setServletInfo(String servletInfo) {
>          this.servletInfo = servletInfo;
>      }
> +    
> +    public String getContextPath() {
> +       throw new UnsupportedOperationException();
> +    }
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1699) Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40097 ] 

Ted Husted commented on WW-1699:
--------------------------------

But as far as I can see, it won't fix anything either, since the tests are running fine under Maven 2. 



> Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing
> ---------------------------------------------------------------------------
>
>                 Key: WW-1699
>                 URL: https://issues.apache.org/struts/browse/WW-1699
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 2.0.5
>            Reporter: Stepan Koltsov
>            Priority: Trivial
>             Fix For: 2.0.6
>
>
> Index: core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java
> ===================================================================
> --- core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (revision 503218)
> +++ core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (working copy)
> @@ -158,4 +158,8 @@
>      public void setServletInfo(String servletInfo) {
>          this.servletInfo = servletInfo;
>      }
> +    
> +    public String getContextPath() {
> +       throw new UnsupportedOperationException();
> +    }
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1699) Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40009 ] 

Musachy Barroso commented on WW-1699:
-------------------------------------

S2 is compiled against Servlet Api 2.4, which doesn't have that method:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html

> Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing
> ---------------------------------------------------------------------------
>
>                 Key: WW-1699
>                 URL: https://issues.apache.org/struts/browse/WW-1699
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 2.0.5
>            Reporter: Stepan Koltsov
>            Priority: Trivial
>             Fix For: 2.0.6
>
>
> Index: core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java
> ===================================================================
> --- core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (revision 503218)
> +++ core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (working copy)
> @@ -158,4 +158,8 @@
>      public void setServletInfo(String servletInfo) {
>          this.servletInfo = servletInfo;
>      }
> +    
> +    public String getContextPath() {
> +       throw new UnsupportedOperationException();
> +    }
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-1699) Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing

Posted by "Tom Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Schneider resolved WW-1699.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0
         Assignee: Tom Schneider

I see no reason to not be forward compatible with the J2EE spec as long as it doesn't break our existing spec compatibility.  Thanks for the patch, I've modified it so that we can set the context path if needed for JUnit tests.

> Cannot build from SVN: StrutsMockServletContext.getContextPath() is missing
> ---------------------------------------------------------------------------
>
>                 Key: WW-1699
>                 URL: https://issues.apache.org/struts/browse/WW-1699
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 2.0.5
>            Reporter: Stepan Koltsov
>         Assigned To: Tom Schneider
>            Priority: Trivial
>             Fix For: 2.0.6, 2.1.0
>
>
> Index: core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java
> ===================================================================
> --- core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (revision 503218)
> +++ core/src/test/java/org/apache/struts2/views/jsp/StrutsMockServletContext.java       (working copy)
> @@ -158,4 +158,8 @@
>      public void setServletInfo(String servletInfo) {
>          this.servletInfo = servletInfo;
>      }
> +    
> +    public String getContextPath() {
> +       throw new UnsupportedOperationException();
> +    }
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.