Eric,

It sounds like you are definitely reaching frustration level. I do not have experience on Mac OS X but I can tell you my WinXP experience. First, I don't use the Sysdeo plug-in; I just start and stop tomcat manually -- I *do* utilize Eclipse's Ant integration to run my builds; this works fine. As far as development, when developing I add the jsp-api.jar and servlet-api.jar to my project's build path; I also reference these jars in my compile path in my Ant script; however, I do not include these jars in my WEB-INF/classes as they are part of Tomcat's system classpath.

As far as my Ant build; I build a War file with the 'dist' target; and then deploy by extracting the WAR into Tomcat's webapps directory. There are other techniques; one popular approach is to point your Tomcat to your application's working development (web) directory; this will let you develop on-the-fly without needing to restart Tomcat.

I suggest you get a simple application working the way you want. Then you can start on your custom tag app.

-Bill Siggelkow

Eric D. Nielsen wrote:
Long post follows... I don't know if its an Eclipse, Tomcat or Struts problem...

I've been trying to get started on Java Web Development using Eclipse, Tomcat, and Struts for the past several weeks. Sometime last week I got both simple JSP's (no custom logic) and the same JSP's using Tiles working. I've been trying to work on my first custom tag. I'm developing on a Mac OS X 10.3 platform.

I had to fiddle a lot for the application wide class path and the project-specific class path to get the jsp-api.jar reachable. Once I got that fixed the base classes were resolve-able and my classes compiled. However, the default build from Eclipse, using the Tomcat project template from the Sysdeo plugin, did not appear to put class files into the correct location for Tomcat to use them (ie not in WEB-INF/classes/<package>/).

I looked at the Eclipse In Action book published by Manning to for how to invoke Ant from inside Eclipse and use the provided build.xml file included in the sample Struts application.

I had to add classpaths to the build.xml to locate servlet-api.jar and jsp-api.jar. Once that was done Ant could compile the files and the directory structure looked correct. I had a typo in the package for my tag handler in the .tld. After I fixed that I started getting:
javax.servlet.ServletExceptions with the root cause as java.lang.NoClassDefFoundError: javax/servlet/Servlet


At which point I started working backward, removing custom components from my JSP's, until it was only the Tiles and static template content, but I got the same errors. I had been restarting Tomcat several times throughout this process from the Sysdeo plugin for Eclipse and didn't see anything suspicious in the log.

I now tried the root web-application (default Tomcat install) and received:
javax.servlet.ServletException: Error allocating a servlet instance org.apache.catalina.values.ErrorReportValue.invoke(ErrorReportValue.java : 105)


At this point I tried stopping and restarting Tomcat from the command-line instead of from within Eclipse. The root application started working.

My development application however now shows 1 of 2 behaviors:
1) Blank page, no content in view source: direct request for a simple complete jsp (only template text, valid HTML) or for the basic template with an <p>Hi</p> as the body. These pages only use the /tags/tiles taglib.


2)
org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.logic.IterateTei
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand ler.java:50)


on any page that includes the /tags/struts-logic taglib.

I'm afraid I've corrupted by install of Tomcat or Struts somehow. I haven't done that much actual development, so re-installing everything is doable, but the amount of cross application configuration is daunting even with the help on-line tutorials and both the Eclipse in Action and Struts in Action books. None of the tutorials indicated either of the problems with adding the jsp-api.jar to the eclipse and/or Ant classpaths nor the configuration required for .classes to end up in /WEB-INF/class. Does anyone know if Mac OS X has serious issues with the "normal" configurations that would be causing those problems? Does anyone know what I did that cased the ServletExceptions near the end of my story or why it can't find struts-logic anymore while it can still find tiles? Any other advice?

Thank you.

Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to