org.apache.jasper.JasperException: equal symbol expected

Hi all,
This is my jsp page resultlog.jsp :  (in code 1)

it throws this error : ( in --error page --- )


 posted Today 12:09:07    
Hi all,
This is my jsp page resultlog.jsp :
view plaincopy to clipboardprint?
 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"  
    pageEncoding="ISO-8859-1"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
 
 <%@page import="java.sql.ResultSet"%>  
<%@page import="java.sql.Date"%>  
 
 
<jsp:useBean id="search" class="com.a.bean.searchbean" > 
<jsp:setProperty name="search" property="mon" />  
<jsp:setProperty name="search" property="state" />  
<jsp:setProperty name="search" property="stype" />  
</jsp:useBean>  
<html>  
<head>  
<title>Insert title here</title>  
</head>  
<body>  
 
<%  
 
ResultSet rs =  search.retrieve();  
...// code continues ...  
   

it throws this error :
view plaincopy to clipboardprint?
  org.apache.jasper.JasperException: /resultlog.jsp(6,35) equal symbol expected  
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)  
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)  
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)  
    org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:198)  
    org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:148)  
    org.apache.jasper.compiler.Parser.parsePageDirective(Parser.java:355)  
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:488)  
    org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1930)  
    org.apache.jasper.compiler.Parser.parse(Parser.java:127)  
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)  
    org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:118)  
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171)  
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)  
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)  
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)  
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)  
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)  
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)  
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)  
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)    

I tried putting log statements in com.a.bean.searchbean class' retrieve method. I am sure the command doesn't even reach to searchbean class. any idea ?

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

 <%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Date"%>


<jsp:useBean id="search" class="com.a.bean.searchbean" >
<jsp:setProperty name="search" property="mon" /> 
<jsp:setProperty name="search" property="state" /> 
<jsp:setProperty name="search" property="stype" />
</jsp:useBean>
<html> 
<head>
<title>Insert title here</title>
</head>
<body>

<%

ResultSet rs =  search.retrieve(); 
...// code continues ...
  



---------error----------------

  org.apache.jasper.JasperException: /resultlog.jsp(6,35) equal symbol expected
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
	org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:198)
	org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:148)
	org.apache.jasper.compiler.Parser.parsePageDirective(Parser.java:355)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:488)
	org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1930)
	org.apache.jasper.compiler.Parser.parse(Parser.java:127)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
	org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:118)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

Open in new window

jayz_smithAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cmalakarCommented:
Yes.. the above error very clearly says.. parsing the page directives has got an error.

Try putting

<%@page language="java"  contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

below.. DOCTYPE

0
jayz_smithAuthor Commented:
Nope. didn't go through. Same error
0
cmalakarCommented:
Delete <%@page import="java.sql.Date"%>

Try to open the page..

Then retype.. (dont copy and paste) the same line.. and then try.

0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

jayz_smithAuthor Commented:
Nope. are you serious ? could be this issue ?  deleting and retyping it ? sorry but sounds wiered
0
cmalakarCommented:
Error is coming while compiling the JSP. In that case, System.out.println cannot help.

Above error message shows, while parsing the page attributes, it is getting the error @ line 6, col 35.

Though there is nothing wrong in the line, I was thinking.. if any  non-printable special characters there. which is causing this issue.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rrzCommented:
It is a mystery.
I cut and pasted the code that you posted. I removed the <jsp:useBean> tag.  
After which it compiles without error for me.
Did you try building up your JSP line by line ?  Doing so may reveal some clue as to what is causing the error.
0
jayz_smithAuthor Commented:
Great. It worked. Thanks. But this is something unusual. Strange ! isn't it? what you say ? Though points are yours buddy!
0
jayz_smithAuthor Commented:
Thank you both
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.