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
Kontraux la stulteco la dioj mem batalas vane
"Ken A Collins" <FMa...@aol.com> wrote in message
news:3A2D5E0F...@aol.com...
Ken
"Ken Hygh" <ken...@nc.rr.com> wrote in message
news:3A2D68CE...@nc.rr.com...
Ken
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.
> 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
"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.
> > > >
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.
>
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
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.
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
I did not know that. So, do you know where one may get the source code for
JSPServlet so I can fix this problem?
Roberto Leibman wrote:
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
"Daniel J. Long" <lon...@nospam.cat.com> wrote in message
news:3A2E9F5F...@nospam.cat.com...
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.
>
Dan
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