struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: codebehind problem
Date Mon, 21 Apr 2008 02:29:26 GMT
Are you thinking of the actionPackages init-param ? You use it to
specify where codebehind should search for Action classes. This is the
other side of codebehind where it should automagically map JSP (or
freemarker or velocity templates) to ActionSupport. It's documented in
the section called 'Default Mappings' on the codebehind wiki page - 

http://struts.apache.org/2.x/docs/codebehind-plugin.html

I noticed the problem on a bigger project I was working on (struts2,
sitemesh, spring, acegi) and wasn't sure if my problem was acegi
configuration or something, so I built a small project with simply a
"Hello World" index.jsp and added the codebehind plugin. My
understanding is that I should be able to add the jar to the project and
have automatic, simple mappings for JSPs not requiring anything more
than ActionSupport. 



On Sun, 2008-04-20 at 22:14 -0400, Blake Byrnes wrote:
> Hey Wes,
> I thought you had to setup at minimum a mapping saying where your default
> jsp location is.  I may be wrong though.
> Blake
> 
> On Sun, Apr 20, 2008 at 10:00 PM, Wes Wannemacher <wesw@wantii.com> wrote:
> 
> > I am gonna ask here before filing a JIRA because this is my first foray
> > into using the codebehind plugin. I don't think the
> > CodebehindUnknownHandler is working correctly. If I have a jsp file, but
> > no action mapping (either in XML, or a matching action class for
> > codebehind to find), then shouldn't it get mapped to ActionSupport and
> > served up? If you take the latest from SVN, then create a web-app and
> > add the codebehind plugin as a dependency (using maven), and try to hit
> > a simple JSP, you get the following error -
> >
> > HTTP ERROR: 404
> > Unable to find interceptor class referenced by ref-name defaultStack
> >
> > RequestURI=/bar/index.action
> >
> >
> > Can anyone else confirm this for me before I put it in JIRA?
> >
> > Below is my pom.xml for anyone that wants to try it (although it's
> > trivial to reproduce)
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >  <modelVersion>4.0.0</modelVersion>
> >  <groupId>com.foo</groupId>
> >  <artifactId>bar</artifactId>
> >  <packaging>war</packaging>
> >  <version>0.0.1-SNAPSHOT</version>
> >  <name>bar Maven Webapp</name>
> >  <url>http://maven.apache.org</url>
> >  <dependencies>
> >    <dependency>
> >      <groupId>junit</groupId>
> >      <artifactId>junit</artifactId>
> >      <version>3.8.1</version>
> >      <scope>test</scope>
> >    </dependency>
> >    <dependency>
> >      <groupId>org.apache.struts</groupId>
> >      <artifactId>struts2-codebehind-plugin</artifactId>
> >      <version>2.1.1-SNAPSHOT</version>
> >    </dependency>
> >  </dependencies>
> >  <build>
> >    <finalName>bar</finalName>
> >    <plugins>
> >      <plugin>
> >        <groupId>org.mortbay.jetty</groupId>
> >        <artifactId>maven-jetty-plugin</artifactId>
> >        <version>6.0.1</version>
> >      </plugin>
> >    </plugins>
> >  </build>
> > </project>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message