It worked with your addon..
thanks for your help...
a couple of comments:
1. jetty.deploy("http://localhost:9080", task.prerequisites.first)
it doesn't change the port to 9080 (I can't use 8080, it is the default in
the addon)
i had to change the file
/usr/lib/ruby/gems/1.8/gems/buildr-1.4.1/addon/buildr/jetty.rb at line 59 to
use 9080
2. I had to use http://localhost:9080/index.xhtml instead of
http://localhost:9080/index.jsp to make it work.
thanks for your help ;)
Juan Carlos
On Thu, Aug 12, 2010 at 7:18 AM, Antoine Toulme <[email protected]>wrote:
> Juan, I work with Jetty, and I heard bad things about JSPs. It seems there
> are multiple implementations of the standard.
> I see your dependencies contain twice a JSP api jar. I would probably
> contact the Jetty project to get the right jar to use (I know Jetty 7 use
> javax.jsp 2.1 from glassfish).
>
> I am wondering if you could use our own jetty addon ?
> http://github.com/apache/buildr/blob/trunk/addon/buildr/jetty.rb
>
> Thanks,
>
> Antoine
> <http://github.com/apache/buildr/blob/trunk/addon/buildr/jetty.rb>
>
> 2010/8/11 Juan Carlos Méndez <[email protected]>
>
> > I'm trying to run jetty using TestServer but the following error is
> thrown:
> > "JSP support not configured"
> >
> > Any ideas?
> >
> > This is my config:
> >
> > JETTY = [
> > 'org.mortbay.jetty:jetty:jar:6.1.25',
> > 'org.mortbay.jetty:jetty-util:jar:6.1.25',
> > 'org.mortbay.jetty:jsp-2.1-jetty:jar:6.1.25',
> > transitive('org.mortbay.jetty:maven-jetty-plugin:jar:6.1.25'),
> > 'org.mortbay.jetty:maven-jetty-jspc-plugin:jar:6.1.25',
> > 'sun-servlet:jsp-api:jar:2.4',
> > 'javax.servlet:jsp-api:jar:2.0',
> > 'org.apache.ant:ant:jar:1.8.1',
> > 'xerces:xercesImpl:jar:2.9.1',
> > ]
> >
> >
> >
> > task :run => :compile do
> > Java::Commands.java('JettyTestServer',:classpath
> > =>compile.dependencies +
> > [compile.target.to_s]+package(:war).libs+artifacts(JETTY))
> > end
> >
> >
> > ********
> > import org.mortbay.jetty.Server;
> > import org.mortbay.jetty.webapp.WebAppContext;
> > import org.slf4j.Logger;
> > import org.slf4j.LoggerFactory;
> >
> > /**
> > *
> > * @author
> > *
> > */
> > class JettyTestServer {
> >
> > private static final Logger log =
> > LoggerFactory.getLogger(JettyTestServer.class);
> >
> > /**
> > *
> > * @param args
> > */
> > public static void main(String[] args){
> >
> > try {
> > Server server = new Server(9080);
> > WebAppContext webAppContext = new
> > WebAppContext("src/main/webapp", "/mywebapp");
> >
> > String[] configClasses =
> > {"org.mortbay.jetty.webapp.WebInfConfiguration",
> > "org.mortbay.jetty.webapp.WebXmlConfiguration"};
> > webAppContext.setConfigurationClasses(configClasses);
> > server.addHandler(webAppContext);
> > server.start();
> > server.join();
> > } catch (Exception e) {
> > log.error(e.getMessage(), e);
> > }
> >
> > }
> > }
> > *********
> >
> >
> > Juan Carlos
> >
>