This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes jsp tags inside javacript creating error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp tags inside javacript creating error" Watch "jsp tags inside javacript creating error" New topic
Author

jsp tags inside javacript creating error

Abdurrahman Khayyat
Greenhorn

Joined: Feb 24, 2010
Posts: 2
Hi everyone..
I have a jsp page, and within the page, some javascript withing the <Script></script> tags.

Withing the js, I want to put in some jsp tags. But I'm getting an error:

An error occurred at line: 1 in the jsp file: /editQuantity.jsp
Type mismatch: cannot convert from int to boolean
1: <%@ page contentType="text/html; charset=UTF-8" import="java.sql.*, java.io.*" %>
2: <html>
3: <head>
4: <title>Enlight Center Library Management System</title>

An error occurred at line: 1 in the jsp file: /editQuantity.jsp
Syntax error on token "<", invalid AssignmentOperator
1: <%@ page contentType="text/html; charset=UTF-8" import="java.sql.*, java.io.*" %>
2: <html>
3: <head>
My code is..




What could possibly be the matter? I know it is THIS block of code which is causing the error, if i remove it, things work fine.

Thanks in Advance!

Srikanth Nalam
Greenhorn

Joined: Feb 23, 2010
Posts: 20
The mistake is in the line



it should be





Thanks & Regards,
Srikanth Nalam.
Abdurrahman Khayyat
Greenhorn

Joined: Feb 24, 2010
Posts: 2
OHHHH!! What a stupid little thing!!

Thank you SO much!! ..........
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please see the JavaRanch naming policy. Please change your display name to conform with this policy. Thanks!

And welcome to JavaRanch!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jsp tags inside javacript creating error
 
Similar Threads
accessing jsp array variable in javascript
error while submitting an http web request
Trying to connect to SQL-2005 with JDBC and JNDI
RC4 Encryption Issue
jquery script not executing on the data values that are extracted from the database