syntax examples :
# 1 : Deploy a war
java -jar grizzly-servlet-deployer-1.9.11-SNAPSHOT.jar -a c:/temp/hudson.war
the param : -p 8080 is optional. 8080 is the default port
the context will be the war file. In this example :
http://localhost:8080/hudson/ (don't forget to put the trailing / or it
won't work... I filled a bug about that)
#2 - Deploy a war expanded.
java -jar grizzly-servlet-deployer-1.9.11-SNAPSHOT.jar -a c:/temp/hudson
that will give the same result as #1
#3 Deploy a servlet
java -classpath myservlet.jar;.;grizzly-servlet-deployer-1.9.11-SNAPSHOT.jar
com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer -a web.xml
the context will be the default "/"
http://localhost:8080/
but there is a bug here. (need to fix it.. )
if I put that in the web.xml
<servlet-mapping>
<servlet-name>servletA</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
I was expecting :
http://localhost:8080/servlet/ but I got a "Resource
Not Found" (is it a bug in my deployer or in GWS..)
#4 - Deploy multiples war in the same time. This one in tricky. Here what
the folders will look like
c:/temp/MultipleWarFolder/
/freemarker
/WEB-INF
/classes
/lib
/templates
hudson.war
struts2-showcase-2.0.12.war
GWSDeployer will check all the folders in the root and if it find one that
contains /WEB-INF/web.xml it will consider it as #2 (expanded war)
if it find a .war it will do #1 (war file)
and the context will the folder name of the war file name.
here the syntax for #4.. (yes it's the same as #2)
java -jar grizzly-servlet-deployer-1.9.11-SNAPSHOT.jar -a
c:/temp/MultipleWarFolder
there are some limitations..
- we have 1 classloader.. so if you have multiple war that contains the same
librairy but a different version, you will have problem.
- classloader problem : not able to add classes in the classpath (the jars
are fine)
- doesn't support tld so my example here with freemarker and struts won't
load because of that.
- wierd case.. when the file : hudson.war and the folder hudson/ are in the
same folder..
oh ya... when we deploy a war file.. it's deployed in the OS temp folder,
maybe we could pass a param to change that.. or a param to force the war to
be expanded.. could fix the previous issue.
any comments ?
2009/3/24 Survivant 00 <survivant00_at_gmail.com>
> ok. I'll let the refactoring to you.
>
> I'll start the documentation tonight and put some examples too.
>
> 2009/3/24 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>
>
>>
>>
>> Survivant 00 wrote:
>>
>>> I'll explain all that :)
>>>
>>> yes you can delete the module : grizzly-servlet-webserver-deployer
>>>
>>> but what's wierd.. is that I don't see it in the trunk. unless I'm in a
>>> branch and I didn't know that
>>>
>>
>> No I've moved it under bundles/... last week or the week before. Now I
>> will test the new module and we may want to move it from contribs/ to
>> modules/ for a possible integration with http-servlet. We may want to add a
>> new API on ServletAdapter like:
>>
>> deploy( path-to-war-file )
>>
>> and under the hood will configure (the same as you did). We may also want
>> to add a
>>
>> parse (path-to-xml)
>>
>> ...but not before I've fixed the classloader issue you have raised (at
>> least on my side) :-)
>>
>> A+
>>
>> -- Jeanfrancois
>>
>>
>>
>>>
>>> 2009/3/24 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com <mailto:
>>> Jeanfrancois.Arcand_at_sun.com>>
>>>
>>> Salut,
>>>
>>>
>>> Survivant 00 wrote:
>>>
>>> I replace ServletDeployer by GrizzlyWebServerDelpoyer.
>>> /contrib/grizzly-servlet-deployer
>>>
>>>
>>> This version support webapp 2.2, 2.3, 2.4, 2.5 and 3.0
>>>
>>> you can launch webapps by using this command line : java -jar
>>> grizzly-servlet-deployer-xxx.jar -a path/webapp.war
>>>
>>> I'll add more javadoc this week and bog about this. I need to
>>> show all the potential of that thing.
>>>
>>>
>>> This is great! And what is the context-path used by default? The
>>> name of the war file? Will test that. Also, do we still need 2
>>> modules? I guess we can get rid of the other one (this time I ask
>>> :-)).
>>>
>>> A+
>>>
>>> -- Jeanfrancois
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>>> <mailto:dev-unsubscribe_at_grizzly.dev.java.net>
>>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>> <mailto:dev-help_at_grizzly.dev.java.net>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>
>>
>