You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Robert Carbonari <ro...@opmr.com> on 2000/04/05 21:09:37 UTC

FYI: Orion tutorials

Hello,

This is just an FYI posting.

I recently got a reference from this group regarding building apps with JSP
Tags from the following URL:

http://www.orionserver.com/tutorials/tagtut/lesson1/lesson1.html

I got to work on it right away and quickly discovered that I got more than I
bargained for in terms of troubleshooting work.  It was, nevertheless an
interesting learning experience.

Lesson one dealt with building a "Hello World" application with a jsp using
a custom tag which was to be defined in a .tld file which made some call to
a Java .class file.  

So, I downloaded the whole thing from the orionserver Web site in the form
of some source code files and a Jar file, which I placed in the current
directory with /examples/jsp/hello/hello.jsp  .

Trouble started with some kind of "Malformed URL" exception, so I edited the
jsp file and replaced their

<%@ taglib
uri="http://www.orionserver.com/tutorials/tagtut/lesson1/mytags.jar"
prefix="mt" %>

with my own

<%@ taglib uri="/jsp/hello/mytags.jar" prefix="mt" %>

After that, the application started choking because I couldn't find any
protocol in the taglib.tld file. So I went into their taglib.tld and changed
their

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.1//EN" "web-jsptaglib_1_1.dtd">

for my own

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.1//EN"
 		"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">


But that wasn't the end of it!
Next thing I got was a "Bad Magic Number" error.

So after much searching and wondering why I had decided to take up
programming, I finally got a hunch that I should compile the source code
that Orion provided for me.

I then jarred the whole thing and replaced their jar file with my own and
voila!  My first Hello World app under Jakarta Tomcat.

The experience has left me wondering:  Is it right to make a Web app so
server-specific?  And what's up with their class file, anyway?  I they
hadn't provided the source code, then my application would never have worked
properly.  What could I have done then?  I thought that under Java, any
class file could run under any machine running a JVM.  Doesn't their design
violate this principal?

Well, on to lesson 2 -- a little wiser, but not worse for wear ;-)
----------------------------------------------
Robert Carbonari
Software Developer, Optimal Robotics Corp.
e-mail: robertc@optimal-robotics.com
Tel:     (514) 738-8885 x. 146
----------------------------------------------