RE: Please Help On Static Reference ........

2001-03-08 Thread Zenon Braga F.

The idea is ever use a static method to deal with static variables.

sincerely,

Zenon Farias Braga F.


>From: "Mick Sullivan" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: RE: Please Help On Static Reference 
>Date: Wed, 07 Mar 2001 15:53:50 -
>
>Hi Jin
>Thanks for replying
>How do I actually do that? Im kinda new to JSP so bear with me here.
>I have done the following to the bean (made it static)
>package parkingPrice;
>
>public class parkingPricehandler{
>
>private static String thePrice;
>
>public parkingPricehandler() {
>//thePrice = null;
>}
>
>   public void setPrice( String price ) {
>thePrice = price;
>}
>
>static public String getPrice() {
>return thePrice;
>}
>
>}
>but i still get the same error?
>Any ideads, thanks , Mick
>
>
>Original Message Follows
>From: Byung Jin Chun <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: RE: Please Help On Static Reference 
>Date: Wed, 7 Mar 2001 10:29:02 -0500
>
>You have to either make the method a static one,
>or instantiate an instance of your class to call
>the method.
>
>Jin
>
> > -Original Message-
> > From: Mick Sullivan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 07, 2001 10:20 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Please Help On Static Reference 
> >
> >
> > It is a class, a very basic one at that
> > Here it is:
> >
> > package parkingPrice;
> >
> > public class parkingPricehandler{
> >  private String thePrice;
> >
> > public parkingPricehandler() {
> > //thePrice = null;
> > }
> > public void setPrice( String price ) {
> > thePrice = price;
> > }
> > public String getPrice() {
> > return thePrice;
> > }
> > }
> >
> > Any ideas?
> >
> >
> > Original Message Follows
> > From: "Samson, Lyndon [IT]" <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: "'[EMAIL PROTECTED]'"
> > <[EMAIL PROTECTED]>
> > Subject: RE: Please Help On Static Reference 
> > Date: Wed, 7 Mar 2001 14:57:58 -
> >
> > Is parkingPriceHandler an instantiated object or a class?
> >
> >
> > -Original Message-
> > From: Mick Sullivan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 07, 2001 2:48 PM
> > To: [EMAIL PROTECTED]
> > Subject: Please Help On Static Reference 
> >
> >
> > Hi all,
> > I was wondering could someoone please help me with this error
> > im getting.
> >
> > Im trying to output a value saved from a previous page in a
> > text box in a
> > new page using the JSP command:
> >  > VALUE="<%=parkingPriceHandler.getPrice()%>">
> >
> > The function getPrice() is defined in parkingPriceHandler.
> > This is the error i get:
> > "Can't make static reference to method java.lang.String
> > getPrice() in class
> > parkingPrice.parkingPricehandler."
> >
> > Error: 500
> > Location: /project/jsp/view_parking_cost.jsp
> > Internal Servlet Error:
> >
> > org.apache.jasper.JasperException: Unable to compile class for
> > JSPC:\tomcat\work\localhost_8080%2Fproject\_0002fjsp_0002fview
> > _0005fparking_
> > 0005fcost_0002ejspview_0005fparking_0005fcost_jsp_30.java:94:
> > Can't make static reference to method java.lang.String
> > getPrice() in class
> > parkingPrice.parkingPricehandler.
> >  out.print(parkingPricehandler.getPrice() );
> >^
> > 1 error
> >
> > at org.apache.jasper.compiler.Compiler.compile(Compiler.java,
> > Compiled
> > Code)
> > at
> > org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java,
> > Compiled
> > Code)
> > at
> > org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java,
> > Compiled Code)
> > at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java,
> > Compiled
> > Code)
> > at
> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfN
> > ecessary(JspSe
> > rvlet.java,
> > Compiled Code)
> > at
> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
> > (JspServlet.ja
> > va,
> > Compiled Code)
> > at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java,
> > Compiled Code)
> > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java,
> > Compiled
> > Code)
> > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
> > Code)
> > at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
> > Compiled Code)
> > at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
> > Code)
> > at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java,
> > Compiled Code)
> > at
> > org.apache.tomcat.core.ContextManager.internalService(ContextM
> > anager.java,
> > Compiled Code)
> > at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java,
> > Compiled Code)
> > at
> > org.apache.tomcat.se

Re: Redirection from http-server

2001-03-14 Thread Zenon Braga F.

If you we're in Tomcat, you could use "Request Dispatch", but it seems that 
you have your own http server, thus you should use the code of TCP/IP 
protocol appropriate, that is, a code and the url (http://someThing:8080).

sincerely,

Zenon Farias Braga F.


>From: "Subbarao Bhagavati" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Redirection from http-server
>Date: Tue, 13 Mar 2001 20:22:03 -0500
>
>Hi,
>
>I have written a simple http server that can serve static content. I want 
>to
>use the same server to run the servlets too. I am planning to use Tomcat in
>out-of-process mode to achieve this. I am having a problem in redirecting
>the http request to tomcat. my web server is running on port 1080 and the
>tomcat appserver http connection handler is listening on port 8080. How do 
>I
>send the request for a servelt to  tomcat and get it processed and send the
>response back to the client.
>Could some one help.
>
>Thanks,
>Subu
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Why we need apache web server with tomcat

2001-03-14 Thread Zenon Braga F.

I don't know, perhaps if dns had an alternative to redirect some domain 
("http://www.something.com") to port 8080, them the only need to use apache 
would be performance, thus for simplicity, I think that only Tomcat could 
work fine, but how many times does apache do the work in static page 
compared to Tomcat?   And if I'm use apache and use some perl script like 
modjk that uses an interpreted language, that as we already know isn't fast, 
does the overall time of serving static and dinamic pages using apache be 
less than the overall time of serving static and dinamic pages using Tomcat?
You should consider that redirecting a page has some overhead, and many 
time when the two servers isn't so coupled, it has some increase in trafic.


>From: "Dave Masino" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: RE: Why we need apache web server with tomcat
>Date: Tue, 13 Mar 2001 15:28:55 -0800
>
>http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-apache-howto.
>html
>
> > -Original Message-
> > From: Ritesh Seth [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 13, 2001 3:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: Why we need apache web server with tomcat
> >
> >
> > Hi all
> >
> > I downloaded apache-1.3.19 from apache web site. Configured it
> > with DSO and
> > perl support and installed it. Http daemon was running on port 80.
> >
> > Then i downloaded tomcat package. Configured and installed. It
> > was runnuing
> > on port 8080.
> >
> > My question is that from the browser when we specify 
>IPAddress::tomcatPort
> > it goes to tomcat otherwise without port number it goes to apache.Then 
>why
> > we need apache web server ?
> >
> >
> > Thanks in advance...
> >
> >
> > regards
> > ritesh
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: 'work' Folder--help??

2001-03-15 Thread Zenon Braga F.

I'm not sure, but the work directory is for hold the servlet's that the jsp 
generates, that is, before any jsp works, it need to generate a servlet, and 
the code of this servlet is hold in work directory.

sincerely,

Zenon Farias Braga F.


>From: "Mick Sullivan" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: 'work' Folder--help??
>Date: Wed, 14 Mar 2001 23:11:12 -
>
>Hi
>Anyone know what the hell is the 'work' folder for??
>Ive been using Tomcat for a couple of months and just today my project is
>gone all screwed up and when I make changes to the .JSP pages, they dont
>update on the server. I am using tomcat on its own and in the server.xml
>file I have the following Context declared
>
> docBase="webapps/project"
> debug="0"
> reloadable="true"
> trusted="false" >
>
>
>How come the JSP pages are not relaoding now until i delete the folder
>"localhost_8080%2Fproject" in the work folder?
>What are the files inside in this folder actually for??, e.g.
>_0002fjsp_0002fview_0005fparking_0005fcost_0002ejspview_0005fparking_0005fcost.class
>Can somebody please help me ion this issue?
>Im sure there is a simple answer.
>Thanks in advance,
>Mick
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: Reloading Pages....Help

2001-03-15 Thread Zenon Braga F.

I'm not sure, but every jsp generates a servlet in work directory and these 
servlets are erased when you invoke shutdown.sh, thus the simplest thing to 
do is to invoke shutdown.sh and then startup.sh, and the second simplest 
thing to do is to go to work directory and "rm *".

sincerely,

Zenon Farias Braga F.

>From: "Mick Sullivan" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Reloading PagesHelp
>Date: Wed, 14 Mar 2001 16:47:32 -
>
>Hi
>I need some help here. Does Tomcat cache JSP pages? I ask this because any
>changes I make to my JSP pages arnt actually saving. I am definetly 
>changing
>the right pages in the folder
>C:\tomcat\webapps\project\jsp\
>When i point my browser to
>http://localhost:8080/project/jsp/anyJSPFile.jsp
>the changes do not show???
>I have even moved the JSP folder, yet the pages (without their images and
>backgrounds) show on the browser?
>Someone please help,
>Thanks in advance, Mick
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: Closing ResultSet and Statement?

2001-03-20 Thread Zenon Braga F.

I'm not sure, but I think that you don't close a ResultSet, you only close 
the connection, in fact, you can even close the connection and still work 
with your ResultSet.
Think of ResultSet like a normal class with an interator that allows you to 
go forward and backward.

sincerely,

Zenon Farias Braga F.


>From: "Mick Sullivan" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Closing ResultSet and Statement?
>Date: Mon, 19 Mar 2001 20:48:31 -
>
>Hi
>Does anyone know how to close a ResultSet?
>Heres my code:
>public String getName() throws Exception {
>   Statement statement = connection.createStatement();
>   int myInt = 1;
>   ResultSet rs = statement.executeQuery("SELECT Name"+
>   " FROM nameAddress" +
>   " WHERE ID = ("+
>   myInt + ")");
>   rs.next();
>   String myString = rs.getString("Name");
> //change the resultSet to a string
> //so it can be used by the jsp page
>   return myString;
>  }
>Any help at all would be much appreciated
>Thanks in advance,
>Mick
>
>
>
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




unscribe

2001-03-28 Thread Zenon Braga F.


_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: Connecting to a database

2001-01-02 Thread Zenon Braga F.

You can use a servlet using jdbc, specifically jdbc-odbc bridge, appart it 
you have to configure ODBC for access.
It is not a feature of Tomcat, it's a feature of Java/servlet.




>From: "Mick Sullivan" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Connecting to a database
>Date: Tue, 02 Jan 2001 16:42:22 -
>
>Dows anyone know how to connect to say an access database using tomcat
>Can you use SQL on access??
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: reloading classes in tomcat 3.2

2001-01-18 Thread Zenon Braga F.




>From: Yaron Klein <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: reloading classes in tomcat 3.2
>Date: Wed, 17 Jan 2001 18:55:10 +0200
>
>Hi,
>I am a new user of  tomcat 3.2 and I'm trying to implements few classes 
>with
>tag libraries.
>In order to do so I have some packages that I wanted to use not under the
>tomcat directory, so in order to use them I added the path to those 
>packages
>in the tomcat.bat file. I think that is the reason that the classes don't
>reload automatically after I changed them and I have to restart the tomcat
>again and again (question 6.4 in the FAQ).
>So, my question is divided into two parts:
>1) how can I reload the classes automatically when I change them, without
>removing the package directory from the path ?

I don't know, it seems that it could not be possible.

>2) If (1) is not possible, how can I use packages and classes that are not
>under the root ?

Make your Servlets using packages, compile everything from the directory 
one degree above in the tree (the directory that your subdirectory is 
connect).
Use web.xml in your context (under WEB-INF) and put:


somethingthatusespackage
nameOfPackage.SomeThingThatUsesPackage




somethingthatusespackage
/somethingthatusespackage


That is it, whem your start Tomcat and Netscape and put 
"http://127.0.0.1:8080/yourcontext/somethingthatusespackage" your servlet 
that would be in 
"/opt/tomcat/webapps/yourcontext/WEB-INF/classes/nameOfPackage/SomeThingThatUsesPackage.class"
 
will be loaded.


>
>I need the answers ASAP and I will be more than thankful to have them,
>Thank you very very much,
>Yaron Klein.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]