Lek Kin Wong wrote:1)how can i use the $path in <%!
Lek Kin Wong wrote:2)how can i print the data from <%!
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sagar Rohankar wrote:
Lek Kin Wong wrote:1)how can i use the $path in <%!
$path is variable in page scope and can be used like normal Java variable access:
Lek Kin Wong wrote:2)how can i print the data from <%!
System.out.println won't work, try printing the data to the page itself, using out.print
by the way, i posted this thread in many forums
Ulf Dittmer wrote:I'm genuinely curious: where do people get the idea of putting Java code into JSP pages? Are there still tutorials out there that advocate this? This has been considered bad design and bad style for at least half a decade. That's what MVC is all about.
Ulf Dittmer wrote:
by the way, i posted this thread in many forums
That being the case, please be aware that we're asking people to BeForthrightWhenCrossPostingToOtherSites. It's the polite thing to do.
Ulf Dittmer wrote:This article should get you started: http://www.javaranch.com/journal/200603/frontman.html
I'd also advise to work through a servlet/JSP introduction like the "Head First Servlets & JSP" book. Once you've become accustomed to bad habits, it's hard to break them.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sagar Rohankar wrote:
Lek Kin Wong wrote:1)how can i use the $path in <%!
$path is variable in page scope and can be used like normal Java variable access:
Lek Kin Wong wrote:2)how can i print the data from <%!
System.out.println won't work, try printing the data to the page itself, using out.print
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sagar Rohankar wrote:public static void main, that's not what JSP are meant for. You really need to go through some JSP/Servlet tutorial. Here is free PDF, http://pdf.coreservlets.com/
Bear Bibeault wrote:So I see that all the good advice to remove the Java code from the JSP is going to be ignored?
Bear Bibeault wrote:Advice #1: NO Java code in JSPs. None. Ever.
Advice #2: See Advice #1.
money grubbing section goes here:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
|