RE: Servlets and debugging

2004-11-23 Thread Benson Margulies
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

RE: Servlets and debugging

2004-11-23 Thread Shapira, Yoav
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

Re: Servlets and debugging

2004-11-23 Thread sven morales
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

Re: Servlets and debugging

2004-11-23 Thread Ben Souther
> 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

Re: Servlets and debugging

2004-11-23 Thread Dave Robbins
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

RE: servlets and jsp with Tomcat 5.0

2004-07-27 Thread Shapira, Yoav
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

Re: Servlets won't load after deployment

2004-02-04 Thread Phil Campaigne
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

RE: Servlets won't load after deployment

2004-02-03 Thread Filip Hanik \(lists\)
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:

RE: servlets are no where to be found

2004-01-21 Thread Wendy Smoak
> 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

RE: servlets marked as unavailable

2003-12-29 Thread Shapira, Yoav
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

Re: Servlets with JDBC connectivity

2003-12-04 Thread Todd O'Bryan
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

Re: Servlets with JDBC connectivity

2003-12-04 Thread Todd O'Bryan
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,

Re: Servlets with JDBC connectivity

2003-12-04 Thread Todd O'Bryan
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

Re: Servlets with JDBC connectivity

2003-12-04 Thread Doug Parsons
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 =

Re: Servlets with JDBC connectivity

2003-12-03 Thread Kwok Peng Tuck
>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

Re: Servlets with JDBC connectivity

2003-12-03 Thread Christopher Schultz
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

Re: Servlets with JDBC connectivity

2003-12-03 Thread Todd O'Bryan
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

Re: Servlets with JDBC connectivity

2003-12-03 Thread Todd O'Bryan
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.

Re: Servlets with JDBC connectivity

2003-12-03 Thread Doug Parsons
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 =

Re: Servlets with JDBC connectivity

2003-12-03 Thread Nikola Milutinovic
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

Re: Servlets with JDBC connectivity

2003-12-03 Thread Peter Harrison
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

Re: Servlets with JDBC connectivity

2003-12-02 Thread Kwok Peng Tuck
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

Re: Servlets -- help needed

2003-11-14 Thread Graham Reeds
> 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

Re: Servlets -- help needed

2003-11-14 Thread Graham Reeds
> 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

RE: Servlets -- help needed

2003-11-14 Thread Indrasish N Basuroychowdhury
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:

RE: Servlets -- help needed

2003-11-14 Thread Edson Alves Pereira
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

Re: Servlets -- help needed

2003-11-14 Thread Christopher Schultz
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

RE: Servlets -- help needed

2003-11-14 Thread Schalk
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

Re: Servlets -- help needed

2003-11-14 Thread Kwok Peng Tuck
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

Re: Servlets -- help needed

2003-11-14 Thread Navanee
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

Re: Servlets -- help needed

2003-11-14 Thread Navanee
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

RE: Servlets -- help needed

2003-11-14 Thread Galbayar
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

Re: Servlets -- help needed

2003-11-14 Thread K. Harvatis
- 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:

Re: Servlets -- help needed

2003-11-14 Thread Navanee
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

RE: Servlets -- help needed

2003-11-13 Thread Schalk
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

Re: servlets: automatic compilation: is it possible?

2003-10-27 Thread Christopher Schultz
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

Re: servlets: automatic compilation: is it possible?

2003-10-27 Thread Tim Funk
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

Re: servlets and cookies

2003-10-14 Thread Robert Weeks
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

RE: servlets and cookies

2003-10-14 Thread Steph Richardson
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

RE: Servlets / Includes - not working

2003-10-01 Thread Keith O'Brien
> -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

Re: Servlets from public_html?

2003-08-18 Thread John Turner
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

RE: Servlets & JSPs log to different files

2003-08-04 Thread Shapira, Yoav
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

RE: Servlets & JSPs log to different files

2003-08-01 Thread Adrian Beech
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

RE: Servlets & JSPs log to different files

2003-08-01 Thread Shapira, Yoav
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 > >> >&

Re: Servlets & JSPs log to different files

2003-08-01 Thread Rick Roberts
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

RE: Servlets & JSPs log to different files

2003-08-01 Thread Shapira, Yoav
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

Re: Servlets in a protected resource

2003-07-28 Thread Zach Gatu
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

RE: Servlets in a protected resource

2003-07-25 Thread Jeff Cummings
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

Re: Servlets in a protected resource

2003-07-25 Thread Tim Funk
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

RE: Servlets/JSP crash, static content & manager app OK

2003-07-02 Thread Yoav Shapira
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

RE: Servlets/JSP crash, static content & manager app OK

2003-07-02 Thread Roman Fail
>>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

RE: Servlets/JSP crash, static content & manager app OK

2003-07-01 Thread Shapira, Yoav
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

Re: servlets fail on me

2003-07-01 Thread John Turner
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

RE: servlets fail on me

2003-07-01 Thread Chen, Yi
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

[OT]Changing Oracle ports (was: Re: Servlets not working in my context: SOLVED)

2003-06-09 Thread Jason Bainbridge
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

RE: Servlets not working in my context: SOLVED

2003-06-09 Thread Schwartz, David (CHR)
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

RE: Servlets and classpath problem

2003-02-21 Thread Collins, Jim
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 > >

Re: Servlets and classpath problem

2003-02-21 Thread Ian Hunter
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

RE: Servlets and classpath problem

2003-02-21 Thread Collins, Jim
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

Re: servlets don't work in own webapp (finshed writing this time)

2003-02-15 Thread Chong Yu Meng
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

RE: servlets don't work in own webapp (finshed writing this time)

2003-02-15 Thread Turner, John
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

Re: servlets don't work in own webapp (finshed writing this time)

2003-02-15 Thread Jaap Duursma
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 > >>

Re: servlets don't work in own webapp (finshed writing this time)

2003-02-15 Thread Chong Yu Meng
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

RE: servlets don't work in own webapp (finshed writing this time)

2003-02-15 Thread Turner, John
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

Re: servlets don't work in own webapp (finshed writing this time)

2003-02-15 Thread Jaap Duursma
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

RE: servlets don't work in own webapp (finshed writing this time)

2003-02-15 Thread Paul Bothma
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

RE: servlets reach under tomcat 4.0.6

2003-02-10 Thread Shapira, Yoav
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

Re: servlets

2003-01-30 Thread Craig R. McClanahan
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

Re: servlets

2003-01-29 Thread Bill Barker
> 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

Re: servlets

2003-01-29 Thread Erik Price
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

Re: servlets

2003-01-28 Thread Will Hartung
> 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

RE: servlets

2003-01-28 Thread Felipe Schnack
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

RE: servlets

2003-01-28 Thread Wendy Smoak
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

RE: servlets

2003-01-28 Thread Craig R. McClanahan
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

RE: servlets

2003-01-28 Thread Wendy Smoak
> 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

Re: servlets

2003-01-28 Thread Felipe Schnack
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,

Re: servlets

2003-01-28 Thread Jon Wingfield
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

Re: servlets

2003-01-28 Thread Felipe Schnack
> > 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

Re: servlets

2003-01-28 Thread Will Hartung
> 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

RE: servlets

2003-01-28 Thread Felipe Schnack
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

RE: servlets

2003-01-28 Thread Felipe Schnack
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

RE: servlets

2003-01-28 Thread Wendy Smoak
> 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

RE: servlets

2003-01-28 Thread Felipe Schnack
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

RE: servlets

2003-01-28 Thread Shapira, Yoav
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

RE: servlets

2003-01-28 Thread Craig R. McClanahan
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

RE: servlets

2003-01-28 Thread Felipe Schnack
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

RE: servlets

2003-01-28 Thread Shapira, Yoav
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

RE: servlets that forward to other servlets

2003-01-23 Thread Mike Jackson
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

RE: servlets that forward to other servlets

2003-01-23 Thread Mike Jackson
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

Re: servlets that forward to other servlets

2003-01-23 Thread Jacob Kjome
"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

Re: servlets that forward to other servlets

2003-01-23 Thread Erik Price
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

RE: servlets that forward to other servlets

2003-01-23 Thread Mike Jackson
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

Re: servlets that forward to other servlets

2003-01-23 Thread Erik Price
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.

Re: servlets that forward to other servlets

2003-01-23 Thread Jacob Kjome
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

RE: servlets that forward to other servlets

2003-01-23 Thread Shapira, Yoav
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

RE: Servlets deployment directory location

2002-10-29 Thread John B
> 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

RE: Servlets deployment directory location

2002-10-29 Thread Robert L Sowders
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

RE: Servlets deployment directory location

2002-10-29 Thread Peter Lee
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

RE: Servlets deployment directory location

2002-10-28 Thread Shapira, Yoav
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

Re: Servlets RUn but JSP Fails

2002-10-23 Thread Chris Wolcott
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   2   3   >