Uploaded image for project: 'Teeda'
  1. Teeda
  2. TEEDA-211

Content-Typeの設定の制御を変更する([Seasar-user:5567][S2JSF]xhmlについて

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.0.3
    • Component/s: Teeda Core
    • Labels:
      None

      Description

      org.seasar.teeda.core.taglib.core.ViewTagを

      ViewTag
          public int doStartTag() throws JspException {
              final int rc = super.doStartTag();
              final FacesContext context = FacesContext.getCurrentInstance();
              AssertionUtil.assertNotNull("FacesContext", context);
              final String encoding = PageContextUtil
                      .getCharacterEncoding(pageContext);
              pageContext.getResponse().setLocale(context.getViewRoot().getLocale());
              final String acceptContentTypes = WebAppUtil.getAcceptHeader(context);
      // >> 追加
              if( acceptContentTypes != null)
              {
      // <<追加
              final String contentType = ContentTypeUtil
                      .getContentType(acceptContentTypes);
              pageContext.getResponse().setContentType(
                      contentType + "; charset=" + encoding);
      // >> 追加
              }
      // <<追加
      

      とすべきでは、ないでしょうか?
      Acceptが指定されなかった場合は、JSPにお任せし、
      Acceptが指定された場合は、Content-Typeを設定すべきと考えますが、
      どうでしょうか?

        Attachments

          Activity

            People

            • Assignee:
              yone yone
              Reporter:
              yone yone
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: