Yes, you're probably right about jspc needing access to the source and/or class files of the beans a JSP page uses in combination with the <jsp:useBean> and <jsp:setProperty> tags (this might be true for some other tags as well).
My point though was that Java syntax errors like typing "fro" instead of "for" are not caught during the translation to a Java source file, but during the compilation of that file with javac. So, I just meant to point out that if a file is successfully translated to a Java file, it doesn't neccessarily compile succesfully, which is what you seemed to imply in your original message. Anyways. However it's done, compiling JSP pages before loading them in the app server would definitely be nice, but only if it can be done without bloating IDEA. Maybe another way of doing this would be making the error highlighting not only 99% javac compatible, which is what IntelliJ seems to be aiming for, but to also make it 99% jspc compatible. This way, JSP pages would not have to be compiled to see compilation errors. Kind of like always-in-sync and on-the-fly JSP compilation without actually running a compiler. Regards. -Thomas > -----Original Message----- > From: Christopher Cobb [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 27, 2001 1:56 PM > To: [EMAIL PROTECTED] > Subject: Re: [Eap-list] Feature Requests > > > If I recall, to even generate the java code requires the > necessary class > file to be present. So if your JSP file uses MyBean, then > MyBean.class must > already exist at the time the JSP file is translated into java. It is > possible that this happens during javac, but I'm pretty sure > that jspc does > at least some of this so it can introspect the objects that > the JPS page > uses. This may not extend to arbitrary java scriptlets in > the JSP file, but > I think it at least extends to the <jsp:useBean> objects. > You may be right > that you have to invoke the javac phase to really be sure > that the file is > completely compilable. > > "Vollmer, Thomas - CannonSA" wrote: > > > cc wrote: > > > As someone mentioned, jspc generates a java file which > then has to be > > > compiled with javac. But if the java file can be > > > successfully generated, that's enough for me. I just want to make > > > sure that the file is syntactically correct, so that when > I do load > > > it into my app server, I know it will compile properly. > > > > I'm no expert on this, but I'm almost certain that a JSP file that > > is successfully translated to a Java file does not necessarily > > compile successfully. I think that's because there are two types > > of errors in JSP pages: > > 1. JSP syntax errors, like a malformed <%@ page...> tag > > 2. Java syntax errors, like "fro(i=0;..." > > > > While Tomcat's jspc (and probably all JSP compilers) checks > > for type 1 errors, I believe it doesn't check for type 2 errors. > > These show up when the Java file is compiled using javac. > > (I'm not sure but I think jspc can automatically call javac.) > > > > Therefore, to achieve what you want, you'd have to actually > > compile the JSP page all the way to a class file. > > > > HTH. > > -Thomas > > > > > -----Original Message----- > > > From: Christopher Cobb [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, November 27, 2001 9:28 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: [Eap-list] Feature Requests > > > > > > > > > I generally don't use ant because it does not provide the > fine-grained > > > file-by-file dependency checking that make does. When > building large > > > projects you generally want to be able to build > > > incrementally, that is, > > > build exactly and no more than is necessary to accommodate > > > the files that > > > have changed. Unfortunately, ant does not support this form > > > of building. > > > > > > I could certainly compile them by hand. In fact, in vi I > > > have a key mapped > > > to 'make' the current file. So if I happen to be editing a > > > JSP file, make > > > (and therefore vi) knows how to handle it. > > > > > > As someone mentioned, jspc generates a java file which > then has to be > > > compiled with javac. But if the java file can be > > > successfully generated, > > > that's enough for me. I just want to make sure that the file is > > > syntactically correct, so that when I do load it into my app > > > server, I know > > > it will compile properly. > > > > > > cc ************************************ If this email is not intended for you, or you are not responsible for the delivery of this message to the addressee, please note that this message may contain ITT Privileged/Proprietary Information. In such a case, you may not copy or deliver this message to anyone. You should destroy this message and kindly notify the sender by reply email. Information contained in this message that does not relate to the business of ITT is neither endorsed by nor attributable to ITT. ************************************ _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list
