[SOLVED] :) user authetication on MySql db issue need some help!
hello everyone, i found out what was the problem:) okay the problem is that my jdbc driver was to old and could not comunicate with my mysql and after finding that out using a java based mysql administartion tool (dbvisualzer) i could not login and i was wondering the whole tiome what could be the source of the problem and i find out that yesterday as i was debuggin (seeking the problem i setted the passwords without md5 no digest and my passwords was as a MD5 crypted so the request 050913 14:40:12 5 Execute [1] SELECT user_pass FROM users WHERE user_name = ? 5 Execute [2] SELECT role_name FROM user_roles WHERE user_name = ? did not match the e115d589186390dd1405e7034d897 not i added the digest=MD5 to my server xml again and thing works fine one thing iam now dealing with is how to lets tomcat manager grab the user and roles data from the db okay have a great time everyone! regards and dont give up :) yassine ps: Wade thanks again! directBOX Reply --- From: WadeChandler ([EMAIL PROTECTED]) To: TomcatUsersList (tomcat-user@jakarta.apache.org) Date: 12.09.2005 18:41:54 --- Yassine ELassad [EMAIL PROTECTED] wrote: hi list, iam about to set my user to a database instead of file and i am now trying to get that done on a mysql rdbms i created the following tables : mysql use authority; Database changed mysql show tables; +-+ | Tables_in_authority | +-+ | user_roles | | users | +-+ 2 rows in set (0.00 sec) mysql describe user_roles; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | user_name | varchar(15) | | PRI | | | | role_name | varchar(10) | | | | | +---+-+--+-+-+---+ 2 rows in set (0.00 sec) mysql describe users; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | user_name | varchar(15) | | PRI | | | | user_pass | varchar(32) | | | | | +---+-+--+-+-+---+ 2 rows in set (0.00 sec) and this this is my server.xml: = Server port=8005 shutdown=SHUTDOWN GlobalNamingResources !-- Used by Manager webapp -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector port=8080 / !-- This is here for compatibility only, not required -- Connector port=8009 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Logger className=org.apache.catalina.logger.FileLogger / Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://dekold4711/authority connectionName=tomcat connectionPassword=tomcat userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name digest=md5 / Host name=localhost appBase=webapps / /Engine /Service /Server each time iam trying to login i gets an error message telling me wrong username or wrong password catalina.out dont show any susspecious errors any idea what i could be doing wrong please!! regards Yassine ELassad I'm using mysql fine. I use a context.xml file for my web app in META-INF and this is it: ?xml version=1.0 encoding=UTF-8? Context path= reloadable=true Resource auth=Container driverClassName=com.mysql.jdbc.Driver maxActive=100 maxIdle=30 maxWait=1 name=jdbc/caro462 password= removeAbandoned=true type=javax.sql.DataSource url=jdbc:mysql://localhost:3306/caro462?autoReconnect=true username=caro462/ Realm className=org.apache.catalina.realm.DataSourceRealm dataSourceName=jdbc/caro462 debug=99 localDataSource=true roleNameCol=role userCredCol=password userNameCol=userid userRoleTable=USERROLELINKS userTable=USERS/ /Context I then have my web.xml file setup with different security constraints like this one:
user authetication on MySql db issue need some help!
hi list, iam about to set my user to a database instead of file and i am now trying to get that done on a mysql rdbms i created the following tables : mysql use authority; Database changed mysql show tables; +-+ | Tables_in_authority | +-+ | user_roles | | users | +-+ 2 rows in set (0.00 sec) mysql describe user_roles; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | user_name | varchar(15) | | PRI | | | | role_name | varchar(10) | | | | | +---+-+--+-+-+---+ 2 rows in set (0.00 sec) mysql describe users; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | user_name | varchar(15) | | PRI | | | | user_pass | varchar(32) | | | | | +---+-+--+-+-+---+ 2 rows in set (0.00 sec) and this this is my server.xml: = Server port=8005 shutdown=SHUTDOWN GlobalNamingResources !-- Used by Manager webapp -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector port=8080 / !-- This is here for compatibility only, not required -- Connector port=8009 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Logger className=org.apache.catalina.logger.FileLogger / Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://dekold4711/authority connectionName=tomcat connectionPassword=tomcat userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name digest=md5 / Host name=localhost appBase=webapps / /Engine /Service /Server each time iam trying to login i gets an error message telling me wrong username or wrong password catalina.out dont show any susspecious errors any idea what i could be doing wrong please!! regards Yassine ELassad __ Verpassen Sie keine eBay-Auktion und bieten Sie bequem und schnell über das Telefon mit http://www.telefonbieten.de Ihre eMails auf dem Handy lesen - ohne Zeitverlust - 24h/Tag eMail, FAX, SMS, VoiceMail mit http://www.directbox.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: user authetication on MySql db issue need some help!
--- Yassine ELassad [EMAIL PROTECTED] wrote: hi list, iam about to set my user to a database instead of file and i am now trying to get that done on a mysql rdbms i created the following tables : mysql use authority; Database changed mysql show tables; +-+ | Tables_in_authority | +-+ | user_roles | | users | +-+ 2 rows in set (0.00 sec) mysql describe user_roles; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | user_name | varchar(15) | | PRI | | | | role_name | varchar(10) | | | | | +---+-+--+-+-+---+ 2 rows in set (0.00 sec) mysql describe users; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | user_name | varchar(15) | | PRI | | | | user_pass | varchar(32) | | | | | +---+-+--+-+-+---+ 2 rows in set (0.00 sec) and this this is my server.xml: = Server port=8005 shutdown=SHUTDOWN GlobalNamingResources !-- Used by Manager webapp -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector port=8080 / !-- This is here for compatibility only, not required -- Connector port=8009 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Logger className=org.apache.catalina.logger.FileLogger / Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://dekold4711/authority connectionName=tomcat connectionPassword=tomcat userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name digest=md5 / Host name=localhost appBase=webapps / /Engine /Service /Server each time iam trying to login i gets an error message telling me wrong username or wrong password catalina.out dont show any susspecious errors any idea what i could be doing wrong please!! regards Yassine ELassad I'm using mysql fine. I use a context.xml file for my web app in META-INF and this is it: ?xml version=1.0 encoding=UTF-8? Context path= reloadable=true Resource auth=Container driverClassName=com.mysql.jdbc.Driver maxActive=100 maxIdle=30 maxWait=1 name=jdbc/caro462 password= removeAbandoned=true type=javax.sql.DataSource url=jdbc:mysql://localhost:3306/caro462?autoReconnect=true username=caro462/ Realm className=org.apache.catalina.realm.DataSourceRealm dataSourceName=jdbc/caro462 debug=99 localDataSource=true roleNameCol=role userCredCol=password userNameCol=userid userRoleTable=USERROLELINKS userTable=USERS/ /Context I then have my web.xml file setup with different security constraints like this one: security-constraint display-nameAgent security constraint/display-name web-resource-collection web-resource-nameAgents/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/agents/secure/*/url-pattern /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nameAdministrator/role-name role-nameAgencyAdministrator/role-name role-nameAgent/role-name /auth-constraint /security-constraint I can login fine. You certainly have to make sure you have your roles linking to your user name. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with context element configuration - need some help
hi; regarding the configuration of a Context element. i have an application called 'app' my configuration is currently: Context path=/ docBase=. debug=0 reloadable=true so in order to execute the application i need to type the url 'http://host:port/app i do not want to type the URL with the 'app' suffix so i changed the context element to Context path=/ docBase=app debug=0 reloadable=true now the url without the 'app' executes the first page BUT all the images (static) are not loaded (the images are in the img directory under the app directory). can anyone explain this behaviour? did i configure anything wrong? thanks Guy Katz Allot Communications [EMAIL PROTECTED] tel: +972 9 7619288 fax: +972 9 7443626 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with context element configuration - need some help
Hi, Change context path=/ to path=. Yoav Shapira Millennium Research Informatics -Original Message- From: Guy Katz [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:55 AM To: '[EMAIL PROTECTED]' Subject: problem with context element configuration - need some help hi; regarding the configuration of a Context element. i have an application called 'app' my configuration is currently: Context path=/ docBase=. debug=0 reloadable=true so in order to execute the application i need to type the url 'http://host:port/app i do not want to type the URL with the 'app' suffix so i changed the context element to Context path=/ docBase=app debug=0 reloadable=true now the url without the 'app' executes the first page BUT all the images (static) are not loaded (the images are in the img directory under the app directory). can anyone explain this behaviour? did i configure anything wrong? thanks Guy Katz Allot Communications [EMAIL PROTECTED] tel: +972 9 7619288 fax: +972 9 7443626 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with context element configuration - need some help
thanks, that did it. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 2:55 PM To: Tomcat Users List Subject: RE: problem with context element configuration - need some help Hi, Change context path=/ to path=. Yoav Shapira Millennium Research Informatics -Original Message- From: Guy Katz [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:55 AM To: '[EMAIL PROTECTED]' Subject: problem with context element configuration - need some help hi; regarding the configuration of a Context element. i have an application called 'app' my configuration is currently: Context path=/ docBase=. debug=0 reloadable=true so in order to execute the application i need to type the url 'http://host:port/app i do not want to type the URL with the 'app' suffix so i changed the context element to Context path=/ docBase=app debug=0 reloadable=true now the url without the 'app' executes the first page BUT all the images (static) are not loaded (the images are in the img directory under the app directory). can anyone explain this behaviour? did i configure anything wrong? thanks Guy Katz Allot Communications [EMAIL PROTECTED] tel: +972 9 7619288 fax: +972 9 7443626 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need some help on catalina.out file
Howdy, Well, you have to start tomcat to get that log, not just install tomcat ;) Otherwise, make sure the user account running tomcat has write permissions throughout the tomcat directories. Yoav Shapira Millennium ChemInformatics -Original Message- From: Fernando Cabredo [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 8:57 PM To: [EMAIL PROTECTED] Subject: Need some help on catalina.out file Hi, I just recently installed Tomcat 4.1.29 and is there anybody who can help me why I could not find the Catalina.out file on my TOMCAT_HOME/logs folder? Thanks, Fernando T. Cabredo --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.551 / Virus Database: 343 - Release Date: 12/11/2003 This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need some help on catalina.out file
Hi, I just recently installed Tomcat 4.1.29 and is there anybody who can help me why I could not find the Catalina.out file on my TOMCAT_HOME/logs folder? Thanks, Fernando T. Cabredo --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.551 / Virus Database: 343 - Release Date: 12/11/2003
Servlet.Service() NullPointer on Filter - Really need some help on this one...
Hi All, I am hoping that someone is able to assist with some problems I am currently having with a filter I have written. The filter is designed to deal with authentication for users to check they have a particular cookie set then place an object into the session for further use. I have researched this error extensively online and can't find any documentation on correcting it. The error presented below only occurs on around 12% of requests (sometimes a few percent either side of this) according to my profiler when the code is put under some load - I am wondering if it may be caused by some form of concurrent request error in the filters whereby the Servlet object is being reset or otherwise nulled out. The codebase looks like: public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain )throws IOException, ServletException { try { req = (HttpServletRequest)request; res = (HttpServletResponse)response; .. //Create Session object HttpSession session = req.getSession( true ); session.setAttribute( QutClientObject.NAME, qutClient ); sessionCreated = true; //set REMOTE_USER res.addHeader(REMOTE_USER,qutClient.getUserName()); // Filter chaining completed, move to next filter in chain chain.doFilter( request, response ); return; } } Error occurs on line: req.getSession( true ); The error from tomcat(both 4.1.24 and 4.1.27) is: 2003-10-28 17:35:35 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.coyote.tomcat4.CoyoteRequestFacade.getSession(CoyoteRequestFacade.java:365) at au.edu.qut.jauth.client.JAuthFilter.doFilter(JAuthFilter.java:197) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) Any help would be very much appreciated I am almost out of ideas for this one... cheers, Bradley. - To unsubscribe,
I need some help on MSQL (Microsoft SQL Server 2000) and JNDI
I am try to setup a JNDI datasource. This is the exerp from my context. I store app context in $CATALINA_HOME/webapp/myapp.xml file Context path=/jtest docBase=C:\myapp crossContext=false debug=9 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_myapp_log. suffix=.txt timestamp=true/ ResourceLink name=linkToGlobalResource global=simpleValue type=java.lang.Integer/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuelocalhost/value /parameter /ResourceParams Resource name=jdbc/MSQL auth=Container type=java.sql.DataSource/ ResourceParams name=jdbc/MSQL parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- MSQL dB username and password for dB connections -- parameter nameusername/name valueuname/value /parameter parameter namepassword/name valuepword/value /parameter !-- Class name for msql JDBC driver -- parameter namedriverClassName/name valuecom.ashna.jturbo.driver.Driver/value /parameter !-- The JDBC connection url for connecting to your MSQL dB.-- parameter nameurl/name valuejdbc:JTurbo://MYSERVER:1036/mydatabase/value /parameter /ResourceParams /Context I also added the following to web.xml for this app resource-ref descriptionDB Connection/description res-ref-namejdbc/MSQL/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref My servlet fails dataSource is null. Here is the code try { Context init = new InitialContext(); Context ctx = (Context) init.lookup(java:comp/env); DataSource dataSource = (DataSource) ctx.lookup(jdbc/MSQL); } catch (NamingException ex) { throw new ServletException(Cannot retrieve java:comp/env/jdbc/conversion,ex); } Any ideas? Jeff
Need some help with connector
Hello, I have the connector for Netscape/Iplanet 4.1.8 to Tomcat 4.1.12 mostly working and am looking for some help for the rest. Here is what is happening. The connection is up and talking with Tomcat. I can serve up /examples/ ... but /examples/jsp/ returns error 302 The requested resource () has moved temporarily to a new location. I can even serve up /examples/jsp/num and /examples/jsp/num/numguess.jsp. I am wondering why I get error 302 any ideas? Thanks, Mark
Re: Need some help with connector
If the directory has a welcome-file (in this case, 'index.jsp'), then Tomcat 4.x will return a 302 response to the welcome-file. Tomcat 3.3.2-dev and Tomcat 5.x allow this behavior to be over-ridden. Mark Strecker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I have the connector for Netscape/Iplanet 4.1.8 to Tomcat 4.1.12 mostly working and am looking for some help for the rest. Here is what is happening. The connection is up and talking with Tomcat. I can serve up /examples/ ... but /examples/jsp/ returns error 302 The requested resource () has moved temporarily to a new location. I can even serve up /examples/jsp/num and /examples/jsp/num/numguess.jsp. I am wondering why I get error 302 any ideas? Thanks, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
We need some help...
We have an Apache 1.3/Tomcat 4/SSL problem that just won't quit. Does anyone out there know an expert consultant on this topic that would be willing to fly to Denver, CO (USA) and spend some time debugging/configuring this problem? Thanks in advance. BWN
Re: We need some help...
If you detail the problem here, someone might be able to help. RS Noyce, Ben W. [EMAIL PROTECTED] on 06/21/2002 04:02:18 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To:Tomcat Users List [EMAIL PROTECTED] cc: Subject:We need some help... We have an Apache 1.3/Tomcat 4/SSL problem that just won't quit. Does anyone out there know an expert consultant on this topic that would be willing to fly to Denver, CO (USA) and spend some time debugging/configuring this problem? Thanks in advance. BWN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: We need some help...
I'm in Denver, I could save you Air Fare... George Sexton MH Software, Inc. Voice: 303 438 9585 http://www.mhsoftware.com -Original Message- From: Noyce, Ben W. [mailto:[EMAIL PROTECTED]] Sent: 21 June, 2002 3:02 PM To: Tomcat Users List Subject: We need some help... We have an Apache 1.3/Tomcat 4/SSL problem that just won't quit. Does anyone out there know an expert consultant on this topic that would be willing to fly to Denver, CO (USA) and spend some time debugging/configuring this problem? Thanks in advance. BWN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: We need some help...
What platform, I could probably do it via ssh with a little more info. feel free to write me directly. - Original Message - From: Noyce, Ben W. [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, June 21, 2002 5:02 PM Subject: We need some help... We have an Apache 1.3/Tomcat 4/SSL problem that just won't quit. Does anyone out there know an expert consultant on this topic that would be willing to fly to Denver, CO (USA) and spend some time debugging/configuring this problem? Thanks in advance. BWN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
need some help ...
Hi, I'm trying to link apache and tomcat My environment: Linux RedHat 7.1 and these RPMs apache-1.3.19-5 tomcat4-4.0.1-1 mod_webapp-0.5-dev.1 tomcat doc mentions a WebAppDeploy directive, but apache mentions a WebAppMount directive; what about ? In my opinion at this time, I should use an other mod_webapp RPM ( I've heard about a = version 1); should I link my Document Root apache directive and my Tomcat app's directory ? and I haven't found any complete doc about the specific service Tomcat-apache (even if www.galatea.com is a good site) and install with RPMs. thanks -- Julien OIX Service Informatique de Gestion Tél: 02 40 99 83 65 mail: [EMAIL PROTECTED]
need some help on tomcat-oracle
Hi I am very new to linux environment..Recently i downloaded tomcat and installed on my linuxbox...Now i want to configure connectivity between tomcat and oracle database...Anybody pls help me out how to do this and the classpath variables and any other settings to configure... Pls do needful... Thanks Regards Praveen
Trying to build tomcat contrib example - need some help
Hello, I'm very new to EJB/Tomcat and I am having trouble building the contrib examples. Ive installed JBoss-2.2.1_Tomcat-3.2.1 bundle and was able to run the system. Next I wanted to build the example out of the contrib package. I've unzipped the contrib files and tried to compile as directed by the readme. The build starts, but fails to find the javax.ejb package. I know I'm missing some setup or something simple. Could anyone send me a pointer? Thanks, Derek Laufenberg Output from build process: F:\ejb_dev\contrib\tomcat\src\buildbuild.bat install build.bat install Searching for build.xml ... Buildfile: F:\ejb_dev\contrib\tomcat\src\build\build.xml init: Using jboss.dist=F:\JBoss-2.2.1_Tomcat-3.2.1\jboss Using tomcat.dist=F:\JBoss-2.2.1_Tomcat-3.2.1\tomcat Using classpath=F:\JBoss-2.2.1_Tomcat-3.2.1\jboss\client\jaas.jar;F:\JBoss-2.2.1_T omcat-3.2.1\jboss\client\jbosssx-client.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\jbos s\client\jnp-client.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\jboss\client\jta-spec1_0 _1.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\jboss\lib\jdbc2_0-stdext.jar;F:\JBoss-2.2 .1_Tomcat-3.2.1\jboss\lib\jaxp.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\jboss\lib\cri mson.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\jboss\lib\jmxri.jar;F:\JBoss-2.2.1_Tomc at-3.2.1\jboss\lib\jboss-jaas.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\jboss\lib\ext\ jboss-j2ee.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\jboss\lib\ext\jboss.jar;F:\JBoss- 2.2.1_Tomcat-3.2.1\jboss\lib\ext\jbosssx.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\jbo ss\lib\ext\log4j.jar;F:\JBoss-2.2.1_Tomcat-3.2.1\tomcat\lib\webserver.jar;F: \JBoss-2.2.1_Tomcat-3.2.1\tomcat\lib\servlet.jar;F:\ejb_dev\contrib\tomcat\b uild\classes prepare: compile: [javac] Compiling 5 source files to F:\ejb_dev\contrib\tomcat\build\classes [javac] Modern compiler is not available - using classic compiler [javac] F:\ejb_dev\contrib\tomcat\src\main\org\jboss\test\tomcat\ejb\bean\StatelessS essionBean.java:8: Package javax.ejb not found in import. [javac] import javax.ejb.*; [javac]^ [javac] F:\ejb_dev\contrib\tomcat\src\main\org\jboss\test\tomcat\ejb\bean\StatelessS essionBean.java:12: Interface org.jboss.test.tomcat.ejb.bean.SessionBean of class org.jboss.test.tomcat.ejb.bean.StatelessSessionBean not found. [javac] public class StatelessSessionBean implements SessionBean { . more of the same
Request Interceptors -- Need Some Help
I am working implementing a database driven access control interceptor. This is similar to JDBCRealm however it stores the information about security constrains in the database so they are dynamic. I was wondering if I implement this, how can I have JDBCRealm work for some of my applications and my new Interceptor work for others. It would be the same thing as using two different JDBCRealms pointing to two different databases for two different application on the same tomcat server. Any help would be appreciated. Creighton Kirkendall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Request Interceptors -- Need Some Help
Creighton Kirkendall wrote: I am working implementing a database driven access control interceptor. This is similar to JDBCRealm however it stores the information about security constrains in the database so they are dynamic. I was wondering if I implement this, how can I have JDBCRealm work for some of my applications and my new Interceptor work for others. It would be the same thing as using two different JDBCRealms pointing to two different databases for two different application on the same tomcat server. Any help would be appreciated. For Tomcat 3.2 you are kind of stuck -- the authentication interceptor is global to all of Tomcat. This is not true in Tomcat 4.0, however -- you can install your realm implementation at the web app, virtual host, or entire container level. Creighton Kirkendall Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Need some help please
I setup tomcat and most everything is working. Any time I try to access a .jsp file I get the following. " Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.14 Server " the example servlets work, however any .jsp file does not. I can't find anything in the documentation about this. I set the log levels to debug but nothing is helpfull at all. How can I fix this?? Thanks in advance. Mike - "The Road to the Internet Starts Here" http://www.enter.net/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Need some help please
Are the examples working? I assume the servlets are. Probably a %CLASSPATH% issue. The JSPs need to compile the first time you call them so you need a reference to your JDK in the classpath. You will need these elements in your classpaths: This is just mine, yours may be slightly different... %CLASSPATH% Your path to: \JDK1.3\lib\tools.jar Your path to: \JDK1.3 ALSO %JAVA_HOME% path to: \JDK1.3 %TOMCAT_HOME% path to: \tomcat Hope this helps, Craig lazybrain eh... -Original Message- From: lazybrain [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 3:48 PM To: [EMAIL PROTECTED] Subject: Need some help please I setup tomcat and most everything is working. Any time I try to access a .jsp file I get the following. " Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.14 Server " the example servlets work, however any .jsp file does not. I can't find anything in the documentation about this. I set the log levels to debug but nothing is helpfull at all. How can I fix this?? Thanks in advance. Mike - "The Road to the Internet Starts Here" http://www.enter.net/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Need some help please
Title: RE: Need some help please hi, thank you for replying. actually when I go through apache (i.e. https://domainname.com/examples/jsp/num/numguess.jsp) I get the plain text version of the file, meaning it is not working. Going to servlets gives me the error: The requested url * was not found on the server. so neither servlets or jsp's work when I go through apache. but when I go through tomcat (http://domainname.com:8080/examples/jsp/num/numguess.jsp) everything works great. Note, I am going through port 8080. Where is this class path setting by the way? I don't think it is an issue for me since things work when I go directly through tomcat. Why won't it go through apache?! I have followed the doucmentation meticulously at this point. Any ideas? I just know there is a problem with mod_jk.so. When I go through apache and ask for *.jsp files, it doesn't realize to pass them onto mod_jk (which passes it onto tomcat). -Original Message- From: Craig O'Brien [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 5:16 PM To: [EMAIL PROTECTED] Subject: RE: Need some help please Are the examples working? I assume the servlets are. Probably a %CLASSPATH% issue. The JSPs need to compile the first time you call them so you need a reference to your JDK in the classpath. You will need these elements in your classpaths: This is just mine, yours may be slightly different... %CLASSPATH% Your path to: \JDK1.3\lib\tools.jar Your path to: \JDK1.3 ALSO %JAVA_HOME% path to: \JDK1.3 %TOMCAT_HOME% path to: \tomcat Hope this helps, Craig lazybrain eh... -Original Message- From: lazybrain [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 3:48 PM To: [EMAIL PROTECTED] Subject: Need some help please I setup tomcat and most everything is working. Any time I try to access a .jsp file I get the following. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.14 Server the example servlets work, however any .jsp file does not. I can't find anything in the documentation about this. I set the log levels to debug but nothing is helpfull at all. How can I fix this?? Thanks in advance. Mike - The Road to the Internet Starts Here http://www.enter.net/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Need some help please
Could you include your tomcat.conf or the part of your httpd.conf where you include mod_jk ??? It sounds to me as if you haven't included the JkMounts for mod_jk and associate them with the jsp extensions. Stefan
RE: Need some help please
uot; AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location "/test/META-INF/" AllowOverride None deny from all /Location ### # Auto configuration for the /test context ends. ### -Original Message-From: Stefan Langer [mailto:[EMAIL PROTECTED]]Sent: Wednesday, January 17, 2001 5:37 PMTo: [EMAIL PROTECTED]Subject: RE: Need some help please Could you include your tomcat.conf or the part of your httpd.conf where you include mod_jk ??? It sounds to me as if you haven't included the JkMounts for mod_jk and associate them with the jsp extensions. Stefan
RE: Need some help please
If your JSPs are working on port 8080 then classpath is probably not the issue. jserv install page will probably have your answers. It sounds to me like your problem is to get Apache to direct jsp calls to tomcat. Are the Servlets working fine if you them in without the port? I am not the best at this as I use IIS and am not too familiar with Apache. Look over the section in "A minimalist User's Guide" on "Setting up Tomcat to Cooperate with the Apache Web Server." Good luck, Craig -Original Message- From: Amjad Ashraf [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 5:23 PM To: '[EMAIL PROTECTED]' Subject: RE: Need some help please hi, thank you for replying. actually when I go through apache (i.e. https://domainname.com/examples/jsp/num/numguess.jsp) I get the plain text version of the file, meaning it is not working. Going to servlets gives me the error: The requested url * was not found on the server. so neither servlets or jsp's work when I go through apache. but when I go through tomcat (http://domainname.com:8080/examples/jsp/num/numguess.jsp) everything works great. Note, I am going through port 8080. Where is this class path setting by the way? I don't think it is an issue for me since things work when I go directly through tomcat. Why won't it go through apache?! I have followed the doucmentation meticulously at this point. Any ideas? I just know there is a problem with mod_jk.so. When I go through apache and ask for *.jsp files, it doesn't realize to pass them onto mod_jk (which passes it onto tomcat). -Original Message- From: Craig O'Brien [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 5:16 PM To: [EMAIL PROTECTED] Subject: RE: Need some help please Are the examples working? I assume the servlets are. Probably a %CLASSPATH% issue. The JSPs need to compile the first time you call them so you need a reference to your JDK in the classpath. You will need these elements in your classpaths: This is just mine, yours may be slightly different... %CLASSPATH% Your path to: \JDK1.3\lib\tools.jar Your path to: \JDK1.3 ALSO %JAVA_HOME% path to: \JDK1.3 %TOMCAT_HOME% path to: \tomcat Hope this helps, Craig lazybrain eh... -Original Message- From: lazybrain [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 3:48 PM To: [EMAIL PROTECTED] Subject: Need some help please I setup tomcat and most everything is working. Any time I try to access a .jsp file I get the following. " Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.14 Server " the example servlets work, however any .jsp file does not. I can't find anything in the documentation about this. I set the log levels to debug but nothing is helpfull at all. How can I fix this?? Thanks in advance. Mike - "The Road to the Internet Starts Here" http://www.enter.net/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Need some help please
- #- # # # Additional class path components. # worker.inprocess.class_path=$(workers.tomcat_home)$(ps)classes # # The XML parser provided with Tomcat # worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jaxp.jar worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)parser.jar # # Tomcat's implementation # worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jasper.jar worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)servlet.jar worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)webserver.jar # # Javac as available from Java2SE # worker.inprocess.class_path=$(workers.java_home)$(ps)lib$(ps)tools.jar # # Setting the command line for tomcat # Note: The cmd_line string may not contain spaces. # worker.inprocess.cmd_line=-config worker.inprocess.cmd_line=$(workers.tomcat_home)/conf/jni_server.xml worker.inprocess.cmd_line=-home worker.inprocess.cmd_line=$(workers.tomcat_home) # # The JVM that we are about to use # # This is for Java2 # #worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)java # # And this is for jdk1.1.X # #worker.inprocess.jvm_lib=$(workers.java_home)$(ps)bin$(ps)javai.dll # # # Setting the place for the stdout and stderr of tomcat # worker.inprocess.stdout=$(workers.tomcat_home)$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)inprocess.stderr # # Setting the tomcat.home Java property # worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home) # # Java system properties # # worker.inprocess.sysprops=java.compiler=NONE # worker.inprocess.sysprops=myprop=mypropvalue # # Additional path components. # # worker.inprocess.ld_path=d:$(ps)SQLLIB$(ps)bin # -Original Message-From: Stefan Langer [mailto:[EMAIL PROTECTED]]Sent: Wednesday, January 17, 2001 6:00 PMTo: [EMAIL PROTECTED]Subject: RE: Need some help please The file looks good to me. Do you get any error from apache when you start it? Maybe it can't find mod_jk (just a suggestion). You have placed mod_jk.so in libexec??? This may sound dumb but I'm just trying to help: you have restarted apache after configuring the httpd.conf right??? One last thing: Have you setup the worker.properties correctly?? Since you use AJP13 you should include that worker in your properties file. Clueless Stefan
RE: Need some help please
The only thing that I can assume now is that somehow the binary you are using isn't working properly. (please correct me if I'm wrong) You should try compiling mod_jk for your machine. Just get the source file for tomcat and then follow the mod_jk how to. It takes a little effort but it should work if you follow the instructions. I'm really out of ideas and your files look ok. Maybe somebody else can spot something I haven't since I'm not an apache expert... Stefan
RE: Need some help please
you know what, originally I was compiling the mod_jk binary myself from tomcat 3.2 src. But then httpd would give me:[warn] Loaded DSO libexec/mod_jk.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI). So, I changed apxs to pass -DEAPI to all gcc commands. In other words I recompiled with EAPI and apache still complained. I saw a lot of posts regarding this and no solution (I think apache warns if it was originally compiled with ssl support and therefore it uses EAPI). SoI got this rpm off falsehope.com which gives me mod_jk.so compiled with EAPI. And apache doesn't complain about it. So that is why I prefer to use it. But maybe you are right and there is somthing wrong with it. But I am out of options. If there was only a way to get some freaking log info. when I hit apache for jsp's so that the logs could tell me why it chose not to use mod_jk, or why mod_jk failed or something... -Original Message-From: Stefan Langer [mailto:[EMAIL PROTECTED]]Sent: Wednesday, January 17, 2001 6:31 PMTo: [EMAIL PROTECTED]Subject: RE: Need some help please The only thing that I can assume now is that somehow the binary you are using isn't working properly. (please correct me if I'm wrong) You should try compiling mod_jk for your machine. Just get the source file for tomcat and then follow the mod_jk how to. It takes a little effort but it should work if you follow the instructions. I'm really out of ideas and your files look ok. Maybe somebody else can spot something I haven't since I'm not an apache expert... Stefan
RE: Need Some help..
Hi, The changes you describe below weren't quite what I meant. I guess I should have been more explicit. I suggest: step 1: define your webapp in the $TOMCAT_HOME/conf/server.xml file with a prefix, like Context path="/mywebapp" docBase="/home/mywebapproot" debug="0" reloadable="true" trusted="false" /Context and in your web.xml, add something like: servlet servlet-name invoker /servlet-name servlet-class org.apache.tomcat.servlets.InvokerServlet /servlet-class /servlet servlet-mapping servlet-name invoker /servlet-name url-pattern /myservlets/* /url-pattern /servlet-mapping This should allow you to run your servlets (ie any class which implements Servlet, and whose .class file is stored under yourwebapproot/WEB-INF/classes) using urls like http://somehost:8080/mywebapp/myservlets/somepkg.someservletclass If you don't like having all your servlets "appear" to be under one directory, don't like having to type in the package name, want servlets to be invoked by names which don't match the actual java class name, or want to pass initialisation params to servlets, then you have to add individual servlet and servlet-mapping tags for each servlet instead of setting up an InvokerServlet. Note that the InvokerServlet is just an ordinary servlet - you could have written it yourself, but tomcat nicely provides an implementation. Above, the standard servlet-mapping feature is used to redirect all urls starting with "myservlets" to an "ordinary" servlet called InvokerServlet. The code inside InvokerServlet just fetches the rest of the URL, and then calls the java "getClassFor" method, and (provided it succeeced) calls the class. step 2: Change the "path" attribute in the context entry from "/mywebapp" to "", which will get rid of the "mywebapp" prefix, so that you can run your servlets as http://somehost:8080/myservlets/somepkg.someservletclass Remember that the settings in $TOMCAT_HOME/conf/server.xml are applied to *all* webapps within a tomcat instance. I think that by doing redirections at this level, you can cause really nasty side-effects. I'm not sure what an InvokerInterceptor actually does, but I think it is too "high-level" for achieving what you want to achieve. Try thinking of a webapp as an application, like microsoft word. Changing settings in a webapp's web.xml file is like selecting File|Properties within word to modify setting for the word application. Changing settings in $TOMCAT_HOME/conf/server.xml is like changing operating-system-wide settings. Regards, Simon -Original Message----- From: Thyagesh [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, December 19, 2000 1:07 PM To: [EMAIL PROTECTED] Subject: Re: Need Some help.. Hi, Thanks Simon for the valuable advice. I got most of it. I still need some clarifications: I am use:Tomcat 3.2 WindowsNT4 IIS 4.0. Things I did is: 1) I Repeated the following lines in server.xml in tomcat home/conf for different context-paths (i.e. for http://host/context-path/servlet name: /servlet, /login etc) by adding different values of 'prefix' attribute. RequestInterceptor className="org.apache.tomcat.request.InvokerInterceptor" debug="0" prefix="/login/" / 2) Defined mappings in web.xml (in webapps/root/.../web.xml) for all servlets that are in packages. This seems to work when I requests to Tomcat directly. I wanted to know: A) whether the above configurations is logically CORRECT. -Thanks -Thyagesh - Original Message - From: Kitching Simon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 18, 2000 4:43 PM Subject: RE: Need Some help.. Hi, I suggest thinking of your mappings in two steps: (a) get the mappings right *within* a context (b) decide what context prefix you want. If you ve a context with a path (ie url prefix) of "mywebapp", then you can set up URLs as you desire *within* that webapp. Configuring the url-servlet mappings (ie what servlet is run when a user requests a particular url) is done by defining servlet-mapping tags within the WEB-INF/web.xml file for your webapp. The urls you define like this are all *relative* to the webapp url, eg if you set up a mapping from "/foo" to the java class "mypackage.myclass", then it must be accessed by the user as "http://somehost/webappname/foo". If you have a whole bunch of servlets, and you don't want to enter separate servlet-mapping entries for each one, then
Re: Need Some help..
Hi, Thanks Simon for the valuable advice. I got most of it. I still need some clarifications: I am use:Tomcat 3.2 WindowsNT4 IIS 4.0. Things I did is: 1) I Repeated the following lines in server.xml in tomcat home/conf for different context-paths (i.e. for http://host/context-path/servlet name: /servlet, /login etc) by adding different values of 'prefix' attribute. RequestInterceptor className="org.apache.tomcat.request.InvokerInterceptor" debug="0" prefix="/login/" / 2) Defined mappings in web.xml (in webapps/root/.../web.xml) for all servlets that are in packages. This seems to work when I requests to Tomcat directly. I wanted to know: A) whether the above configurations is logically CORRECT. -Thanks -Thyagesh - Original Message - From: Kitching Simon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 18, 2000 4:43 PM Subject: RE: Need Some help.. Hi, I suggest thinking of your mappings in two steps: (a) get the mappings right *within* a context (b) decide what context prefix you want. If you ve a context with a path (ie url prefix) of "mywebapp", then you can set up URLs as you desire *within* that webapp. Configuring the url-servlet mappings (ie what servlet is run when a user requests a particular url) is done by defining servlet-mapping tags within the WEB-INF/web.xml file for your webapp. The urls you define like this are all *relative* to the webapp url, eg if you set up a mapping from "/foo" to the java class "mypackage.myclass", then it must be accessed by the user as "http://somehost/webappname/foo". If you have a whole bunch of servlets, and you don't want to enter separate servlet-mapping entries for each one, then you may want to take advantage of the "invoker servlet" which effectively sets up bulk url mappings for you, but doesn't give you such fine control as creating invididual mappings. Deciding whether you want the webapp to have a prefix of "/" (ie be the root webapp) is a separate thing. This is configured with the context tag in the $TOMCAT_HOME/conf/server.xml file. WAR files have nothing to do with paths at all; they are just a convenient method of installing the bunch of files making up a webapp. PS: In future, please specify your tomcat VERSION, as answers to questions often depend on which tomcat you are using. Regards, Simon
RE: Need Some help..
Hi, I suggest thinking of your mappings in two steps: (a) get the mappings right *within* a context (b) decide what context prefix you want. If you ve a context with a path (ie url prefix) of "mywebapp", then you can set up URLs as you desire *within* that webapp. Configuring the url-servlet mappings (ie what servlet is run when a user requests a particular url) is done by defining servlet-mapping tags within the WEB-INF/web.xml file for your webapp. The urls you define like this are all *relative* to the webapp url, eg if you set up a mapping from "/foo" to the java class "mypackage.myclass", then it must be accessed by the user as "http://somehost/webappname/foo". If you have a whole bunch of servlets, and you don't want to enter separate servlet-mapping entries for each one, then you may want to take advantage of the "invoker servlet" which effectively sets up bulk url mappings for you, but doesn't give you such fine control as creating invididual mappings. Deciding whether you want the webapp to have a prefix of "/" (ie be the root webapp) is a separate thing. This is configured with the context tag in the $TOMCAT_HOME/conf/server.xml file. WAR files have nothing to do with paths at all; they are just a convenient method of installing the bunch of files making up a webapp. PS: In future, please specify your tomcat VERSION, as answers to questions often depend on which tomcat you are using. Regards, Simon -Original Message- From: Thyagesh [SMTP:[EMAIL PROTECTED]] Sent: Monday, December 18, 2000 7:52 AM To: [EMAIL PROTECTED] Subject: Need Some help.. Hi, I know its stupid. But I really struck with Tomcat's Docs can't figure how to configure it. I had used JServ extensively. I had to migrate to Tomcat since I need a Servlet Container to Connect to IIS in Windows. My Requirements are that I had to Run Servlets which are in packages. Hence I need mappings to these servlets. Also I need different context Paths to same set of code(ex: /servlet, /foo) like zones in JServ. Thing I want to know whether I had to create a WAR file to make it work . OR Just add code to /webapps/root/.../classes(then where would be mappings??). I had seen docs but couldn't figure out Any Help will be really useful. Please.. -Thyagesh
Need Some help..
Hi, I know its stupid. But I really struck with Tomcat's Docs can't figure how to configure it. I had used JServ extensively. I had to migrate to Tomcat since I need a Servlet Container to Connect to IIS in Windows. My Requirements are that I had to Run Servlets which are in packages. Hence I need mappings to these servlets. Also I need different context Paths to same set of code(ex: /servlet, /foo) like zones in JServ. Thing I want to know whether I had to create a WAR file to make it work . OR Just add code to /webapps/root/.../classes(then where would be mappings??). I had seen docs but couldn't figure out Any Help will be really useful. Please.. -Thyagesh
Tomcat - mod_jk - Configuration : Need some help please
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi folks, Okay, I'm kind of new to this java stuff, so please bear with me. I think I have it almost done but have reached a stumbling block which I cannot resolve by searching through the archives. I'm sure its a simple one, but It's got me stumped. FOR--- Solaris 2.6 Apache 1.3.12 Tomcat 3.2 mod_jk JDK 1.3 I have my apache set up to use virtual hosts. I have the tomcat set up pretty much stock, with the exception that I added ajp13(i'm not using it in my apache configuration though) and I commented out the /examples, /admin, etc. now all i have in my server.xml file for context is Context path="/java" docBase ="/export/home/cci/public_html/java" croseContext="true" debug="0" reloadable="true" /Context then in my httpd.conf file i have VirtualHost 111.111.111.111 ServerAdmin [EMAIL PROTECTED] DocumentRoot /export/home/cci/public_html ServerName my.domain.com DirectoryIndex index.cgi index.pl index.html index.shtml Directory /export/home/cci/public_html Options All /Directory Directory /export/home/cci/public_html/cgi-bin Options All /Directory AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /export/home/cci/public_html/logs/error_log TransferLog /export/home/cci/public_html/logs/access_log Directory "/export/home/cci/public_html/java" Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /java/servlet/* ajp12 JkMount /java/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location "/java/WEB-INF/" AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location "/java/META-INF/" AllowOverride None deny from all /Location /VirtualHost If I http to my virtualhost:8080 the stock tomcat screen comes up. If I http to my virtualhost:8080/java then I get the directory index of the /export/home/cci/public_html/java(as I would expect). I have created a quick jsp to test my setup which just does the basic html tags and then does a % out.println("test") % if I go to http://my.domain.com/java i get the same directory listing as I would expect. the problem is that when i click on test.jsp, i get the following output.(for either the servername:8080/java or the virtual host). Error: 500 Location: /java/test.jsp Internal Servlet Error: javax.servlet.ServletException: sun/tools/javac/Main at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NoClassDefFoundError: sun/tools/javac/Main at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:245) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at
RE: Tomcat - mod_jk - Configuration : Need some help please
You need to have tools.jar (in the JDK/lib dir) in your classpath for Tomcat, since it uses javac to complile the JSPs. Good luck. -MC -Original Message- From: Bill Long [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 4:02 PM To: [EMAIL PROTECTED] Subject: Tomcat - mod_jk - Configuration : Need some help please *This message was transferred with a trial version of CommuniGate(tm) Pro* Hi folks, Okay, I'm kind of new to this java stuff, so please bear with me. I think I have it almost done but have reached a stumbling block which I cannot resolve by searching through the archives. I'm sure its a simple one, but It's got me stumped. FOR--- Solaris 2.6 Apache 1.3.12 Tomcat 3.2 mod_jk JDK 1.3 I have my apache set up to use virtual hosts. I have the tomcat set up pretty much stock, with the exception that I added ajp13(i'm not using it in my apache configuration though) and I commented out the /examples, /admin, etc. now all i have in my server.xml file for context is Context path="/java" docBase ="/export/home/cci/public_html/java" croseContext="true" debug="0" reloadable="true" /Context then in my httpd.conf file i have VirtualHost 111.111.111.111 ServerAdmin [EMAIL PROTECTED] DocumentRoot /export/home/cci/public_html ServerName my.domain.com DirectoryIndex index.cgi index.pl index.html index.shtml Directory /export/home/cci/public_html Options All /Directory Directory /export/home/cci/public_html/cgi-bin Options All /Directory AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /export/home/cci/public_html/logs/error_log TransferLog /export/home/cci/public_html/logs/access_log Directory "/export/home/cci/public_html/java" Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /java/servlet/* ajp12 JkMount /java/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location "/java/WEB-INF/" AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location "/java/META-INF/" AllowOverride None deny from all /Location /VirtualHost If I http to my virtualhost:8080 the stock tomcat screen comes up. If I http to my virtualhost:8080/java then I get the directory index of the /export/home/cci/public_html/java(as I would expect). I have created a quick jsp to test my setup which just does the basic html tags and then does a % out.println("test") % if I go to http://my.domain.com/java i get the same directory listing as I would expect. the problem is that when i click on test.jsp, i get the following output.(for either the servername:8080/java or the virtual host). Error: 500 Location: /java/test.jsp Internal Servlet Error: javax.servlet.ServletException: sun/tools/javac/Main at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NoClassDefFoundError: sun/tools/javac/Main at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:245) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.ja