Re: JSP pages giving out source code
Hello, Thanks for the reply. I am not the owner of the server. I have hosted my site on some shared server. So, I do not have any admin previliages. How can I use JK or JK2 or WARP. I have been given a directory as somename is the root folder for my site. e.g webapps/somename. I upload all my files here. Can some one tell me in more detail how to prevent my jsp pages giving out the code. How can I prevent this? Thanks Uma http://www.javagalaxy.com - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 8:53 PM Subject: RE: JSP pages giving out source code Apache doesn't understand that *.jsp requests need to be sent to Tomcat. You need a connector (WARP, JK, or JK2), and if you already have one, it's misconfigured. John -Original Message- From: Uma Maheswar [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 10:17 AM To: Tomcat Users List Subject: JSP pages giving out source code Hello, Some of the links in my website to .jsp pages are giving out the source code and some or not. What is the reason? e.g http://www.javagalaxy.com/sss.jsp gives out source code (not true link) where as http://www.javagalaxy.com:8080/ss/s.jsp will work. How to correct this? Any one help. Uma http://www.javagalaxy.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JSP pages giving out source code
Hello, Some of the links in my website to .jsp pages are giving out the source code and some or not. What is the reason? e.g http://www.javagalaxy.com/sss.jsp gives out source code (not true link) where as http://www.javagalaxy.com:8080/ss/s.jsp will work. How to correct this? Any one help. Uma http://www.javagalaxy.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat Problem
Hello, I cannot view the Tomcat Console. I am using Tomcat 4.0 on Win XP. Also, I cannot start the Tomcat from Start - Programmes - Apache Tomcat. I need to go to the Control Panel - Admin Tools - Services and then start the Tomcat over there. Can any one tell me what is wrong? I am also using JDK1.4.0 Thanks Uma Java Developer http://www.javagalaxy.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Problem
Hi Probst, Sorry, I did that. Not helpful. Any other way? Uma - Original Message - From: Andreas Probst [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, October 05, 2002 12:56 PM Subject: Re: Tomcat Problem Hi Uma, it seems you installed Tomcat as a service. You could deinstall this service or set it to manual start. Then you should be able to start Tomcat manually from the script. On Sun, 29 Sep 2002 19:30:50 -0500 there was a message from Jacob Kjome (Subject: Re: Need Help ASAP w. Tomcat install!), where he also explained, how to install or deinstall the service from the command line. Andreas On 5 Oct 2002 at 7:54, Uma Maheswar wrote: Hello, I cannot view the Tomcat Console. I am using Tomcat 4.0 on Win XP. Also, I cannot start the Tomcat from Start - Programmes - Apache Tomcat. I need to go to the Control Panel - Admin Tools - Services and then start the Tomcat over there. Can any one tell me what is wrong? I am also using JDK1.4.0 Thanks Uma Java Developer http://www.javagalaxy.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Problem
Hi Reynir, I do not have any error message. If I need to start the Tomcat in my PC running on Win XP, I need to go to Start - Control Panel - Admin Tools - Services and then start the Tomcat. There is no other option for me than this. Now the Tomcat gets started if I do so. But I wanted to view its Console (Black DOS like Window). How can I get this? Thanks Uma http://www.javagalaxy.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Problem
Hi Reynir, I tried it, I got this messages C:\PROGRA~1\Apache Tomcat 4.0\bincatalina run Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CLASSPATH: ..\bin\bootstrap.jar;c:/j2sdk1.4.0/bin;\lib\tools.jar Using JAVA_HOME: c:/j2sdk1.4.0/bin; The system cannot find the path specified. C:\PROGRA~1\Apache Tomcat 4.0\bin But I dont see the console. My Tomcat is working when I type http://localhost:8080 . Please suggest me. Thanks Uma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Problem
Reynir, I tried this and it gave me some error messages. Can you suggest me now? Uma C:\PROGRA~1\Apache Tomcat 4.0\bincatalina run Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CLASSPATH: ..\bin\bootstrap.jar;c:/j2sdk1.4.0/bin;\lib\tools.jar Using JAVA_HOME: c:/j2sdk1.4.0/bin; The system cannot find the path specified. C:\PROGRA~1\Apache Tomcat 4.0\binset JAVA_HOME=C:\j2sdk1.4.0 C:\PROGRA~1\Apache Tomcat 4.0\bincatalina run Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CLASSPATH: ..\bin\bootstrap.jar;C:\j2sdk1.4.0\lib\tools.jar Using JAVA_HOME: C:\j2sdk1.4.0 ERROR reading ..\conf\server.xml At Line 319 /Server/Service/Connector/ className=org.apache.catalina.connector.w arp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.connector. warp.WarpConnector java.lang.ClassNotFoundException: org.apache.catalina.connector.warp.WarpConnect or at java.net.URLClassLoader$1.run(URLClassLoader.java:198) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:262) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:130) at org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:616) at org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412) at org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91 ) at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.ja va:329) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490) at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500) at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:314) at javax.xml.parsers.SAXParser.parse(SAXParser.java:253) at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) C:\PROGRA~1\Apache Tomcat 4.0\bin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Problem
Reynir, I never changed the server.xml file. I dont know that stuff. Can you tell me how to change WARP? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
About WARP, HELP
Can any one tell me about WARP? Please help me. My problem is listed below. Thanks Uma C:\PROGRA~1\Apache Tomcat 4.0\bincatalina run Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CLASSPATH: ..\bin\bootstrap.jar;c:/j2sdk1.4.0/bin;\lib\tools.jar Using JAVA_HOME: c:/j2sdk1.4.0/bin; The system cannot find the path specified. C:\PROGRA~1\Apache Tomcat 4.0\binset JAVA_HOME=C:\j2sdk1.4.0 C:\PROGRA~1\Apache Tomcat 4.0\bincatalina run Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CLASSPATH: ..\bin\bootstrap.jar;C:\j2sdk1.4.0\lib\tools.jar Using JAVA_HOME: C:\j2sdk1.4.0 ERROR reading ..\conf\server.xml At Line 319 /Server/Service/Connector/ className=org.apache.catalina.connector.w arp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.connector. warp.WarpConnector java.lang.ClassNotFoundException: org.apache.catalina.connector.warp.WarpConnect or at java.net.URLClassLoader$1.run(URLClassLoader.java:198) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:262) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:130) at org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:616) at org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412) at org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91 ) at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.ja va:329) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490) at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500) at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:314) at javax.xml.parsers.SAXParser.parse(SAXParser.java:253) at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) C:\PROGRA~1\Apache Tomcat 4.0\bin -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: About WARP, HELP
Hi, Its already same in the server.xml file. I am attaching the file for your review. Please check it Uma !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 4.0 documentation bundle for more detailed instructions): * Download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define an SSL HTTP/1.1 Connector on port 8443 -- !-- Connector className=org.apache.catalina.connector.http.HttpConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory className=org.apache.catalina.net.SSLServerSocketFactory clientAuth=false protocol=TLS/ /Connector -- !-- Define an AJP 1.3 Connector on port 8009 -- !-- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ -- !-- Define a Proxied HTTP/1.1 Connector on port 8081 -- !-- See proxy documentation for more information about using this. -- !-- Connector className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 connectionTimeout=6 proxyPort=80/ -- !-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 -- !-- Connector className=org.apache.catalina.connector.http10.HttpConnector port=8082 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0/ -- !-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). -- !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- The request dumper valve dumps useful debugging information about the request headers and cookies that were received, and the response headers and cookies that were sent, for all requests received by this instance of Tomcat. If you care only
Re: About WARP, HELP
George, Then which server.xml file is this taking? I got this file from tomcat/conf/server.xml. Please advice. Uma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Cannot view the console
Hello, I cannot view the Tomcat Console. I am using Tomcat 4.0 on Win XP. Also, I cannot start the Tomcat from Start - Programmes - Apache Tomcat. I need to go to the Control Panel - Admin Tools - Services and then start the Tomcat over there. Can any one tell me what is wrong? I am also using JDK1.4.0 Thanks Uma Java Developer http://www.javagalaxy.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Writing beans
Hi, I need help writing a bean inside my JSP programme. I am also attaching my JSP programme, please check it and do the need ful changes. % page import=java.sql.*,java.io.*,javax.servlet.*,javax.servlet.http.*,java.util.* % html %! String iam,seeking,lookingfor,firstname,lastname,address,city,state,country,email; String userid,password1,password2,newsletter,offers,totdate; int slno,pincode,phone,count=0,month,date,year; Connection con = null; Statement st,st1; ResultSet rs,rs1; Calendar cal; java.sql.Date sqlDate; % % try { Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); con = DriverManager.getConnection(jdbc:odbc:umasql,sa,bhavanid); st = con.createStatement(); st1 = con.createStatement(); firstname = request.getParameter(firstname); lastname = request.getParameter(lastname); address = request.getParameter(address); city = request.getParameter(city); state = request.getParameter(state); country = request.getParameter(country); pincode = Integer.parseInt(request.getParameter(zipcode)); email = request.getParameter(email); phone = Integer.parseInt(request.getParameter(phone)); userid = request.getParameter(nickname); password1 = request.getParameter(password1); password2 = request.getParameter(password2); newsletter = request.getParameter(newsletter); offers = request.getParameter(offers); rs1 = st1.executeQuery(select * from Dating_Register where nickname='+userid+' ); out.println(htmlhead); out.println(/head); if(rs1.next()) { out.println(h4font color=redSorry the user already exists/font/h4); //printContent(); } else if(!(password1.equals(password2))) { out.println(h4font color=redPlease type both the passwords same/font/h4); //printContent(); } else { String inserting = insert into Dating_Register values(+count+,'+iam+','+seeking+','+lookingfor+','+firstname+','+lastname+','+address+','+city+','+state+','+country+',+pincode+,'+email+',+phone+,+sqlDate+,'+userid+','+password1+','+password2+','+newsletter+','+offers+'); int x = st1.executeUpdate(inserting); out.println(centerbRegistered Successfully/b/center); out.println(form name=login action='/servlet/Login' method='post'); out.println(tabletrtdNickname:/tdtdinput type=text name=userid size=15/td/tr); out.println(trtdPassword:/tdtdinput type=password name=pass size=15/td/tr/table); out.println(input type=submit value='Login' name=loginnbsp;input type=reset value='Reset' name=reset); out.println(/form); } } catch(Exception e) { e.printStackTrace(); } % %! public void printContent() { This is my bean code, It is a big code, so I am not pasting it here. It is actually recalling the HTML page when the user already exists or the password is not valid. Do, I have to say out.println statement for each and every HTML line? } % /body /html Thank you, Regards Uma
Pls Help!! Uploading an image
HI, I need help from any of you. I need a programme to upload an image to the database while submitting a form. If any one is having the source code pls help me. Regards Uma
Re: Pls Help!! Uploading an image
Hi, I tried using O'Reilly, but it is confusing. I need a simple one than that one. Can you help me? Uma - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 2:34 AM Subject: Re: Pls Help!! Uploading an image Uma, The O'Reilly servlets book has a good example (including code) where you can upload files (including images as part of a form). See http://www.servlets.com/cos/javadoc/com/oreilly/servlet/m ultipart/MultipartP arser.html for more info. Hope this helps. Satyakant Evani - Original Message - From: Uma Maheswar [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 04, 2002 10:49 AM Subject: Pls Help!! Uploading an image HI, I need help from any of you. I need a programme to upload an image to the database while submitting a form. If any one is having the source code pls help me. Regards Uma nope i am using tomcat from my user area .. both tomcat and apache run from my user area there is some problem with a particular .so file which it is not able to find -Original Message- From: brian ally [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 11:04 PM To: Tomcat Users List Subject: Re: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path Are you starting tomcat as root? On my linux box, if i su to root, all manner of LD_LIBRARY_PATH problems begin. i need to su - (with the dash). Could this be your problem? /b Abhishek Pamecha wrote: it is there.. -Original Message- From: Toru Watanabe [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 2:34 PM To: Tomcat Users List Subject: Re: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path First, please make sure that Oracle client is installed in your machine. Abhishek Thanks buddy! Abhishek but ..i already did that Abhishek but i have a a requirement which says i have to use oci client only Abhishek any other solution ??? UnsatisfiedLinkError means JVM can't find shared library. You need to add shared library path to environment variable. If you use solaris or linux, then you should add following statement in your tomcat.sh. LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH if you use HP-UX, then SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH export SHLIB_PATH if you use Windows, then you should add following to tomcat.bat. set PATH=%ORACLE_HOME%\lib;%PATH% then it will be able to find shared library. regards, Watanabe. -- 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] -- 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: Pls Help!! Uploading an image
Dear Brett, Could you please send me the code? Uma - Original Message - From: Brett Porter [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 7:14 AM Subject: RE: Pls Help!! Uploading an image You might try struts: http://jakarta.apache.org/struts It has an easy way to get multipart content from a form, including an easy example, but there is a learning curve to setting up struts itself. The code is not going to just appear before your eyes unfortunately :) - Brett -Original Message- From: Uma Maheswar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 5 March 2002 12:33 PM To: Tomcat Users List Subject: Re: Pls Help!! Uploading an image Hi, I tried using O'Reilly, but it is confusing. I need a simple one than that one. Can you help me? Uma - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 2:34 AM Subject: Re: Pls Help!! Uploading an image Uma, The O'Reilly servlets book has a good example (including code) where you can upload files (including images as part of a form). See http://www.servlets.com/cos/javadoc/com/oreilly/servlet/m ultipart/MultipartP arser.html for more info. Hope this helps. Satyakant Evani - Original Message - From: Uma Maheswar [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 04, 2002 10:49 AM Subject: Pls Help!! Uploading an image HI, I need help from any of you. I need a programme to upload an image to the database while submitting a form. If any one is having the source code pls help me. Regards Uma nope i am using tomcat from my user area .. both tomcat and apache run from my user area there is some problem with a particular .so file which it is not able to find -Original Message- From: brian ally [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 11:04 PM To: Tomcat Users List Subject: Re: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path Are you starting tomcat as root? On my linux box, if i su to root, all manner of LD_LIBRARY_PATH problems begin. i need to su - (with the dash). Could this be your problem? /b Abhishek Pamecha wrote: it is there.. -Original Message- From: Toru Watanabe [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 2:34 PM To: Tomcat Users List Subject: Re: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path First, please make sure that Oracle client is installed in your machine. Abhishek Thanks buddy! Abhishek but ..i already did that Abhishek but i have a a requirement which says i have to use oci client only Abhishek any other solution ??? UnsatisfiedLinkError means JVM can't find shared library. You need to add shared library path to environment variable. If you use solaris or linux, then you should add following statement in your tomcat.sh. LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH if you use HP-UX, then SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH export SHLIB_PATH if you use Windows, then you should add following to tomcat.bat. set PATH=%ORACLE_HOME%\lib;%PATH% then it will be able to find shared library. regards, Watanabe. -- 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] -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Writing a bean
Hi, I wanted to write a java bean inside my JSP programme. My requirement is like this % Connection con = (.); statement = con.createStatement(); request.getParameter(name); request.getParameter(phone); rs = st.executeQuery(select * from uma where name=+name); if(rs.next()) { out.println(name is present in db); printContent(); } else { int x = st.executeUpdate(insert into uma values('+name+','+phone+'); } % % public void printContent() { I wanted to do some printing stuff here basically HTML coding. } % The printContent() method is giving me errors. I get Statement Expected near the above method. Can any one help me? If there is any other way could any one tell me what it is? Uma
integer value
Hi, I have a doubt, I have a form that has name and his phone number, both the fields are optional. I declared name as VARCHAR and number as INTEGER in my SQL database. When the user leaves the fild empty, I get an error with the number field as NumberFormatException. So , What I need to do now is, when the user leaves the field null or blank, I wanted to insert a default value into the database. For eg. If(number == null) { number = 00; } if(name==null) { name=tomcat; } I know the number if statement will give error.But could you please help me with this? Uma
Re: Java servlet and mailing
Hi, There is a ready made programme out there in www.globalleafs.com . You can download it from our site. Uma - Original Message - From: Simon [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, February 22, 2002 4:01 AM Subject: Java servlet and mailing Dear, I come from PHP world, so that i don't really know about this. If i need to sent out an email in my serlvet program, do i need to download and install javamail? (I did a mail() in PHP, which calls /bin/mail indeed, most likely...) According to this FAQ saying: http://java.sun.com/products/javamail/FAQ.html#1 Q: What is the JavaMailTM API? A: The JavaMailTM API is a set of abstract APIs that model a mail system. The API provides a platform independent and protocol independent framework to build Java technology based email client applications. The JavaMail API provides facilities for reading and sending email. Service providers implement particular protocols. Several service providers are included with the JavaMail API package; others are available separately. The JavaMail API is implemented as a Java optional package that can be used on JDK 1.1.6 and later. The JavaMail API is also a required part of the JavaTM 2 Platform, Enterprise Edition (J2EETM). Do I have J2SE, i don't have JavaMail right? So, the easy way out, is to install J2EE in the first place, rather than J2SE? I don't this sounds stupid, but please help. Many thanks! Simon. -- 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]
Checking with DB
Hi, Please help me with this. Please see the code below. It doesn't work, if I give the correct id and password.But it works if I say (!rs.next()). The same type of programme worked for me in case of other tables. Could any one pls help me solve this problem. String id = req.getParameter(userid); String pwd = req.getParameter(password); ServletOutputStream sos = res.getOutputStream(); rs = st.executeQuery(select * from uma where userid='+user+' and password='+pwd+' ); sos.println(htmlbody bgcolor=lightyellow); if(rs.next()) { sos.println(you are lucky); sos.println(input type='submit' value='Submit' name='submit'/p); } else { sos.println(h2Get out of my site/h2); } sos.println(/body/html); } catch(Exception e) { e.printStackTrace(); } } }
Signup servlet
Hi friends, I am doing a project now. I am trying to register a user into the database using Signup.java (Servlet). I did the code and it worked fine till some days but giving me problems now. It says that any user who wants to signup is already present in the database. I am attaching my java file here. Please check the file and correct me where I am wrong. To see this error in action, please visit http://www.globalleafs.com/Signup.html Thanks Uma
Re: Signup servlet
sorry, Forgot the file. Please check it now. Uma - Original Message - From: Ralph Einfeldt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 8:16 PM Subject: AW: Signup servlet Which file ? Can't see an attachment. -Ursprüngliche Nachricht- Von: Uma Maheswar [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 19. Februar 2002 15:36 An: Tomcat Users List Betreff: Signup servlet snip/ the database. I am attaching my java file here. Please check snip/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Signup.java Description: Binary data -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Signup servlet
Hi, There is no error in this. The servlet is working fine, but the query is giving me problem. When the user in the database is not present also, it says that the user is present in the database. Please check this. Uma - Original Message - From: Vercesi Paolo [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 8:26 PM Subject: R: Signup servlet Could we have the error stack trace also? Regards Paolo -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Signup.java Description: Binary data -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Signup servlet
Hi friends, I am doing a project now. I am trying to register a user into the database using Signup.java (Servlet). I did the code and it worked fine till some days but giving me problems now. It says that any user who wants to signup is already present in the database. I am attaching my java file here. Please check the file and correct me where I am wrong. To see this error in action, please visit http://www.globalleafs.com/Signup.html Thanks Uma Signup.java Description: Binary data -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Getting values from different tables
Hi, I wanted to know if there is any possiblility of getting all the values from a Database in a single command. Example: I am using it in this way in a browser select * from and here is a drop down box which contains table names as register,pc,signup . I select the table I need from the drop down box and hit the submit button. and I should get all the values from the database in a table. The problem is I do not have all the fields in all the databases same. Then how are we going to get the result. String tables = req.getParameter(tables); rs = st.executeQuery(select * from '+tables+' ); while(rs.next() { ?? } Help me. Uma
Re: Inserting DATE into SQL server
Hi, Thanks for your replies. I tested both of your methods and mine too. But in all the cases I found the date to be inserted Random as 1899 or 1905 or so on. cal = Calendar.getInstance(); cal.set(year,month,date); sqlDate = new java.sql.Date(cal.getTime().getTime()); or totdate = year+-+month+-+date; I printed the selected date in the browser, I see correct date as selected by me in the browser. But when I look at the SQL server I see the date inserted randomly. Could you please tell me where the problem is? Uma -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
How to configure tomcat?
Hi, I have a web site www.globalleafs.com . I have downlaoded Tomcat4.0 . I have hosted my site with Indiaaccess,India. They are using Apache Tomcat 4.0. I wanted to configure my tomcat in such a way that, I can see the System.out.println statements? i.e to see the console of Apache Tomcat 4.0 of Indiaaccess,Mumbai in my Home PC. Is this possible? If so please hlep me. Uma
Problem with IE
Hi, I am using Apache Tomcat4.0. I am doing a project in Servlets. I do not get my files working on IE with this kind of URL http://globalleafs.com:8080/globalleafs/servlet/TestServlet But the same URL works fine in Netscape. What could be the problem? Uma
Re: Problem with IE
Hi, It is a sample one that I gave you, It is working for me too. Please try this http://www.globalleafs.com/Login.html User ID: kiran Password: kiran and then when you try clicking on any URL, you get HTTP 404 File not found. But the same works fine in Netscape. Please check it. Uma - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, February 08, 2002 9:53 AM Subject: Re: Problem with IE I have connected to the URL you have mentioned using IE6 and i got following response Connected to database inside Test Servlet.java uma uma .what version of IE you are using? Ahmed - Original Message - From: Uma Maheswar [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 8:17 PM Subject: Problem with IE Hi, I am using Apache Tomcat4.0. I am doing a project in Servlets. I do not get my files working on IE with this kind of URL http://globalleafs.com:8080/globalleafs/servlet/TestServlet But the same URL works fine in Netscape. What could be the problem? Uma -- 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: Problem with IE
Hi Brian, It is a sample one that I gave you, It is working for me too. Please try this http://www.globalleafs.com/Login.html User ID: kiran Password: kiran and then when you try clicking on any URL, you get HTTP 404 File not found. But the same works fine in Netscape. Please check it. Uma -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat not getting installed
Hi, I am using JavaWebServer2.0(Trial Version) in WinXP. I have downloaded Tomcat (.exe) file. when I try to install it , it says JDK is not found. I have JDK installed with Visual Cafe in my PC. What should I do now? Help me. Uma