Velocity is a Java-based template engine. It permits web page
designers to reference methods defined in Java code. Web designers
can work in parallel with Java programmers to develop web sites
according to the Model-View-Controller (MVC) model, meaning that web
page designers can focus solely on creating a well-designed site,
and programmers can focus solely on writing top-notch code. Velocity
separates Java code from the web pages, making the web site more
maintainable over the long run and providing a viable alternative to JSPs.
Velocity - Guide
<HTML>
<BODY>
Hello $customer.Name!
<table>
#foreach( $mud in $mudsOnSpecial )
#if ( $customer.hasPurchased($mud) )
<tr>
<td>
$flogger.getPromo( $mud )
</td>
</tr>
#end
#end
</table>
JSP etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
JSP etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
2 Kasım 2012 Cuma
26 Nisan 2012 Perşembe
Creating JSP Web Application in Netbeans
1. In start page, click "Install Plugins".
2. Under Available Plugins, search for "Java Web Applications". Select it.
When you select, it automatically selects its dependencies.
3. Click Install.
4. File > New Project > Web > JSP
5. Name your project as HelloWeb.
6. Click Next. Specify your server location.
I used Tomcat. Set its root directory.
7. Change body as
<body>
<h1>Hello Web !</h1>
</body>
8. Finally, Run index.jsp
2. Under Available Plugins, search for "Java Web Applications". Select it.
When you select, it automatically selects its dependencies.
3. Click Install.
4. File > New Project > Web > JSP
5. Name your project as HelloWeb.
6. Click Next. Specify your server location.
I used Tomcat. Set its root directory.
7. Change body as
<body>
<h1>Hello Web !</h1>
</body>
8. Finally, Run index.jsp