Two thoughts:
1: startup time can be further shrunk by lightly editing the config to
remove the default load balancing app and the like.
2: I do all this using eclipse + MyEclipse, and I've found it quite
satisfactory.
-
To uns
Hi,
>copy it to the classes directory, restart Tomcat (which takes several
>minutes)
Restarting Tomcat doesn't take several minutes unless you have added
other webapps that do significant processing on startup/shutdown, or
significantly modified the Tomcat out-of-the-box configuration.
>and rea
The IDE suggested by others may already have this
features, but Apache Axis tcpmon is a neat tool to
have if you do not use IDE's. It allows you to see
what is being sent to a servlet running on Tomcat and
vice versa, the response coming out. Easy to use, as
it is an applet and run like so:
jav
> invoker
> /servlet/*
>
> (No one had ever said before about the
> servlet-mapping directive.)
There are good reasons why the invoker servlet has been removed
(commented out) of the default web.xml in Tomcat.
http://jakarta.apache.org/tomcat/faq/misc.html#evil
You would be much bet
Richard,
I'm certainly no expert but I've been playing with this stuff a while and
I find the free netbeans IDE to be an excellent environment for learning
this stuff. It come with a copy of tomcat built into it so you can debug
your servlet from within the IDE. With the click of a buton it will
g
Hi,
I didn't see any question or error in your message. What's wrong
(besides several sub-optimal coding practices) ?
Yoav Shapira
Millennium Research Informatics
>-Original Message-
>From: Bill Reynolds [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 26, 2004 7:22 PM
>To: [EMAIL PROTECT
Filip Hanik (lists) wrote:
remove all that stuff from your classpath.
do this
export CLASSPATH=""
./startup.sh
and it should work, the startup scripts are setting the classpath, and so
does tomcat when it startup,
you placing stuff in the system classpath will only mess things up :)
Filip
-Ori
remove all that stuff from your classpath.
do this
export CLASSPATH=""
./startup.sh
and it should work, the startup scripts are setting the classpath, and so
does tomcat when it startup,
you placing stuff in the system classpath will only mess things up :)
Filip
-Original Message-
From:
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> 3. html file(s) = c:\tomcat\webapps\ROOT\datatel\openweb
Have you asked on info-datatel? I know someone posted a HOWTO with
screenshots on getting WebAdvisor to work on Tomcat. Datatel has some
interesting ideas about where to put things, an
Howdy,
Technically, once a servlet is marked as unavailable it's pretty much gone for the
lifecycle of the container (not just the webapp). Why is it being marked unavailable
the first time? You should only have one context reload, and that should occur after
all the necessary files have been
I hadn't noticed that ResultSets need to be closed. But why couldn't I
close it after dealing with it in whichever servlet I call it from?
Also, if the Connection is a static variable in SQLUtils that all the
servlets use, it won't ever get closed.
I'm just realizing that there's probably a maj
On Dec 3, 2003, at 6:59 PM, Kwok Peng Tuck wrote:
>But this means I still have to get a connection, create a statement,
and execute a query or update on the statement >in every servlet where
I want to use the connection. Yes, it locates the connection details
(i.e., the JDBC >connection method,
Thanks, Doug. I'll have a look at this today and make sure I understand
it.
Todd
On Dec 3, 2003, at 11:30 PM, Doug Parsons wrote:
The whole class I need, apparently.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
This is how I handle mine modified for your application.
import java.sql.*;
public class DBUtil {
/** Retrieves results from query as a DBResults class.
*/
public static DBResults getQueryResults(String query, String dBase) {
Connection connection = Conn.getConn(dBase);
Statement statement =
>But this means I still have to get a connection, create a statement,
and execute a query or update on the statement >in every servlet where I
want to use the connection. Yes, it locates the connection details
(i.e., the JDBC >connection method, the database name, user and
password) somewhere c
Todd,
SQLUtils.executeQuery("a SQL statement");
SQLUtils.executeUpdate("another one");
Just out of curiosity, what do these methods return? If the former
returns a ResultSet object, then you're in for a world of trouble. The
ResultSet will never get closed, or you'll close the connection over
w
On Dec 3, 2003, at 5:40 AM, Todd O'Bryan wrote:
On Dec 3, 2003, at 2:59 AM, Nikola Milutinovic wrote:
Peter Harrison wrote:
On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote:
How do people handle this elegantly? The requirements are: a single,
globally visible (within a webapp) database interface and
On Dec 3, 2003, at 2:59 AM, Nikola Milutinovic wrote:
Peter Harrison wrote:
On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote:
How do people handle this elegantly? The requirements are: a single,
globally visible (within a webapp) database interface and the ability
to access multiple databases easily.
Based on the how-to and modified for your app:
package yourpackage;
import java.sql.*;
import javax.naming.*;
import javax.sql.*;
public class Conn {
/**Takes desired database as a string and returns a connection.
*/
public static Connection getConn(String dBase) {
Connection connection =
Peter Harrison wrote:
On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote:
How do people handle this elegantly? The requirements are: a single,
globally visible (within a webapp) database interface and the ability
to access multiple databases easily.
The first point is to use a singleton to set up th
On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote:
> How do people handle this elegantly? The requirements are: a single,
> globally visible (within a webapp) database interface and the ability
> to access multiple databases easily.
The first point is to use a singleton to set up the database connect
I think this link over here, might give you a hand.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
There are samples there for databases like mysql, but I think you should
be ok.
Todd O'Bryan wrote:
This may not be the right place to ask this, but if you ca
> I never had a problem with Tomcat being installed to "C:\Program
> Files\Apache Group\Jakarta Tomcat", and this was with version 3.2.3
>
> Problems arose when installing the JDK to "C:\Program Files\jdk1.3.1_09"
> where Tomcat refuses to work with it there (I posted a question about this
> ages a
> All,
> Someone should also point out right now that having Tomcat installed in
> a directory containing spaces is just *asking* for trouble.
>
> Try re-installing tomcat into, say, c:\programs\tomcat, or at least
> modify the path to be C:\PROGRA~1\tomcat or whatever windows does to
> long filena
omcat Users List'
Subject: RE: Servlets -- help needed
Try,
http://127.0.0.1:8080/examples/servlet/HelloWWW
> --
> De: Navanee[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada: sexta-feira, 14 de novembro de 2003 4:11
> Para:
Try,
http://127.0.0.1:8080/examples/servlet/HelloWWW
> --
> De: Navanee[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada: sexta-feira, 14 de novembro de 2003 4:11
> Para: Tomcat Users List
> Assunto: Re: Servl
All,
Someone should also point out right now that having Tomcat installed in
a directory containing spaces is just *asking* for trouble.
Try re-installing tomcat into, say, c:\programs\tomcat, or at least
modify the path to be C:\PROGRA~1\tomcat or whatever windows does to
long filenames to mak
can correct and delete the original email.
Thank you.
:: -Original Message-
:: From: Navanee [mailto:[EMAIL PROTECTED]
:: Sent: Friday, November 14, 2003 10:37 AM
:: To: Tomcat Users List
:: Subject: Re: Servlets -- help needed
::
:: I don't have any idea of how to edit the web.xml
uot;Navanee" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2003 9:11 AM
Subject: Re: Servlets -- help needed
Schalk,
I wrote a java program (HelloWWW.java) and placed the file in this
path:
C:\Program Files\jakarta-tomcat
vatis
-
National Center for Social Research - Directorate of Research Support
www.ekke.gr
- Original Message -
From: "Navanee" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2003 9:11 AM
Subject: Re: Servlets -- h
iday, November 14, 2003 3:24 PM
To: Tomcat Users List
Subject: Re: Servlets -- help needed
Navanee,
Please check and edit the \WEB-INF\web.xml file, which holds the mappings.
After that, you will only need
http://localhost/your_servlet_urlname_from_web.xml
Kostas Harvatis
-
National Center for So
http://localhost:8080/examples/servlet/HelloWWW
-Original Message-
From: K. Harvatis [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 3:24 PM
To: Tomcat Users List
Subject: Re: Servlets -- help needed
Navanee,
Please check and edit the \WEB-INF\web.xml file, which holds the
-
From: "Navanee" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2003 9:11 AM
Subject: Re: Servlets -- help needed
> Schalk,
>
> I wrote a java program (HelloWWW.java) and placed the file in this path:
> C:
Schalk,
I wrote a java program (HelloWWW.java) and placed the file in this path:
C:\Program Files\jakarta-tomcat-4.1.27\webapps\examples\WEB-INF\classes
I also compiled that java code. Compilation was successful.
I tried to execute that servlet in the browser using this link :
http://localhost:8
Navanee
The file structure, for webapps are as follows:
Tomcat/webapps/yourapp/
- In this folder you can place all of your image files, html files, .js,
.css, and your JSP's.
Tomcat/webapps/yourapp/WEB-INF/classes/
- In here you should place all compiled servlet code
Tomcat/webapps/yourapp/WEB-INF
Neil,
When I want to deploy a web
application I have to recompile the servlet (.java file) and
place the produced class file (bytecode) under the WEB-INF/classes
directory. Now, with JSP when you have a .jsp file the it all
happens automatically: you don't have to manually produce and
place any c
Its possible - but not with the existing tomcat functionality.
-Tim
Neil Zanella wrote:
Hello,
I am currently using Tomcat 4.1.27. When I want to deploy a web
application I have to recompile the servlet (.java file) and
place the produced class file (bytecode) under the WEB-INF/classes
director
Hello -
Hello
i assume this is more of a servlet programming problem that tomcat, but
i hope someone has some insight?
Please tell me i can do this:
1)i go to a jsp page and if it does not find the exist of a cookie it
forwards to a login screen
2) the login screen submits to a servlet, and then s
Randy,
Because you are doing an RequestDispatcher.include() the my.jsp page is served up in
the same HTTP Response that is setting the
cookies.
my.jsp then looks in the Request for the cookies and doesn't find them there, because
it's looking at the same HTTP Request that was
originally sent to
> -Original Message-
> From: Keith O'Brien [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 26, 2003 5:01 PM
> To: 'Tomcat Users List'
> Subject: Servlets / Includes - not working
>
>
> Hello,
>
> Current working environment:
> RedHat 7.3
> jakarta-tomcat-4.1.24
> apache_1.3.27
> j
Dir structure? Error message? URL that you're trying to use?
Remember that the Invoker servlet is disabled by default, if you've just
dumped your servlet into a directory and expect to call it by its name,
it won't work. You have to map it in your web.xml file, as enabling the
Invoker is a s
Howdy,
>Can anyone expand on this further and explain how to use a Log4j logger
>reference in beans that do not have a notion of what the underlying
servlet
>context is? The only way I can see how to get this to work is to pass
the
>logger reference as an argument in the bean's constructor.
You
tor.
My query does seem to be out of context for this list so my apologies in
advance.
AB
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Saturday, 2 August 2003 3:24 AM
To: Tomcat Users List
Subject: RE: Servlets & JSPs log to different files
Howdy,
Then us
Howdy,
Then use log4j.
Yoav Shapira
Millennium ChemInformatics
>-Original Message-
>From: Rick Roberts [mailto:[EMAIL PROTECTED]
>Sent: Friday, August 01, 2003 1:18 PM
>To: Tomcat Users List
>Subject: Re: Servlets & JSPs log to different files
>
>>
>&
How are you logging in your servlets? Are you using
System.out/System.err? If so, don't use them, and instead use the
ServletContext#log(..) methods.
Actually, they are mostly beans with no ServletContext :(
--
***
* Rick Roberts
Howdy,
>What is standard/recomended approach to getting my servlets and JSPs to
log
>to
>the same file.
>
>I am currently using the context logger in server.xml as follows:
>
>
>crossContext="true">
>suffix=".txt" timestamp="true"/>
>
>
>My JSP logs into /var/log/tomcat/ai_log.2003-08-01.txt
>But
If you serve your servlets preceded by /servlet, you can add something
like this to your web.xml
/servlet/*
Zach.
Jeff Cummings wrote:
Hi everyone,
I have been able to setup JSPs in a protrected resource. The login page is
displayed and everything works as expected. How do I setup a servlet i
Thanks Tim. I got it working.
Jeff
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 6:39 AM
To: Tomcat Users List
Subject: Re: Servlets in a protected resource
Security contraints are always made on the incoming URI. Therefore, whatever
you map
Security contraints are always made on the incoming URI. Therefore, whatever
you map your servlets paths to you'll need to create the appropriate
constraints.
-Tim
Jeff Cummings wrote:
Hi everyone,
I have been able to setup JSPs in a protrected resource. The login page is
displayed. How do I s
Howdy,
See intermixed -- there are a lot of different questions here ;)
> This turned out to be the case, but for a funky reason. By using the
JDBC drivers are a frequent cause for this. Another is JMS clients.
> It turns out that the SCSI backplane was the real problem and had to be
> replace
>>The problem: periodically Tomcat stops serving up servlets and JSP from my
>>webapps. However, the manager webapp and static pages continue to be
>>served normally. If I click 'stop' for any of my webapps from the manager
>>app, the page load just hangs forever. If you refresh the manager, it
Howdy,
>The problem: periodically Tomcat stops serving up servlets and JSP from
my
>webapps. However, the manager webapp and static pages continue to be
>served normally. If I click 'stop' for any of my webapps from the
manager
>app, the page load just hangs forever. If you refresh the manager
FAQ
http://jakarta.apache.org/tomcat/faq/misc.html#invoker
In short, you can't just drop a servlet into a directory and call it,
unless its in the /examples web application.
John
On Tue, 1 Jul 2003 11:21:50 -0700 (PDT), R. J. <[EMAIL PROTECTED]> wrote:
I just downloaded Tomcat Windows 4.1.24
I had the same problem yesterday and other Tomcatters helped me out.
Add this web.xml to your application WEB-INF directory.
http://java.sun.com/dtd/web-app_2_3.dtd";>
YourServlet
path.to.your.clss.files.YourServlet
YourServlet
/YourServlet
On Mon, 9 Jun 2003 23:05, Schwartz, David (CHR) wrote:
> Oracle 9i installs a service on Port 8080. This causes the logon popup.
> You either have to change tomcats port or disable the oracle feature.
> I changed Tomcat port to 80.
>
> Does anyone know how to disable or change oracle from port 808
from port 8080?
-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 21, 2003 11:45 AM
To: Tomcat Users List
Subject: Re: Servlets not working in my context
No, sorry. XP Home is a whole other animal...it's not designed or
configured by default t
You could edit the setclasspath.sh script but I would recommend against
that.
Regards
Jim.
> -Original Message-
> From: Ian Hunter [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2003 13:55
> To: Tomcat Users List
> Subject: Re: Servlets and classpath problem
>
>
I've had similar problems and I could have sworn I saw someone give the
advice that it's best to give each webapp it's own copy of the shared jars.
I did that and the problems went away. I hate having duplicate files, but I
guess if proper application "segmentation" is going on it's probably safer
Hi John,
Tomcat ignores the classpath that you set. Why can't you jar the external
classes you wish to call and put the jar file in webapp/WEB-INF/lib
Regards
Jim.
> -Original Message-
> From: John Rishea [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2003 13:49
> To: Tomcat Users List
11:54 AM
To: Tomcat Users List
Subject: Re: servlets don't work in own webapp (finshed writing this time)
On Sat, 15 Feb 2003 23:12:50 +0800
Chong Yu Meng <[EMAIL PROTECTED]> wrote:
where I can access it succesfull at :
http://localhost:8180/examples/servlets/HelloWorld
bu
OTECTED]]
Sent: Saturday, February 15, 2003 11:54 AM
To: Tomcat Users List
Subject: Re: servlets don't work in own webapp (finshed writing this time)
On Sat, 15 Feb 2003 23:12:50 +0800
Chong Yu Meng <[EMAIL PROTECTED]> wrote:
> >
> >
> >>>where I can access it su
On Sat, 15 Feb 2003 23:12:50 +0800
Chong Yu Meng <[EMAIL PROTECTED]> wrote:
> >
> >
> >>>where I can access it succesfull at :
> >>>http://localhost:8180/examples/servlets/HelloWorld
> >>>
> >>>but when I go to
> >>>
> >>>
> >>http://localhost:8180/pso/servlets/HelloWorld it doesn't
> >>
where I can access it succesfull at :
http://localhost:8180/examples/servlets/HelloWorld
but when I go to
http://localhost:8180/pso/servlets/HelloWorld it doesn't
work and gives me a 404 error, resource is not available.
The default invoker URL /pso/servlets/HelloWorld is d
What URL did you use?
The URL you use to access your server has to match the URL in .
John
> -Original Message-
> From: Jaap Duursma [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 15, 2003 6:57 AM
> To: Tomcat Users List
> Subject: Re: servlets don't work in
It didn't make any difference,
I put the following in my web.xml file :
http://java.sun.com/dtd/web-app_2_3.dtd";>
PSO webapp
PSO webapp
HelloWorld
HelloWorld
HelloWorld
/HelloWorld
thanks for ur help though, any other ideas ?
On
Hi,
Look at the web.xml for /examples. You'll see that you need to map your
servlet, etc.
Looks something like this:
SendMailServlet
SendMailServlet
SendMailServlet
/SendMailServlet
Hope this help.
Paul
-Original Message-
From: Jaap
Hi,
Yes, you need to modify web.xml. The url-pattern in the servlet-mapping
element is relative to the context root. For the URL you say want, put
in /cbiservlet instead of the current value.
Also, I suggest you put your servlet in a package, e.g. com.cbir or
whatever.
Yoav Shapira
Millennium
On Wed, 29 Jan 2003, Erik Price wrote:
> Date: Wed, 29 Jan 2003 07:41:01 -0500
> From: Erik Price <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: servlets
>
>
>
> Crai
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: RE: servlets
> >
> > So if I have just one and in my web.xml I
> > have guarantee of one instance, don't I?
>
> Yes, as long as the servl
Craig R. McClanahan wrote:
On 28 Jan 2003, Felipe Schnack wrote:
Date: 28 Jan 2003 19:26:27 -0200
From: Felipe Schnack <[EMAIL PROTECTED]>
Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: RE: servlets
So if I have ju
> From: "Wendy Smoak" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 28, 2003 2:32 PM
> Subject: RE: servlets
> Craig wrote
> > The servlet spec guarantees that you will get a single instance of a
> > non-SingleThreadModel servlet PER DEFINITION for tha
Yes, that's cool :-)))
Anyway, if you have multiple tomcats one would not see others
instances, so no prob at all.
I don't think anyone would use SingleThreadModel... it's practically
useless
On Tue, 2003-01-28 at 20:32, Wendy Smoak wrote:
> Craig wrote
> > The servlet spec guarantees that y
Craig wrote
> The servlet spec guarantees that you will get a single instance of a
> non-SingleThreadModel servlet PER DEFINITION for that webapp.
> See Section SRV.2.2 of the Servlet 2.3 spec for the formal details.
Interesting... I was under the impression that the container was free to
create
On 28 Jan 2003, Felipe Schnack wrote:
> Date: 28 Jan 2003 19:26:27 -0200
> From: Felipe Schnack <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: servlets
>
> So if I hav
> Well, the short answer is that I need instance variable values from a
> servlet (in this case, data from ServletConfig). I could certainly make
> my classes ask for the servlet instance as a method parameter, but this
> just looks so ugly to my perfectionist eyes :-)
If I've got it right, Servle
Yes... now I see :-))
But there must be a way!!!
On Tue, 2003-01-28 at 19:52, Jon Wingfield wrote:
> Problem with serialization:
> 1) Client asks for singleton from webapp and stores it as an instance
> variable.
> 2) Client get serialized to some persistance store (db, jms message
> queue,
Problem with serialization:
1) Client asks for singleton from webapp and stores it as an instance
variable.
2) Client get serialized to some persistance store (db, jms message
queue, whatever)
3) webapp goes away (dies, gets shutdown, whatever)
4) webapp restored
5) Client deserialized.
Which ve
> > If I write an servlet and DO NOT implement the SingleThreadModel, I
> > have a guarantee that I'll have only one instance of it? If not, here is
> > a way to do this?
>
> No, there's no guarantee. As far as I can tell, there's no guarantee even
> with SingleThreadModel.
As far as I understa
> From: "Felipe Schnack" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 28, 2003 1:05 PM
> Subject: servlets
> If I write an servlet and DO NOT implement the SingleThreadModel, I
> have a guarantee that I'll have only one instance of it? If not, here is
> a way to do this?
No, there's no guarante
Well, the short answer is that I need instance variable values from a
servlet (in this case, data from ServletConfig). I could certainly make
my classes ask for the servlet instance as a method parameter, but this
just looks so ugly to my perfectionist eyes :-)
On Tue, 2003-01-28 at 19:27, Wendy
ll getInstance() at the same time, you will only have one instance
>of your singleton.
>
> Yoav Shapira
> Millennium ChemInformatics
>
>
> >-Original Message-
> >From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, January 28, 2003 4:19
> yes, I know how to do it (private constructor, etc), but how tomcat
> will call an getInstance() method instead of create a new instance of
> it?
No... you move the sensitive code *out* of the Servlet into a Singleton, and
then code in your Servlet interacts with that Singleton.
Can you post a
So if I have just one and in my web.xml I
have guarantee of one instance, don't I?
On Tue, 2003-01-28 at 19:22, Craig R. McClanahan wrote:
>
>
> On Tue, 28 Jan 2003, Shapira, Yoav wrote:
>
> >
> > > If I write an servlet and DO NOT implement the SingleThreadModel, I
> > >have a guarantee t
apira
Millennium ChemInformatics
>-Original Message-
>From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 28, 2003 4:19 PM
>To: Tomcat Users List
>Subject: RE: servlets
>
> yes, I know how to do it (private constructor, etc), but how tomcat
>will
On Tue, 28 Jan 2003, Shapira, Yoav wrote:
>
> > If I write an servlet and DO NOT implement the SingleThreadModel, I
> >have a guarantee that I'll have only one instance of it?
>
> No.
That's not quite right.
The servlet spec guarantees that you will get a single instance of a
non-SingleThread
yes, I know how to do it (private constructor, etc), but how tomcat
will call an getInstance() method instead of create a new instance of
it?
On Tue, 2003-01-28 at 19:13, Shapira, Yoav wrote:
> Howdy,
>
> > If I write an servlet and DO NOT implement the SingleThreadModel, I
> >have a guarantee
Howdy,
> If I write an servlet and DO NOT implement the SingleThreadModel, I
>have a guarantee that I'll have only one instance of it?
No.
>If not, here is
>a way to do this?
No.
If you need only one instance of something, put in in a singleton. Have
your servlets use the singleton. A googl
Oops, ment to say "word" not "work".
--mikej
-=-
mike jackson
[EMAIL PROTECTED]
> -Original Message-
> From: Mike Jackson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 11:24 AM
> To: Tomcat Users List
> Subject: RE: servlets that
ECTED]
> -Original Message-
> From: Erik Price [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 10:53 AM
> To: Tomcat Users List
> Subject: Re: servlets that forward to other servlets
>
>
>
>
> Mike Jackson wrote:
> > You can always dispatch to ano
"dispatch" refers to the RequestDispatcher class which you use to do a
forward(). You are talking about exactly the same thing.
Jake
At 01:53 PM 1/23/2003 -0500, you wrote:
Mike Jackson wrote:
You can always dispatch to another servlet. You don't have to redirect.
So the sequence could be
Mike Jackson wrote:
You can always dispatch to another servlet. You don't have to redirect.
So the sequence could be something like the following:
-> LoginServlet (validated) (dispatch)-> MainServlet (dispatch)-> *.jsp
It'd look like your page that the MainServlet returned was coming direct
Price [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 10:19 AM
> To: Tomcat Users List
> Subject: Re: servlets that forward to other servlets
>
>
>
>
> Shapira, Yoav wrote:
> > Hi,
> > If it were a universal bad idea, it probably wouldn't be
Shapira, Yoav wrote:
Hi,
If it were a universal bad idea, it probably wouldn't be available as an
options ;) Although that may just be wishful thinking on my part.
It's not always a bad idea. As usual, if you share your design and give
some more concrete details, we may be able to help more.
In an Model2 sort of architecture like Struts, you would use this to
forward to your presentation JSP file. So, no, I don't think it is a bad idea.
Jake
At 12:14 PM 1/23/2003 -0500, you wrote:
Is it a bad idea to have a servlet that forwards to another servlet using
getRequestDispatcher(anoth
Hi,
If it were a universal bad idea, it probably wouldn't be available as an
options ;) Although that may just be wishful thinking on my part.
It's not always a bad idea. As usual, if you share your design and give
some more concrete details, we may be able to help more. If you're
getting into
> Suppose I have this servlet
>
> \WEBAPPS\ROOT\WEB-INF\CLASSES\HelloServlet
>
> for versions 4.0.6 and before , I could use
> "http://localhost:8080/servlet/HelloServlet";
>
> but now under 4.1.12, it is no longer working. It
> just cannot find it at
> all. However, normal HTML pages can stil
Lee <[EMAIL PROTECTED]>
10/29/2002 12:01 AM
Please respond to "Tomcat Users List"
To: [EMAIL PROTECTED]
cc:
Subject:RE: Servlets deployment directory location
Hi,
Suppose I have this servlet
\WEBAPPS\ROOT\WEB-INF\CLASSES\HelloServlet
fo
Hi,
Suppose I have this servlet
\WEBAPPS\ROOT\WEB-INF\CLASSES\HelloServlet
for versions 4.0.6 and before , I could use
"http://localhost:8080/servlet/HelloServlet";
but now under 4.1.12, it is no longer working. It just cannot find it at
all. However, normal HTML pages can still be accessed
Hi,
The WEB-INF/classes and WEB-INF/lib directories are where you can deploy
servlets and other compiled Java things for your web application. This
is not a tomcat-specific structure, it's part of the Servlet
Specification. And it hasn't changed from tomcat 4.0 to 4.1.
However, some other things
As a short-term work-around, try going to the /work directory and
manually compile the page_JSP.JAVA file there. I can't get JSPs to
automatically compile, but if I do them manually the next time they are
called they work fine. (It seems even with no changes you may have to
recompile them if
1 - 100 of 215 matches
Mail list logo