Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JSP Compile Error

3 views
Skip to first unread message

Ken A Collins

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to
Hi,

WAS 3.5.0 Standard edition for NT:

I'm a newbie trying to create my first Java servlet which calls a
JavaServer Page but I get a compile error that starts...

com.sun.jsp.JspException: Compilation failed
at javax.servlet.ServletException.(ServletException.java:49)
at com.sun.jsp.JspException.(JspException.java:29)
at com.sun.jsp.compiler.Main.compile(Main.java:347)

...and so on (the error messages go on forever).

I haven't yet begun to set up my own app, I'm using the default_app
environment which has a JSP10 thingy already defined. My servlet is in
the default_app/servlets directory and my JSP sits in default_app/web
and is pure HTML, no Java, about 5 lines of code that just set up
required HTML tags and one line that tells me I got into the file. I've
compared the default_app settings to those of the WebSphere samples
and everything looks right. Any suggestions? I saw a posting from
Anders Monrad suggesting that WAS be brought up to the 3.5.2 level so
that Jaspar JSP compiler could be used because it provides better error
messages. Until that can happen here, I'd like to know what ideas
anyone has.

Thanks in Advance,
Ken A Collins,
a very confused independent consultant


Roberto Leibman

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to
Ken,
This is my biggest gripe with Websphere (are you listening IBM? no, I
thought not!). WebSphere's jspservlet does not display the actual compiled
error on the screen, instead, you have to dig deeply and go see the
/websphere/appserver/logs/default_server_stderr.log file to figure out what
the complier error means.
I have *NO* idea what the developer of this piece of &#*&@(#% was thinking.

--
Roberto Leibman
Kontraux la stulteco la dioj mem batalas vane


"Ken A Collins" <FMa...@aol.com> wrote in message
news:3A2D5E0F...@aol.com...

Ken Hygh

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to
Roberto,
IBM doesn't listen here. Never has, probably won't. That's not what this ng is
for.

Ken

Roberto Leibman

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to
I know, I was just venting. But in my company, if I had a product and
bothered to do an News server (or newsgroup) for that product, you can bet
I'd be reading what people are saying and trying to answer their questions.
Can you imagine how much money they could save on support if they put a
dedicated guy in this group? How many cool ideas they could get for next
release? how many happy customers?
But then again. We are talking about big blue.


"Ken Hygh" <ken...@nc.rr.com> wrote in message
news:3A2D68CE...@nc.rr.com...

Ken Hygh

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
Roberto,
I would do the same, which is why I try to help here though it's not my job.

Ken

Paul Ilechko

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
Roberto,

I don't know how long you've been on here, but IBM killed the n.g. last year
because there were too many people complaining about the product, and getting
bad advice. Those of us at IBM (I'm ex-IBM) who thought the n.g. was important
had to fight pretty hard to get it reinstated.

Al White

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
Roberto Leibman wrote:

> I have *NO* idea what the developer of this piece of &#*&@(#% was thinking.

WebSphere Application Server is not, strictly speaking, a development
environment. Tools like Visual Age for Java are much better for development,
and for things like debugging.

I'm gonna guess that the developer was thinking "Do I write a lot of debugging
code for things that are supposed to be tested before deployment, and degrade
performance at run-time in exchange for saving a few clock cycles in the
development lab? Or should I go out for a pizza and leave the production end as
fast as I can make it?"

I appreciate your frustration. But I also understand why development team
hasn't spent a lot of cycles on error messages and troubleshooting - they are
assuming that the code sent to WAS would have been developed and debuged
elsewhere.

fer what my two cents are worth . . .

Al White

Roberto Leibman

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
I haven't been here that long, and I only plan to keep around as long as I'm
on this websphere project, our next project we'll likely choose weblogic,
jrun or just plain tomcat. But this is an excelent newsgroup to figure out
some of the issues with the product.

Roberto

"Paul Ilechko" <paul.i...@bms.com> wrote in message
news:3A2E3CD9...@bms.com...

> > > > I have *NO* idea what the developer of this piece of &#*&@(#% was
> > thinking.
> > > >

Roberto Leibman

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
I'm not talking extreme debugging support or anything like that. Websphere
is (among other things) a JSP runner, as such, it is the FIRST chance your
code has to find a syntax error, unless you used some other GOOD JSP runner
before deploying to websphere, which would be rather silly. How do YOU
develop JSP?

The case in question would be very simple. Put the output of the compilation
errors to the ServerRequest.out instead of to System.err. Is that so hard to
come up with? No! does that affect performance in any manner whatsoever? No!

I repeat my statement. I don't know what the developer was thinking in this
particular case.

Oh, yeah, and on your statement about leaving the production end as fast as
the developer can make it...that end leaves a lot to be desired as well!!!!
It looks like the guy got some totally undeserved pizza.

Roberto


"Al White" <v2ci...@us.NoSpam.ibm.com> wrote in message
news:3A2E5DB6...@us.NoSpam.ibm.com...


> Roberto Leibman wrote:
>
> > I have *NO* idea what the developer of this piece of &#*&@(#% was
thinking.
>

Matthew Mascari

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
From a security stand point, I would not want any compile error messages
being sent to the web client.

Imagine a page has a small change and is not tested correctly, but
simply deployed (We know this never really happens). If the compile
error messages are simply sent as the output this would expose the jsp
source code to whoever made the request. This of course would not be a
problem because no developer ever put something security sensitive in
source code.

Another JSP Runner for development sounds reasonable since in a
development mode you are not taking advantage of most of the Websphere
advantages. Strictly speaking, an application that simply performed
syntax checking on jsp files would be a nice way to catch most compile
errors.

Matt

Frances Stewart

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
Please note there is a batch compiler in 3.5.2 for .91 and 1.0 (there has been a
.91 batch compiler since 3.02 - check the bin directory and the docs) which may
help with the third paragraph. I also agree with the first and second paragraphs
and feel that there is nothing wrong with the output going to stdout/stderr log
files, it is just a matter of having clear documentation which indicates where to
look for errors when JSPs fail to compile (or when anything running in the
application server does not behave correctly). I am not convinced that this
documentation is missing, but it may be.

Roberto Leibman

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
"Matthew Mascari" <matthew...@yahoo.com> wrote in message
news:3A2E8380...@yahoo.com...

> From a security stand point, I would not want any compile error messages
> being sent to the web client.
>
> Imagine a page has a small change and is not tested correctly, but
> simply deployed (We know this never really happens). If the compile
> error messages are simply sent as the output this would expose the jsp
> source code to whoever made the request. This of course would not be a
> problem because no developer ever put something security sensitive in
> source code.

I doubt that this syllogism went through the developers mind. ALL other
runners that I use (JRUN, weblogic, tomcat) throw the actual results of the
compilation if this one was unsuccessful.

>
> Another JSP Runner for development sounds reasonable since in a
> development mode you are not taking advantage of most of the Websphere
> advantages.

Which are? It's slow as hell, it is poorly documented, it is quirky, it is
hard to configure and a pain in the but to develop for.
Another JSP runner for development is a BAD idea, by any software
engineering standard. One should (in general, and as much as possible)
develop in the same platform to which one is developing, that way many bugs
related to the platform are found within development. The sooner a bug is
found the cheaper it is to fix it, if I had to wait to find non-compliance
issues with the release runner until deployment (or integration testing) the
cost would elevate exponentially.
A better solution would be to have a configurable switch that throws the
results of the compilation into different places.

The fact is that the developers here were stupid, and did things half way.
The error actually says:

Unhandled error! You might want to consider having an error page to
report such errors more gracefully
com.sun.jsp.JspException: Compilation failed
at com.sun.jsp.compiler.Main.compile(Main.java:347)
at com.sun.jsp.runtime.JspLoader.compile(JspLoader.java:86)
at com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:210)

And yet does not explain how to write a custom error page. In fact, as far
as I can tell, there is no way to write a custom page for this particular
error (it's possible to do it for other uncaught exceptions though).

>Strictly speaking, an application that simply performed
> syntax checking on jsp files would be a nice way to catch most compile
> errors.

There is no excuse for the excusing of bad software. The problem in question
is clearly a misfeature.

Paul Ilechko

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
The JSP engine in 3.5.2 is the apache Jasper engine ...

Roberto Leibman wrote:

> I'm not talking extreme debugging support or anything like that. Websphere
> is (among other things) a JSP runner, as such, it is the FIRST chance your
> code has to find a syntax error, unless you used some other GOOD JSP runner
> before deploying to websphere, which would be rather silly. How do YOU
> develop JSP?
>
> The case in question would be very simple. Put the output of the compilation
> errors to the ServerRequest.out instead of to System.err. Is that so hard to
> come up with? No! does that affect performance in any manner whatsoever? No!
>
> I repeat my statement. I don't know what the developer was thinking in this
> particular case.
>
> Oh, yeah, and on your statement about leaving the production end as fast as
> the developer can make it...that end leaves a lot to be desired as well!!!!
> It looks like the guy got some totally undeserved pizza.
>
> Roberto
>

> "Al White" <v2ci...@us.NoSpam.ibm.com> wrote in message
> news:3A2E5DB6...@us.NoSpam.ibm.com...
> > Roberto Leibman wrote:
> >
> > > I have *NO* idea what the developer of this piece of &#*&@(#% was
> thinking.
> >
> > WebSphere Application Server is not, strictly speaking, a development
> > environment. Tools like Visual Age for Java are much better for
> development,
> > and for things like debugging.
> >
> > I'm gonna guess that the developer was thinking "Do I write a lot of
> debugging
> > code for things that are supposed to be tested before deployment, and
> degrade
> > performance at run-time in exchange for saving a few clock cycles in the

> > development lab? Or should I go out for a pizza and leave the production
> end as

Roberto Leibman

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
"Paul Ilechko" <paul.i...@bms.com> wrote in message
news:3A2E9522...@bms.com...

> The JSP engine in 3.5.2 is the apache Jasper engine ...

I did not know that. So, do you know where one may get the source code for
JSPServlet so I can fix this problem?

Frances Stewart

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
The documentation center contains information on creating and using an error
page. I went to
http://www-4.ibm.com/software/webservers/appserv/doc/v35/ae/infocenter/index.html,
clicked on Application Server in the left-hand frame, chose Programming, and
then paged down to the Developing Servlets section, and then saw Enhancing
servlet error reporting. If the Search was working it would be much faster to
just search on "error page", but they do provide a downloadable version of the
doc center which is searchable.

Roberto Leibman wrote:

Daniel J. Long

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
> > And yet does not explain how to write a custom error page. In fact, as far
> > as I can tell, there is no way to write a custom page for this particular
> > error (it's possible to do it for other uncaught exceptions though).

I agree with the previous poster...I have developed a custom error page,
but it
unfortunately (and for what reason I don't know) does not catch a jsp
compile
error but insides gives that totally crappy jsp exception message.
Granted a
user should never see that, but s**t does happen.

Anyone know how to catch that jsp compile error with my custom error
page?

Thanks!
Dan

Roberto Leibman

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
You can't! Unless you rewrite the JSPServlet from scratch. Even if you try
to wrap the JSPServlet, there is no exception thrown, the complier throws
the exception and the JSPServlet catches it and displays it to System.err
before you can do anything.

"Daniel J. Long" <lon...@nospam.cat.com> wrote in message
news:3A2E9F5F...@nospam.cat.com...

Ken A Collins

unread,
Dec 7, 2000, 10:24:12 AM12/7/00
to
Roberto,

Thanks so much for telling me where the errors are logged. I checked that
file and saw a message indicating it didn't seem to like my naming convention
orders-recent.jsp even though Windows NT allows hyphens in file names and the
servlet which calls this JSP didn't get any compile errors. I changed the file
name to orders_recent.jsp and it worked! Whew! What a relief!

By the way, I thought your comments were funny, I laughed out loud! IBM
says they are pumping $600 million into supporting WebSphere developers, but
exactly where that money is going, I don't know. I'm an ex-IBMer who
recommended my client buy WebSphere, and now that I'm outside the company I
realize how difficult it is to figure out WebSphere without documentation or
tech support.

Ken

Roberto Leibman wrote:

> Ken,
> This is my biggest gripe with Websphere (are you listening IBM? no, I
> thought not!). WebSphere's jspservlet does not display the actual compiled
> error on the screen, instead, you have to dig deeply and go see the
> /websphere/appserver/logs/default_server_stderr.log file to figure out what
> the complier error means.

> I have *NO* idea what the developer of this piece of &#*&@(#% was thinking.
>

Daniel J. Long

unread,
Dec 7, 2000, 12:05:44 PM12/7/00
to
I hate to be critical of code I have never seen...but
that seems to be pretty poor decision.

Dan

Bill Hines

unread,
Dec 19, 2000, 10:08:28 AM12/19/00
to
Don't forget to visit the newsgroups for those other products before you
decide to switch - you might find just as many or more complaints. Or you
might find there's no newsgroup. I participate in listservs and monitor
newsgroups and believe me, those products have plenty of flaws and
dissatisfied users!

Let's face it, these products are trying to keep up with the advances in
technology, which are happening at an unbelievable pace. You can't expect
lots of polish in that scenario.

In article <90lt1b$sm8$1...@news.software.ibm.com>, robe...@wirestone.com
says...


> I haven't been here that long, and I only plan to keep around as long as I'm
> on this websphere project, our next project we'll likely choose weblogic,
> jrun or just plain tomcat. But this is an excelent newsgroup to figure out
> some of the issues with the product.
>
> Roberto
>

> "Paul Ilechko" <paul.i...@bms.com> wrote in message

0 new messages