Re: File upload won't work with Tomcat4 ...
Try to upload to upload your data files in the apache htdocs directory and access them via your JSP files from there. This is our setup in our webhosting company. All our JSP apps are in /webapps directory. And all the rest of the files (*.html, *gif, *.jpg, *.zip) are in /htdocs. At 09:42 AM 12/20/01 +0100, martin eberle wrote: Hi, i try to upload any stuff (mostly .zip, .doc, .xls, .txt) - but it doesn't matter which filetype, the result is always the same: Apache Tomcat/4.0.1 - HTTP Status 404 - ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not found) type Status report message ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not found) description The requested resource ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not found)) is not available. I know, that the file has not been found, cause i try to create it ;) ... Tomcat directory structure to .jsp files (oh, directory / file user rights, etc. has been set correctly!): /var/tomcat4/webapps/mywebapp/ Tomcat directory structure to data (upload) files: /var/tomcat4/webapps/mywebapp/data/attachements/ In my upload class, i've defined the var SAVEPATH which contain's the store path as string ... : String savePath=../webapps/mywebapp/data/attachements/; Question 1: From which base directory does tomcat try to access the data dir? (/var/tomcat4/bin/../webapps/mywebap/data/attachements/) ??... Question 2: Is my savePath definition just wrong? What i'm wondering about: with Tomcat 3.2x, the fileupload worked as well Thx for any answers ... Regards, -martin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: AW: File upload won't work with Tomcat4 ...
Our setup in our web hosting company is if we have a /webapps/data directory, we should also have a /htdocs/data directory. All JSP's and classes reside in the /webapps directory while the rest are in /htdocs directory. Lester At 09:57 AM 12/20/01 +0100, martin eberle wrote: I've thinked about /htdocs dir, too .. But: why does tomcat tries to access the file in ../webapps/mywebapp/data/attachements/ ?? In result, how should the /htdocs directory labeled? /usr/local/httpd/htdocs/webapps/mywebapp/data/attachements/ ?? Or anything else? regards, -martin -Ursprüngliche Nachricht- Von: Lester June Cabrera [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 20. Dezember 2001 09:45 An: Tomcat Users List; martin eberle Betreff: Re: File upload won't work with Tomcat4 ... Try to upload to upload your data files in the apache htdocs directory and access them via your JSP files from there. This is our setup in our webhosting company. All our JSP apps are in /webapps directory. And all the rest of the files (*.html, *gif, *.jpg, *.zip) are in /htdocs. At 09:42 AM 12/20/01 +0100, martin eberle wrote: Hi, i try to upload any stuff (mostly .zip, .doc, .xls, .txt) - but it doesn't matter which filetype, the result is always the same: Apache Tomcat/4.0.1 - HTTP Status 404 - ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not found) type Status report message ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not found) description The requested resource ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not found)) is not available. I know, that the file has not been found, cause i try to create it ;) ... Tomcat directory structure to .jsp files (oh, directory / file user rights, etc. has been set correctly!): /var/tomcat4/webapps/mywebapp/ Tomcat directory structure to data (upload) files: /var/tomcat4/webapps/mywebapp/data/attachements/ In my upload class, i've defined the var SAVEPATH which contain's the store path as string ... : String savePath=../webapps/mywebapp/data/attachements/; Question 1: From which base directory does tomcat try to access the data dir? (/var/tomcat4/bin/../webapps/mywebap/data/attachements/) ??... Question 2: Is my savePath definition just wrong? What i'm wondering about: with Tomcat 3.2x, the fileupload worked as well Thx for any answers ... Regards, -martin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JSP/Servlet Web Hosting?
Try also MMA Web Hosting http://www.mmaweb.net At 09:56 PM 11/12/01 -0700, Dan Hinojosa wrote: Kattare.com C Cayetano wrote: Anyone know or can recommend a reasonable priced web hosting company that supports JSP/servlets? Thanks in advance Chris -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Help please...
Hi Daniel, You should be able to change the port setting in the /conf/server.xml file. !-- Normal HTTP -- Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.http.HttpConnectionHandler/ Parameter name=port value=8080/ /Connector The server root setting is also in server.xml file. As for the placement of servlets, you can use the build utility of Tomcat so that it will compile and copy the servlets into its destintaion directory. See the sample directory. Settings are configured in your build.xml file. For example, you can set the following line in build.xml property name=app.name value=daniel/ so all your servlets will then be saved in /webapps/daniel/web-inf/classes And there is a document that explains integrating Tomcat with Apache. Lester At 01:58 PM 10/23/01 +0200, you wrote: Hi all: I am new with tomcat server. I have tomcat 4.0 version and Windows NT. I have installed the server and it works with the default settings. But I have many questions (I was reading the server docs... I don't understand the greater part of the things): - How can I change the server default name (localhost) and server default port (8080)? - How can I change the server default root (/Apache Tomcat 4.0/webapps/Root/)? - Where do I must to put my servlets for running?. I suppose that I must to write where is the servlet's code in a configuration file (like in JDSK server). - How can I implement tomcat like an Apache module? I know, many questions but if you can help me in whatever it would be really helpful because the server docs are like chinese for me Thanks a million, Daniel Best regards, Daniel
getDay() return value is delayed
Hi, I'm using Tomcat 3.2. I noticed that the return value of getDay() of java.util.Date is delayed by 1 week every week. First, I deployed my apps in my Linux server, I encountered this problem. Now, I transferred all my apps to our SUN server, it's the same problem. So, I have to keep on adding + 7 days every week. This is really weird. Thanks, Lester
Re: off-topic: Result Set as attribute
Hi Peter, Yes, your code is using two attribute names for every record. And the last attribute values that get saved are the those of the last record of your resultset. I would would recommend that you use hidden fields in your form with the id for each record. Lester At 11:21 AM 9/26/01 +0200, you wrote: Hello all, this is a bit off Topic, but it also belong to Tomcat: I have 2 jsp-pages: In the first a result set is executed. Each record in the row has a button ( more information) which leeds to the second page. On this page I will give more information to the item of the first page but I allways see only the last record of the result set. Here's a piece of my code: % while(rs.next()) { session.setAttribute(autor,rs.getString(1)); session.setAttribute(titel1,rs.getString(2)); .. % B%=rs.getString(1)%/BBR %=rs.getString(2)% %=rs.getString(3)% %=rs.getString(6)% %=rs.getString(10)% HREF=moreinfos.jspmore information/A } % in moreinfos.jsp I now want to show more of this item like: %=(String)session.getAttribute(autor)% %=(String)session.getAttribute(titel1)% .. And it shows me allways the last record of my result set instead of the one I need. How can I tell on which record I push the moreinfos-button??? I would be very happy about every hint and please excuse my bad english Peter
Re: Works on 8080 but not on 80, help!
Did you edit /conf/server.xml already? At 09:05 PM 9/25/01 -0700, you wrote: It appears I have things working correctly on port 8080, but i'd like to call JSP files from standard port 80 as well. I'm using mod_webapp with the following lines in apache: WebAppConnection tomcatConnection warp 192.168.1.2:8008 WebAppDeploy webapp tomcatConnection /webapp WebAppDeploy root_site tomcatConnection / the URL http://mysitesURL:8080/something.jsp works so does http://mysitesURL:8080/webapp/something.jsp but i'd like http://mysitesURL/something.jsp to work (on port 80) right now, if I try to connect without the port 8080, it just hangs and eventually times out. My paths are /usr/local/jakarta-tomcat-4.0/webapps/ROOT (this is apache's docroot and has some JSPs in it and HTML) /usr/local/jakarta-tomcat-4.0/webapps/webapp (this has some JSPs in it also) Any help is appreciated! ___ http://inbox.excite.com Lester June Cabrera Chief Programmer VinciWorks 29F 88 Corporate Center Valero St., Salcedo Village Makati City Tel: +632-889 6303 Fax: +632-889 6287 Email: [EMAIL PROTECTED] Mobile: +63915-7120430
[JSP] get serial value in PostgreSQL
After adding a record in PostgreSQL with id as serial, how do I get the value of id? Thanks, Lester
Re: Deploying a Servlet using WAR
Hi Stuart, If you use the build utility that's bundled with the Tomcat package, you can set how you want your servlet called via the file /etc/web.xml. See sample value below. I have my servlet file named ServiceControl.class but I want it to be accessed as /service in the URL. servlet servlet-nameServiceControl/servlet-name servlet-classServiceControl/servlet-class /servlet servlet-mapping servlet-nameServiceControl/servlet-name url-pattern/service/url-pattern /servlet-mapping Lester At 11:15 AM 9/24/01 +0100, you wrote: All Does anybody have information on how to reduce the full Java path to a servlet? (deployed with WAR file) ..Want this: http://loopback/myproject/ClickThroughListener file path on server would be /root/jakarta/webapps/myproject/WEB-INF/classes/com/abcgateway/abc/gateway/MyServlet .Don't want this: http://loopback/abcgateway/com.mycompany.abc.gateway.MyServlet or this: http://loopback/servlet/com.mycompany.abc.gateway.MyServlet file path on server is /root/jakarta/webapps/ROOT/WEB-INF/classes/com/abcgateway/abc/gateway/MyServlet ... Stuart This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
Re: Change Default port 8080
Edit server.xml in tomcat/conf directory: !-- Normal HTTP -- Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.http.HttpConnectionHandler/ Parameter name=port value=8080/ /Connector At 03:30 PM 9/20/01 +0800, you wrote: Hi all, Can I running TomCat on port 80 instead 8080? Is the Tomcat can process common HTML syntax? How to modify it? I do not want to merge it to APACHE. I just want t simple web server. thank you all~
Re: Session Problem
Try this one inside your JSP page... if (session.isNew()) { // do something } else { // ... String sessionUser = (String)session.getValue(username); // do something } At 04:17 PM 9/20/01 +0530, you wrote: Hello Tomcats, I have a problem with tomcat 4.0. I would like to know if anybody else has experienced this. I am creating a session with getSession(false) in my first page and then in the subsequent pages when I call the session using getSession(true), tomcat is creating and returning a new session. The same code is working fine with tomcat323 i.e I get the session which was created in the first page. Could somebody through some light on this. Razi _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp Lester June Cabrera Chief Programmer VinciWorks 29F 88 Corporate Center Valero St., Salcedo Village Makati City Tel: +632-889 6303 Fax: +632-889 6287 Email: [EMAIL PROTECTED] Mobile: +63915-7120430
Permission Denied Error in Linux
Hi, I tried to install Tomcat 3.2 in Linux. But when I run shell bin/startup.sh I got a Permission Denied error. These are the steps I did: 1) installed JDK 1.2.2 for Linux as root. 2) included JDK path in .bash_profile 3) set JAVA_HOME env variable in .bash_profile 4) installed Tomcat 3.2 as root 5) included Tomcat path in .bash_profile 6) set a TOMCAT_HOME in .bash_profile See th settings of .bash_profile below: PATH=$PATH:$HOME/bin:/usr/local/jdk1.2.2/bin:/usr/local/jakarta-tomcat-3.2.3/bin ENV=$HOME/.bashrc TOMCAT_HOME=/usr/local/jakarta-tomcat-3.2.3 JAVA_HOME=/usr/local/jdk1.2.2 USERNAME=root export USERNAME ENV PATH TOMCAT_HOME Thanks, Lester
Re: Permission Denied Error in Linux
Thanks. I got it now. I made startup.sh, tomcat.sh and shutdown.sh all executable. And nope, we're not using RedHat 7.0. We haven't fully tested it yet. Why? What should we know about version 7? We're using 6.2 because we have tested it already for more than a year now. Thanks again, Lester At 12:11 AM 8/30/01 -0700, you wrote: hi lester, try chmod +x startup.sh or chmod 777 startup.sh then try sh startup.sh or ./startup.sh what flavour of linux do u have i hope it;'s not RH7.0!!! ravi On Wed, 29 August 2001, Lester June Cabrera wrote: Hi, I tried to install Tomcat 3.2 in Linux. But when I run shell bin/startup.sh I got a Permission Denied error. These are the steps I did: 1) installed JDK 1.2.2 for Linux as root. 2) included JDK path in .bash_profile 3) set JAVA_HOME env variable in .bash_profile 4) installed Tomcat 3.2 as root 5) included Tomcat path in .bash_profile 6) set a TOMCAT_HOME in .bash_profile See th settings of .bash_profile below: PATH=$PATH:$HOME/bin:/usr/local/jdk1.2.2/bin:/usr/local/jakarta-tomcat-3.2.3/bin ENV=$HOME/.bashrc TOMCAT_HOME=/usr/local/jakarta-tomcat-3.2.3 JAVA_HOME=/usr/local/jdk1.2.2 USERNAME=root export USERNAME ENV PATH TOMCAT_HOME Thanks, Lester Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com Lester June Cabrera Chief Web Programmer VinciWorks 2904 88 Corporate Center Valero St., Salcedo Village Makati City Email: [EMAIL PROTECTED] Mobile: +63915-7120430