You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Davidson <MD...@2wire.com> on 2001/02/13 02:10:23 UTC

Struts example doesn't work???

I've seen other people post about this problem, but I really haven't seen a
good answer to why this problem is occurring... I'm hoping someone can
enlighten this poor soul as to what's going on.

I've downloaded the Struts nightly binary build (I've actually tried
several; all do this), and placed the struts.jar file in Tomcat's tree (as
per the instructions).   I've also placed the .war files in the webapps
directory.  Tomcat gets started, sees the .war files and proceeds to unpack
everything.

Problem is... the example app doesn't work.  If you try to go to
http://localhost:8080/struts-example, the system proceeds to do whatever it
needs to do to compile the JSP pages, then throws an error 500:  

Location: /struts-example/index.jsp
Internal Servlet Error:

javax.servlet.ServletException: Missing message for key index.title
	at java.lang.Throwable.(Throwable.java:96)
	at java.lang.Exception.(Exception.java:44)
	at javax.servlet.ServletException.(ServletException.java:161)
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
	at
_0002findex_0002ejspindex_jsp_2._jspService(_0002findex_0002ejspindex_jsp_2.
java:381)

... the rest of the trace is removed to keep this message small.

Re: Struts example doesn't work???

Posted by Maya Muchnik <mm...@pumatech.com>.
I have this error, and a "fix" was very simple: you need to follow the
installation instructions. If you have got a nightly binary build, unjar it.
Under a subdirectory jakarta-struts read README file. Here is some extract from
it and you need to do ONLY this:

- Install the Struts example application by deploying file
  "lib/struts-example.war" into your servlet container, using the standard
  techniques supported by that container.  (For Tomcat, simply copy this
  file to the $TOMCAT_HOME/webapps directory and restart Tomcat).

- Restart Tomcat.

All the rest Tomcat will do automatically for you.


Mark Davidson wrote:

> I've seen other people post about this problem, but I really haven't seen a
> good answer to why this problem is occurring... I'm hoping someone can
> enlighten this poor soul as to what's going on.
>
> I've downloaded the Struts nightly binary build (I've actually tried
> several; all do this), and placed the struts.jar file in Tomcat's tree (as
> per the instructions).   I've also placed the .war files in the webapps
> directory.  Tomcat gets started, sees the .war files and proceeds to unpack
> everything.
>
> Problem is... the example app doesn't work.  If you try to go to
> http://localhost:8080/struts-example, the system proceeds to do whatever it
> needs to do to compile the JSP pages, then throws an error 500:
>
> Location: /struts-example/index.jsp
> Internal Servlet Error:
>
> javax.servlet.ServletException: Missing message for key index.title
>         at java.lang.Throwable.(Throwable.java:96)
>         at java.lang.Exception.(Exception.java:44)
>         at javax.servlet.ServletException.(ServletException.java:161)
>         at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:459)
>         at
> _0002findex_0002ejspindex_jsp_2._jspService(_0002findex_0002ejspindex_jsp_2.
> java:381)
>
> ... the rest of the trace is removed to keep this message small.
>
> >From looking at the code, it seems that the code is having problems loading
> the ApplicationResources.properties file (where the text for index.title
> is).  The file is definitely there, in the org.apache.struts.example tree.
>
> I've seen other postings from people using both Tomcat and Weblogic, and
> having the same problem.  My question is... why?  I know some people have
> suggested unpacking the war file and struts.jar file so they can be in your
> classpath, but I would love to know the reason behind this issue.
>
> Any ideas or suggestions would be greatly appreciated.
>
>                 ---
>                 Mark E. Davidson
>                 mdavidson@2wire.com
>                 Sr. Server Engineer          "The same thing that makes you
> live,
>                 1704 Automation Pkwy          can kill you in the end."
>                 San Jose, CA 95131            -- Neil Young
>                 Phone:  408-503-1085
>                 Fax:    408-503-1185


Re: Struts example doesn't work???

Posted by Ted Husted <ne...@husted.com>.
Mark Davidson wrote:
> I've seen other postings from people using both Tomcat and Weblogic, and
> having the same problem.  My question is... why?  I know some people have
> suggested unpacking the war file and struts.jar file so they can be in your
> classpath, but I would love to know the reason behind this issue.

There are actually two issues:

(1) Running a Struts application from a WAR

(2) Compiling your own Struts application

The containers and development environments have conflicting
requirements, which is the source of a lot of confusion.

The bottom line is that the struts.jar SHOULD NOT be on the classpath
when Tomcat is running.

See < http://husted.com/about/struts/kickstart.html#jar > for more. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/