Re: Unable to find a javac compiler

2003-07-31 Thread Reginald Oake
Hi.

It sounds like when running Tomcat with Apache that your path variable
is not being passed to the Jasper compiler (not sure what the solution
is but I hope this is of some value).


Thanx,


Reg


On Thu, 2003-07-31 at 13:42, Bradberry, Rick wrote:
 Hi,
  
 Got a problem with Apache 2.0.47, Tomcat 4.1.18 and  j2sdk 1.4.1.01. I've
 read through the archive and 
 found some close to my problem, but not quit. 
  
 My problem:
  
 I've installed Apache and Tomcat as standalone servers and they both work
 great. Now I'm trying to 
 get them to talk to each other. 
  
 I read through a HOWTO on setting it up on win2K as a inprocess server for
 jk2 and it almost works. 
 Apache passes the request to Tomcat and Tomcat will process them unless it
 comes across 
 a jsp page that has not been complied. Then I get
 Unable to find a javac compiler in the Tomcat logs. However, If I start
 Tomcat as a stand alone and
 go to the same page it compiles it and then I can go back to Apache and it
 will work.
  
 I've tried everything I can find, but get the same results.
  
 any help would be greatly appreciated.
  
 Some setup
  
 JAVA_HOME=C:\Program Files\eclipse\j2sdk1.4.1_01
 CATALINA_HOME=C:\Program Files\Apache Group\jakarta-tomcat-4.1.18
 TOMCAT_HOME=C:\Program Files\Apache Group\jakarta-tomcat-4.1.18
  
 JK2.properties from HOWTO
  
 ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
 ## WHEN YOU EDIT THE FILE.
 ## COMMENTS WILL BE _LOST_
  
 ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
  
 # Override the default port for the socketChannel
 # channelSocket.port=8019
 # Default:
 # channelUnix.file=${jkHome}/work/jk2.socket
 # Just to check if the the config  is working
 shm.file=C:\Program Files\Apache Group\Apache2/logs/jk2.shm
  
 # In order to enable jni use any channelJni directive
 channelJni.disabled = 0
 # And one of the following directives:
  
 # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
  
 # If set to inprocess the mod_jk2 will Register natives itself
 # This will enable the starting of the Tomcat from mod_jk2
 apr.jniModeSo=inprocess
  
 
 worker.properties from the HOWTO.
  
 [logger]
 level=DEBUG
  
 [config:]
 #file=${serverRoot}/conf/workers2.properties
 file=C:/Program Files/Apache Group/Apache2/conf/workers2.properties
 debug=0
 debugEnv=0
  
 [uriMap:]
 info=Maps the requests. Options: debug
 debug=0
  
 # Alternate file logger
 #[logger.file:0]
 #level=DEBUG
 #file=${serverRoot}/logs/jk2.log
  
 [shm:]
 info=Scoreboard. Required for reconfiguration and status with multiprocess
 servers
 file=C:/Program Files/Apache Group/Apache2/logs/jk2.shm
 size=100
 debug=0
 disabled=0
  
 [workerEnv:]
 info=Global server options
 timing=1
 debug=0
 # Default Native Logger (apache2 or win32 )
 # can be overriden to a file logger, useful
 # when tracing win32 related issues
 #logger=logger.file:0
  
 [lb:lb]
 info=Default load balancer.
 debug=0
  
 #[lb:lb_1]
 #info=A second load balancer.
 #debug=0
  
 [channel.socket:localhost:8009]
 info=Ajp13 forwarding over socket
 debug=0
 tomcatId=localhost:8009
  
 #[channel.socket:localhost:8019]
 #info=A second tomcat instance.
 #debug=0
 #tomcatId=localhost:8019
 #lb_factor=1
 #group=lb
 #group=lb_1
 #disabled=0
  
 #[channel.un:/opt/33/work/jk2.socket]
 #info=A second channel connecting to localhost:8019 via unix socket
 #tomcatId=localhost:8019
 #lb_factor=1
 #debug=0
  
 [channel.jni:jni]
 info=The jni channel, used if tomcat is started inprocess
  
 [status:]
 info=Status worker, displays runtime informations
  
 [vm:]
 info=Parameters used to load a JVM in the server process
 #JVM=C:\jdk\jre\bin\hotspot\jvm.dll
 OPT=-Djava.class.path=C:/Program Files/Apache
 Group/jakarta-tomcat-4.1.18/bin/tomcat-jni.jar;C:/Program Files/Apache
 Group/jakarta-tomcat-4.1.18/server/lib/commons-logging.jar;C:/Program
 Files/eclipse/j2sdk1.4.1_01/bin;C:/Program Files/Apache
 Group/jakarta-tomcat-4.1.18/jre/lib/rt.jar;C:/Program Files/Apache
 Group/jakarta-tomcat-4.1.18/lib/tools.jar
 OPT=-Dtomcat.home=C:/Program Files/Apache Group/jakarta-tomcat-4.1.18
 OPT=-Dcatalina.home=C:/Program Files/Apache Group/jakarta-tomcat-4.1.18
 OPT=-Djava.home=C:/Program Files/eclipse/j2sdk1.4.1_01
 OPT=-Xmx128M
 #OPT=-Djava.compiler=NONE
 OPT=-Djava.compiler=C:/Program Files/eclipse/j2sdk1.4.1_01/bin/javac
 disabled=0
  
 [worker.jni:onStartup]
 info=Command to be executed by the VM on startup. This one will start
 tomcat.
 class=org/apache/jk/apr/TomcatStarter
 ARG=start
 disabled=0
 stdout=C:/Program Files/Apache Group/Apache2/logs/stdout.log
 stderr=C:/Program Files/Apache Group/Apache2/logs/stderr.log
  
 [worker.jni:onShutdown]
 info=Command to be executed by the VM on shutdown. This one will stop
 tomcat.
 class=org/apache/jk/apr/TomcatStarter
 ARG=stop
 disabled=0
  
 [uri:/jkstatus/*]
 info=Display status information and checks the config file for changes.
 group=status:
  
 #[uri:127.0.0.1:8003]
 #info=Example virtual host. Make sure myVirtualHost is in 

Re: Tomcat Education

2003-07-28 Thread Reginald Oake
Hello Ben.

There are several (about a half dozen) books available for Struts right
now. There is an O'Reilly book called Programming Jakarta Struts and a
book by Ted Husted (acknowledged struts guru) called Struts in Action.
Both of these should be readily available at your local computer book
store.

Reg

On Mon, 2003-07-28 at 09:11, Ben Johnson wrote:
 Hello all,
   I'm new to the Tomcat world and I'm desperately trying to find some
 good resources to learn from.  I bought Professional Apache Tomcat (Wrox)
 and it's decent but it's for version 3.0 or something.  I also have a
 Servlet book from O'Reilly but it doesn't help when integrating with Tomcat.
 I've spent an inordinate number of hours just trying to figure out how to
 pull DataSources using the admin tool and I still haven't figured it out.
 
 Anybody have any resource or book ideas?  Thanks!
 
 
 Ben Johnson
 Senior Software Developer
  
 Collect America, LTD.
 1999 Broadway, Suite 2150
 Denver, CO 80202
 [p]: 303.296.3345 x124
 
 
 -
 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: JDK Problems - libjava.so

2003-07-24 Thread Reginald Oake
Hi.

One of the things that typically gives a 'can't find *.so' error the
problem is that the path to the so (shared object) file is not in the
LD_LIBRARY_PATH environment variable.

You can check this by bringing up a terminal window and entering the
following command...
set | grep LD_LIBRARY_PATH

The first thing I would do is find out where the libjava.so file is
(typically path to your java install/jre/lib/arch/libjava.so where
path to your java install is the path to the root of the java install
and arch is something like i386 -- probably ppc or ppc64 or something
like it in your case). If you can't find it then the problem is that the
install of java did not complete properly or the installer is broken. If
this is the case you will need to find a different j2sdk or jre or check
with the site where you got the installer for further help.

Second, try the following set of commands...
export JAVA_HOME=path to your java install
export PATH=$PATH:$JAVA_HOME
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME/jre/lib/arch
java -version
The setting of the JAVA_HOME environment variable is not strictly
necessary but is required by Tomcat and it helps with the following
commands. Of course arch and path to your java install will have to
be replaced with the appropriate values for your system as above. If
this works then you simply need to take the first three lines of the
above commands and modify your /etc/profile file such that it does this
for you.

Hope this helps.


Reg


On Wed, 2003-07-23 at 09:50, Hari Om wrote:
 I downloaded and installed j2sdk-1.3.1-02b-FCS-linux-ppc.bin from the 
 penguinppc.org web site and followed the instructions. I was able to INSTALL 
 under /usr/local and also changed my PATH variable.but later when I test 
 my java version it gives following error - wonder why
 
 #./java -version
 Error: can't find libjava.so.
 
 
 I am using IBM PowerPC (pseries) with Red Hat Linux 7.1
 
 Any related information on this is appreciated.
 
 THANKS!
 
 HARI OM
 
 _
 STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
 
 
 -
 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: Tomcat jsp file is locked on win32

2003-07-15 Thread Reginald Oake
Hello.

I have found that under Windows file locks are not always released when
a file is closed and the only way after this to release a file lock is
to reboot the system. Sometimes file locks seem to clear on their own,
other times I have to restart the computer to release a file lock
(sometimes even this does not work).

If you are on a UNIX based system try running lsof and grep for the name
of the file. Part of the information you will get will be the id of the
process that has the file open. You can then go to that process and
release the file or terminate the process (either should release the
file lock).

Hope this helps.


Reg


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



Re: Error when trying to access Admin or Sample code

2003-07-14 Thread Reginald Oake
Hi.

I just the same problem recently and an upgrade (actually downgrade) to
j2sdk1.4.1 solved my problem.

Also, Tim Funk supplied me with this link which has information on other
possible solutions
http://jakarta.apache.org/tomcat/faq/misc.html#compile
Hope this helps.


Reg


On Sun, 2003-07-13 at 19:35, [EMAIL PROTECTED] wrote:
 Dear Friends, thanks for your help in advance:
 
 I just installed Java 1.4.0, used defaults, and regular .java code compiles. So 
 installed the TomCat 4.1.24 and used defaults, all went OK, no errors reported. Get 
 the following error when I click on the Admin Tool short cut:
 
 
 
 
 HTTP Status 500 - 
 
 
 
 type Exception report
 
 message 
 
 description The server encountered an internal error () that prevented it from 
 fulfilling this request.
 
 exception 
 
 org.apache.jasper.JasperException: Unable to compile class for JSP
 
 An error occurred at line: -1 in the jsp file: null
 
 Generated servlet error:
 [javac] Since fork is true, ignoring compiler setting.
 [javac] Compiling 1 source file
 [javac] Since fork is true, ignoring compiler setting.
 [javac] C:\Program Files\Apache Group\Tomcat 
 4.1\work\Standalone\localhost\_\index_jsp.java:266: 
 handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be 
 applied to (java.lang.Throwable)
 [javac]   if (pageContext != null) pageContext.handlePageException(t);
 [javac]   ^
 [javac] 1 error
 
 
 
   at 
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
   at 
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
   at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
   at 
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
   at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
   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:2415)
   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:594)
   at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
   at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
   at 
 

Re: [off-topic] - Where can i find Oreilly's package for uploadingfiles?

2003-07-14 Thread Reginald Oake
Hi.

According to the book Java Servlet Programming the cos.jar file can be
found at www.servlets.com.


On Mon, 2003-07-14 at 01:22, Guus Holshuijsen wrote:
 Try http://examples.oreilly.com/jservlet2/. There you will find a link to
 http://www.servlets.com/cos/.
 
 Regards,
 Guus
 - Original Message -
 From: Susan Hoddinott [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Saturday, July 12, 2003 6:05 PM
 Subject: Re: [off-topic] - Where can i find Oreilly's package for uploading
 files?
 
 
  Have you tried www.oreilly.com?
 
  Regards,
  Susan Hoddinott
  http://www.hexworx.com
 
  - Original Message -
  From: Jose Euclides da Silva Junior - DATAPREVRJ
  [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, July 10, 2003 2:02 AM
  Subject: [off-topic] - Where can i find Oreilly's package for uploading
  files?
 
 
   Hi, i have tried to search for , but i didnt find it. Can somebody help
  me?
   Thanks in advance,
   Euclides.
  
   -
   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]
 
 
 
 -
 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: tomcat startup

2003-07-14 Thread Reginald Oake
Hi.

From the look of the error message it appears that your CATALINA_HOME
environment variable is not set. It should be a global environment
variable (under windows) or if you are using some flavour of unix set it
in /etc/profile.

Also, it appears that you do not have a TCP/IP stack available. I have
encountered this before in Windows where, if you do not have a network
connection (ethernet or through a modem) Windows does not create a
TCP/IP stack. I am not sure how you would proceed in this case but the
availability of a TCP/IP stack is a necessity.


Thanx,


Reg

On Mon, 2003-07-14 at 06:29, Souren Sinha wrote:
 Hi,
 I am having trouble starting up tomcat from the Start menu.
 I get the following exception:
 
 Using CATALINA_BASE:   ..
 Using CATALINA_HOME:   ..
 Using CATALINA_TMPDIR: ..\temp
 Using JAVA_HOME:   C:\j2sdk1.4.0_03
 Jul 14, 2003 10:28:26 PM org.apache.commons.modeler.Registry loadRegistry
 INFO: Loading registry information
 Jul 14, 2003 10:28:27 PM org.apache.commons.modeler.Registry getRegistry
 INFO: Creating new Registry instance
 Jul 14, 2003 10:28:28 PM org.apache.commons.modeler.Registry getServer
 INFO: Creating MBeanServer
 Jul 14, 2003 10:28:29 PM org.apache.coyote.http11.Http11Protocol init
 SEVERE: Error initializing endpoint
 java.net.SocketException: Network is down: listen failed
 at java.net.PlainSocketImpl.socketListen(Native Method)
 at java.net.PlainSocketImpl.listen(PlainSocketImpl.java:333)
 at java.net.ServerSocket.bind(ServerSocket.java:309)
 at java.net.ServerSocket.bind(ServerSocket.java:266)
 at java.net.ServerSocket.init(ServerSocket.java:182)
 at java.net.ServerSocket.init(ServerSocket.java:138)
 
 Can someone please help me out.
 Regards
 Souren
 
 
 - Original Message -
 From: Agarwal, Naresh [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 14, 2003 10:09 PM
 Subject: Do we have any control on Tomcat threads?
 
 
 Hi
 
 Web apps in tomcat run in threads spawned by Tomcat. Do we have any control
 on these threads?
 
 I want to perform some Init and UnInit operations at the time creation and
 destruction of these threads. Is it possible to do with Tomcat threads?
 
 thanks  regards,
 Naresh Agarwal
 
 
 
 
 -
 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: Newbie question on Tomcat security

2003-07-14 Thread Reginald Oake
Hi.

I'm not certain about this but it seems to me that it would be next to
impossible to keep the html source from being viewed by someone using
any browser (this is not a server side issue). The source has to be
uploaded to the browser and, once it is uploaded anyone can view source
on the page.

As far as keeping your directory structure at least a little bit more
obscured you can do two things. You can never fully obscure the
directory structure as the browser requires this information to load
images, style sheets and links.

The first is to put an index.jsp or index.html file in so that people
cannot view your directory structure directly (there is probably a
better way to do this).

The second is to use servlet mappings.

I'm not sure if this needs to be said but even though people can
determine your directory structure with fairly little effort this does
not, in itself, pose a security risk.


Thanx


Reg


On Mon, 2003-07-14 at 15:49, substring wrote:
 Hello All,
 
 I just developed a JSP application called myapp,
 running on Tomcat 4.1.24.  How can I keep people from
 accessing my files under tomcat/webapps/myapp?  For
 example, people can do a simple view source and find
 the path to my css file, then they can type in the
 path on the browser to access my files.
 
 What kind of security that I should set up for that? 
 I am pretty new to Tomcat so I need help.
 
 By the way, my OS is Windows 2000 Pro.
 
 Any help will be very much appreciated.
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 -
 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: Newbie question on Tomcat security

2003-07-14 Thread Reginald Oake
Hi.

I don't know if this will be helpful but I have heard of people putting
their JSPs and other ancilliary files inside the WEB-INF directory. I'm
not sure what you have to do to make this work but it may well be worth
looking into.


Reg


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