Prev: Programming Java 3D API Book Recommendation
Next: Apache Tomcat https link goes down but http works
From: pmz on 29 Jul 2010 12:23 On 29 Lip, 17:51, Lew <l...(a)lewscanon.com> wrote: > pmz wrote: > > I've discovered that such enthusiasm was not found by me in the C/C++ > > (or plenty more devlangs) sections of google groups, that's weird, > > isn't it? > > This isn't a "section of Google Groups" (despite that I'm using GG to > post this response right now). Google Groups merely echoes the Usenet > forum, and really isn't even the best way to access the forum. GG > echoes tons of spam and other garbage that other newsgroup servers > filter, and the browser has no capability to filter the spam that does > get through. Google for "newsgroup reader", or use Mozilla > Thunderbird as a minimally acceptable client. You will need to > connect to a newsgroup server - like a mail server but specifically > for news feeds - to get the good experience. Don't be so precise, but I'll think about it - thank you. Anyway, the Google gives me ability to "read and share wherever I am" the usenet. > > > Now I'm pretty sure that I may share any of my problems here and they > > won't stay without an answer. > > Of course you will have to deal with posters like me who reply > enthusiastically but not always kindly, humbly or diplomatically. > Bear in mind that sarcasm or rhetorical tricks don't necessarily > indicate unhelpful responses; sometimes one is cruel to be kind. To > pick one of the most popular examples, the initialism "GIYF", or > "Google Is Your Friend", is dismissive in tone but embodies the > extremely empowering advice to use the search tools available to find > answers rather than ask stupid questions. Build a man a fire and you > warm him for an hour. Set a man on fire and you warm him for the rest > of his life. > > Kidding aside, most of us most of the time mean to help whether or not > we add attitude as a bonus feature. Also, Usenet is a discussion > medium, not a help desk. You usually can get good advice, but much of > the joy comes from the spirited discussion and diversity of opinions > people express. > > -- > Lew True, true and true. I'm not afraid of Google power so at first I look for answers there. Unfortunately, some things are not found, because they are not just syntax or function questions - the ideas and techniques rarely are posted. Nevertheless, I did find some interesting topics, Q&A, FAQ or tutorials, which I read carefully and tried to follow them. As you see, I do not ask for "how do I declare a Object variable?", because such answers are found in each manual website. The sarcasm you've mentioned - believe me, I know what you are talking about and I'm kind of immune for it. All the best, Przemek M. Zawada
From: pmz on 29 Jul 2010 13:18 On 29 Lip, 15:57, Tom Anderson <t...(a)urchin.earth.li> wrote: > On Wed, 28 Jul 2010, pmz wrote: > > I'd like to have ONE default JSP page (which obviously contains a > > webpage main layout - styles, scripts, tables, images, etc.). In few > > places I have some dynamical stuff (such as parameter-regarded menu > > display or also parameter-regarded body display). > > > Shall I use you <c:choose/> method for further inclusion of required > > jsp-sub-pages? > > No. You're doing this all wrong. Or rather, you're doing it all PHP, which > in JSP means wrong. > > Use separate pages for the different pages, and a tag file to define the > common structure: > > http://www.oracle.com/technology/sample_code/tutorials/jsp20/tagfiles... > > A tag file is the analog of a framework method in code; it can write a > load of HTML, but can also invoke fragments passed by the original > invoker. > > For example, given a tag file like this (call it main.tag): > > <%@ attribute name="content" required="true" fragment="true" %> > <html> > <body> > <h1>PMZ's SUPER SITE</h1> > <jsp:invoke fragment="content"/> > </body> > </html> > > You could write a JSP like this: > > <%@ taglib prefix="mytags" tagdir="/WEB-INF/tags" %> > <mytags:main> > <jsp:attribute name="content"> > <p>Some content.</p> > </jsp:attribute> > </mytags:main> > > This would invoke the main.tag to build the page structure, which would > then call down to the fragment defined in the JSP. You can have multiple > fragments, and also use normal content of the tag via <jsp:doBody/>. > > tom > > -- > The art of medicine consists in amusing the patient while nature cures > the disease. -- Voltaire I think I'm getting it now. P.
From: Przemek M. Zawada on 29 Jul 2010 15:10 W dniu 2010-07-28 22:00, markspace pisze: > > In the WEB-INF/web.xml file, you'd bind a pattern to a name, like this: > > <servlet-mapping> > <servlet-name>MainPlugIn</servlet-name> > <url-pattern>/myPlugin</url-pattern> > </servlet-mapping> > > That replaces mod_rewrite, and maps the url pattern after your hostname > to the name MainPlugIn. Now you have to do one more thing to map the > name MainPlugIn to some code. > > <servlet> > <servlet-name>MainPlugIn</servlet-name> > <servlet-class>myplugin/plugin.jsp</servlet-class> > </servlet> > .... > > Also, try reading the servlet specifications, it's are surprisingly > readable. > > <http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html> > > Java EE 6 Tutorial. > > <http://download-llnw.oracle.com/javaee/6/tutorial/doc/> Well, I've tried your method above (this mapping) - seems to work, but I still have some difficulties with web layout. I'm browsing the netbeans tutorials - interesting. P.
From: Przemek M. Zawada on 29 Jul 2010 15:27 Dear Friends, I've finally found what I've been looking for - great thanks to all of you. For future readers, I recommend the NetBeans tutorial, placed here: http://netbeans.org/kb/docs/javaee/ecommerce/page-views-controller.html I assume this topic might be closed for now. Thank you for helping me entering the Java world. All the best, Przemek M. Zawada
From: Arne Vajhøj on 1 Aug 2010 20:11
On 29-07-2010 10:32, Chris Riesbeck wrote: > On 7/28/2010 7:25 PM, Arne Vajh�j wrote: >> With newer versions: >> >> <li><c:out value="${item}" /></li> >> >> can even be written as: >> >> <li>${item}</li> > > c:out will convert HTML special characters to entity code. ${item} by > itself does not. I've been bit by that several times when ${item} was a > string with < in it. True. But I would expect that to only be needed in relative few cases due to input validation rejecting input with <> in. Arne |