2

I've just discovered this way to output things on php templates:

<body>
  my name is
  <?= $params['name'] ?>
  ...

That should be equal to:

<body>
  my name is
  <?php echo $params['name'] ?>
  ...

It's a very cool and clean syntax, but my question is: is legit? Or is deprecated?


xmlInputFactory.createXMLStreamReader giving null on Weblogic

I am trying to create some xml content in my web application. For that i have used JAXB.

JAXBContext jaxbContext = JAXBContext.newInstance(QueryRequest.class);

        XMLInputFactory xif = XMLInputFactory.newInstance();
        xif.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false);
        StreamSource source = new StreamSource(new ByteArrayInputStream(
                queryRequestXml.getBytes()));

        XMLStreamReader xsr = xif.createXMLStreamReader(source);

        Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();

        QueryRequest queryRequest = (QueryRequest) jaxbUnmarshaller
                .unmarshal(xsr);

The problem i am facing is that in JBOSS,Tomcat it works fine.But as soon as i move my application to Weblogic i get xif.createXMLStreamReader(source); as null.

Any idea on how to get this fixed.

4

1 回答 1

3

是的,使用它是合法的,但有时短标签未启用。

要在它们关闭时打开它们,您可以执行以下操作:

  1. 转到 php.ini 文件

  2. 找到“short_open_tag”并将其设置为打开,

  3. 重启服务器

于 2013-10-21T09:01:21.323 回答