Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Anyone doing JSP on X (tomcat) or OS9?

Anyone doing JSP on X (tomcat) or OS9?
Thread Tools
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jun 30, 2001, 09:43 AM
 
Subject says it all.. I'm learnig Java so i can make cross platform probrams (i do windows programming and asp for a living but in my own time i'm a closet unix/mac hacker) and wanted to translate my newfound knowledge to JSP since after looking at it, is better geared for actualy web applictions vs. PHP (which i love).

Any thoughts?
     
Fresh-Faced Recruit
Join Date: Jun 2001
Status: Offline
Reply With Quote
Jun 30, 2001, 02:17 PM
 
Hi Raman,

I've been running a Tomcat server under os 8.x for over a year now. Works well, even with the antiquated mac that I'm using for the webserver. Under os 9, there aren't many backend databases to choose from, I run a java based backend database called hypersonic (available through sourceforge.net).

If you haven't done much with JSP and servlet programming, a book I used to pick up on the technology is called Web Development with JavaServer Pages.

Sean
SacredPaws
     
Grizzled Veteran
Join Date: Oct 2000
Location: Cardiff, Wales
Status: Offline
Reply With Quote
Jul 2, 2001, 05:24 AM
 
I didn't even realise you could run Tomcat on OS 8.x!

Like you, at work I mainly deal in ASP. ASP is a decent technology, but VBScript is a terrible language compared to Java. In my opinion, BASIC should've died a long time ago and Pascal and Java replaced it.

Tomcat is a nice webserver, and I even prefer it to BEA's WebLogic. It doesn't scatter itself around the filesystem like some Unix apps, and the file structure is quite logical. I also figured out how to read/write text-files in Tomcat which I haven't managed to do in WebLogic (it'll create a new file but won't overwrite an existing one..) Sometimes you just don't need a database, but you'll never hear JavaWorld say that!

If I were you I'd get a slim-line JSP book that gives you the basics about JavaBeans and syntax. I've got Wrox's Professional JSP and 90% of it useless to me. The opening chapters, and the 'JSP for ASP developers' section are very good, but the rest is too heavy. I should've learnt that after Professional ASP, so somebody stop me from getting Professional PHP and wasting more cash!

Chris
     
Fresh-Faced Recruit
Join Date: Jun 2001
Status: Offline
Reply With Quote
Jul 2, 2001, 08:42 AM
 
Tomcat is written in Java and the current 3.x releases only require a 1.1.x Java environment. So using JBindery from Apple's MRJ SDK and simply adding the classes that are needed, and looking up the class that needs to be called from the shell scripts, bang a double clickable version of tomcat.

As for databases, no, you don't need them all the time. It can come in handy though. I'd still reccomend at least looking at it, and the JDBC packages for java.

Sean
SacredPaws
     
Raman  (op)
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jul 2, 2001, 06:54 PM
 
Versiontracker came up with nothing when I tried 'tomcat' || 'jsp' || 'java server pages'

Tell me I need to go to apache's website to find it.

Do you have step-by-step instructions on compiling tomcat under OS9.1 using the latest Apple JDK? Specifically which classes/packages I'll need over and above what's included in the JDK?
     
Fresh-Faced Recruit
Join Date: Jun 2001
Status: Offline
Reply With Quote
Jul 3, 2001, 03:27 PM
 
Tomcat is at http://jakarta.apache.org/site/binindex.html the latest stable version is 3.2.2

Using JBindery from Apple's MRJ SDK do the following:

In the COMMAND panel use org.apache.tomcat.startup.Tomcat for the classname

In the CLASSPATH panel add the following with the MANUAL button:
file:///$APPLICATION/lib/ant.jar
file:///$APPLICATION/lib/jasper.jar
file:///$APPLICATION/lib/jaxp.jar
file:///$APPLICATION/lib/parser.jar
file:///$APPLICATION/lib/servlet.jar
file:///$APPLICATION/lib/webserver.jar

In the PROPERTIES panel add
Name: tomcat.home
Value: /$APPLICATION/

Click on the save settings button. Select the save as application checkbox. Save the application to the tomcat folder (which contains the lib, webapps, etc folders.) Give it a name (such as tomcat).

At that point you should have a double clickable tomcat java applicaiton.

So why didn't you find it using version tracker?

<soapbox mode>

Well, technicaly speaking tomcat isn't a mac application, rather its a java application. Java on the macintosh has for the most part been ignored for a long time, since the jvm version wasn't in sync with the rest of the world (unix/M$/etc.). Does that mean that java doesn't exist on the mac? Of course not. It's just historically been under used. With OS X in the picture, you'll probably still draw stares from IT and development folks when you use Macintosh and Java in the same sentence. Of course we know its there, and it works, quite well to boot. So enjoy, spread the word, java and the MacOS work great together, especially if you're using OS X, but none too shabby with earlier OS releases as well.

</soapbox mode>

Sean
SacredPaws
     
Raman  (op)
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jul 22, 2001, 07:25 PM
 
Originally posted by seanrg_2000:
<STRONG>Tomcat is at http://jakarta.apache.org/site/binindex.html the latest stable version is 3.2.2

Using JBindery from Apple's MRJ SDK do the following:

In the COMMAND panel use org.apache.tomcat.startup.Tomcat for the classname

In the CLASSPATH panel add the following with the MANUAL button:
file:///$APPLICATION/lib/ant.jar
file:///$APPLICATION/lib/jasper.jar
file:///$APPLICATION/lib/jaxp.jar
file:///$APPLICATION/lib/parser.jar
file:///$APPLICATION/lib/servlet.jar
file:///$APPLICATION/lib/webserver.jar

In the PROPERTIES panel add
Name: tomcat.home
Value: /$APPLICATION/

Click on the save settings button. Select the save as application checkbox. Save the application to the tomcat folder (which contains the lib, webapps, etc folders.) Give it a name (such as tomcat).

At that point you should have a double clickable tomcat java applicaiton.
</STRONG>
I tried it with 3.2.3 and it didn't work. I even tried "src.org.apache.tomcat.startup.Tomcat" since that was the true path from where my double-clickable app was sitting (in the jakarta-tomcat-3.2.3 folder on my desktop) I verified the locations of the 7 .jar's in the lib folder.

The error was something like "The main class org/apache/tomcat/startup/Tomcat could not be loaded. Either it is not in the classpath or has a static initializer that uses a class not in the classpath."

Same thing when I use "src.org.apache.tomcat.startup.Tomcat"

I can compile simple java applications & applets and run them fine off the destop using javac, jbindery, jar, drop Javac, applet runner

help?
     
Fresh-Faced Recruit
Join Date: Jun 2001
Status: Offline
Reply With Quote
Jul 24, 2001, 07:04 AM
 
Originally posted by Raman:
<STRONG>

I tried it with 3.2.3 and it didn't work. I even tried "src.org.apache.tomcat.startup.Tomcat" since that was the true path from where my double-clickable app was sitting (in the jakarta-tomcat-3.2.3 folder on my desktop) I verified the locations of the 7 .jar's in the lib folder.

The error was something like "The main class org/apache/tomcat/startup/Tomcat could not be loaded. Either it is not in the classpath or has a static initializer that uses a class not in the classpath."

Same thing when I use "src.org.apache.tomcat.startup.Tomcat"

I can compile simple java applications & applets and run them fine off the destop using javac, jbindery, jar, drop Javac, applet runner

help?</STRONG>
Raman,

Just verified that it does work using the instructions I posted. Make sure that you're adding the .jar files from the lib directory. Those are the compiled and compressed java classes for tomcat. The src directory contains the java source code and is bundled with the release simply as a reference.

Sean

SacredPaws
     
Raman  (op)
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jul 25, 2001, 07:21 PM
 
Originally posted by seanrg_2000:
<STRONG>

Raman,

Just verified that it does work using the instructions I posted. Make sure that you're adding the .jar files from the lib directory. Those are the compiled and compressed java classes for tomcat. The src directory contains the java source code and is bundled with the release simply as a reference.

Sean

SacredPaws</STRONG>
I know what I was doing wrong. On the page, I typed in the name/value but DIDN'T PRESS THE ADD BUTTON to make the relationship show in the bottom text box. Works now. You are the $hit!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:41 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2