1 2 3 Previous Next 38 Replies Latest reply on Feb 17, 2005 6:50 AM by arturasb Go to original post
      • 30. Re: Trouble - hadcoded MIME type and restrictions

        no, the metadata parser must have an issue. could you correct it if you can and issue a JIRA bug report which the patch ? or just a bug report if you cannot fix it.

        thanks

        • 31. Re: Trouble - hadcoded MIME type and restrictions
          arturasb

           

          "julien@jboss.com" wrote:
          no, the metadata parser must have an issue. could you correct it if you can and issue a JIRA bug report which the patch ? or just a bug report if you cannot fix it.

          thanks


          Hmmm.....
          I am wondering - how must the section be organized?

          <supports>
           <mime-type>text/html</mime-type>
           <mime-type>text/vnd.wap.wml</mime-type>
           <portlet-mode>VIEW</portlet-mode>
           <portlet-mode>HELP</portlet-mode>
           </supports>


          or

          <supports>
           <mime-type>text/html</mime-type>
           <portlet-mode>VIEW</portlet-mode>
           <portlet-mode>HELP</portlet-mode>
           </supports>
           <supports>
           <mime-type>text/vnd.wap.wml</mime-type>
           <portlet-mode>VIEW</portlet-mode>
           <portlet-mode>HELP</portlet-mode>
           </supports>
          


          What does the standard say ?

          • 32. Re: Trouble - hadcoded MIME type and restrictions

            secon choice afair... look at the spec

            • 33. Re: Trouble - hadcoded MIME type and restrictions
              arturasb

              Hi.

              "julien@jboss.com" wrote:
              secon choice afair... look at the spec


              Well, I specified 2 mime types supported as in the 2nd example, but
              I have no content type set even I change the order of interceptors like this:

              <jboss>
               <container-configuration>
               <interceptors>
               <interceptor>
               <interceptor-class>org.jboss.portal.core.invocation.UserContextInterceptor</interceptor-class>
               </interceptor>
               <interceptor>
               <interceptor-class>org.jboss.portal.core.invocation.ContentTypeInterceptor</interceptor-class>
               </interceptor>
               <interceptor>
               <interceptor-class>org.jboss.portal.core.invocation.ViewInterceptor</interceptor-class>
               </interceptor>
               <interceptor>
               <interceptor-class>org.jboss.portal.server.invocation.portal.MainDispatcherInterceptor</interceptor-class>
               </interceptor>
               </interceptors>
               </container-configuration>
              </jboss>


              Then if I call getContentType on the request I get the "null" value. It is very strange since the ContentTypeInterceptor was invoked before and the MIME type was set to the correct one....

              And one more thing - I have found this in the org.jboss.portal.server.invocation.portal packege:
              public class ContentTypeInterceptor
               implements Interceptor
              {
               public Object invoke(Invocation invocation)
               {
               String contentType = "text/html";
               PortalResponse response = (PortalResponse)invocation.getAttachment(AttachmentKey.PORTAL_RESPONSE);
               response.setContentType(contentType);
               return invocation.invokeNext();
               }
              }


              Can this be some how related to the "null content type" problem ?

              Regards,
              Arturas

              • 34. Re: Trouble - hadcoded MIME type and restrictions

                well surprinsingly I had this issue too so I ended up overriding getContentType/setContentType in portal response.

                perhaps you dont have the latest code, could you check it ? look at PortalResponseImp code here : http://cvs.sourceforge.net/viewcvs.py/jboss/jboss-portal/server/src/main/org/jboss/portal/server/impl/invocation/PortalResponseImpl.java?rev=1.4&view=markup

                • 35. Re: Trouble - hadcoded MIME type and restrictions
                  arturasb

                   

                  "julien@jboss.com" wrote:
                  well surprinsingly I had this issue too so I ended up overriding getContentType/setContentType in portal response.

                  perhaps you dont have the latest code, could you check it ? look at PortalResponseImp code here : http://cvs.sourceforge.net/viewcvs.py/jboss/jboss-portal/server/src/main/org/jboss/portal/server/impl/invocation/PortalResponseImpl.java?rev=1.4&view=markup


                  I have downloaded PortalResponseImpl.java and I'm facing 2 problems now:

                  1. Error The operator != is undefined for the argument type(s) boolean, null PortalResponseImpl.java jboss-portal-2.0/server/src/main/org/jboss/portal/server/impl/invocation line 49 in PortalResponseImpl.encodePortalURL(ServerURL)

                  2. Error Cannot invoke booleanValue() on the primitive type boolean PortalResponseImpl.java jboss-portal-2.0/server/src/main/org/jboss/portal/server/impl/invocation line 51 in PortalResponseImpl.encodePortalURL(ServerURL)

                  Shall I get more files ?

                  • 36. Re: Trouble - hadcoded MIME type and restrictions
                    arturasb

                     

                    I have downloaded PortalResponseImpl.java and I'm facing 2 problems now:

                    1. Error The operator != is undefined for the argument type(s) boolean, null PortalResponseImpl.java jboss-portal-2.0/server/src/main/org/jboss/portal/server/impl/invocation line 49 in PortalResponseImpl.encodePortalURL(ServerURL)

                    2. Error Cannot invoke booleanValue() on the primitive type boolean PortalResponseImpl.java jboss-portal-2.0/server/src/main/org/jboss/portal/server/impl/invocation line 51 in PortalResponseImpl.encodePortalURL(ServerURL)

                    Shall I get more files ?


                    Well, it seems I need to get the latest'n'greatest, but I'll be able to do that at home only...

                    Julien, what's about nighty builds ? Are they available already ?

                    • 37. Re: Trouble - hadcoded MIME type and restrictions

                      keep your old version and just add the get/set content type so that will work.

                      no nightly builds are not available yet. could you add a JIRA task for it ?

                      • 38. Re: Trouble - hadcoded MIME type and restrictions
                        arturasb

                         

                        keep your old version and just add the get/set content type so that will work.


                        OK, thanks.

                        no nightly builds are not available yet. could you add a JIRA task for it ?


                        Could you provide me with a brief instruction on how to do that ;) ?
                        I have never done this before.

                        1 2 3 Previous Next