File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error when using session.getAttribute

 
Rakesh Rajmohan
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I get the below error in one machine.. (In the other machine withb same source code & class files it works)

org.apache.jasper.JasperException: /searchStudentDetails.jsp(133,151) Attribute value session.getAttribute("School_id").toString() is quoted with " which must be escaped when used within the value

any ideas plase..?
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you post your code snippet
 
Rakesh Rajmohan
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<td width="23%" height="25" align="left"><html:text property="school_id_code" size="20" styleClass="InputTxt10black" readonly="true" value="<%=session.getAttribute("School_id").toString() %>"/></td>

this is the line where I get the error.. (But the same works on another machine)
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the jsp spec prohibits using nested quotes ..

try using value='<%= expr("") %>'

some containers support the version that is actually not allowed,
check https://issues.apache.org/bugzilla/show_bug.cgi?id=45015
 
Rakesh Rajmohan
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are awesome.. Its works now.. Thanks a million..!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic