Jules,
Thanks for your reply. I got the application configured, by editing the
jetty.xml file. Here is the entry that I made:
<Call name="addWebApplication">
<Arg>/test/*</Arg>
<Arg><SystemProperty name="jetty.home" default="."/>/webapps/test</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/etc/webdefault.xml</Arg>
<Arg type="boolean">false</Arg> <!-- dont expand war -->
</Call>
My web app has a jsp and a servlet. I can get the directory listing, but
when I try to run the jsp, I get the following error:
HTTP ERROR: 503 Service Unavailable
java.lang.NoClassDefFoundError: sun/tools/javac/Main
RequestURI=/test/Jsp1.jsp
When I try to run the servlet, I get the following:
HTTP ERROR: 404 Not Found
Could not find resource for /servlet1
RequestURI=/servlet1
My web.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>servlet1</servlet-name>
<servlet-class>untitled1.Servlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>servlet1</servlet-name>
<url-pattern>/servlet1</url-pattern>
</servlet-mapping>
</web-app>
Why won't the jsp and servlet run? I'm used to working with Resin, and I
just drop them in and the container compiles them, no special magic needed.
Am I missing something here?
Thanks much,
Brian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Julian
Gosnell
Sent: Monday, July 09, 2001 8:21 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Adding web app to Jetty...pls help.
I've just reread my mail....
Ignore the bit 'should be posted....'. There is a lot of reference to EARS
and
JBoss, so this is completely relevant.
When I started writing it I was only going to talk about the Jetty config
file.
Then I took a step back, thought about EAR files and rethought my answer.
Jules
Julian Gosnell wrote:
> "Brian D. Brown" wrote:
>
> > I have a question which should be simple to answer. I am trying to add
a
> > new web app to jetty, but I don't understand how to do it. Is there
some
> > automated mechanism to deploy the app, or do I have to edit some config
file
> > or something? Please explain how to do this with and without using
virtual
> > hosting.
> >
> > Thanks in advance.
> >
> > Brian
>
> Firstly, this should be posted to [EMAIL PROTECTED] - being a
Jetty
> and not a Jboss question :-), but seeing as it's here, and it's bound to
be
> asked again.....
>
> Is the webapp going to talk to EJBs ?
>
> Yes - stick it in a ear and deploy via JBoss, either by copying it into
> jboss/deploy (a hot-deploy) or via the JMX interface to the J2EEDeployer
> (available on port 8082). The J2EEDeployer must be in charge, otherwise it
> cannot coordinate the deployment of EJBs and WebApp - this means that they
> won't share a common ClassLoader and this means that all calls between
them
> will result in serialisation and will not be optimised down to standard
> function calls.
>
> No - You could still stick it in an ear and deploy it via JBoss, or you
can put
> an entry into Jetty's config file - currently defaults to
> jboss/conf/jetty/jetty.xml - this is the demo config. you need to insert
> another entry that looks like this :
>
> <Call name="addWebApplication">
> <Arg>/jetty/*</Arg>
> <Arg><SystemProperty name="jetty.home"
default="."/>/webapps/jetty</Arg>
> <Arg><SystemProperty name="jetty.home"
> default="."/>/etc/webdefault.xml</Arg>
> <Arg type="boolean">false</Arg>
> </Call>
>
> This translates into the Java :
>
> jetty.addWebApplication("/jetty/*", System.getProperty("jetty.home",
> ".")+"/webapps/jetty", System.getProperty("jetty.home",
> ".")+"/etc/default.xml", false);
>
> the args mean :
>
> 1 - the URL you want the webapp to deploy to - e.g. localhost:8080:/jetty
> 2 - where to find the webapp (in this case a dir, but could be a war -
i.e. end
> in war)
> 3 - where to find the webdefault.xml - default bindings for webapps - just
copy
> this - look in the file if you are interested
> 4 - whether to unpack the webapp (if it is a war) before running it - JSPs
will
> fail to compile if this is set to false and you deploy an archive
>
> If you don't understand XML - then you are taking your life into your
hands
> going this route.
>
> That's as clear as it gets !
>
> Jules
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user