what is in your xpathExpression?

解决方案 »

  1.   

    My xpathExression is "\\Genre\GenreName"In my client application, it's no problemBut it will throw a TransformerException in jspI don't know why ?Could you help me ?
    javax.xml.transform.TransformerException: A location path was expected, but the following token was encountered: \ 
      

  2.   

    sorry对不起,我上面打错了,程序里其实是 //Genre/GenreName的但还是出错报错是location path的问题难道说//Genre/GenreName不对吗?我在本机上运行application可以的但在JSP里就异常搞了半天了
      

  3.   

    something is wrong with your xslt, can you show the xslt?
      

  4.   

    from the error message, it appears that your xpath expression is wrong, but also, 1. before calling XPathAPI.selectNodeIterator, write out both doc and xpathExpression to make sure they are right if you are constructing them dynamically2. make sure the right jar files (if you have multiple versions on the same machine) are on the classpath for JSP engine