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 > jsp or asp on 10.2

jsp or asp on 10.2
Thread Tools
Forum Regular
Join Date: Jun 2003
Status: Offline
Reply With Quote
Jan 20, 2004, 10:01 PM
 
I am ready to learn a server page language, but I don't know which one I should learn first. What is the easiest to do on OS 10.2, jsp or asp with JavaScript or asp.net with C# and what are some good books? From what I hear asp is easier to debug then jsp. I am using Dreamweaver MX for html and it supports jsp, asp with JavaScript and asp.net with C#.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jan 21, 2004, 06:58 AM
 
ASP locks you into IIS, which doesn't run on OSX anyway. Go for JSP instead. Tomcat runs fine on OSX.

Contrary to the marketing statements from a certain company, ASP is not easier than JSP unless you need Windows-specific functionality, which you don't.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status: Offline
Reply With Quote
Jan 21, 2004, 07:43 AM
 
why not try learning php? it's built into osx and is a lot more straightforward to work with for a beginner than jsp.
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jan 21, 2004, 09:39 AM
 
Originally posted by ameat:
why not try learning php? it's built into osx and is a lot more straightforward to work with for a beginner than jsp.
There's nothing wrong with JSP either. It's arguably a lot faster than PHP, and it's a great bridge into learning java.

The main advantage of PHP (to me) is its ubiquity -- there's no trouble finding a hosting company that supports it.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Mac Elite
Join Date: Aug 2000
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Jan 21, 2004, 03:32 PM
 
JSP is a more polished product than PHP. It may have similarities in outcome, but the final product can be elegantly written and constructed with JSP where in PHP you would need a few hacks or at least workarounds for the same functionality.

Mind you, I write almost everything in PHP for my sites. Its being so common is a great plus.

From my reading of JSP/Tomcat, there are persistent object and other items that need workarounds in PHP.

PHP can be used for most things quite well. Its just the things JSP or ASP (ack) can do in addition make all the difference when you want/need those features.

Try out PHP to being with and then see how JSP works for you. The best advice I can give is to stay with opensource or cross-platform solutions that don't lock you down to a specific platform/os.
(Last edited by bluedog; Jan 21, 2004 at 03:39 PM. )
     
Junior Member
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jan 22, 2004, 06:00 AM
 
Originally posted by iStudent 2003:
I am ready to learn a server page language, but I don't know which one I should learn first. What is the easiest to do on OS 10.2, jsp or asp with JavaScript or asp.net with C# and what are some good books? From what I hear asp is easier to debug then jsp. I am using Dreamweaver MX for html and it supports jsp, asp with JavaScript and asp.net with C#.
I've had great success doing JSP development on OS X, using the Tomcat webserver.

Tomcat 5 comes with excellent ant scripts - I can change Java Classes, JSP pages etc, build with ant and see them on my webserver within 3 seconds.

I can then just copy a single WAR file to my Linux webserver and see my code live. Running ASP on anything other than Windows is not realistic.

I've done PHP but didn't see any advantages, and didn't like it at all.. in common with most scripting languages you end up with 'uber scripts' that mix model, controller and view logic.

You can get Tomcat from jakarta.apache.org.

Feel free to e-mail me if you try JSP and get stuck (me@theComputer.com)
Nobody made a greater mistake than
he who did nothing because he could only
do a little. Edmund Burke
     
Forum Regular
Join Date: Jun 2003
Status: Offline
Reply With Quote
Jan 22, 2004, 10:29 AM
 
Thanks everyone, I am going be using JSP!!!! I’ve downloaded and installed Server Logistics Tomcat server, but I am having some problems getting it work. What folder do I put the .jsp pages in to get them to work; and do I have to be using Apache 2 with Tomcat?

http://www.serverlogistics.com/tomcat.php
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jan 22, 2004, 12:00 PM
 
Originally posted by iStudent 2003:
Thanks everyone, I am going be using JSP!!!! I’ve downloaded and installed Server Logistics Tomcat server, but I am having some problems getting it work. What folder do I put the .jsp pages in to get them to work; and do I have to be using Apache 2 with Tomcat?

http://www.serverlogistics.com/tomcat.php
I've never used the server logistics release. However, the one that comes from Apache is the standard, and I know how it works. There should be a "webapps" folder, and in that a ROOT folder. jsp pages that go in there should be interpreted automatically.

Generally, though, you will define your own webapp folder in the xml file and put it in "webapps", then put your code in that. This will also let you deploy as a jar/war file when your app is done.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Grizzled Veteran
Join Date: Oct 2003
Status: Offline
Reply With Quote
Jan 22, 2004, 12:37 PM
 
the tomcat at serverlogistics is the one released by apache I believe. Serverlogisitics doesn't make their own tomcat servers and apache server and mysql servers and php. They just release them in easy to install package installers.

Now that said, the default data and file dirs will probably be different. For example their mySQL package release installs to /Library/MySQL instead of the standard *nix path.
     
Forum Regular
Join Date: Jun 2003
Status: Offline
Reply With Quote
Jan 22, 2004, 09:45 PM
 
I got it working! All I had to do was specify port 8080; I went to my local host address at port 8080 (127.0.0.1:8080) and the jsp page came up! I am SO happy!

Can anyone recommend a good jsp book for beginners, I don't know Java; but I’ve heard that you only need to know Java for servlets and applets.
     
Dedicated MacNNer
Join Date: Oct 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Jan 26, 2004, 04:45 PM
 
You are going to need to know Java to use JSPs. You will need to know Java to execute the logic in the pages if you (by God, dont do this) use JSPs only.

If you're just going to use JSP pages, and not bother w/ servlets, then you might as well dump that and go with PHP. You'll have a easier life.

JSP pages are simply one part of the whole (J2EE) and should simply be the view component of the entire webapp. The logic is handled in Java, and the webapp stuff would be handled/delegated w/ servlets, or using some sort of framework like Struts.

If you're really as new to the whole thing as I think you are, I'd strongly suggest you do one of two things.

1) If you want to make some simple web applications for your own pleasure or just to see how it goes, go and learn PHP, and see how you enjoy it. PHP has OO constructs that can (in a way) help you grok Java better later on.

2) If you really want to do JSP stuff, then you should learn Java first. I can suggest the learning Java 1.4.1 book by Ivor Horton from Wrox Books. You can skip the stuff that covers Swing and other GUI stuff, and focus simply on the basics of GUI-less Java programming, then move on to learning how to use JSP/Servlets etc.. etc.
     
Junior Member
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jan 27, 2004, 04:05 AM
 
My preferred setup is to have a structure like this;

project/src
project/web/jsp
project/build

I put Java source code into src, and JSP pages into web/jsp. Tomcat 5 comes with ant build scripts that will quickly package your code and deploy it into tomcat as a single .war file.

Once you've got things set up you can just type 'ant' at the command line and your project will be built and deployed. You then browse to localhost:8080/projectname to view it.

I blogged a couple of introduction bits about J2EE a while ago;

J2EE Intro - Overview

I also did a more detailed example of really simple JSP/Servlet setup.

Simple JSP/Servlet Code

It might seem like a bit of work installing ant and tomcat, and configuring them but its worth it.

You don't need apache to use tomcat, they can run on different ports.
Nobody made a greater mistake than
he who did nothing because he could only
do a little. Edmund Burke
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jan 27, 2004, 08:42 AM
 
Some mention of J2EE has been made. For 99% of the Java-based web apps out there, J2EE is serious overkill. You'll be much happier with Java Servlets for the model and controller and either JSP or Velocity templates for the view.


Velocity templates are a lot simpler that JSP or PHP and truly enforce a separation between the data model and controller from the view (the web page). You can learn more about Velocity here: http://jakarta.apache.org/velocity/
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Dedicated MacNNer
Join Date: Oct 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Jan 27, 2004, 08:50 AM
 
JSP/Servlets ARE part of J2EE. So is JMX, JMS, etc, and of course EJBs.

The common misconception of J2EE is that you have to use EJBs, and you have to use everything under the J2EE umbrella to be using 'J2EE'. J2EE is just simply an API of various technologies to faciliate enterprise webapp development, and there's no contract in there that mandates you use everything.

So if someone develops with JSP/Servlets, they are in fact, doing devlopment w/ J2EE.
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jan 27, 2004, 09:06 AM
 
Originally posted by timster:
JSP/Servlets ARE part of J2EE. So is JMX, JMS, etc, and of course EJBs.

So if someone develops with JSP/Servlets, they are in fact, doing devlopment w/ J2EE.
Well, that is technically true, but if you specify J2EE I expect you mean that you used some features specific to J2EE. That includes BMP, CMP 2, Entity Beans, Session Beans (stateful and stateless), local, remote, and home interfaces, JMS queues, JSP, servlets, and probably a MVC abstraction layer like Struts.

Servlets and JSP predated J2EE, so I don't really consider them J2EE in and of themselves. You're right though, that they are a part of the J2EE standard.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
   
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:52 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