Hi,
I am using this statement exactly in my JSP page. - <%@ page import="java.util.*, java.lang.*" %>
But when i view the equivalent servlet generated, it is like this : - import java.util.*; //[ /hrms/budgetsAndCosts_HRMS.jsp; Line: 1]
-
import java.lang.*; //[ /hrms/budgetsAndCosts_HRMS.jsp; Line: 1]
-
And the second import is always getting to the end of the first import statement so that it is also included as a part of the single line comment '//'. This happens with all the JSP imports.
Could anyone figure out where the problem lies ... Its really urgent.
Many Thanks for any help .
17 8293
what's the problem with the conversion?????
kind regards.
dmjpro.
Hi,
I am using this statement exactly in my JSP page. - <%@ page import="java.util.*, java.lang.*" %>
But when i view the equivalent servlet generated, it is like this : - import java.util.*; //[ /hrms/budgetsAndCosts_HRMS.jsp; Line: 1]
-
import java.lang.*; //[ /hrms/budgetsAndCosts_HRMS.jsp; Line: 1]
-
And the second import is always getting to the end of the first import statement so that it is also included as a part of the single line comment '//'. This happens with all the JSP imports.
Could anyone figure out where the problem lies ... Its really urgent.
Many Thanks for any help .
Are you getting an error then?
what's the problem with the conversion?????
kind regards.
dmjpro.
The second import statement gets to the end of the first one like - import java.util.*; //[ /hrms/budgetsAndCosts_HRMS.jsp; Line: 1]#import java.lang.*; //[ /hrms/budgetsAndCosts_HRMS.jsp; Line: 1]
so that the second one is always commented along with the comment of the first import statement with a special character (shown as a square in my editor)
inserted at the place where you see '#' here. Thus only the class being imported first is being imported and it raises an error when there is a reference to the classes imported second or later .
Hope thats clearer ..
now what 's ur headache with these comment lines???
r u trying to do something which is not due to these unexpected comment lines????
kind regards.
dmjpro.
The second import statement gets to the end of the first one like - import java.util.*; //[ /hrms/budgetsAndCosts_HRMS.jsp; Line: 1]#import java.lang.*; //[ /hrms/budgetsAndCosts_HRMS.jsp; Line: 1]
so that the second one is always commented along with the comment of the first import statement with a special character (shown as a square in my editor)
inserted at the place where you see '#' here. Thus only the class being imported first is being imported and it raises an error when there is a reference to the classes imported second or later .
Hope thats clearer ..
Do you get an error when you run your JSP?
now what 's ur headache with these comment lines???
r u trying to do something which is not due to these unexpected comment lines????
kind regards.
dmjpro.
If this is the import statement in the JSP page, - <%@ import="java.util.Date,java.util.Calendar" %>
the servlet generated shows it like - import java.util.Date; //[ test.jsp; Line: 1]import java.util.Vector; //[ test.jsp; Line: 1]
So, only Date is imported and not the Vector.
The second import is commented after
as - //[ test.jsp; Line: 1]import java.util.Vector; //[ test.jsp; Line: 1]
Do you get an error when you run your JSP?
I get the error when am referring to the class which comes in the second import statement. Since the second import is commented along with the first import's sidenote, its not imported at all..
Thanks for any Help
I get the error when am referring to the class which comes in the second import statement. Since the second import is commented along with the first import's sidenote, its not imported at all..
Thanks for any Help
Which error did you get specifically?
why did not u tell the particualr problem before?????
it does not happen to me.
i m using Oracle Jdeveloper for JSP Editor.
what r u using????
if this happens to u then change it into one packege import instead of more that one packge or class import.
one more thing i want to mention that directly come to the point.... instead of complicating the problem..
and i hope u ll not do that again.
have a good day.
kind regards.
dmjpro.
I get the error when am referring to the class which comes in the second import statement. Since the second import is commented along with the first import's sidenote, its not imported at all..
Thanks for any Help
I suspect it's just an editor problem; my guess is that those lines are just
terminated by a newline '\n' character and your editor chokes on it. If your
JSP runs fine I am right; if it doesn't there's a nasty bug somewhere in your
JSP compiler.
My JSP is more than rusty. Is it allowed to import more than one package
using a comma as a package name separator? Can you import those packages
using separate import statements, one of each package? Does it run then?
kind regards,
Jos
Which error did you get specifically?
cannot resolve symbol
why did not u tell the particualr problem before?????
it does not happen to me.
i m using Oracle Jdeveloper for JSP Editor.
what r u using????
if this happens to u then change it into one packege import instead of more that one packge or class import.
one more thing i want to mention that directly come to the point.... instead of complicating the problem..
and i hope u ll not do that again.
have a good day.
kind regards.
dmjpro.
Very sorry for not being clear ..
After some hours of head break on it found that the error has been due to a missing new keyword somewhere .. Now thats working fine ...
And Thanks a lot your valuable concern.. Am using Editplus trial version and it shows the newline characters as unidentified chars..
I suspect it's just an editor problem; my guess is that those lines are just
terminated by a newline '\n' character and your editor chokes on it. If your
JSP runs fine I am right; if it doesn't there's a nasty bug somewhere in your
JSP compiler.
My JSP is more than rusty. Is it allowed to import more than one package
using a comma as a package name separator? Can you import those packages
using separate import statements, one of each package? Does it run then?
kind regards,
Jos
Your suspicion about my editor is cent percent correct. My editplus trial version shows newlines as squares.. atleast that it shows !!
Regarding the import statement, its always valid to import more than one package using a comma as a package name separator. And as i understand theres hardly any difference between importing watever u want through a single import and importing one through each statement.
Many Thanks for the support ..
Regarding the import statement, its always valid to import more than one package using a comma as a package name separator. And as i understand theres hardly any difference between importing watever u want through a single import and importing one through each statement.
Many Thanks for the support ..
Ok, so we skip the editor for now as a cause (download vim instead!). Do your
JSPs work when you use separate import statements, one for each package?
(note that you never need to import java.lang.*, i.e. it's "self-imported" by javac).
If separate import statements do work, you're most probably facing a bug in
the JSP compiler. Which one are you using and what version?
kind regards,
Jos
Ok, so we skip the editor for now as a cause (download vim instead!). Do your
JSPs work when you use separate import statements, one for each package?
(note that you never need to import java.lang.*, i.e. it's "self-imported" by javac).
If separate import statements do work, you're most probably facing a bug in
the JSP compiler. Which one are you using and what version?
kind regards,
Jos
I think they said the problem is resolved now Jos.
Said it was a missing keyword somewhere and so the problem had nothing to do with the import statements.
I think they said the problem is resolved now Jos.
Said it was a missing keyword somewhere and so the problem had nothing to do with the import statements.
I still consider that a bug in the JSP compiler. If somewhere else a keyword is
missing the imports goof up without a warning or whatever. It once again shows
why I don't like that entire web mess ;-)
kind regards,
Jos
I still consider that a bug in the JSP compiler. If somewhere else a keyword is
missing the imports goof up without a warning or whatever. It once again shows
why I don't like that entire web mess ;-)
kind regards,
Jos
Yeah the generated code should have the import statements right for the final class to be created correctly. Unless there's another file somewhere with the correct code ...
Sign in to post your reply or Sign up for a free account.
Similar topics
by: John Roth |
last post by:
I've found a case where it seems that Python is importing two copies of a
module without any reason or indication. It took me a while to verify that
this is what is occuring: I had to write a...
|
by: Steve Holden |
last post by:
This is even stranger: it makes it if I import the module a second time:
import dbimp as dbimp
import sys
if __name__ == "__main__":
dbimp.install()
#k = sys.modules.keys()
#k.sort()
#for...
|
by: Jon |
last post by:
It appears that (windows) python searches in the current working
directory before looking in the local site-packages directory, or that
'.' comes first in sys.path? The problem arises when I made...
|
by: Panard |
last post by:
Hi,
I'm experiencing a strange problem while trying to manage a ftp connection
into a separate thread.
I'm on linux, python 2.4.3
Here is a test :
------ ftp_thread.py ------
import ftplib...
|
by: robert |
last post by:
I get python crashes and (in better cases) strange Python exceptions when (in most cases) importing and using cookielib lazy on demand in a thread.
It is mainly with cookielib, but remember the...
|
by: Nick Craig-Wood |
last post by:
I've been dumping a database in a python code format (for use with
Python on S60 mobile phone actually) and I've noticed that it uses
absolutely tons of memory as compared to how much the data...
|
by: Victor Lin |
last post by:
Hi,
I got some problem with import. I have some python file that should be
executed. Something like unit-test or other small tool. The project is
not so small. So I want to separate these files...
|
by: Stef Mientki |
last post by:
hello,
The import statement "import sqlite3" gives the error given below.
In simple programs, the import statement (sometimes) succeed,
and I can indeed access the database.
So I guess there is...
|
by: nisp |
last post by:
Hi all !
I'm trying to capture stderr of an external module I use in my python
program. I'm doing this
by setting up a class in my module overwriting the stderr file object
method write.
The...
|
by: Rafe |
last post by:
Hi,
I am in a situation where I feel I am being forced to abandon a clean
module structure in favor of a large single module. If anyone can save
my sanity here I would be forever grateful.
My...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |