• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting JspCoreException while using EL

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67745
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic