You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2001/10/26 16:55:23 UTC

cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java HTTPConstants.java

dims        01/10/26 07:55:23

  Modified:    java     build.xml
               java/src/org/apache/axis/handlers JWSProcessor.java
               java/src/org/apache/axis/resolver/jws JWSResolver.java
               java/src/org/apache/axis/transport/http AxisServlet.java
                        HTTPConstants.java
  Log:
  - axis.jar can be built even if servlet jar file is not found.
  - Please note that you cannot run "functional-tests" if servlet jar is not present as the functional-tests uses SimpleAxisServer which does not get built.
  
  Revision  Changes    Path
  1.70      +3 -1      xml-axis/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/build.xml,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- build.xml	2001/10/26 10:54:09	1.69
  +++ build.xml	2001/10/26 14:55:23	1.70
  @@ -159,8 +159,9 @@
         classpathref="classpath">
         <exclude name="**/old/**/*" />
         <exclude name="**/bak/**"/>
  -      <exclude name="org/apache/axis/handlers/HTTP*" unless="servlet.present"/>
  +      <exclude name="org/apache/axis/handlers/http/*" unless="servlet.present"/>
         <exclude name="org/apache/axis/transport/http/*" unless="servlet.present"/>
  +      <exclude name="org/apache/axis/security/servlet/*" unless="servlet.present"/>
         <exclude name="**/*TestSuite.java" unless="junit.present"/>
       </javac>
       <copy file="${src.dir}/org/apache/axis/server/server-config.xml"
  @@ -228,6 +229,7 @@
         <include name="test/**/*.java" />
         <exclude name="test/inout/*.java" />
         <exclude name="test/import_/**/*.java"/>
  +      <exclude name="test/wsdl/Wsdl2javaTestSuite.java" unless="servlet.present"/>
       </javac>
     </target>
   
  
  
  
  1.24      +3 -6      xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java
  
  Index: JWSProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- JWSProcessor.java	2001/10/17 13:16:36	1.23
  +++ JWSProcessor.java	2001/10/26 14:55:23	1.24
  @@ -67,7 +67,6 @@
   import org.w3c.dom.Element;
   import sun.tools.javac.Main;
   
  -import javax.servlet.http.HttpServlet;
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileOutputStream;
  @@ -330,11 +329,9 @@
           // Just to be safe (the above doesn't seem to return the webapp
           // classpath in all cases), manually do this:
   
  -        HttpServlet servlet = (HttpServlet)msgContext.getProperty(
  -                                         HTTPConstants.MC_HTTP_SERVLET);
  -        if (servlet != null) {
  -            String webBase = servlet.getServletContext().
  -                                                  getRealPath("/WEB-INF");
  +        String webBase = (String)msgContext.getProperty(
  +                                         HTTPConstants.MC_HTTP_SERVLETLOCATION);
  +        if (webBase != null) {
               classpath.append(webBase + File.separatorChar + "classes" +
                                File.pathSeparatorChar);
               try {
  
  
  
  1.3       +2 -5      xml-axis/java/src/org/apache/axis/resolver/jws/JWSResolver.java
  
  Index: JWSResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/resolver/jws/JWSResolver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JWSResolver.java	2001/10/18 14:36:58	1.2
  +++ JWSResolver.java	2001/10/26 14:55:23	1.3
  @@ -8,7 +8,6 @@
   import org.apache.axis.utils.AxisClassLoader;
   import sun.tools.javac.Main;
   
  -import javax.servlet.http.HttpServlet;
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileOutputStream;
  @@ -172,10 +171,8 @@
           // Just to be safe (the above doesn't seem to return the webapp
           // classpath in all cases), manually do this:
   
  -        HttpServlet servlet = (HttpServlet)context.getProperty(HTTPConstants.MC_HTTP_SERVLET);
  -        if (servlet != null) {
  -            String webBase = servlet.getServletContext().
  -                                                  getRealPath("/WEB-INF");
  +        String webBase = (String)context.getProperty(HTTPConstants.MC_HTTP_SERVLETLOCATION);
  +        if (webBase != null) {
               classpath.append(webBase + File.separatorChar + "classes" +
                                File.pathSeparatorChar);
               try {
  
  
  
  1.52      +1 -0      xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- AxisServlet.java	2001/10/05 15:04:05	1.51
  +++ AxisServlet.java	2001/10/26 14:55:23	1.52
  @@ -160,6 +160,7 @@
               msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLET, this );
               msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, req );
               msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, res );
  +            msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETLOCATION, getServletContext().getRealPath("/WEB-INF") );
               msgContext.setProperty(Constants.MC_REMOTE_ADDR, req.getRemoteAddr());
   
               try {
  
  
  
  1.8       +4 -1      xml-axis/java/src/org/apache/axis/transport/http/HTTPConstants.java
  
  Index: HTTPConstants.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPConstants.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HTTPConstants.java	2001/08/29 14:17:17	1.7
  +++ HTTPConstants.java	2001/10/26 14:55:23	1.8
  @@ -108,5 +108,8 @@
       public static String MC_HTTP_SERVLETREQUEST = "transport.http.servletRequest";
       /** HttpServletResponse
        */
  -    public static String MC_HTTP_SERVLETRESPONSE= "transport.http.servletRessponse";
  +    public static String MC_HTTP_SERVLETRESPONSE= "transport.http.servletResponse";
  +    /** HttpServletResponse
  +     */
  +    public static String MC_HTTP_SERVLETLOCATION= "transport.http.servletLocation";
   }
  
  
  

Re: cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java HTTPConstants.java

Posted by Davanum Srinivas <di...@yahoo.com>.
Rob,
Now it should work!!!. I fixed it later yesterday. 

Thanks,
dims

--- Rob Jellinghaus <ro...@unrealities.com> wrote:
> At 02:55 PM 10/26/2001 -0000, dims@apache.org wrote:
> >  - Please note that you cannot run "functional-tests" if servlet jar is not present as the
> functional-tests uses SimpleAxisServer which does not get built.
> 
> This is ironic, since SimpleAxisServer does *not* actually itself depend on servlet.jar!
> 
> Can SimpleAxisServer be put back into the no-servlet.jar build, or does Ant make that painful?
> 
> Cheers,
> Rob
> 
> 


=====
Davanum Srinivas - http://jguru.com/dims/

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Re: cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java HTTPConstants.java

Posted by Rob Jellinghaus <ro...@unrealities.com>.
At 02:55 PM 10/26/2001 -0000, dims@apache.org wrote:
>  - Please note that you cannot run "functional-tests" if servlet jar is not present as the functional-tests uses SimpleAxisServer which does not get built.

This is ironic, since SimpleAxisServer does *not* actually itself depend on servlet.jar!

Can SimpleAxisServer be put back into the no-servlet.jar build, or does Ant make that painful?

Cheers,
Rob