• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting JspCoreException while using EL

 
Aravind Jerubandi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to get the JSP file name in my custom tag. So, i'm using the following code to achieve it.



But i'm getting the following error:

[Servlet Error]-[/WEB-INF/pages/auth/Signon.jsp]: com.ibm.ws.jsp.JspCoreException: /WEB-INF/pages/auth/Signon.jsp(29,83) JSPG0055E: Unable to create an xml attribute from name [${pageContext.request.requestURI}] value [/>]
at com.ibm.ws.jsp.translator.document.Jsp2Dom.getJspDocumentAsJspPage(Jsp2Dom.java:300)
at com.ibm.ws.jsp.translator.document.Jsp2Dom.getJspDocument(Jsp2Dom.java:179)
at com.ibm.ws.jsp.translator.JspTranslator.<init>(JspTranslator.java:73)
at com.ibm.ws.jsp.translator.JspTranslatorFactory.createTranslator(JspTranslatorFactory.java:116)
at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:229)
at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:114)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:501)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:428)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:290)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:145)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:286)

But when i try to print the file name as follows, then it prints the file name correctly:



Can some please explain what is wrong in the below code? Any help in this regard would be much appreciated.



(There seems to be no issues with my custom tag, because when i put some random literal string in place of then my tag works fine.)

Also please note in the custom tag; "pageContext.getRequest()" gives me an instance of ServletRequest; so i can not use "pageContext.getRequest().getRequestURI()" in my custom tag.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't use a custom tag as the attribute value of a custom tag. Why are you using <c:out> at all? Just use the EL expression.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!