Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-24 Thread Harry Mantheakis
I just read this thread and didn't quite understand it. If it means what it seems to mean on the surface, I'm doing everything wrong. I belong to the camp that thinks Java code in JSPs is evil. I happen to think that tag libraries are wonderful. JSPs are HTML documents that are empowered to

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-24 Thread Dakota Jack
Debugging code in JSPs is very painful. Debugging tag libraries is the same as debugging any ordinary Java object. I pretty much agree with everything Harry says and I do so in spades as they say. You can, as a tip, make debugging JSP easier by putting the whole page in a try/catch exception

What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Dola Woolfe
I just read this thread and didn't quite understand it. If it means what it seems to mean on the surface, I'm doing everything wrong. Schematically, my typical JSP page looks like the following (basically 100% code). Is this what Craig is advising against? %@ page errorPage=ErrorPage.jsp

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Frank W. Zammetti
I certainly wouldn't presume to speak for Craig, so this is just my own answer... Scriplets, that is, code in JSPs inside % %, is generally considered a Bad Thing(tm) because it's too easy for business logic to sneak into the presentation. Now, there is I think room for debate about how far

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread David Johnson
The intent of JSP is that it is primarily HTML with just enough Java to make things work. Ideally, you can hand a JSP to a web designer who is not a programmer and they can make a pretty web page that works. In some shops this works. As a productivity booster, this works in some shops. But in

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Frank W. Zammetti
David Johnson wrote: Using taglibs instead of code adds a level of obfuscation that, IMHO, makes it difficult to get work done. I always end up taking the servlet that was generated from the JSP and rewriting it so it works correctly, performs adequately, and generates no side effects. This has

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Tim Funk
Essentially you have written a servlet but packaged it as a JSP. Anytime it becomes a trivial effort to hand transform a JSP into a servlet usually means some refactoring is in order. Personally I do not mind java code in JSP's but only if its structured. I try not to rely on in-line java code

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Frank W. Zammetti
That's a good point Tim... I have to admit I've only used methods a couple of times in JSPs, generally preferring all the code be inline (except where there would be a lot of duplication, then I tend to make utility classes). You make a good point though, I may start getting into that habit

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Parsons Technical Services
Don't ask to see my code. All I know is it works most of the time. Really, I think it is a matter of circumstance. Each case is different and allows for sway from one extreme to the other. One word of caution to people just learning, is that as you move from company to company expect to

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Dakota Jack
There are lots of reasons why this is not the way to code JSPs, Dola. Let's start with one: REUSABILITY. If I can read between the lines in your code, you are essentially using these classes to write HTML in sort of a Tiles way. This is clearly a good thing and your ideas might be really

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Dola Woolfe
Thank you for the useful responses. I agree with the person (sorry, tough to both type and look up names...) who said that I wrote enough code for it to be a servlet. In fact, I would rather write a servlet! This is because I prefer to work with JBuilder and JBuilder does an OK job aligning and

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Dola Woolfe
On the subject of your hope that this engenders a long can the English be fixed in the subject before this is archived? It's embarrassing. --- Dakota Jack [EMAIL PROTECTED] wrote: There are lots of reasons why this is not the way to code JSPs, Dola. Let's start with one: REUSABILITY. If I

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread QM
I'm quite late to this thread, so I'll stick to answering the one technical question: On Sun, Jan 23, 2005 at 12:03:36PM -0800, Dola Woolfe wrote: : the code changes, the app needs to be restarted. The : project I work with takes 2 min to start up so this is : prohibitive There's a reloadable

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Sean M. Duncan
I work in a shop similar to the one you describe where individuals are forced to fill multiple roles. I'm called upon to implement everything from domain models to navigation menus. However, I find that keeping the Java code that appears in JSP to a minimum helps in this situation as well.

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Michael Echerer
provides. Some logic does belong in JSP. However, the logic that appears within pages should be limited to display logic. I've found that Struts and JSTL are a great combination to accomplish such separation. IMHO this is basically the essence of Java code does no belong in well designed JSP

Re: What is it mean that Java code does not belong in well designed JSP pages?

2005-01-23 Thread Dakota Jack
snip On Sun, 23 Jan 2005 12:09:39 -0800 (PST), Dola Woolfe [EMAIL PROTECTED] wrote: On the subject of your hope that this engenders a long can the English be fixed in the subject before this is archived? It's embarrassing. /snip Too late. Don't worry about it. What we type in here rarely has