What's the simplest, most straightforward, servlet container for
testing and developing servlets on Linux? I'd prefer one that doesn't
require a lot of setup, and will run on older versions of Linux.
|
|
0
|
|
|
|
Reply
|
rossclement (79)
|
9/2/2009 3:52:49 PM |
|
Ross wrote:
> What's the simplest, most straightforward, servlet container for
> testing and developing servlets on Linux? I'd prefer one that doesn't
> require a lot of setup, and will run on older versions of Linux.
Apache Tomcat.
--
Lew
|
|
0
|
|
|
|
Reply
|
lew (2143)
|
9/2/2009 4:24:47 PM
|
|
Lew wrote:
> Ross wrote:
>> What's the simplest, most straightforward, servlet container for
>> testing and developing servlets on Linux? I'd prefer one that
>> doesn't
>> require a lot of setup, and will run on older versions of Linux.
>
What Lew said. It's tivial to install (just unzip it), and simple to
administer: you can either use the browser-based GUI to install and
remove apps, or, alternatively, you can kill it, add and delete war
files to its webapp directory, and restart it..
|
|
0
|
|
|
|
Reply
|
mscottschilling (1976)
|
9/2/2009 4:57:43 PM
|
|
Mike Schilling wrote:
> [Tomcat]'s tivial to install (just unzip it), and simple to
> administer: you can either use the browser-based GUI to install and
> remove apps, or, alternatively, you can kill it, add and delete war
> files to its webapp directory, and restart it..
You can also configure Tomcat to autodeploy updated WARs without
having to bounce the server, by setting the Host autoDeploy attribute
in the server.xml.
--
Lew
|
|
0
|
|
|
|
Reply
|
lew (2143)
|
9/2/2009 5:22:58 PM
|
|
On Wed, 2 Sep 2009, Lew wrote:
> Ross wrote:
>> What's the simplest, most straightforward, servlet container for
>> testing and developing servlets on Linux? I'd prefer one that doesn't
>> require a lot of setup, and will run on older versions of Linux.
>
> Apache Tomcat.
Or Jetty. It's also a case of unzip, run, copy files to deploy directory.
tom
--
Links are content.
|
|
0
|
|
|
|
Reply
|
twic (2083)
|
9/2/2009 7:56:42 PM
|
|
Lew wrote:
> Mike Schilling wrote:
>> [Tomcat]'s tivial to install (just unzip it), and simple to
>> administer: you can either use the browser-based GUI to install and
>> remove apps, or, alternatively, you can kill it, add and delete war
>> files to its webapp directory, and restart it..
>
> You can also configure Tomcat to autodeploy updated WARs without
> having to bounce the server, by setting the Host autoDeploy
> attribute
> in the server.xml.
When was that introduced? In the version I'm using (5.x), Tomcat
won't even figure out on startup that a WAR updated while it was down
is newer than the exploded directoy.
|
|
0
|
|
|
|
Reply
|
mscottschilling (1976)
|
9/2/2009 8:27:41 PM
|
|
On 02.09.2009 22:27, Mike Schilling wrote:
> Lew wrote:
>> Mike Schilling wrote:
>>> [Tomcat]'s tivial to install (just unzip it), and simple to
>>> administer: you can either use the browser-based GUI to install and
>>> remove apps, or, alternatively, you can kill it, add and delete war
>>> files to its webapp directory, and restart it..
>> You can also configure Tomcat to autodeploy updated WARs without
>> having to bounce the server, by setting the Host autoDeploy
>> attribute
>> in the server.xml.
>
> When was that introduced? In the version I'm using (5.x), Tomcat
> won't even figure out on startup that a WAR updated while it was down
> is newer than the exploded directoy.
That feature must be ancient. I remember having it seen years ago. Did
you apply the setting Lew mentioned?
Kind regards
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
|
|
0
|
|
|
|
Reply
|
shortcutter (5766)
|
9/2/2009 8:39:36 PM
|
|
Lew wrote:
>> You can also configure Tomcat to autodeploy updated WARs without
>> having to bounce the server, by setting the Host autoDeploy
>> attribute in the server.xml.
>
Mike Schilling wrote:
> When was that introduced? =A0In the version I'm using (5.x), Tomcat
> won't even figure out on startup that a WAR updated while it was down
> is newer than the exploded directoy.
I reviewed the 6.x docs to confirm the name of the attribute (Host
element, "autoDeploy" attribute), but the feature has been present in
Tomcat as long as I've been using it, since at least 4.x IIRC.
<http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html>
Scroll down to the section labeled "Deploying on a running Tomcat
server".
--
Lew
|
|
0
|
|
|
|
Reply
|
lew (2143)
|
9/2/2009 10:01:28 PM
|
|
Robert Klemme wrote:
> On 02.09.2009 22:27, Mike Schilling wrote:
>> Lew wrote:
>>> Mike Schilling wrote:
>>>> [Tomcat]'s tivial to install (just unzip it), and simple to
>>>> administer: you can either use the browser-based GUI to install
>>>> and
>>>> remove apps, or, alternatively, you can kill it, add and delete
>>>> war
>>>> files to its webapp directory, and restart it..
>>> You can also configure Tomcat to autodeploy updated WARs without
>>> having to bounce the server, by setting the Host autoDeploy
>>> attribute
>>> in the server.xml.
>>
>> When was that introduced? In the version I'm using (5.x), Tomcat
>> won't even figure out on startup that a WAR updated while it was
>> down
>> is newer than the exploded directoy.
>
> That feature must be ancient. I remember having it seen years ago.
> Did you apply the setting Lew mentioned?
>
No.. I was expecting that simple date check to be default behavior,
and didn't look for a way to enable it. Now I will.
|
|
0
|
|
|
|
Reply
|
mscottschilling (1976)
|
9/2/2009 11:34:57 PM
|
|
Mike Schilling wrote:
> Lew wrote:
>> Mike Schilling wrote:
>>> [Tomcat]'s tivial to install (just unzip it), and simple to
>>> administer: you can either use the browser-based GUI to install and
>>> remove apps, or, alternatively, you can kill it, add and delete war
>>> files to its webapp directory, and restart it..
>> You can also configure Tomcat to autodeploy updated WARs without
>> having to bounce the server, by setting the Host autoDeploy
>> attribute
>> in the server.xml.
>
> When was that introduced? In the version I'm using (5.x),
It is in server.xml on my 4.1, 5.0, 5.5 and 6.0, so it is not
exactly new.
And I believe that it is true in the server.xml in the dist.
Arne
|
|
0
|
|
|
|
Reply
|
arne6 (9485)
|
9/3/2009 12:02:05 AM
|
|
Ross wrote:
> What's the simplest, most straightforward, servlet container for
> testing and developing servlets on Linux? I'd prefer one that doesn't
> require a lot of setup, and will run on older versions of Linux.
Tomcat is widely used and easy to install and run.
The version dependency goes over Java.
Tomcat X requires Java Y+ which requires Linux kernel & glibc Z+.
Arne
|
|
0
|
|
|
|
Reply
|
arne6 (9485)
|
9/3/2009 12:03:28 AM
|
|
I've used tomcat extensively, but didn't want to use it this time
because I'm temporarily on an old machine that it is not worth
upgrading, but while I'm here for a few days, I don't want to put a
lot of effort into the machine.
So everyone says "tomcat". From past experience, I have a bad feeling
about this, but I download and install tomcat. I move it to a
directory with a simple path. I add the tomcat "bin" directory to my
path, and change the permissions of the .sh files in the /path/to/
tomcat/bin directory.
I then make sure I've got both JAVA_HOME and JRE_HOME environment
variables set properly.
I then run startup.sh. Tomcat starts, and reports everything fine
(directories).
What happens when I go to http://localhost:8080?
Nothing, it just hangs.
OK, so I've got a problem. I don't know what it is, but I've got to go
through the standard dance of trying to work out what it is and how to
fix it.
I don't want to be working on a tomcat or other fully featured servlet
engine that is taking time to configure. I want to have something like
this:
$ java -jar simpleServletEngine.jar /path/to/servlet/classes
Where I can then run:
$ konqueror http://localhost:8080/MyServletName
and see it run.
I know enough about servlets to know that this interface is entirely
possible, and that it would be useful to people learning servlet
programming independent of server administration.
I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
immediately see all the demonstration servlets. Good I think. So, how
do I add my own Servlet class to the engine, Can't find any class
files for the demo servlets, so how do I add mine. I then start
trawling through the documentation to find out what you'd think is the
most simple straightforward thing that 99% of people would want to do.
And basically, no doing. What do I get when I click on a link titled
"How to test a servlet?" You'd think it would tell you how to test a
servlet. No, it goes straight into testing servlets with an embedded
server. http://docs.codehaus.org/display/JETTY/ServletTester Can't I
just put my bl**dy servlets in a directory and run them?
Fundamentally, I don't want to be wasting my time doing all this, I
want to write some servlets and do some simple testing of them. But
I'm searching around for a simple, straightforward, easy to use tool.
|
|
0
|
|
|
|
Reply
|
rossclement (79)
|
9/3/2009 12:20:12 PM
|
|
I've used tomcat extensively, but didn't want to use it this time
because I'm temporarily on an old machine that it is not worth
upgrading, but while I'm here for a few days, I don't want to put a
lot of effort into the machine.
So everyone says "tomcat". From past experience, I have a bad feeling
about this, but I download and install tomcat. I move it to a
directory with a simple path. I add the tomcat "bin" directory to my
path, and change the permissions of the .sh files in the /path/to/
tomcat/bin directory.
I then make sure I've got both JAVA_HOME and JRE_HOME environment
variables set properly.
I then run startup.sh. Tomcat starts, and reports everything fine
(directories).
What happens when I go to http://localhost:8080?
Nothing, it just hangs.
OK, so I've got a problem. I don't know what it is, but I've got to go
through the standard dance of trying to work out what it is and how to
fix it.
I don't want to be working on a tomcat or other fully featured servlet
engine that is taking time to configure. I want to have something like
this:
$ java -jar simpleServletEngine.jar /path/to/servlet/classes
Where I can then run:
$ konqueror http://localhost:8080/MyServletName
and see it run.
I know enough about servlets to know that this interface is entirely
possible, and that it would be useful to people learning servlet
programming independent of server administration.
I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
immediately see all the demonstration servlets. Good I think. So, how
do I add my own Servlet class to the engine, Can't find any class
files for the demo servlets, so how do I add mine. I then start
trawling through the documentation to find out what you'd think is the
most simple straightforward thing that 99% of people would want to do.
And basically, no doing. What do I get when I click on a link titled
"How to test a servlet?" You'd think it would tell you how to test a
servlet. No, it goes straight into testing servlets with an embedded
server. http://docs.codehaus.org/display/JETTY/ServletTester Can't I
just put my bl**dy servlets in a directory and run them?
Fundamentally, I don't want to be wasting my time doing all this, I
want to write some servlets and do some simple testing of them. But
I'm searching around for a simple, straightforward, easy to use tool.
|
|
0
|
|
|
|
Reply
|
rossclement (79)
|
9/3/2009 12:27:00 PM
|
|
And continuing on, I've downgraded to tomcat 5.5, I still get no joy.
I can start the server. Sure, no problem, and no problems reported in
any logs.
But if I try to do even the most basic tests for the web server
running, e.g.
$ telnet localhost 8080
GET / HTTP/1.0
I get an error 400. Can't understand this request.
Downgrading to 4.1, as I'm on an old machine (JDK is 1.6, but that
should be sufficient for any of them), I get a different error. "No
Context configured to process this request". OK, so I need
configuration. But the whole point in wanting a simple testbed is so
that you don't have to go through complicated installations.
This is precisely why I wanted a small, cutdown, server, rather than a
fully featured one. So that I don't have to fight fight fight against
installation issues.
Tomcat is NOT just a matter of unzipping it and you're ready to go.
|
|
0
|
|
|
|
Reply
|
rossclement (79)
|
9/3/2009 1:51:39 PM
|
|
And continuing on, I've downgraded to tomcat 5.5, I still get no joy.
I can start the server. Sure, no problem, and no problems reported in
any logs.
But if I try to do even the most basic tests for the web server
running, e.g.
$ telnet localhost 8080
GET / HTTP/1.0
I get an error 400. Can't understand this request.
Downgrading to 4.1, as I'm on an old machine (JDK is 1.6, but that
should be sufficient for any of them), I get a different error. "No
Context configured to process this request". OK, so I need
configuration. But the whole point in wanting a simple testbed is so
that you don't have to go through complicated installations.
This is precisely why I wanted a small, cutdown, server, rather than a
fully featured one. So that I don't have to fight fight fight against
installation issues.
Tomcat is NOT just a matter of unzipping it and you're ready to go.
|
|
0
|
|
|
|
Reply
|
rossclement (79)
|
9/3/2009 2:20:36 PM
|
|
And continuing on, I've downgraded to tomcat 5.5, I still get no joy.
I can start the server. Sure, no problem, and no problems reported in
any logs.
But if I try to do even the most basic tests for the web server
running, e.g.
$ telnet localhost 8080
GET / HTTP/1.0
I get an error 400. Can't understand this request.
Downgrading to 4.1, as I'm on an old machine (JDK is 1.6, but that
should be sufficient for any of them), I get a different error. "No
Context configured to process this request". OK, so I need
configuration. But the whole point in wanting a simple testbed is so
that you don't have to go through complicated installations.
This is precisely why I wanted a small, cutdown, server, rather than a
fully featured one. So that I don't have to fight fight fight against
installation issues.
Tomcat is NOT just a matter of unzipping it and you're ready to go.
|
|
0
|
|
|
|
Reply
|
rossclement (79)
|
9/3/2009 2:46:54 PM
|
|
And I've finally had success with Winstone. Would still think it
worthwhile to have a simple and straightforward container though.
|
|
0
|
|
|
|
Reply
|
rossclement (79)
|
9/3/2009 2:47:32 PM
|
|
Ross wrote :
> I get an error 400. Can't understand this request.
Which, as stated here: http://www.checkupdown.com/status/E400.html
means that either the web server is mis-coded or the client is sending
a malformed request.
Tomcat has a hello page on port 80 which is a JSP page. Does this work?
If it does, then the Tomcat installation is successful.
You also need a proper web.xml so that Tomcat can map the request URL
to the correct servlet class
--
Wojtek :-)
|
|
0
|
|
|
|
Reply
|
Wojtek
|
9/3/2009 3:06:03 PM
|
|
Ross wrote:
> I've used tomcat extensively, but didn't want to use it this time
> because I'm temporarily on an old machine that it is not worth
> upgrading, but while I'm here for a few days, I don't want to put a
> lot of effort into the machine.
>
> So everyone says "tomcat". From past experience, I have a bad feeling
> about this, but I download and install tomcat. I move it to a
> directory with a simple path. I add the tomcat "bin" directory to my
> path, and change the permissions of the .sh files in the /path/to/
> tomcat/bin directory.
>
> I then make sure I've got both JAVA_HOME and JRE_HOME environment
> variables set properly.
>
> I then run startup.sh. Tomcat starts, and reports everything fine
> (directories).
>
> What happens when I go to http://localhost:8080?
>
> Nothing, it just hangs.
Is that the port for which Tomcat is configured? Does your /etc/hosts/
resolve "localhost"? What happens when you try to browse to
http://127.0.0.1:<port>/ instead?
> OK, so I've got a problem. I don't know what it is, but I've got to go
> through the standard dance of trying to work out what it is and how to
> fix it.
That's why they pay you the big bucks.
> I don't want to be working on a tomcat or other fully featured servlet
> engine that is taking time to configure. I want to have something like
> this:
>
> $ java -jar simpleServletEngine.jar /path/to/servlet/classes
>
> Where I can then run:
>
> $ konqueror http://localhost:8080/MyServletName
>
> and see it run.
JARs aren't designed to hold servlets and associated resources; WARs are.
You get what you ask for from Tomcat. You can use the deploytool much like
you ask of "java -jar", then use konqueror just as you describe.
> I know enough about servlets to know that this interface is entirely
> possible, and that it would be useful to people learning servlet
> programming independent of server administration.
And it exists! See my description previous paragraph.
> I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
> immediately see all the demonstration servlets. Good I think. So, how
> do I add my own Servlet class to the engine, Can't find any class
> files for the demo servlets, so how do I add mine. I then start
> trawling through the documentation to find out what you'd think is the
> most simple straightforward thing that 99% of people would want to do.
> And basically, no doing. What do I get when I click on a link titled
> "How to test a servlet?" You'd think it would tell you how to test a
> servlet. No, it goes straight into testing servlets with an embedded
> server. http://docs.codehaus.org/display/JETTY/ServletTester Can't I
> just put my bl**dy servlets in a directory and run them?
No. You need a servlet container. Too bad. You want to run a servlet, you
need something that knows how to run servlets. *Any* such product would
require you to set a port for the connection.
> Fundamentally, I don't want to be wasting my time doing all this, I
> want to write some servlets and do some simple testing of them. But
> I'm searching around for a simple, straightforward, easy to use tool.
You should be more familiar with Tomcat then. Don't blame the tool because
you don't know it well enough.
--
Lew
|
|
0
|
|
|
|
Reply
|
noone7 (3512)
|
9/3/2009 3:26:53 PM
|
|
Ross wrote:
> And continuing on, I've downgraded to tomcat 5.5, I still get no joy.
Is it really necessary to keep posting the same message repeatedly?
--
Lew
|
|
0
|
|
|
|
Reply
|
noone7 (3512)
|
9/3/2009 3:28:24 PM
|
|
On Sep 2, 9:52=A0am, Ross <rossclem...@gmail.com> wrote:
> What's the simplest, most straightforward, servlet container for
> testing and developing servlets on Linux? I'd prefer one that doesn't
> require a lot of setup, and will run on older versions of Linux.
I just started myself. Tomcat (by it's self) is good but your
requirement is low setup... Why not download the latest version of
netbeans? It includes three web containers (tomcat and two versions
of glass fish)... The point is there is a web app project, which lets
you select which server you want to deploy on and when you hit the run
button everything just works. It's pretty mindless.
|
|
0
|
|
|
|
Reply
|
ken473 (54)
|
9/3/2009 4:01:58 PM
|
|
I don't know why some of my messages were duplicated, I certainly
didn't post duplicates intentionally.
Yes, I understand that I need a container. What I wanted was a
container for a particular set of circumstances. Winstone is it.
I'm pretty sure that there was something weird going on with tomcat on
my machine. It certainly thought it was running, and was listening to
the ports. I used telnet to send requests to both port 8080 and 80, I
got nothing from 80, and from 8080 the continued 400 errors. I was
typing the HTTP requests myself, and was doing it over and over while
double checking what I should be typing to make sure it was correct.
Certainly both Jetty and Winstone ran the servers properly first time,
and could be interacted with via konqueror, so it's unlikely to be the
browser sending a malformed request. It's not me who is going to be
setting up the server for the proper deployment, nor me managing it.
So a lot of time spent on learning tomcat management and issue
debugging would be of little benefit to me. I'm sure that on many
machines tomcat would just plug and play, but it didn't on mine.
That's why they pay me the big bucks? I wish! I'm in education.
I haven't used tomcat for quite a few years. Back then I had it all
set up on a dedicated machine and was all set up so that people could
sftp new servlets to to prepared directories and their classes would
be instantly available to run blah blah blah. But it's been some years
and the details of how to do these things have gone into the memory
bit bucket. When people talk about "blaming the tool" because I don't
know how to use it, the whole point of my first question was to find a
tool with minimum setup and get-go time. And, as computer tools get
more sophisticated, there is, on average, an increase in the number of
things that can go wrong and the amount of time that it takes to debug
these problems. If I was actually setting up a container/server for
proper use, I'd definitely go for tomcat and allocate a few days to
get properly up to speed. What I was hoping for earlier today was to
be installed and going in minutes. Didn't happen :(
Winstone has the ability to save sessions across runs, and can be crtl-
c'd to restart it. That's good enough for me right now!
|
|
0
|
|
|
|
Reply
|
rossclement (79)
|
9/3/2009 6:03:51 PM
|
|
Ross wrote:
> I don't know why some of my messages were duplicated, I certainly
> didn't post duplicates intentionally.
>
You have to be careful when you use Google Groups.
|
|
0
|
|
|
|
Reply
|
lars.enderin1 (160)
|
9/3/2009 7:23:30 PM
|
|
Ken wrote:
> On Sep 2, 9:52 am, Ross <rossclem...@gmail.com> wrote:
>> What's the simplest, most straightforward, servlet container for
>> testing and developing servlets on Linux? I'd prefer one that doesn't
>> require a lot of setup, and will run on older versions of Linux.
>
> I just started myself. Tomcat (by it's self) is good but your
> requirement is low setup... Why not download the latest version of
> netbeans? It includes three web containers (tomcat and two versions
> of glass fish)... The point is there is a web app project, which lets
> you select which server you want to deploy on and when you hit the run
> button everything just works. It's pretty mindless.
Until something goes wrong.
Separate IDE and server is often easier to troubleshoot
than an integrated bundle, because the integrated bundle
hides what is happening.
Arne
|
|
0
|
|
|
|
Reply
|
arne6 (9485)
|
9/4/2009 2:26:34 AM
|
|
On Thu, 3 Sep 2009, Ross wrote:
> I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
> immediately see all the demonstration servlets. Good I think. So, how do
> I add my own Servlet class to the engine,
You don't add classes, you add WARs. Servlets are meaningless outside a
WAR.
To put it another way, you need to write a little shell script which packs
your classes into a trivial WAR - it wouldn't be hard.
> Can't I just put my bl**dy servlets in a directory and run them?
No.
tom
--
Coldplay is the kind of music computers will make when they get smart
enough to start making fun of humans -- Lower Marsh Tit
|
|
0
|
|
|
|
Reply
|
twic (2083)
|
9/4/2009 9:03:30 PM
|
|
Tom Anderson wrote:
> On Thu, 3 Sep 2009, Ross wrote:
>
>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you
>> can
>> immediately see all the demonstration servlets. Good I think. So,
>> how do I add my own Servlet class to the engine,
>
> You don't add classes, you add WARs. Servlets are meaningless
> outside
> a WAR.
>
> To put it another way, you need to write a little shell script which
> packs your classes into a trivial WAR - it wouldn't be hard.
Ant works even better, since it can recompile everything, build the
WAR, and deploy it, simply by typing "ant deploy"..
|
|
0
|
|
|
|
Reply
|
mscottschilling (1976)
|
9/4/2009 10:15:23 PM
|
|
In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,
twic@urchin.earth.li says...
>
> On Thu, 3 Sep 2009, Ross wrote:
>
> > I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
> > immediately see all the demonstration servlets. Good I think. So, how do
> > I add my own Servlet class to the engine,
>
> You don't add classes, you add WARs. Servlets are meaningless outside a
> WAR.
>
> To put it another way, you need to write a little shell script which packs
> your classes into a trivial WAR - it wouldn't be hard.
>
> > Can't I just put my bl**dy servlets in a directory and run them?
>
> No.
>
Yes.
Can't say much about Tomcat since I don't use it, but with Jetty you can
deploy webapps to a directory as easily as deploying a WAR. The
directory just has to have the right structure (meaning, it must have
the WEB-INF directory and the proper files inside WEB-INF)...
--
Steve Sobol, Victorville, California, USA
sjsobol@JustThe.net
|
|
0
|
|
|
|
Reply
|
sjsobol (486)
|
9/4/2009 10:28:56 PM
|
|
Steve Sobol wrote:
> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,
> twic@urchin.earth.li says...
>> On Thu, 3 Sep 2009, Ross wrote:
>>
>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
>>> immediately see all the demonstration servlets. Good I think. So, how do
>>> I add my own Servlet class to the engine,
>> You don't add classes, you add WARs. Servlets are meaningless outside a
>> WAR.
>>
>> To put it another way, you need to write a little shell script which packs
>> your classes into a trivial WAR - it wouldn't be hard.
>>
>>> Can't I just put my bl**dy servlets in a directory and run them?
>> No.
>>
>
> Yes.
>
> Can't say much about Tomcat since I don't use it, but with Jetty you can
> deploy webapps to a directory as easily as deploying a WAR. The
> directory just has to have the right structure (meaning, it must have
> the WEB-INF directory and the proper files inside WEB-INF)...
No.
That doesn't constitute "just putting bloody servlets in a directory and
running them". That's putting servlets in a very specific directory and
running Jetty.
--
Lew
|
|
0
|
|
|
|
Reply
|
noone7 (3512)
|
9/4/2009 11:10:25 PM
|
|
Steve Sobol wrote:
>
> Can't say much about Tomcat since I don't use it, but with Jetty you
> can deploy webapps to a directory as easily as deploying a WAR. The
> directory just has to have the right structure (meaning, it must
> have
> the WEB-INF directory and the proper files inside WEB-INF)...
Tomcat too. That is, you can give it either a WAR or an
already-exploded WAR, which sounds exactly what you're saying about
Jetty.
|
|
0
|
|
|
|
Reply
|
mscottschilling (1976)
|
9/4/2009 11:55:45 PM
|
|
Steve Sobol wrote:
> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,
> twic@urchin.earth.li says...
>> On Thu, 3 Sep 2009, Ross wrote:
>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
>>> immediately see all the demonstration servlets. Good I think. So, how do
>>> I add my own Servlet class to the engine,
>> You don't add classes, you add WARs. Servlets are meaningless outside a
>> WAR.
>>
>> To put it another way, you need to write a little shell script which packs
>> your classes into a trivial WAR - it wouldn't be hard.
>>
>>> Can't I just put my bl**dy servlets in a directory and run them?
>> No.
>
> Yes.
>
> Can't say much about Tomcat since I don't use it, but with Jetty you can
> deploy webapps to a directory as easily as deploying a WAR. The
> directory just has to have the right structure (meaning, it must have
> the WEB-INF directory and the proper files inside WEB-INF)...
And a web.xml referring to the servlets etc..
Arne
|
|
0
|
|
|
|
Reply
|
arne6 (9485)
|
9/5/2009 2:24:19 AM
|
|
In article <h7s6p1$oo1$1@news.albasani.net>, Lew <noone@lewscanon.com> wrote:
>Steve Sobol wrote:
>> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,
>> twic@urchin.earth.li says...
>>> On Thu, 3 Sep 2009, Ross wrote:
>>>
>>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
>>>> immediately see all the demonstration servlets. Good I think. So, how do
>>>> I add my own Servlet class to the engine,
>>> You don't add classes, you add WARs. Servlets are meaningless outside a
>>> WAR.
>>>
>>> To put it another way, you need to write a little shell script which packs
>>> your classes into a trivial WAR - it wouldn't be hard.
>>>
>>>> Can't I just put my bl**dy servlets in a directory and run them?
>>> No.
>>>
>>
>> Yes.
>>
>> Can't say much about Tomcat since I don't use it, but with Jetty you can
>> deploy webapps to a directory as easily as deploying a WAR. The
>> directory just has to have the right structure (meaning, it must have
>> the WEB-INF directory and the proper files inside WEB-INF)...
>
>No.
>
>That doesn't constitute "just putting bloody servlets in a directory and
>running them". That's putting servlets in a very specific directory and
>running Jetty.
>
Same for Tomcat. I'm looking at TC5.5, with servlets in
[tomcat_home]\webapps\servlets-examples\WEB-INF\classes
It strikes me that this is an exploded war structure. So yeah, you can't just
drop a servlet class anywhere, but if you drop it in the right place ...
|
|
0
|
|
|
|
Reply
|
efried (3)
|
9/5/2009 5:14:20 AM
|
|
On 05.09.2009 04:24, Arne Vajh=F8j wrote:
> Steve Sobol wrote:
>> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,=20
>> twic@urchin.earth.li says...
>>> On Thu, 3 Sep 2009, Ross wrote:
>>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you=20
>>>> can immediately see all the demonstration servlets. Good I think.=20
>>>> So, how do I add my own Servlet class to the engine,
>>> You don't add classes, you add WARs. Servlets are meaningless outside=
=20
>>> a WAR.
>>>
>>> To put it another way, you need to write a little shell script which =
>>> packs your classes into a trivial WAR - it wouldn't be hard.
>>>
>>>> Can't I just put my bl**dy servlets in a directory and run them?
>>> No.
>>
>> Yes.
>>
>> Can't say much about Tomcat since I don't use it, but with Jetty you=20
>> can deploy webapps to a directory as easily as deploying a WAR. The=20
>> directory just has to have the right structure (meaning, it must have =
>> the WEB-INF directory and the proper files inside WEB-INF)...
>=20
> And a web.xml referring to the servlets etc..
AFAIK recent servlet standards allow for web.xml less deployment if you=20
provide proper annotations. There may even be defaults so you could get =
away without XML and annos.
Cheers
robert
--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
|
|
0
|
|
|
|
Reply
|
shortcutter (5766)
|
9/5/2009 10:44:42 AM
|
|
On Fri, 4 Sep 2009, Steve Sobol wrote:
> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,
> twic@urchin.earth.li says...
>>
>> On Thu, 3 Sep 2009, Ross wrote:
>>
>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you can
>>> immediately see all the demonstration servlets. Good I think. So, how do
>>> I add my own Servlet class to the engine,
>>
>> You don't add classes, you add WARs. Servlets are meaningless outside a
>> WAR.
>>
>> To put it another way, you need to write a little shell script which packs
>> your classes into a trivial WAR - it wouldn't be hard.
>>
>>> Can't I just put my bl**dy servlets in a directory and run them?
>>
>> No.
>>
>
> Yes.
>
> Can't say much about Tomcat since I don't use it, but with Jetty you can
> deploy webapps to a directory as easily as deploying a WAR. The
> directory just has to have the right structure (meaning, it must have
> the WEB-INF directory and the proper files inside WEB-INF)...
Ah, i consider such directories to be WARs. They're just unarchived WARs -
i suppose i should call them Ws.
tom
--
I prefer gin now sleep doesn't want me anyway.
|
|
0
|
|
|
|
Reply
|
twic (2083)
|
9/5/2009 10:48:39 AM
|
|
Robert Klemme wrote:
> On 05.09.2009 04:24, Arne Vajh�j wrote:
>> Steve Sobol wrote:
>>> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,
>>> twic@urchin.earth.li says...
>>>> On Thu, 3 Sep 2009, Ross wrote:
>>>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you
>>>>> can immediately see all the demonstration servlets. Good I think.
>>>>> So, how do I add my own Servlet class to the engine,
>>>> You don't add classes, you add WARs. Servlets are meaningless
>>>> outside a WAR.
>>>>
>>>> To put it another way, you need to write a little shell script which
>>>> packs your classes into a trivial WAR - it wouldn't be hard.
>>>>
>>>>> Can't I just put my bl**dy servlets in a directory and run them?
>>>> No.
>>>
>>> Yes.
>>>
>>> Can't say much about Tomcat since I don't use it, but with Jetty you
>>> can deploy webapps to a directory as easily as deploying a WAR. The
>>> directory just has to have the right structure (meaning, it must have
>>> the WEB-INF directory and the proper files inside WEB-INF)...
>>
>> And a web.xml referring to the servlets etc..
>
> AFAIK recent servlet standards allow for web.xml less deployment if you
> provide proper annotations. There may even be defaults so you could get
> away without XML and annos.
>
> Cheers
>
> robert
>
The current trend seems to be toward gutting web.xml, ejb-jar.xml,
faces-config.xml, etc., and favouring annotations. I'm provisionally in
favour of annotations, for one major reason - the configuration is right
there where you need it - but oddly enough I am starting to miss the
convenience of having the deployment descriptors as single-source
references. The large apps I work with at present have very little
information in the standard descriptors, and server admin consoles don't
cut it when it comes to displaying this info either. Typically you end
up consulting the app server generated proprietary deployment
descriptors. I may be the only one, but I find this somewhat ironic.
AHS
|
|
0
|
|
|
|
Reply
|
dcest61 (384)
|
9/5/2009 12:22:43 PM
|
|
On 05.09.2009 14:22, Arved Sandstrom wrote:
> Robert Klemme wrote:
>> On 05.09.2009 04:24, Arne Vajh=F8j wrote:
>>> Steve Sobol wrote:
>>>> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,=20
>>>> twic@urchin.earth.li says...
>>>>> On Thu, 3 Sep 2009, Ross wrote:
>>>>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you =
>>>>>> can immediately see all the demonstration servlets. Good I think. =
>>>>>> So, how do I add my own Servlet class to the engine,
>>>>> You don't add classes, you add WARs. Servlets are meaningless=20
>>>>> outside a WAR.
>>>>>
>>>>> To put it another way, you need to write a little shell script=20
>>>>> which packs your classes into a trivial WAR - it wouldn't be hard.
>>>>>
>>>>>> Can't I just put my bl**dy servlets in a directory and run them?
>>>>> No.
>>>>
>>>> Yes.
>>>>
>>>> Can't say much about Tomcat since I don't use it, but with Jetty you=
=20
>>>> can deploy webapps to a directory as easily as deploying a WAR. The =
>>>> directory just has to have the right structure (meaning, it must=20
>>>> have the WEB-INF directory and the proper files inside WEB-INF)...
>>>
>>> And a web.xml referring to the servlets etc..
>>
>> AFAIK recent servlet standards allow for web.xml less deployment if=20
>> you provide proper annotations. There may even be defaults so you=20
>> could get away without XML and annos.
>>
> The current trend seems to be toward gutting web.xml, ejb-jar.xml,=20
> faces-config.xml, etc., and favouring annotations. I'm provisionally in=
=20
> favour of annotations, for one major reason - the configuration is righ=
t=20
> there where you need it - but oddly enough I am starting to miss the=20
> convenience of having the deployment descriptors as single-source=20
> references. The large apps I work with at present have very little=20
> information in the standard descriptors, and server admin consoles don'=
t=20
> cut it when it comes to displaying this info either. Typically you end =
> up consulting the app server generated proprietary deployment=20
> descriptors. I may be the only one, but I find this somewhat ironic.
Funny that you should mention this. I am also not sure whether the=20
current trend is actually the right one. I believe for JPA it is=20
beneficial that you can do everything with annotations because often you =
have independent parts in a persistence scheme. But with webapps having =
to search through Servlet sources to find out which one serves a=20
particular URL seems a rather tedious thing to do.
I'm curios what the trend of next year will be. :-)
Cheers
robert
--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
|
|
0
|
|
|
|
Reply
|
shortcutter (5766)
|
9/6/2009 8:19:08 PM
|
|
Robert Klemme wrote:
>
> Funny that you should mention this. I am also not sure whether the
> current trend is actually the right one. I believe for JPA it is
> beneficial that you can do everything with annotations because often
> you have independent parts in a persistence scheme. But with
> webapps
> having to search through Servlet sources to find out which one
> serves
> a particular URL seems a rather tedious thing to do.
I've been playing with JAX-RS in Glassfish, and noticed a huge delay
the first time a service is accessed, while it does exactly that.
|
|
0
|
|
|
|
Reply
|
mscottschilling (1976)
|
9/6/2009 8:45:58 PM
|
|
Mike Schilling wrote:
> Robert Klemme wrote:
>> Funny that you should mention this. I am also not sure whether the
>> current trend is actually the right one. I believe for JPA it is
>> beneficial that you can do everything with annotations because often
>> you have independent parts in a persistence scheme. But with
>> webapps
>> having to search through Servlet sources to find out which one
>> serves
>> a particular URL seems a rather tedious thing to do.
>
> I've been playing with JAX-RS in Glassfish, and noticed a huge delay
> the first time a service is accessed, while it does exactly that.
How do you distinguish that from first-time servlet instantiation delay that
would be present regardless?
--
Lew
|
|
0
|
|
|
|
Reply
|
noone7 (3512)
|
9/6/2009 10:05:40 PM
|
|
Lew wrote:
> Mike Schilling wrote:
>> Robert Klemme wrote:
>>> Funny that you should mention this. I am also not sure whether
>>> the
>>> current trend is actually the right one. I believe for JPA it is
>>> beneficial that you can do everything with annotations because
>>> often
>>> you have independent parts in a persistence scheme. But with
>>> webapps
>>> having to search through Servlet sources to find out which one
>>> serves
>>> a particular URL seems a rather tedious thing to do.
>>
>> I've been playing with JAX-RS in Glassfish, and noticed a huge
>> delay
>> the first time a service is accessed, while it does exactly that.
>
> How do you distinguish that from first-time servlet instantiation
> delay that would be present regardless?
The debugger shows that it's inside a routine that's looking things up
in the ClassLoader..
|
|
0
|
|
|
|
Reply
|
mscottschilling (1976)
|
9/7/2009 5:32:14 AM
|
|
Arved Sandstrom wrote:
> Robert Klemme wrote:
>> On 05.09.2009 04:24, Arne Vajh�j wrote:
>>> Steve Sobol wrote:
>>>> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,
>>>> twic@urchin.earth.li says...
>>>>> On Thu, 3 Sep 2009, Ross wrote:
>>>>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you
>>>>>> can immediately see all the demonstration servlets. Good I think.
>>>>>> So, how do I add my own Servlet class to the engine,
>>>>> You don't add classes, you add WARs. Servlets are meaningless
>>>>> outside a WAR.
>>>>>
>>>>> To put it another way, you need to write a little shell script
>>>>> which packs your classes into a trivial WAR - it wouldn't be hard.
>>>>>
>>>>>> Can't I just put my bl**dy servlets in a directory and run them?
>>>>> No.
>>>>
>>>> Yes.
>>>>
>>>> Can't say much about Tomcat since I don't use it, but with Jetty you
>>>> can deploy webapps to a directory as easily as deploying a WAR. The
>>>> directory just has to have the right structure (meaning, it must
>>>> have the WEB-INF directory and the proper files inside WEB-INF)...
>>>
>>> And a web.xml referring to the servlets etc..
>>
>> AFAIK recent servlet standards allow for web.xml less deployment if
>> you provide proper annotations. There may even be defaults so you
>> could get away without XML and annos.
> The current trend seems to be toward gutting web.xml, ejb-jar.xml,
> faces-config.xml, etc., and favouring annotations. I'm provisionally in
> favour of annotations, for one major reason - the configuration is right
> there where you need it - but oddly enough I am starting to miss the
> convenience of having the deployment descriptors as single-source
> references. The large apps I work with at present have very little
> information in the standard descriptors, and server admin consoles don't
> cut it when it comes to displaying this info either. Typically you end
> up consulting the app server generated proprietary deployment
> descriptors. I may be the only one, but I find this somewhat ironic.
I completely agree.
The "let us get rid of XML config files and use annotations" change
is great for hello world apps.
But for big real world apps it is actually beneficial to have
all this stuff centrally.
A bit surrealistic that a false claim of Java EE being complex
due to XML config files actually caused changes that increased
the complexity.
Arne
|
|
0
|
|
|
|
Reply
|
arne6 (9485)
|
9/8/2009 12:01:45 AM
|
|
Robert Klemme wrote:
> On 05.09.2009 04:24, Arne Vajh�j wrote:
>> Steve Sobol wrote:
>>> In article <alpine.DEB.1.10.0909042201380.24359@urchin.earth.li>,
>>> twic@urchin.earth.li says...
>>>> On Thu, 3 Sep 2009, Ross wrote:
>>>>> I've downloaded Jetty. It runs fine, java -jar start.jar, and you
>>>>> can immediately see all the demonstration servlets. Good I think.
>>>>> So, how do I add my own Servlet class to the engine,
>>>> You don't add classes, you add WARs. Servlets are meaningless
>>>> outside a WAR.
>>>>
>>>> To put it another way, you need to write a little shell script which
>>>> packs your classes into a trivial WAR - it wouldn't be hard.
>>>>
>>>>> Can't I just put my bl**dy servlets in a directory and run them?
>>>> No.
>>>
>>> Yes.
>>>
>>> Can't say much about Tomcat since I don't use it, but with Jetty you
>>> can deploy webapps to a directory as easily as deploying a WAR. The
>>> directory just has to have the right structure (meaning, it must have
>>> the WEB-INF directory and the proper files inside WEB-INF)...
>>
>> And a web.xml referring to the servlets etc..
>
> AFAIK recent servlet standards allow for web.xml less deployment if you
> provide proper annotations. There may even be defaults so you could get
> away without XML and annos.
I don't think the servlet 3.0 spec is final yet.
But if not "recent" then "just around the corner".
Arne
|
|
0
|
|
|
|
Reply
|
arne6 (9485)
|
9/8/2009 12:04:15 AM
|
|
Arne Vajhøj wrote:
> A bit surrealistic that a false claim of Java EE being complex
> due to XML config files actually caused changes that increased
> the complexity.
The new approach increases some complexity, arguably, though I remain
unconvinced. It also reduced complexity, e.g., for EJBs. No more home
interface/remote interface/narrow the reference garbage.
--
Lew
|
|
0
|
|
|
|
Reply
|
noone7 (3512)
|
9/8/2009 1:48:12 AM
|
|
"Lew" <noone@lewscanon.com> wrote in message
news:h84d4s$92d$1@news.albasani.net
> Arne Vajhøj wrote:
>> A bit surrealistic that a false claim of Java EE being
>> complex due to XML config files actually caused changes
>> that increased the complexity.
>
> The new approach increases some complexity, arguably,
> though I remain unconvinced. It also reduced complexity,
> e.g., for EJBs. No more home interface/remote
> interface/narrow the reference garbage.
No for entity yes, but session beans still needs those. Even narrowing, as
it was the only way that I got that working (when doing a context lookup) on
WebSphere. It does not hurt elsewhere, so the same code runs with the
PortableRemoteObject.narrow in any container I have tested.
|
|
0
|
|
|
|
Reply
|
donkey (101)
|
9/8/2009 8:27:15 AM
|
|
|
41 Replies
12 Views
(page loaded in 0.346 seconds)
|