aspose file tools*
The moose likes JSP and the fly likes syntax error in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "syntax error in JSP" Watch "syntax error in JSP" New topic
Author

syntax error in JSP

gouse mohiuddin shaik
Greenhorn

Joined: Aug 13, 2012
Posts: 7
hi i couldn't solve this error for the last 2 days..... please provide the solution to the error......

my jsp code is


the error which i am facing is:


org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 47 in the jsp file: /Login.jsp
Generated servlet error:
Syntax error on token "<", invalid AssignmentOperator

An error occurred at line: 47 in the jsp file: /Login.jsp
Generated servlet error:
Syntax error on token "=", != expected


at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)

[Added code tags and formatted - see UseCodeTags]
Sumit Patil
Ranch Hand

Joined: May 25, 2009
Posts: 296


In this line, you have missed the closing angle bracket (">") for option. Please put it and try.
Thanks

Thanks & Regards, Sumeet
SCJP 1.4, SCWCD 5, LinkedIn Profile
Sumit Patil
Ranch Hand

Joined: May 25, 2009
Posts: 296

And Welcome to the Ranch !!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

You should not be using scriptlets in your JSP page at all! Please read this JspFaq entry.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
gouse mohiuddin shaik
Greenhorn

Joined: Aug 13, 2012
Posts: 7
Sumit Patil wrote:
In this line, you have missed the closing angle bracket (">") for option. Please put it and try.
Thanks




hi sumeet.... thanks for replying but that doesn't seem to be the error. i could still find the same error...... please help..
gouse mohiuddin shaik
Greenhorn

Joined: Aug 13, 2012
Posts: 7
Bear Bibeault wrote:You should not be using scriptlets in your JSP page at all! Please read this JspFaq entry.








hi Bear Bibeault.....

i am new to java and i am just learning it. If i am not suppose to write scriplets in my jsp then how am i going to get the required output.

please do help.
gouse mohiuddin shaik
Greenhorn

Joined: Aug 13, 2012
Posts: 7
i have added closing tag(>) after option i.e. "</option>".

i could still find the same error.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

Modern JSP uses the JSTL (JSP Standard Tag Library) and the EL (Expression Language) in JSP pages. Scriptlets have been obsolete and discredited since 2002.

If you are just starting out and learning about JSP, why are you wasting time learning how to do things the wrong way?
gouse mohiuddin shaik
Greenhorn

Joined: Aug 13, 2012
Posts: 7
Bear Bibeault wrote:Modern JSP uses the JSTL (JSP Standard Tag Library) and the EL (Expression Language) in JSP pages. Scriptlets have been obsolete and discredited since 2002.

If you are just starting out and learning about JSP, why are you wasting time learning how to do things the wrong way?




we were taught the same thing at our institute. so i don't have any other option to get things done.

now how do i rectify my error.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

So let me get this right: you were taught an obsolete way of doing things so you aren't even going to bother trying to learn how to do it right? Is that what you are saying?
gouse mohiuddin shaik
Greenhorn

Joined: Aug 13, 2012
Posts: 7
Bear Bibeault wrote:So let me get this right: you were taught an obsolete way of doing things so you aren't even going to bother trying to learn how to do it right? Is that what you are saying?


not like that. We are to create a web base application by the end of this week so i am actually in hurry. it would be of immense pleasure to me if you can teach me the right way.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

Well as far as properly structuring a web app, this article might be helpful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: syntax error in JSP