JNI and Tomcat problem
Hi, I have a web application deployed in Tomcat. On a click on button on the web browser, it calls a servlet which in turn calls a native function written in C. First time when tomcat is started and I run the application, it works fine. The second clicking the same button causes the server to crash with the following error message. I have placed the .dll file in $Cateline_Home\shared\lib Tomcat version: 6.0 When I restart the server, it works fine the first time and second time, it crashes and stops again. The error log is: - Jun 15, 2008 2:39:13 AM org.apache.catalina.core.StandardServer await SEVERE: StandardServer.await: accept: java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.apache.catalina.core.StandardServer.await(StandardServer.java:389) at org.apache.catalina.startup.Catalina.await(Catalina.java:642) at org.apache.catalina.startup.Catalina.start(Catalina.java:602) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jun 15, 2008 2:39:13 AM org.apache.jk.common.ChannelSocket acceptConnections WARNING: Exception executing accept java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:306) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660) at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) Jun 15, 2008 2:39:13 AM org.apache.jk.common.ChannelSocket acceptConnections WARNING: Exception executing accept java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:306) java.util.logging.ErrorManager: 1 at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660) java.lang.NullPointerException at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870) at org.apache.juli.FileHandler.publish(FileHandler.java:137) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.util.logging.Logger.log(Logger.java:472) at java.lang.Thread.run(Thread.java:619) at java.util.logging.Logger.doLog(Logger.java:494) Jun 15, 2008 2:39:13 AM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run at java.util.logging.Logger.logp(Logger.java:694) SEVERE: Socket accept failed at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:167) java.net.SocketException: socket closed at org.apache.juli.logging.DirectJDKLog.warn(DirectJDKLog.java:127) at java.net.PlainSocketImpl.socketAccept(Native Method) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:671) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.net.ServerSocket.accept(ServerSocket.java:421) at java.lang.Thread.run(Thread.java:619) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310) at java.lang.Thread.run(Thread.java:619) Jun 15, 2008 2:39:13 AM org.apache.jk.common.ChannelSocket acceptConnections WARNING: Exception executing accept java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native
3 fiels form based login authentication in Tomcat
Hi I want Tomcat authentication like company id / username / Password so it looks i should go for Form based authentication 1) I wrote login.jsp and error.jsp ; 2)web.xml FORM MyFirst Protected Area /login.jsp<;/form-login-page> /error.jsp<;/form-error-page> 3 )configured Realm in server.xml of tomcat className="org.apache.catalina.realm.DataSourceRealm"; Now issue is tomcat handles this j_security_check action and i want the j_companyid field in my application ... so how can i get it Can we write an class that will process this authentication and pass insted of let tomcat handel it ? OR any configuration that can handel this j_companyid and pass on to application? Should we need to write our own Realm if so then how to any example? Thanks Chetan Login.jsp * http://www.w3.org/TR/html4/loose.dtd";> Login Page Login to MyFirst If you have been issued a username and password, key them in here now! CompanyID : Username : Password : -- View this message in context: http://www.nabble.com/3-fiels-form-based-login-authentication-in-Tomcat-tp17846853p17846853.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Custom Connector
Any ability to configure in custom JioEndpoint? http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/tomcat/util/net/JIoEndpoint.html which can be configured as parameter to Ajp? http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ajp/AjpProcessor.html#AjpProcessor(int,%20org.apache.tomcat.util.net.JIoEndpoint) ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > To: users@tomcat.apache.org > From: [EMAIL PROTECTED] > Subject: Re: Tomcat Custom Connector > Date: Fri, 13 Jun 2008 19:51:35 -0700 > > The Adapter is set in the initialize method of the Connector > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/connector/Connector.html). > > You can pretty much just trust that Tomcat will give you an Adapter instance > before the first request comes through, since that is the contract. Yes, > the current implementation only will give you an instance of CoyoteAdapter, > but programming your ProtocolHandler around this is dangerous, since the > contract only promises an instance of Adapter. > > The Adapter is the bridge between your ProtocolHandler and the Tomcat > Servlet Container. Once you hand off your Request and Response objects to > the Adapter, you can trust that Tomcat will handle all of the Servlet-Spec > parts by itself, including finding the Servlet to send the request to. At > that point, you are only responsible for communicating with the client over > the wire via the InputBuffer and OutputBuffer interfaces. For example, the > various AJP/1.3 Connectors > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ajp/AjpProcessor.html) > > convert the message into AJP/1.3 format before sending it over the wire to > Apache httpd. > > Once you have figured out how to initialize the Request and Response objects > to look enough like the wire protocol was HTTP, the rest is really pretty > easy :). For non-HTTP protocols (e.g. trying to make Tomcat look like an > FTP server), this is the hard part. > > "Simon Aquilina" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > I have checked the code in Tomcat again, and although it is very confusing I > feel I did understand something here and there :) > > However I have a question - where is the adapter being set? No Adapter is > being initialized in the 'JIoEndPoint', 'Http11Protocol' and > 'Http11Processor'. I also checked the 'server.xml' file and this is not > being set! From the API documentation I found out the 'CoyoteAdapter'; so is > this the default being used for Tomcat? Is it the CoyoteAdapter which is > responsible to find the servlet for which the request is? or? > > Thanks for any comments, > Simon J. > > To: users@tomcat.apache.org> From: [EMAIL PROTECTED]> Subject: Re: > > Tomcat Custom Connector> Date: Tue, 3 Jun 2008 19:17:03 -0700> > AFAIK, > > there isn't a lot of documentation. But there isn't that much too > it. > > You need to implement a ProtocolHandler > > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ProtocolHandler.html) > > > > > This class is responsible for managing the transport (e.g. ServerSocket) > > and > request threads (but the various EndPoint classes in > > > org.apache.tomcat.util.net may simplify this aspect for you). For best > > > results, this class may implement ActionHook as well > > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ActionHook.html).> > > > > > When a new request comes in, it is the ProtocolHandler's job to > > initialize a > Request > > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Request.html) > > > > > and a Response > > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Response.html) > > > > > objects for it, making certain that they get valid InputBuffer > > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/InputBuffer.html) > > > > > and OutputBuffer > > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/OutputBuffer.html) > > > > > instances to comunicate with the client. Then within the thread, you > > hand > the Request and Response off to the service method of the Adapter > > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Adapter.html) > > > > > that Tomcat will give to the ProtocolHandler. And that is pretty much it > > > :).> > Using the standard server.xml (as opposed to Embedding), you > > would configure > Tomcat to use your Connector with an element like:> > > > Any > > other attributes in the tag will be passed JavaBean style > > > to the ProtocolHandler to handle init options.> > Fo
Re: Tomcat Custom Connector
The Adapter is set in the initialize method of the Connector (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/connector/Connector.html). You can pretty much just trust that Tomcat will give you an Adapter instance before the first request comes through, since that is the contract. Yes, the current implementation only will give you an instance of CoyoteAdapter, but programming your ProtocolHandler around this is dangerous, since the contract only promises an instance of Adapter. The Adapter is the bridge between your ProtocolHandler and the Tomcat Servlet Container. Once you hand off your Request and Response objects to the Adapter, you can trust that Tomcat will handle all of the Servlet-Spec parts by itself, including finding the Servlet to send the request to. At that point, you are only responsible for communicating with the client over the wire via the InputBuffer and OutputBuffer interfaces. For example, the various AJP/1.3 Connectors (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ajp/AjpProcessor.html) convert the message into AJP/1.3 format before sending it over the wire to Apache httpd. Once you have figured out how to initialize the Request and Response objects to look enough like the wire protocol was HTTP, the rest is really pretty easy :). For non-HTTP protocols (e.g. trying to make Tomcat look like an FTP server), this is the hard part. "Simon Aquilina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I have checked the code in Tomcat again, and although it is very confusing I feel I did understand something here and there :) However I have a question - where is the adapter being set? No Adapter is being initialized in the 'JIoEndPoint', 'Http11Protocol' and 'Http11Processor'. I also checked the 'server.xml' file and this is not being set! From the API documentation I found out the 'CoyoteAdapter'; so is this the default being used for Tomcat? Is it the CoyoteAdapter which is responsible to find the servlet for which the request is? or? Thanks for any comments, Simon J. > To: users@tomcat.apache.org> From: [EMAIL PROTECTED]> Subject: Re: > Tomcat Custom Connector> Date: Tue, 3 Jun 2008 19:17:03 -0700> > AFAIK, > there isn't a lot of documentation. But there isn't that much too > it. > You need to implement a ProtocolHandler > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ProtocolHandler.html) > > > This class is responsible for managing the transport (e.g. ServerSocket) > and > request threads (but the various EndPoint classes in > > org.apache.tomcat.util.net may simplify this aspect for you). For best > > results, this class may implement ActionHook as well > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ActionHook.html).> > > > When a new request comes in, it is the ProtocolHandler's job to > initialize a > Request > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Request.html) > > and a Response > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Response.html) > > objects for it, making certain that they get valid InputBuffer > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/InputBuffer.html) > > > and OutputBuffer > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/OutputBuffer.html) > > > instances to comunicate with the client. Then within the thread, you > hand > the Request and Response off to the service method of the Adapter > > (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Adapter.html) > > that Tomcat will give to the ProtocolHandler. And that is pretty much it > > :).> > Using the standard server.xml (as opposed to Embedding), you > would configure > Tomcat to use your Connector with an element like:> > > Any > other attributes in the tag will be passed JavaBean style > > to the ProtocolHandler to handle init options.> > For the simplest > example, look at > org.apache.coyote.memory.MemoryProtocolHandler (but > this one is mostly > useful for unit testing).> > "Simon Aquilina" > <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED]> > Hi,> I am > interested in building a custom connector for Tomcat. I have checked > the > Tomcat source code and found the source code for the http11 and ajp > > connectors. I thought of trying to understand the code of these two > > connectors and then try to implement mine based on these. However I am no > > expert and was wondering if there is any good documentation/tutorial on > how > a connector can be developed for Tomcat (I would later use this > connector > with Geronimo).> Just to give you some insight; what I want to > achieve is to build a custom > connector so that Tomcat can understand > requests made from a 3rd party > clients who cannot communicate using the > Http protocol and nor do they > expect data in html format. Additionally > some of the clients could > c
Re: Tomcat started but is not available!
> it is just because under eclipse you don't have the > the ROOT application . What do you mean with a ROOT application? Where should i deploy my web applications? they are already in tomcat/webapps but as i said when i start tomcat from eclipse, although the tomcat is started, but the tomcat is not available from the browser and and consequently my web applications too > just deploy your web app and it will work fine. Whre > > On Sat, Jun 14, 2008 at 10:14 PM, henry human > <[EMAIL PROTECTED]> wrote: > > > Hello > > I have Tomcat 6.0.4, JRE 1.6 on my PC. I embed > tomcat > > in eclipse IDE. > > When i run tomcat with the startup.bat from the > > console i have access to tomcat at the web browser > via > > http://localhost:8080 and I see in the console > output > > of the tomcat that my web applications in > > tomcat/webapps are deployed. > > In contrast to that, when i start it inside > eclipse, > > although i see that the tomcat is successfully > > started, but the tomcat output does not show that > my > > web applications are deployed and at the browser i > > have no access to server typing > http://localhost:8080! > > > > I get the HTTP Status 404 - / ERROR: > > > > HTTP Status 404 - / > > type Status report > > description The requested resource (/) is not > > available. > > Apache Tomcat/6.0.14 > > ++ > > > > > > Thanks for you hints > > henry > > > > > > > > > __ > > Gesendet von Yahoo! Mail. > > Dem pfiffigeren Posteingang. > > http://de.overview.mail.yahoo.com > > > > > - > > To start a new topic, e-mail: > users@tomcat.apache.org > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > Regards, Youssef > __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat started but is not available!
it is just because under eclipse you don't have the the ROOT application . just deploy your web app and it will work fine. On Sat, Jun 14, 2008 at 10:14 PM, henry human <[EMAIL PROTECTED]> wrote: > Hello > I have Tomcat 6.0.4, JRE 1.6 on my PC. I embed tomcat > in eclipse IDE. > When i run tomcat with the startup.bat from the > console i have access to tomcat at the web browser via > http://localhost:8080 and I see in the console output > of the tomcat that my web applications in > tomcat/webapps are deployed. > In contrast to that, when i start it inside eclipse, > although i see that the tomcat is successfully > started, but the tomcat output does not show that my > web applications are deployed and at the browser i > have no access to server typing http://localhost:8080! > > I get the HTTP Status 404 - / ERROR: > > HTTP Status 404 - / > type Status report > description The requested resource (/) is not > available. > Apache Tomcat/6.0.14 > ++ > > > Thanks for you hints > henry > > > > __ > Gesendet von Yahoo! Mail. > Dem pfiffigeren Posteingang. > http://de.overview.mail.yahoo.com > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Regards, Youssef
Tomcat started but is not available!
Hello I have Tomcat 6.0.4, JRE 1.6 on my PC. I embed tomcat in eclipse IDE. When i run tomcat with the startup.bat from the console i have access to tomcat at the web browser via http://localhost:8080 and I see in the console output of the tomcat that my web applications in tomcat/webapps are deployed. In contrast to that, when i start it inside eclipse, although i see that the tomcat is successfully started, but the tomcat output does not show that my web applications are deployed and at the browser i have no access to server typing http://localhost:8080! I get the HTTP Status 404 - / ERROR: HTTP Status 404 - / type Status report description The requested resource (/) is not available. Apache Tomcat/6.0.14 ++ Thanks for you hints henry __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mapping tomcat to ip address behind router
Date sent: Fri, 13 Jun 2008 08:52:51 -0500 From: "Caldarale, Charles R" <[EMAIL PROTECTED]> Subject:RE: mapping tomcat to ip address behind router To: Tomcat Users List Send reply to: Tomcat Users List > > From: Walter Thompson [mailto:[EMAIL PROTECTED] > > Subject: RE: mapping tomcat to ip address behind router > > > > IP numbers usually are 0-255 and the end number in your IP > > address is 456? > > Sometimes we miss the obvious. Not just usually 0-255, they must be > 0-255, since it's an octet. > > Thanks for pointing out what Steve, Chris, Johnny, and I missed. > > - Chuck > I had just figured that ip address was fake to hide his real address and I mostly ignored that section since he said that it was working. -Steve O. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL is "null" and HTTP 404 error when using FROM authentication
Hi Chuck Thanks alot for this last bit about the query for the roles, it actually made me realize what was wrong. The digest algorithm i used to initialize my users table was different from the digest algorithm used by tomcat. This is very surprising I've never seen encountered something like that in the past. The algorith I used was from www.md5oogle.com, so apperently they are using some different encoding... So I've changed the global sever.xml config and i see this in MySQL logs: 080614 9:57:35 118 Connect [EMAIL PROTECTED] on hamula 118 Query /* mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} ) */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name = 'wait_timeout' OR Variable_name = 'character_set_client' OR Variable_name = 'character_set_connection' OR Variable_name = 'character_set' OR Variable_name = 'character_set_server' OR Variable_name = 'tx_isolation' OR Variable_name = 'transaction_isolation' OR Variable_name = 'character_set_results' OR Variable_name = 'timezone' OR Variable_name = 'time_zone' OR Variable_name = 'system_time_zone' OR Variable_name = 'lower_case_table_names' OR Variable_name = 'max_allowed_packet' OR Variable_name = 'net_buffer_length' OR Variable_name = 'sql_mode' OR Variable_name = 'query_cache_type' OR Variable_name = 'query_cache_size' OR Variable_name = 'init_connect' 080614 9:57:54 118 Query SELECT password FROM users WHERE uid = '[EMAIL PROTECTED]' 118 Query commit 118 Query SELECT role FROM users WHERE uid = '[EMAIL PROTECTED]' 118 Query commit And it actually lets me through when i try to login into the manager. The problem im having right now (which i beleave is relatively simple) is that my app doesn't connect to the DB. I configured server.xml back to use MemoryRealm because i want only the app to use the DB. Then I've changed my apps context.xml to this: username="root" password="skywalker" digest="MD5" userTable="users" userNameCol="uid" userCredCol="password" userRoleTable="users" roleNameCol="role" logAbandoned="true" removeAbandoned="true" removeAbandonedTimeout="10" maxActive="20" maxIdle="10" maxWait="-1"/> And my web.xml to this: Hamula home.jsp DB Connection jdbc/hamula javax.sql.DataSource Container Hamula Pages accessible by registered users /home.jsp /events.jsp /profile.jsp /community.jsp GET POST admin manager FORM /index.jsp /index.jsp The role that is required to access registered user functions and pages admin manager I don't see any attempt for a connection in the mysql logs... very weird... Do I need to define some global naming for the DB connection? Thanks -Assaf On Sat, Jun 14, 2008 at 7:55 AM, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: >> From: exkor [mailto:[EMAIL PROTECTED] >> Subject: Re: URL is "null" and HTTP 404 error when using FROM >> authentication > > It's good that you're starting from a clean install. > >> MySQL logs indicate the the connector has connected to the database >> and quering the right table + fields: > > Except there's no query for the role, indicating that either the uid is not > found or the password check fails. The MySQL logs should show the responses > to the queries; do those look correct? > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL is "null" and HTTP 404 error when using FROM authentication
> From: exkor [mailto:[EMAIL PROTECTED] > Subject: Re: URL is "null" and HTTP 404 error when using FROM > authentication It's good that you're starting from a clean install. > MySQL logs indicate the the connector has connected to the database > and quering the right table + fields: Except there's no query for the role, indicating that either the uid is not found or the password check fails. The MySQL logs should show the responses to the queries; do those look correct? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat will not create session cookie
- Original Message - From: "mkweb" <[EMAIL PROTECTED]> To: Sent: Friday, June 13, 2008 11:44 AM Subject: Tomcat will not create session cookie Hello, I'm new to the forum. I have a strange problem with my tomcat installation. I'm using tomcat5.5.26 and struts for my web projekt. I configured the projekt in a context file, like this : I set the attribute cookies to 'true' because I want to have session cookies. Furthermore I added the following lines to the index.jsp to display the cookies : out.println("Cookies : "); Cookie[] cookies=request.getCookies(); if(cookies==null) { out.println("No cookies"); } else { Cookie MyCookie; for(int i=0;i Mario, I dont use Struts... But this is what my code typically looks like HttpSession session = request.getSession(true); daBean= (DaBean)session.getAttribute("daBean"); if (daBean== null) { // make new bean daBean= new daBean(); } else {// got session info } That getSession(true); makes the cookie if there isnt one... and struts probably has some XML that does this. Then the other thing is that you must send it when you send your form... its no good only making the sesion (cookie) when you trying to read the form data, its too late then. You dont have to set cookies="true" its the default... and it means it will use cookies, but you still have to create the things. Somewhere underneath struts is doing this I guess... Hope that helps... --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Farm War Deployer / Deploment Strategies
- Original Message - From: "Theparanoidone Theparanoidone" <[EMAIL PROTECTED]> To: Sent: Thursday, June 12, 2008 9:14 PM Subject: Farm War Deployer / Deploment Strategies Hola~ I'm looking for an efficient way to deploy a tomcat project to 2 or more tomcat servers simultaneously. Changes to are tomcat project may affect the way it communicates with a database, and therefore we'd like to make sure the deployment takes place swiftly. What are some of the better ways to deploy a project to multiple servers??? According to this link from 2007, the farm war deployer is broken... but it hints at other methods: http://marc.info/?l=tomcat-user&m=117345255505224&w=2 It also seems to state it's still broken in the docs here: http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html Oh sorry, my previous post assumed you were using sticky sessions... didnt realize you clustering (persisting sessions), and to be honest I'd almost forgotten it was there, looked at it along time ago and decided sticky is for me ;) I think heres your answer... http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html Maybe sticky is also for you ;) This is the article I read yonks ago.. and decided I can live with sticky... http://www.onjava.com/pub/a/onjava/2004/11/24/replication1.html Good luck! --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing the deployer on windows server 2003
- Original Message - From: "Vinny" <[EMAIL PROTECTED]> To: Sent: Friday, June 13, 2008 8:37 PM Subject: Installing the deployer on windows server 2003 I have tomcat 5.5 java 1.5 on window server 2003. Does the windows installer come with the Deployer bundled? I basically just want to deploy my webapps from netbeans remotely. If I need to install the Deployer separately , do I just uncompress it in the same installation folder as tomcat_home ? Wil, I dont do this stuff every day, so I could be wrong... The only time you really need the deployer package is if you want to go nuts with ANT stuff. Thats what I used it for if I remember correctly Otherwise its much easier Type this into your browser http://localhost:8080/manager/html ie logon the TC of interest, pick the war file which lives in your NB DIST folder... it shall go there ;) The NB deploy stuff in the menu's is doing the same thing... but targets the TC you using in the project. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disable directory indexing in tomcat?
- Original Message - From: "Dave Girardin" <[EMAIL PROTECTED]> To: Sent: Friday, June 13, 2008 11:38 PM Subject: disable directory indexing in tomcat? Group, I'm a Unix admin working on a Solaris 8 server running Tomcat 6.0.16. No other apps run on the server, for example, there is no Apache httpd running. I have been tasked with disabling directory indexing based on a security scan that provided this infomation: Look in the GLOBAL web.xml - default org.apache.catalina.servlets.DefaultServlet - debug 0 - listings false 1 See that listing... thats the thing... yours is true. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hiding JSP Pages
- Original Message - From: "W Strater" <[EMAIL PROTECTED]> To: Sent: Friday, June 13, 2008 5:06 PM Subject: Hiding JSP Pages I am trying to hide the JSP so they can only be accessed via a forward. I have been able to put them in a subdirectory of WEB-INF using other containers but have not been able to do that with Tomcat 5.5. We are not using Struts but it is the same approach where our business logic is servlet/action based and we only use JSP for presentation. A common practice would be to put the JSP page in the root directory of the WAR like following: /HelloWorld.jsp /WEB-INF/web.xml /WEB-INF/classes/HelloWorld.class Mmmm no dont think so, that kinda looks like a mix between precompiled and JSP Anyway doesnt matter... and it maybe because I'm in a different IDE, doesnt work the same... This would allow the user to access the JSP page through the servlet with http://localhost:8080/app/HelloWorld or directly with http://localhost:8080/app/HelloWorld.jsp. I want to use to only be able to access the JSP page through the servlet and the directory of the WAR would like the following: /WEB-INF/web.xml /WEB-INF/classes/HelloWorld.class /WEB-INF/jsp/HelloWorld.jsp The HelloWorld servlet would use the JSP for presentation by forwarding to it using code like the fllowing: RequestDispatcher dispatcher = request.getRequestDispatcher(" /WEB-INF/jsp/HelloWorld.jsp"); Rather use this mapping... /META-INF/test/index.jsp ie just put the JSP's into Meta_Inf That will hide em and they'll still work... Having said that, this is the first time I gave this a whiz... you're forwarding idea is actually just the MVC model, a good way to do it... But normally what I do is stick a little code in the JSP... ie I check the bean, or the URI... then redirect or give the user a little message. Interesting question... thanks I tested on NB... there it just amounted to dragging the jsp's to the META folder... done. Have fun.. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]