You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wong Kok Wai <wo...@pacific.net.sg> on 2000/06/26 15:14:10 UTC

Struts and ServletExec

I've got the following exception:

[Mon Jun 26 21:06:12 GMT+08:00 2000] ServletExec: servlet action caused
exception - javax.servlet.UnavailableException: Cannot load internal
resources from 'org.apache.struts.action.ActionResources'

Any help?

thanks.



Jakarta site is slow??

Posted by Kevin Duffey <kd...@buymedia.com>.
Whats up with the Jakarta site? Its been extremely slow. I can't even get
the latest struts. It keeps timing out. Its been like this for the past
couple of days. Can anyone email me the latest build if they have it (June
27 version). Thanks.


RE: Building struts

Posted by Scott Ganyo <sc...@etapestry.com>.
Well, I assume that the lack of response means that no one knows why I had
the problem.  That being so, now that I've found the problem I'd thought
share the resolution in case others experience the same thing...

In a nutshell, the build (ant) script assumes that that
jakarta-servletapi/lib directory holds the servlet.jar file.  And, this is
only the case is if the servletapi project was built with the "dist" target.
So, there are two possible resolutions:

1) go ahead and build the servletapi project with the dist option.

2) change the ant build script to do as the other jakarta scripts apparently
do (I say "apparently" because the other scripts work, but I'm no ant
expert) and have the compile use the "../build/servletapi/classes" in the
classpath.

I went with option 1. :)

Scott

> -----Original Message-----
> From: Scott Ganyo [mailto:scott.ganyo@etapestry.com]
> Sent: Tuesday, June 27, 2000 2:34 PM
> To: struts-user@jakarta.apache.org
> Subject: Building struts
>
>
> Sorry.  I hate to pollute the list with this drivel, but I'm
> trying to get struts to build without success.  I've already gone
> through the build process with jakarta-ant, jakarta-servletapi,
> and jakarta-tomcat, but jakarta-struts refuses to build.
>
> The output looks like this:
>
> Buildfile: build.xml
> Project base dir set to: D:\Dev\Java\jakarta-struts
> Executing Target: prepare.library
> Executing Target: compile.library
> [Javac] Compiling 65 source files to
> D:\Dev\Java\build\struts\library\classes
> D:\Dev\Java\jakarta-struts\src\share\org\apache\struts\action\Acti
> on.java:67: cannot resolve symbol
> symbol  : class ServletException
> location: package servlet
> import javax.servlet.ServletException;
>                      ^
> D:\Dev\Java\jakarta-struts\src\share\org\apache\struts\action\Acti
> on.java:68: cannot resolve symbol
> symbol  : class HttpServletRequest
> location: package http
> import javax.servlet.http.HttpServletRequest;
>                           ^
> (...etc...)
>
> So it appears that it can't find the jakarta-servletapi stuff
> that is definitely in the build dir.  (Now, I know I could
> probably(?) just force it onto the classpath, but I want it to
> build correctly without stupid hacks like that.)
>
> Quick fix?
>
> Thanks,
> Scott
>


Building struts

Posted by Scott Ganyo <sc...@etapestry.com>.
Sorry.  I hate to pollute the list with this drivel, but I'm trying to get
struts to build without success.  I've already gone through the build
process with jakarta-ant, jakarta-servletapi, and jakarta-tomcat, but
jakarta-struts refuses to build.

The output looks like this:

Buildfile: build.xml
Project base dir set to: D:\Dev\Java\jakarta-struts
Executing Target: prepare.library
Executing Target: compile.library
[Javac] Compiling 65 source files to
D:\Dev\Java\build\struts\library\classes
D:\Dev\Java\jakarta-struts\src\share\org\apache\struts\action\Action.java:67
: cannot resolve symbol
symbol  : class ServletException
location: package servlet
import javax.servlet.ServletException;
                     ^
D:\Dev\Java\jakarta-struts\src\share\org\apache\struts\action\Action.java:68
: cannot resolve symbol
symbol  : class HttpServletRequest
location: package http
import javax.servlet.http.HttpServletRequest;
                          ^
(...etc...)

So it appears that it can't find the jakarta-servletapi stuff that is
definitely in the build dir.  (Now, I know I could probably(?) just force it
onto the classpath, but I want it to build correctly without stupid hacks
like that.)

Quick fix?

Thanks,
Scott


Re: Struts and ServletExec

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Wong Kok Wai wrote:

> Thanks! I'll give it a try when I'm back to work tomorrow.
>
> bryan davis wrote:
>
> > I too saw this problem while playing with some of the configurations.  You
> > need to put struts.jar into the WEB-INF directory of your web application.
>

Actually it should go in WEB-INF/lib as the documentation points out.

> > You may also have to put struts.jar into your classpath as well depending on
> > your setup and servlet/JSP runner.
> >

If you are running the version of ServletExec that implements the 2.2 spec (i.e.
the newest one), this should never be necessary.  Servlet containers compliant
with 2.2 are supposed to add all JAR files in the WEB-INF/lib directory to the
class path for that application automatically.

>
> > ---
> > Bryan Davis
> >

Craig McClanahan





Re: Struts and ServletExec

Posted by Wong Kok Wai <wo...@pacific.net.sg>.
Thanks! I'll give it a try when I'm back to work tomorrow.

bryan davis wrote:

> I too saw this problem while playing with some of the configurations.  You
> need to put struts.jar into the WEB-INF directory of your web application.
> You may also have to put struts.jar into your classpath as well depending on
> your setup and servlet/JSP runner.
>
> ---
> Bryan Davis
>


Re: Struts and ServletExec

Posted by bryan davis <bd...@emerging.com>.
I too saw this problem while playing with some of the configurations.  You
need to put struts.jar into the WEB-INF directory of your web application.
You may also have to put struts.jar into your classpath as well depending on
your setup and servlet/JSP runner.

---
Bryan Davis

----- Original Message -----
From: "Wong Kok Wai" <wo...@pacific.net.sg>
To: "struts-user" <st...@jakarta.apache.org>
Sent: Monday, June 26, 2000 6:14 AM
Subject: Struts and ServletExec


> I've got the following exception:
>
> [Mon Jun 26 21:06:12 GMT+08:00 2000] ServletExec: servlet action caused
> exception - javax.servlet.UnavailableException: Cannot load internal
> resources from 'org.apache.struts.action.ActionResources'
>
> Any help?
>
> thanks.
>
>