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 excep

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-23 Thread Dakota Jack
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. Too late. Don't worry about it. What we type in here rarely has mu

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 p

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. Altho

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" a

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. >

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

2005-01-23 Thread Dola Woolfe
are almost > done. > > Doug > > > - Original Message ----- > From: "Frank W. Zammetti" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > > Sent: Sunday, January 23, 2005 1:22 PM > Subject: Re: What is it mean that "Java code does >

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 worth

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

2005-01-23 Thread Parsons Technical Services
ou are almost done. Doug - Original Message - From: "Frank W. Zammetti" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Sunday, January 23, 2005 1:22 PM Subject: Re: What is it mean that "Java code does not belong in well designed JSP pages"? That's a

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 my

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
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 a

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 o

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

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" impor