NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS | Hail Support


Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·REALbasic
·All Categories


Creating a JavaServer Pages Application
Topic: Web   Posted:2004-01-25
Printer Friendly: Print

spacer
In this article we installed Tomcat so that we could serve JavaServer Pages (JSP). JSP is pretty easy to start off with, since you merely add the script parts to regular HTML, much like PHP. For instance, we could call this HTML hellow.jsp:

<html>
<body>
Hello
</body>
</html>

If we browse to our JSP server, we get:



Let's use a little JSP. The JSP stuff lives between <%= and %>. Here is some code:

<html>
<body>
Hello, my name is 
<i>
<%= System.getProperty("os.name")%>
<%= System.getProperty("os.arch")%>
<%= System.getProperty("os.version")%>
</i>
<br />
<br />
I live at <b><%= System.getProperty("java.home")%></b>
</body>
</html>

For more information on System.getProperty, see this page. We put this in /opt/tomcat/webapps/ROOT. When we browse to this page, we see:



Note that this stuff is compiled on the fly using javac. This means that there is a very sophisticated language available to control your web applications. While we are on the whole Java deal, what language besides Java can be used to create web apps, yet can also be used to program a microcontroller natively?




Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 NetAdminTools.com

Created by:
MCJ
MCJ CMS