Can only view pages on localhost

2009-03-26 Thread Joel
I am a new user of Tomcat.  In my test system I have pc's networked via
a wireless router.  The router assigns the IP address of 192.168.0.2 to the
machine that runs Tomcat.  When I run Tomcat using http://localhost/... or
http://192.168.0.2/... everything works fine when I work on the local
machine.  But when I attempt to view web pages from any other machine on the
network using http://192.168.0.2/... I get timed out.  
 
How should I configure Tomcat so that it accepts requests from other
machines -- not just localhost?
 
Joel


Can only view web pages from loalhost

2009-03-26 Thread Joel
I am a new user of Tomcat. In my test system I have pc's networked via a
wireless router. The router assigns the IP address of 192.168.0.2 to the
machine that runs Tomcat. When I run Tomcat using  <http://localhost/>
http://localhost/... or  <http://192.168.0.2/> http://192.168.0.2/...
everything works fine when I work on the local machine. But when I attempt
to view web pages from any other machine on the network using
<http://192.168.0.2/> http://192.168.0.2/... I get timed out. 

How should I configure Tomcat so that it accepts requests from other
machines -- not just localhost?

I am using Tomcat 6.0.18 on windows XP Professional.

 

Joel

 


Can only view web pages from localhost

2009-03-26 Thread Joel
I am a new user of Tomcat. In my test system I have pc's networked via a
wireless router. The router assigns the IP address of 192.168.0.2 to the
machine that runs Tomcat. When I run Tomcat using < <http://localhost/>
http://localhost/>  <http://localhost/> http://localhost/... or <
<http://192.168.0.2/> http://192.168.0.2/>  <http://192.168.0.2/>
http://192.168.0.2/...

everything works fine when I work on the local machine. But when I attempt
to view web pages from any other machine on the network using <
<http://192.168.0.2/> http://192.168.0.2/>  <http://192.168.0.2/>
http://192.168.0.2/... I get timed out. 

How should I configure Tomcat so that it accepts requests from other
machines -- not just localhost?

I am using Tomcat 6.0.18 on windows XP Professional.

 

Yes, windows firewall is on.

 
Joel
 


Can only view web pages from loalhost

2009-03-26 Thread Joel
Windows firewall is now OFF.  I still can't connect but I do get an error
reply much faster with a new message of "Internet explorer can not display
the web page".
 
Joel
 


Can only view web pages from localhost

2009-03-26 Thread Joel
I will try Firefox
 
Joel
 


server running website

2011-02-22 Thread Joel
So my boss has a Tomcat folder that was running a website at his old job. I
don't know how to determine the exact version but in the realease notes
there is: "$Id: RELEASE-NOTES-4.1.txt,v 1.81 2003/10/27 13:40:27 remm Exp $"
he wants to run it on a new machine, the OS is: Mac OS X Server 10.6.5

 When I do "sudo bash startup.sh" I get:
Using CATALINA_BASE:   /opt/Tomcat
Using CATALINA_HOME:   /opt/Tomcat
Using CATALINA_TMPDIR: /opt/Tomcat/temp
Using JAVA_HOME:   /Library/Java/Home

But when I try to go to the page "localhost:8080" or "localhost:80"

Safari says:

"Safari can’t open the page “http://function2.basiceng.umr.edu/view” because
Safari can’t find the server “function2.basiceng.umr.edu”."

When I don't run the server as sudo I get things like

Safari can’t open the page “http://www.localhost.com:80/” because the server
unexpectedly dropped the connection. This sometimes occurs when the server
is busy. Wait for a few minutes, and then try again.


Likewise when shutting down the server without sudo:
Using CATALINA_BASE:   /opt/Tomcat
Using CATALINA_HOME:   /opt/Tomcat
Using CATALINA_TMPDIR: /opt/Tomcat/temp
Using JAVA_HOME:   /Library/Java/Home
Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
 at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
 at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.(Socket.java:375)
 at java.net.Socket.(Socket.java:189)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:581)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 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.main(Bootstrap.java:203)

I don't mind running the server as root currently (I was just showing that
to see if that was a symptom of another problem), but I was wondering how it
can obviously find the correct previous web address but not find the server
that is running it; is it for some reason trying to go to the previous
website even though I told it to go to localhost? I tried changing all the
files in the tomcat folder to being owned by my user name but that had no
effect (that was impulsive hopefully that won't screw anything up later, let
me know if so)

I was wondering where I should start looking to resolve these problems.
Thanks.


Re: server running website

2011-02-23 Thread Joel
On Tue, Feb 22, 2011 at 10:59 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:
>
>
> Again, it looks like something's wrong with the hosts file.  Might be as
> simple as not having a hosts file, or not having an entry for localhost.
>
> Another possibility is that you may have a webapp deployed that has
> hard-coded the original website address, and did a redirect with it - hard
> coding like that is a very, very bad practice.
>
>
So yeah it might be the later problem, where there is a hardcoded directory.
Is there a quick way to fix this? This should be a list of all the files
that "function2.basiceng.umr.edu" appears in

sackett-research-lab2b:opt joel$ sudo find /opt/Tomcat -type f | xargs grep
function2.basiceng.umr.edu
grep: /opt/Tomcat/conf/server: No such file or directory
grep: copy.xml: No such file or directory
/opt/Tomcat/webapps/ROOT/index.jsp: http://function2.basiceng.umr.edu/view";>
/opt/Tomcat/webapps/view/acct_new.jsp:// "http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; + id
+ "\">"
Binary file /opt/Tomcat/webapps/view/css/.nobar.css.swp matches
grep: /opt/Tomcat/webapps/view/images/folder_closed: No such file or
directory
grep: copy.gif: No such file or directory
grep: /opt/Tomcat/webapps/view/Pick_: No such file or directory
grep: CLMatrices.jsp: No such file or directory
grep: /opt/Tomcat/webapps/view/Reading: No such file or directory
grep: Excel.jsp: No such file or directory
grep: /opt/Tomcat/webapps/view/searchmorph_results: No such file or
directory
grep: old.jsp: No such file or directory
/opt/Tomcat/webapps/view/test.html: http://function2.basiceng.umr.edu:8080/view/cgi-bin/test.cgi";>Test
/opt/Tomcat/webapps/view/test1.html: http://function2.basiceng.umr.edu/tst.cgi";>
grep: /opt/Tomcat/webapps/view/Testing: No such file or directory
grep: DB.jsp: No such file or directory
grep: /opt/Tomcat/webapps/view/UserPick_: No such file or directory
grep: CLMatrices.jsp: No such file or directory
/opt/Tomcat/webapps/view2/acct_new.jsp:// "http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; + id
+ "\">"
Binary file /opt/Tomcat/webapps/view2/css/.nobar.css.swp matches
grep: /opt/Tomcat/webapps/view2/images/folder_closed: No such file or
directory
grep: copy.gif: No such file or directory
Binary file /opt/Tomcat/work/Standalone/localhost/_/index_jsp.class matches
/opt/Tomcat/work/Standalone/localhost/_/index_jsp.java:
 out.write("http://function2.basiceng.umr.edu/view\";>\r\n");
/opt/Tomcat/work/Standalone/localhost/view/acct_new_jsp.java:// "http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; + id
+ "\">"
grep: copy/SESSIONS.ser: No such file or directory






Check the logs to find out what happened when you attempted to start the

server.

here is what happens in catalina.out when I start, not sure which log file
you want, though there aren't errors in any of them

Feb 23, 2011 10:37:26 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stoping http11 protocol on 80 Catalina:type=ThreadPool,name=http80
Feb 23, 2011 10:41:50 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Feb 23, 2011 10:41:50 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 80
Starting service Tomcat-Standalone
Apache Tomcat/4.1.29-LE-jdk14
Feb 23, 2011 10:41:51 AM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
Feb 23, 2011 10:41:51 AM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
Feb 23, 2011 10:41:51 AM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
returnNull=true
Feb 23, 2011 10:41:52 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Feb 23, 2011 10:41:52 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 80
Feb 23, 2011 10:41:52 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:9007
Feb 23, 2011 10:41:52 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/8  config=/opt/Tomcat/conf/jk2.properties


Is there something else already running on the ports tomcat is
trying to use?  What does netstat list as listening ports with and
without tomcat running?


With tomcat:
sackett-research-lab2b:logs joel$ netstat -a | grep LISTEN
tcp4   0  0  localhost.8005 *.*LISTEN
tcp46  0  0  *.9007 *.*LISTEN
tcp46  0  0  *.commplex-link*.*LISTEN
tcp46  0  0  *

Re: server running website

2011-02-23 Thread Joel
On Wed, Feb 23, 2011 at 10:44 AM, Joel  wrote:

>
>
> On Tue, Feb 22, 2011 at 10:59 AM, Caldarale, Charles R <
> chuck.caldar...@unisys.com> wrote:
>>
>>
>> Again, it looks like something's wrong with the hosts file.  Might be as
>> simple as not having a hosts file, or not having an entry for localhost.
>>
>> Another possibility is that you may have a webapp deployed that has
>> hard-coded the original website address, and did a redirect with it - hard
>> coding like that is a very, very bad practice.
>>
>>
> So yeah it might be the later problem, where there is a hardcoded
> directory. Is there a quick way to fix this? This should be a list of all
> the files that "function2.basiceng.umr.edu" appears in
>
> sackett-research-lab2b:opt joel$ sudo find /opt/Tomcat -type f | xargs grep
> function2.basiceng.umr.edu
> grep: /opt/Tomcat/conf/server: No such file or directory
> grep: copy.xml: No such file or directory
> /opt/Tomcat/webapps/ROOT/index.jsp:  content="0;url=http://function2.basiceng.umr.edu/view";>
> /opt/Tomcat/webapps/view/acct_new.jsp:// " http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
> id + "\">"
> Binary file /opt/Tomcat/webapps/view/css/.nobar.css.swp matches
> grep: /opt/Tomcat/webapps/view/images/folder_closed: No such file or
> directory
> grep: copy.gif: No such file or directory
> grep: /opt/Tomcat/webapps/view/Pick_: No such file or directory
> grep: CLMatrices.jsp: No such file or directory
> grep: /opt/Tomcat/webapps/view/Reading: No such file or directory
> grep: Excel.jsp: No such file or directory
> grep: /opt/Tomcat/webapps/view/searchmorph_results: No such file or
> directory
> grep: old.jsp: No such file or directory
> /opt/Tomcat/webapps/view/test.html: http://function2.basiceng.umr.edu:8080/view/cgi-bin/test.cgi";>Test
> /opt/Tomcat/webapps/view/test1.html: http://function2.basiceng.umr.edu/tst.cgi";>
> grep: /opt/Tomcat/webapps/view/Testing: No such file or directory
> grep: DB.jsp: No such file or directory
> grep: /opt/Tomcat/webapps/view/UserPick_: No such file or directory
> grep: CLMatrices.jsp: No such file or directory
> /opt/Tomcat/webapps/view2/acct_new.jsp:// " http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
> id + "\">"
> Binary file /opt/Tomcat/webapps/view2/css/.nobar.css.swp matches
> grep: /opt/Tomcat/webapps/view2/images/folder_closed: No such file or
> directory
> grep: copy.gif: No such file or directory
> Binary file /opt/Tomcat/work/Standalone/localhost/_/index_jsp.class matches
> /opt/Tomcat/work/Standalone/localhost/_/index_jsp.java:
>  out.write(" http://function2.basiceng.umr.edu/view\";>\r\n");
> /opt/Tomcat/work/Standalone/localhost/view/acct_new_jsp.java:// " href=\"
> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
> id + "\">"
> grep: copy/SESSIONS.ser: No such file or directory
>
>
>
>
>
>
> Check the logs to find out what happened when you attempted to start the
>
> server.
>
> here is what happens in catalina.out when I start, not sure which log file
> you want, though there aren't errors in any of them
>
> Feb 23, 2011 10:37:26 AM org.apache.coyote.http11.Http11Protocol destroy
> INFO: Stoping http11 protocol on 80 Catalina:type=ThreadPool,name=http80
> Feb 23, 2011 10:41:50 AM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on port 8080
> Feb 23, 2011 10:41:50 AM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on port 80
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.29-LE-jdk14
> Feb 23, 2011 10:41:51 AM org.apache.struts.util.PropertyMessageResources
> 
> INFO: Initializing, config='org.apache.struts.util.LocalStrings',
> returnNull=true
> Feb 23, 2011 10:41:51 AM org.apache.struts.util.PropertyMessageResources
> 
> INFO: Initializing, config='org.apache.struts.action.ActionResources',
> returnNull=true
> Feb 23, 2011 10:41:51 AM org.apache.struts.util.PropertyMessageResources
> 
> INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
> returnNull=true
> Feb 23, 2011 10:41:52 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on port 8080
> Feb 23, 2011 10:41:52 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on port 80
> Feb 23, 2011 10:41:52 AM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:9007
> Feb 23, 2011 10:41:52 AM org.apache.jk.server.JkMain start

Re: server running website

2011-02-23 Thread Joel
On Wed, Feb 23, 2011 at 11:08 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:
>
>
> Try this:
>
> sudo find /opt/Tomcat -type f -exec \
>   grep "function2.basiceng.umr.edu" "{}" \;
>
> Thanks, I'll use this now.

sackett-research-lab2b:~ joel$ sudo find /opt/Tomcat -type f -exec \
>   grep "function2.basiceng.umr.edu" "{}" \;
Password:
http://function2.basiceng.umr.edu/view";>
// "http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; + id
+ "\">"
Binary file /opt/Tomcat/webapps/view/css/.nobar.css.swp matches
http://function2.basiceng.umr.edu:8080/view/cgi-bin/test.cgi
">Test
http://function2.basiceng.umr.edu/tst.cgi";>
// "http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; + id
+ "\">"
Binary file /opt/Tomcat/webapps/view2/css/.nobar.css.swp matches
Binary file /opt/Tomcat/work/Standalone/localhost/_/index_jsp.class matches
  out.write("http://function2.basiceng.umr.edu/view\";>\r\n");
// "http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; + id
+ "\">"



>
> >> /opt/Tomcat/webapps/view/acct_new.jsp:// " >> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id=";
> +
> >> id + "\">"
>
> This appears commented-out, but could be a problem.
>
How could this be a problem if it is commented out?


> Are the messages you are getting coming only from Safari? Can you track
> the HTTP messages that are actually being sent? It's tough to tell
> what's going on just from Safari error messages (which are somewhat
> "friendly" and try to interpret the situation instead of telling you
> exactly what happened).
>
>
I'm not sure how to do this, I know you can turn off friend messages in
internet explorer. But when I downloaded ie5 for mac I couldn't find the
*$&#*@(# tools menu. :)



oh and this is the /etc/hosts

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
~



Thanks for the help.


Re: server running website

2011-02-23 Thread Joel
On Wed, Feb 23, 2011 at 12:57 PM, Joel  wrote:

>
>
>
> On Wed, Feb 23, 2011 at 11:08 AM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>>
>>
>> Try this:
>>
>> sudo find /opt/Tomcat -type f -exec \
>>   grep "function2.basiceng.umr.edu" "{}" \;
>>
>> Thanks, I'll use this now.
>
> sackett-research-lab2b:~ joel$ sudo find /opt/Tomcat -type f -exec \
> >   grep "function2.basiceng.umr.edu" "{}" \;
> Password:
> http://function2.basiceng.umr.edu/view";>
> // " http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
> id + "\">"
> Binary file /opt/Tomcat/webapps/view/css/.nobar.css.swp matches
> http://function2.basiceng.umr.edu:8080/view/cgi-bin/test.cgi
> ">Test
>  http://function2.basiceng.umr.edu/tst.cgi";>
> // " http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
> id + "\">"
> Binary file /opt/Tomcat/webapps/view2/css/.nobar.css.swp matches
> Binary file /opt/Tomcat/work/Standalone/localhost/_/index_jsp.class matches
>   out.write(" http://function2.basiceng.umr.edu/view\";>\r\n");
> // " http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
> id + "\">"
>
>
>
>>
>> >> /opt/Tomcat/webapps/view/acct_new.jsp:// "> >> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id=";
>> +
>> >> id + "\">"
>>
>> This appears commented-out, but could be a problem.
>>
> How could this be a problem if it is commented out?
>
>
>> Are the messages you are getting coming only from Safari? Can you track
>> the HTTP messages that are actually being sent? It's tough to tell
>> what's going on just from Safari error messages (which are somewhat
>> "friendly" and try to interpret the situation instead of telling you
>> exactly what happened).
>>
>>
> I'm not sure how to do this, I know you can turn off friend messages in
> internet explorer. But when I downloaded ie5 for mac I couldn't find the
> *$&#*@(# tools menu. :)
>
>
>
> oh and this is the /etc/hosts
>
> ##
> # Host Database
> #
> # localhost is used to configure the loopback interface
> # when the system is booting.  Do not change this entry.
> ##
> 127.0.0.1   localhost
> 255.255.255.255 broadcasthost
> ::1 localhost
> fe80::1%lo0 localhost
> ~
>
>
>
> Thanks for the help.
>
Yeah, finally found the tools menu (not used to macs), but I still can't see
how to turn off friendly messages. All the options are different in the mac
version.


Re: server running website

2011-02-23 Thread Joel
On Wed, Feb 23, 2011 at 3:26 PM, Joel  wrote:

>
>
> On Wed, Feb 23, 2011 at 12:57 PM, Joel  wrote:
>
>>
>>
>>
>> On Wed, Feb 23, 2011 at 11:08 AM, Christopher Schultz <
>> ch...@christopherschultz.net> wrote:
>>>
>>>
>>> Try this:
>>>
>>> sudo find /opt/Tomcat -type f -exec \
>>>   grep "function2.basiceng.umr.edu" "{}" \;
>>>
>>> Thanks, I'll use this now.
>>
>> sackett-research-lab2b:~ joel$ sudo find /opt/Tomcat -type f -exec \
>> >   grep "function2.basiceng.umr.edu" "{}" \;
>> Password:
>> http://function2.basiceng.umr.edu/view";>
>> // "> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
>> id + "\">"
>> Binary file /opt/Tomcat/webapps/view/css/.nobar.css.swp matches
>> http://function2.basiceng.umr.edu:8080/view/cgi-bin/test.cgi
>> ">Test
>>  http://function2.basiceng.umr.edu/tst.cgi";>
>> // "> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
>> id + "\">"
>> Binary file /opt/Tomcat/webapps/view2/css/.nobar.css.swp matches
>> Binary file /opt/Tomcat/work/Standalone/localhost/_/index_jsp.class
>> matches
>>   out.write("> http://function2.basiceng.umr.edu/view\";>\r\n");
>>  // "> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id="; +
>> id + "\">"
>>
>>
>>
>>>
>>> >> /opt/Tomcat/webapps/view/acct_new.jsp:// ">> >>
>>> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id=";
>>> +
>>> >> id + "\">"
>>>
>>> This appears commented-out, but could be a problem.
>>>
>> How could this be a problem if it is commented out?
>>
>>
>>> Are the messages you are getting coming only from Safari? Can you track
>>> the HTTP messages that are actually being sent? It's tough to tell
>>> what's going on just from Safari error messages (which are somewhat
>>> "friendly" and try to interpret the situation instead of telling you
>>> exactly what happened).
>>>
>>>
>> I'm not sure how to do this, I know you can turn off friend messages in
>> internet explorer. But when I downloaded ie5 for mac I couldn't find the
>> *$&#*@(# tools menu. :)
>>
>>
>>
>> oh and this is the /etc/hosts
>>
>> ##
>> # Host Database
>> #
>> # localhost is used to configure the loopback interface
>> # when the system is booting.  Do not change this entry.
>> ##
>> 127.0.0.1   localhost
>> 255.255.255.255 broadcasthost
>> ::1 localhost
>> fe80::1%lo0 localhost
>> ~
>>
>>
>>
>> Thanks for the help.
>>
> Yeah, finally found the tools menu (not used to macs), but I still can't
> see how to turn off friendly messages. All the options are different in the
> mac version.
>



So I was wondering if the website url in these files has anything to do with
my problem and if so are all the java files present for all the class files
and if so how would I go about recompiling the java files?


Binary file Tomcat/work/Standalone/localhost/_/index_jsp.class matches

Tomcat/work/Standalone/localhost/_/index_jsp.java:  out.write("http://function2.basiceng.umr.edu/view\";>\r\n");



Thanks.


Re: server running website

2011-03-02 Thread Joel
On 2/23/2011 4:18 PM, Joel wrote:
> >>> sackett-research-lab2b:~ joel$ sudo find /opt/Tomcat -type f -exec \
> >>>>   grep "function2.basiceng.umr.edu" "{}" \;
>
> Oops: I forgot the "-l" switch on grep... it's not giving you any file
> names :)


sackett-research-lab2b:~ joel$ sudo find /opt/Tomcat -type f -exec grep -l "
function2.basiceng.umr.edu" "{}" \;
Password:
Sorry, try again.
Password:
/opt/Tomcat/webapps/ROOT/index.jsp
/opt/Tomcat/webapps/view/acct_new.jsp
/opt/Tomcat/webapps/view/css/.nobar.css.swp
/opt/Tomcat/webapps/view/test.html
/opt/Tomcat/webapps/view/test1.html
/opt/Tomcat/webapps/view2/acct_new.jsp
/opt/Tomcat/webapps/view2/css/.nobar.css.swp
/opt/Tomcat/work/Standalone/localhost/_/index_jsp.class
/opt/Tomcat/work/Standalone/localhost/_/index_jsp.java
/opt/Tomcat/work/Standalone/localhost/view/acct_new_jsp.java





>  >>> Password:
> >>> http://function2.basiceng.umr.edu/view";>
> >>> // " >>> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id=";
> +
> >>> id + "\">"
> >>> Binary file /opt/Tomcat/webapps/view/css/.nobar.css.swp matches
> >>> http://function2.basiceng.umr.edu:8080/view/cgi-bin/test.cgi
> >>> ">Test
> >>>  http://function2.basiceng.umr.edu/tst.cgi";>
> >>> // " >>> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id=";
> +
> >>> id + "\">"
> >>> Binary file /opt/Tomcat/webapps/view2/css/.nobar.css.swp matches
> >>> Binary file /opt/Tomcat/work/Standalone/localhost/_/index_jsp.class
> >>> matches
> >>>   out.write(" >>> http://function2.basiceng.umr.edu/view\";>\r\n");
> >>>  // " >>> http://function2.basiceng.umr.edu:8080/view/Accounting/confirm.jsp?id=";
> +
> >>> id + "\">"
>
> Got some hits, I see. What is the hostname of the server on which the
> app is actually running, now? Either :80 or :8080 should work given the
> configuration you've shown, so I suspect the hostname is the problem.
> You can always try to configure an /etc/hosts setting for the above
> hostname and set them to the IP address of the real host -- just for
> testing, of course... it's not reasonable to have users modify their
> hosts files just to use your webapp :)
>
> I'm not exactly sure what you are talking about. I don


I tried setting the host name to function2.basiceng.umr.edu with "sudo
scutil --set HostName function2.basiceng.umr.edu" I also tried escaping the
periods like so
"sudo scutil --set HostName "function2\.basiceng\.umr\.edu", and "sudo
scutil --set HostName function2\\.basiceng\\.umr\\.edu" and I tried putting
quotes around all of the former but the hostname continues to show up as
"function2" or "function2\".






function2:~ joel$ PS1="[\d \t \u@\h:\w ] $ "
[Thu Feb 24 13:19:21 joel@function2:~ ] $



I may be missing something here, if this isn't what you meant let me know.



>
> Hmm... does Wireshark have a Mac OS X build? You might try that if you
> get desperate.
>
> > So I was wondering if the website url in these files has anything to do
> with
> > my problem
>
> If the hostname of the server has changed (or you've moved the app,
> which it sounds like you have), then it is /very/ likely to cause problems.
>
>
Yes it does, but when I don



 > and if so are all the java files present for all the class files
>
> You'll have to check that out for yourself. How familiar are you with
> Java in general? Each .class file comes from a .java file, though there
> are some cases where the .java filename isn't obvious from the .class
> file name (inner classes, anonymous classes, and other assorted fun stuff).
>
> String constants are compiled-into the .class files without any
> compression, so if you have a .java file with that text in it, you
> should find it in the .java file that goes with it.
>
> Web applications rarely come with any source files in them, though .jsp
> files (which are compiled on the fly by the server) are always in
> "source form". If the webapp is written properly, all UI-related stuff
> will be in the .jsp files and not in any .java files.
>
> > and if so how would I go about recompiling the java files?
>
> That really depends on the build process of the webapp. Are there any
> files like "build.xml" in the root directory of the webapp? Anything
> else that might look like a build script? If you don't have

Re: server running website

2011-03-02 Thread Joel
Ignore that half complete message. One of mac's annoying keyboard shortcuts
sent that for me :) (don't ask me how, I really don't know how it happened)


tomcat session mixing

2013-06-17 Thread joel
 

Hi, 

I'm using Apache Tomcat/6.0.24 running on centos and have
several times observed a rare issue in which user sessions are "mixed".
When this occurs, userA clicks on a link and is provided with userB
specific content, content that should only be accessible to userB. When
this "mixing" occurs, it seems to affect multiple sessions at the same
time, ie userA and userB are not the only ones affected. Restarting
tomcat fixed the problem. 

Does anyone know what causes this or how to
prevent it? 

Thanks, 

Joel 

 

Re: tomcat session mixing

2013-06-17 Thread joel
 

Hi Mark, 

Thanks for the info! I'll look into making the upgrade.


Can you advise how an application bug can cause this when restarting
tomcat will fix it? That would help me wrap my mind around something
that isn't imaginable, yet. 

Thanks! 

Joel 

On 2013-06-17 10:46, Mark
Thomas wrote: 

> On 17/06/2013 16:32, joel wrote:
> 
>> Hi, I'm using
Apache Tomcat/6.0.24 running on centos and have several times observed a
rare issue in which user sessions are "mixed". When this occurs, userA
clicks on a link and is provided with userB specific content, content
that should only be accessible to userB. When this "mixing" occurs, it
seems to affect multiple sessions at the same time, ie userA and userB
are not the only ones affected. Restarting tomcat fixed the problem.
Does anyone know what causes this or how to prevent it?
> 
> This is
caused by an application bug in 99.9% of cases.
> 
> There are known
issues in 6.0.24 that could cause this. In any case, 
> given the number
of security fixes since 6.0.24, an upgrade to 6.0.37 is 
> in order.
>

> Mark
> 
>
-
>
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For
additional commands, e-mail: users-h...@tomcat.apache.org

 

Re: tomcat session mixing

2013-06-17 Thread joel
 

Hi Chris, 

Thanks for the help. I'm not an expert with tomcat
management, There are no servlets. I don't know what Threadlocal,
doGet/doPost/etc are, so presumably haven't used them. No references are
kept to request,response, session, or stream objects. At login, a user
session token is stored: 

 session.setAttribute("userToken",
userToken);

This token also contains wrapper methods to make server
calls. When tomcat starts mixing sessions, it at least some of the time
incorrectly maps the userToken with the user.

I'll start the process of
upgrading tomcat and hopefully that is all it takes (and hopefully it
doesn't introduce new problems).

Joel

On 2013-06-17 12:47, Christopher
Schultz wrote: 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>

> Joel,
> 
> On 6/17/13 12:01 PM, joel wrote:
> 
>> Thanks for the
info! I'll look into making the upgrade. Can you advise how an
application bug can cause this when restarting tomcat will fix it? That
would help me wrap my mind around something that isn't imaginable,
yet.
> 
> If you store a request object in a session, for example.
Another one
> is having a servlet-scoped variable that gets set in the
>
doGet/doPost/etc. method.
> 
> There are other ways to shoot yourself in
the foot, but these are two
> of the most obvious (and common).
> 
>
Other ways to leak information include, but are not limited to:
> 
> - -
Sloppy ThreadLocal management
> - - Retaining a reference a request or
response object
> - - Retaining a reference to a servlet
Input/OutputStream
> - - Retaining a reference to a session
> 
> Hope
that helps,
> - -chris
> -BEGIN PGP SIGNATURE-
> Version:
GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools -
http://gpgtools.org
> Comment: Using GnuPG with Thunderbird -
http://www.enigmail.net/
> 
>
iQIcBAEBCAAGBQJRv0vAAAoJEBzwKT+lPKRY01IQAIDwohve5xSpLBN+IqVCUJDQ
>
fW8Iyqch5B6h0nNNQh+A5uxAtWDNnCRUb0PTVwuk3mSYiiDXq9XwhW0Z1zQmmV/Y
>
1J4WyiEJfksjDq4NQa0bH4rUh9wbvHu8beTihz73zN4ydHe/kyOTIiC9K0SBs1Dh
>
HvsjRrf/+jXkg8SNvTZGxHZ9wCMv2wuRA2SFYy5PJIOgjBEDrVzctxwSidcBlta6
>
FhQmTV2DJELBjbc9QPl5DXrsnGntb0T9gzvOuxhl4hWVkt2oIO2MUdYkPGV9APIi
>
rAH4/dJtXzhMs4laMFIsiLBt2eNx8zMJUUfW0wnj1zjfxWqg6chIdidlkqc/M6Bn
>
A3oC3V5QGLrdeONHmvelOqX+9st3OorrKBvk+JoIVzvxN2zeXQacYJGiOOI484Vc
>
HdbWdBrcAgk3PVwtOnR8NF+jCP0quDuiS5O9C3UpXjAr/F/azeVswJZImWVTElJO
>
LmhfRFBq/CaopNJGRRm3MWbbgTeTrPUxCw/S6SbUASHcQAh3eRboq04UvPm+BqWb
>
HRX65PLzio92rboIMKbPpVTc8sqDKRtoQ0k59vH8zsGQmF6WkpRi2MFoHkhdo2JQ
>
IrUSSrbYoJP5KF6GmjEqVfPVWXiKc5aWyWBG1O8ffcqZGqghCwK4/r6OEx9jFz6S
>
mW18XO3jD02az0rTZRGo
> =L4yS
> -END PGP SIGNATURE-
> 
>
-
>
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For
additional commands, e-mail: users-h...@tomcat.apache.org

 

Re: tomcat session mixing

2013-06-17 Thread joel
 

Hi Chris, 

First, my apologies. Much of the terminology is
unfamiliar to me here. I hope that I've managed to fully answer your
questions. 

The "server calls" are all rmi calls on java-based servers
on the same machine. There are no separate threads directly in the .jsp
pages. 

The userToken has a few variables (userID, userName, etc) and a
bunch of rmi interface methods. It doesn't directly use a tomcat
request,response, etc. Another way of putting it is that all of these
methods could be called equally well from the command line. Here's a
typical method: 

 public UserToken getUserToken(String userName) 

I
think a few of the server calls do have
System.out.println/System.err.println commands that do end up in the
catalina.out file. 

Joel 

On 2013-06-17 16:59, Christopher Schultz
wrote: 

> -BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
>
Joel,
> 
> On 6/17/13 5:12 PM, joel wrote:
> 
>> Thanks for the help.
I'm not an expert with tomcat management, There are no servlets. I don't
know what Threadlocal, doGet/doPost/etc are, so presumably haven't used
them.
> 
> Eventually, everything is a servlet (or maybe a Filter in
certain
> cases). Even if your code does not include doGet/doPost, they
are
> likely being used under the covers.
> 
>> No references are kept
to request,response, session, or stream objects. At login, a user
session token is stored: session.setAttribute("userToken", userToken);
This token also contains wrapper methods to make server calls.
> 
> What
does that mean "make server calls"? Do you make those calls in
>
separate threads or anything like that?

 

Links:
--
[1]
http://gpgtools.org
[2] http://www.enigmail.net/
[3]
mailto:users-unsubscr...@tomcat.apache.org
[4]
mailto:users-h...@tomcat.apache.org


Tomcat 8.5.64 maxHttpHeaderSize="6553600"

2023-08-11 Thread Joel Werginz
Version:  8.5.64

maxHttpHeaderSize=³6553600²

10-Aug-2023 16:36:21.530 FINE [https-openssl-apr-443-exec-7]
org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch Entry,
Connection [1], SocketStatus [OPEN_READ]
10-Aug-2023 16:36:21.530 FINE [https-openssl-apr-443-exec-7]
org.apache.coyote.http2.Http2UpgradeHandler.init Connection [1], State
[CONNECTED]
10-Aug-2023 16:36:21.530 FINE [https-openssl-apr-443-exec-7]
org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch Exit,
Connection [1], SocketState [UPGRADED]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch Entry,
Connection [1], SocketStatus [OPEN_READ]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Http2UpgradeHandler.init Connection [1], State
[CONNECTED]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Http2Parser.validateFrame Connection [1], Stream
[23], Frame type [HEADERS], Flags [33], Payload size [16374]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.StreamStateMachine.stateChange Connection [1],
Stream [23], State changed from [null] to [IDLE]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.StreamStateMachine.stateChange Connection [1],
Stream [23], State changed from [IDLE] to [OPEN]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.AbstractNonZeroStream.rePrioritise Connection [1],
Stream [23], Exclusive [true], Parent [0], Weight [220]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Http2Parser.readHeaderPayload Connection [1],
Stream [23], Processing headers payload of size [16,369]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Stream.emitHeader Connection [1], Stream [23],
HTTP header [:method], Value [GET]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Stream.emitHeader Connection [1], Stream [23],
HTTP header [:authority], Value [mdmsdev6.intranet.dow.com]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Stream.emitHeader Connection [1], Stream [23],
HTTP header [:scheme], Value [https]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Stream.emitHeader Connection [1], Stream [23],
HTTP header [:path], Value [/ebx-ui/rest/user/v1/current]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Stream.emitHeader Connection [1], Stream [23],
HTTP header [sec-ch-ua], Value ["Not/A)Brand";v="99", "Google
Chrome";v="115", "Chromium";v="115"]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Stream.emitHeader Connection [1], Stream [23],
HTTP header [accept], Value [application/json]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch Connection
error
org.apache.coyote.http2.ConnectionException: Connection [1], Stream 
[23],
Total header size too big
at 
org.apache.coyote.http2.Http2Parser.readHeaderPayload(Http2Parser.java:454)
at 
org.apache.coyote.http2.Http2Parser.readHeadersFrame(Http2Parser.java:253)
at 
org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:97)
at 
org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:69)
at 
org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHan
dler.java:334)
at 
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeP
rocessorInternal.java:60)
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.jav
a:59)
at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtoc
ol.java:831)
at 
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.ja
va:2075)
at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java
:49)
at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecu
tor.java:1128)
at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExec
utor.java:628)
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.j
ava:61)
at java.base/java.lang.Thread.run(Thread.java:834)
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.Stream.receiveReset Connection [1], Stream [23],
Reset received due to [8]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.coyote.http2.StreamStateMachine.stateChange Connection [1],
Stream [23], State changed from [OPEN] to [CLOSED_RST_RX]
10-Aug-2023 16:36:21.623 FINE [https-openssl-apr-443-exec-19]
org.apache.c

Ubuntu Tomcat package maintenance

2024-07-11 Thread Joel Griffith
A year and a half ago I had to stop updating Tomcat because a Ubuntu
packaging bug force-changes file ownership of the Tomcat installation.  I'm
trying to get in touch with the package maintainers to have that fixed.

`apt-cache show tomcat` gives ubuntu-devel-disc...@lists.ubuntu.com as the
maintainers' mailing list.  I tried emailing it, but my posting was blocked
"pending moderator review" since I'm not a member of that list.  That was a
year and a half ago, and I've heard nothing.

I posted a bug under the Tomcat package on Ubuntu's Launchpad bug tracker,
but that has sat similarly ignored for the past year and a half.

Can anyone on this list help me get in touch with the Ubuntu package
maintainers for Tomcat?  Surely there's someone who can get me a degree or
two closer to them.

Thanks,
Joel


Re: Ubuntu Tomcat package maintenance

2024-07-18 Thread Joel Griffith
I don't, no.  That's one of the things I'd expect to learn from the listed
Ubuntu package maintainer if I could contact them.

I've given up trying again for the year, and I'm working on a workaround.

Joel

On Fri, Jul 12, 2024 at 4:08 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Joel,
>
> On 7/11/24 16:13, Joel Griffith wrote:
> > A year and a half ago I had to stop updating Tomcat because a Ubuntu
> > packaging bug force-changes file ownership of the Tomcat installation.
> I'm
> > trying to get in touch with the package maintainers to have that fixed.
> >
> > `apt-cache show tomcat` gives ubuntu-devel-disc...@lists.ubuntu.com as
> the
> > maintainers' mailing list.  I tried emailing it, but my posting was
> blocked
> > "pending moderator review" since I'm not a member of that list.  That
> was a
> > year and a half ago, and I've heard nothing.
> >
> > I posted a bug under the Tomcat package on Ubuntu's Launchpad bug
> tracker,
> > but that has sat similarly ignored for the past year and a half.
> >
> > Can anyone on this list help me get in touch with the Ubuntu package
> > maintainers for Tomcat?  Surely there's someone who can get me a degree
> or
> > two closer to them.
>
> Do you know if the package you want is actually from Ubuntu or from
> upstream Debian?
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat ownership changed spontaneously

2022-04-05 Thread Joel Griffith
Hi,

I'm running a webapp under Tomcat 9 on Ubuntu 20.04.  We run Tomcat as an
ad-hoc system user who owns the Tomcat installation files.

On Friday, the app stopped working.  Over the weekend, I determined that
the problem was that something had reset the ownership of the Tomcat
installation files to the 'tomcat' user so that the webapp no longer had
permission to access its own files.  I had to spend a couple of days poring
through my notes to figure out what ownership was required for what files
and then manually change everything that needed it back to our ad-hoc user.

Since this change affected only Tomcat files, I can only guess that an
update from Tomcat altered the ownership of these files.  Did any recent
Tomcat update change file and folder ownership of the Tomcat installation
to force them to the 'tomcat' user?

Joel


Re: Tomcat ownership changed spontaneously

2022-04-06 Thread Joel Griffith
> If you use a third-party package for Tomcat (e.g. apt-get), you may be
> seeing something coming from /them/. did you recently get any new
> updates from Ubuntu or any other repositories you use?

I don't have a record of specific updates, but I run `apt upgrade`
regularly and originally installed Tomcat using `apt`.  I'll check with
Canonical, then, I guess.  Thanks for the info!

Joel


On Tue, Apr 5, 2022 at 5:56 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Joel,
>
> On 4/5/22 10:33, Joel Griffith wrote:
> > I'm running a webapp under Tomcat 9 on Ubuntu 20.04.  We run Tomcat as an
> > ad-hoc system user who owns the Tomcat installation files.
> >
> > On Friday, the app stopped working.  Over the weekend, I determined that
> > the problem was that something had reset the ownership of the Tomcat
> > installation files to the 'tomcat' user so that the webapp no longer had
> > permission to access its own files.  I had to spend a couple of days
> poring
> > through my notes to figure out what ownership was required for what files
> > and then manually change everything that needed it back to our ad-hoc
> user.
> >
> > Since this change affected only Tomcat files, I can only guess that an
> > update from Tomcat altered the ownership of these files.  Did any recent
> > Tomcat update change file and folder ownership of the Tomcat installation
> > to force them to the 'tomcat' user?
>
> The Tomcat distribution is just a tarball. When you untar it, you get
> the current-user as the owner of the files.
>
> Tomcat has no installer for *NIX systems.
>
> If you use a third-party package for Tomcat (e.g. apt-get), you may be
> seeing something coming from /them/. did you recently get any new
> updates from Ubuntu or any other repositories you use?
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat 9 returns INameEnvironment error

2023-06-15 Thread Joel Griffith
I'm setting up a JSP webapp on an Ubuntu 22.04 system.  The webapp uses
Tomcat 9 proxied through Apache 2, just as described here
<https://tomcat.apache.org/tomcat-9.0-doc/proxy-howto.html> .  I'm
recreating a setup that works on an Ubuntu 20.04/Tomcat 9 system, and has
worked in the past for earlier versions of both Ubuntu and Tomcat.

When I access the page https://localhost/app/foo, I get a 500 Internal
Server Error.  The error message is

java.lang.UnsupportedClassVersionError:
org/eclipse/jdt/internal/compiler/env/INameEnvironment has been compiled by
a more recent version of the Java Runtime (class file version 55.0), this
version of the Java Runtime only recognizes class file versions up to 52.0

The exception is

javax.servlet.ServletException: java.lang.UnsupportedClassVersionError:
org/eclipse/jdt/internal/compiler/env/INameEnvironment has been compiled by
a more recent version of the Java Runtime (class file version 55.0), this
version of the Java Runtime only recognizes class file versions up to 52.0
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:332)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

There is no file by any variation of the name `INameEnvironment` in my
webapp code, and that string does not appear in any file.  I recognize
Eclipse as a popular IDE, but I don't use it.  The full stack trace (which
I can provide if anyone thinks it would be useful) doesn't refer to any
other file I recognize.

Searching through the Tomcat source code on GitHub, I found the file `
java/org/apache/jasper/compiler/JDTCompiler.java` that appears to be the
source of the error.  This link takes you to the code snippet in question:

https://github.com/search?q=repo%3Aapache%2Ftomcat%20INameEnvironment&type=code

Is this a bug?  It seems strange that it affects only one system when I've
set up Tomcat 9 on many systems.  Is there something on the Ubuntu 22.04
system that might cause the bug to be thrown that I can fix?

The Java version on the Ubuntu 22.04 system (localhost) is
```
$ java -version
openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build 1.8.0_362-8u362-ga-0ubuntu1~22.04-b09)
OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)
```

and the Tomcat version is
```
$ java -cp catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/9.0.58 (Ubuntu)
Server built:   Jan 6 1970 15:09:28 UTC
Server number:  9.0.58.0
OS Name:Linux
OS Version: 5.19.0-38-generic
Architecture:   amd64
JVM Version:1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
JVM Vendor: Private Build
```

The Java version on the Ubuntu 20.04 server for which the webapp works is
effectively identical:
```
$ java -version
openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build
1.8.0_362-8u372-ga~us1-0ubuntu1~20.04-b09)
OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)
```

and its Tomcat version is
```
$ java -cp catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/9.0.31 (Ubuntu)
Server built:   Nov 18 2022 19:07:15 UTC
Server number:  9.0.31.0
OS Name:Linux
OS Version: 5.4.0-150-generic
Architecture:   amd64
JVM Version:1.8.0_362-8u372-ga~us1-0ubuntu1~20.04-b09
JVM Vendor: Private Build
```

Thanks for any help you can give me.

Joel


Re: Tomcat 9 returns INameEnvironment error

2023-06-15 Thread Joel Griffith
It looks like the JDT you mention is the Ubuntu package
`libeclipse-jdt-core-java`.

When I installed Tomcat 9 (9.0.31) on the functioning Ubuntu 20.04 system,
version 3.18.0+eclipse4.12-1 of this JDT package was installed as a
dependency.  When I installed Tomcat 9 (9.0.58) on the Ubuntu 22.04 system,
version 3.27.0+eclipse4.21-1 was installed.  Assuming the "4.12" and "4.21"
numbers are the JDT versions you're referring to, it seems like you're
right about the cause.

According to this table (https://tomcat.apache.org/whichversion.html),
Tomcat 9 is supposed to be compatible with Java 8, yet in this case it
seems to have broken compatibility on a patch update between 9.0.31 and
9.0.58.  In order to regain compatibility, the dependency on JDT should be
adjusted to a lower version.  Is this something the Tomcat people have to
handle, or is it the package maintainers at Canonical who make that choice?

Thanks,
Joel

On Thu, Jun 15, 2023 at 11:26 AM Rémy Maucherat  wrote:

> On Thu, Jun 15, 2023 at 5:17 PM Joel Griffith 
> wrote:
> >
> > I'm setting up a JSP webapp on an Ubuntu 22.04 system.  The webapp uses
> > Tomcat 9 proxied through Apache 2, just as described here
> > <https://tomcat.apache.org/tomcat-9.0-doc/proxy-howto.html> .  I'm
> > recreating a setup that works on an Ubuntu 20.04/Tomcat 9 system, and has
> > worked in the past for earlier versions of both Ubuntu and Tomcat.
> >
> > When I access the page https://localhost/app/foo, I get a 500 Internal
> > Server Error.  The error message is
> >
> > java.lang.UnsupportedClassVersionError:
> > org/eclipse/jdt/internal/compiler/env/INameEnvironment has been compiled
> by
> > a more recent version of the Java Runtime (class file version 55.0), this
> > version of the Java Runtime only recognizes class file versions up to
> 52.0
> >
> > The exception is
> >
> > javax.servlet.ServletException: java.lang.UnsupportedClassVersionError:
> > org/eclipse/jdt/internal/compiler/env/INameEnvironment has been compiled
> by
> > a more recent version of the Java Runtime (class file version 55.0), this
> > version of the Java Runtime only recognizes class file versions up to
> 52.0
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:332)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
> > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> >
> > There is no file by any variation of the name `INameEnvironment` in my
> > webapp code, and that string does not appear in any file.  I recognize
> > Eclipse as a popular IDE, but I don't use it.  The full stack trace
> (which
> > I can provide if anyone thinks it would be useful) doesn't refer to any
> > other file I recognize.
> >
> > Searching through the Tomcat source code on GitHub, I found the file `
> > java/org/apache/jasper/compiler/JDTCompiler.java` that appears to be the
> > source of the error.  This link takes you to the code snippet in
> question:
> >
> >
> https://github.com/search?q=repo%3Aapache%2Ftomcat%20INameEnvironment&type=code
> >
> > Is this a bug?  It seems strange that it affects only one system when
> I've
> > set up Tomcat 9 on many systems.  Is there something on the Ubuntu 22.04
> > system that might cause the bug to be thrown that I can fix?
> >
> > The Java version on the Ubuntu 22.04 system (localhost) is
> > ```
> > $ java -version
> > openjdk version "1.8.0_362"
> > OpenJDK Runtime Environment (build 1.8.0_362-8u362-ga-0ubuntu1~22.04-b09)
> > OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)
> > ```
> >
> > and the Tomcat version is
> > ```
> > $ java -cp catalina.jar org.apache.catalina.util.ServerInfo
> > Server version: Apache Tomcat/9.0.58 (Ubuntu)
> > Server built:   Jan 6 1970 15:09:28 UTC
> > Server number:  9.0.58.0
> > OS Name:Linux
> > OS Version: 5.19.0-38-generic
> > Architecture:   amd64
> > JVM Version:1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
> > JVM Vendor: Private Build
> > ```
> >
> > The Java version on the Ubuntu 20.04 server for which the webapp works is
> > effectively identical:
> > ```
> > $ java -version
> > openjdk version "1.8.0_362"
> > OpenJDK Runtime Environment (build
> > 1.8.0_362-8u372-ga~us1-0ubuntu1~20.04-b09)
> > OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)
> > ```
> >
> > and its Tomcat version is
> > ```
> > $ java -cp catalina.jar org.apache.catalina.util.ServerInfo
> > Server version: Apa

Re: Tomcat 9 returns INameEnvironment error

2023-06-16 Thread Joel Griffith
This is definitely the issue, I found a bug report to Canonical on the very
thing:
https://bugs.launchpad.net/ubuntu/+source/tomcat9/+bug/1972829
Oh, well.

Thanks for your help, everyone!

On Fri, Jun 16, 2023 at 4:17 AM Mark Thomas  wrote:

> On 16/06/2023 09:07, Rémy Maucherat wrote:
> > On Thu, Jun 15, 2023 at 9:54 PM Mark Thomas  wrote:
> >>
> >> On 15/06/2023 19:23, Joel Griffith wrote:
> >>> It looks like the JDT you mention is the Ubuntu package
> >>> `libeclipse-jdt-core-java`.
> >>>
> >>> When I installed Tomcat 9 (9.0.31) on the functioning Ubuntu 20.04
> system,
> >>> version 3.18.0+eclipse4.12-1 of this JDT package was installed as a
> >>> dependency.  When I installed Tomcat 9 (9.0.58) on the Ubuntu 22.04
> system,
> >>> version 3.27.0+eclipse4.21-1 was installed.  Assuming the "4.12" and
> "4.21"
> >>> numbers are the JDT versions you're referring to, it seems like you're
> >>> right about the cause.
> >>>
> >>> According to this table (https://tomcat.apache.org/whichversion.html),
> >>> Tomcat 9 is supposed to be compatible with Java 8, yet in this case it
> >>> seems to have broken compatibility on a patch update between 9.0.31 and
> >>> 9.0.58.  In order to regain compatibility, the dependency on JDT
> should be
> >>> adjusted to a lower version.  Is this something the Tomcat people have
> to
> >>> handle, or is it the package maintainers at Canonical who make that
> choice?
> >>
> >> That would be Canonical.
> >>
> >> If you get Tomcat 9 from the ASF it works out of the box on Java 8. (You
> >> actually get the reverse issue with really new JDKs and very old JDTs
> >> but that isn't what is happening here).
> >
> > JDT seems to be getting more and more aggressive with bumping Java
> > requirements. For example, Tomcat 10.1 uses Java 11 as the minimum,
> > but JDT 4.28 is *already* Java 17+. So Tomcat 10.1 will stay on 4.27
> > forever basically.
>
> Thanks for the info. I hadn't realized that. I guess I would have found
> out when I did the version updates for the July releases. I've added a
> note to the 10.1.x build.properties file.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 9 returns INameEnvironment error

2023-06-19 Thread Joel Griffith
I found a workaround that I'll post here in case anyone with the same
problem stumbles on this thread.  The fix is to install the older
`libeclipse-jdt-core-java` JDT package from the Ubuntu 20.04 repo.

1. Add the line `deb http://de.archive.ubuntu.com/ubuntu/ focal main
universe` to the end of `/etc/apt/sources.list`.

2. Update Apt ($ sudo apt update)

3. Install the old version of the package, specifying the older version:
$ sudo apt install libeclipse-jdt-core-java=3.18.0+eclipse4.12-1
Apt should identify this as a `DOWNGRADE` operation automatically, so
there's no worry about conflicting package versions.

4. Hold this package back from further updates so that apt-upgrade doesn't
return it to the newer `3.27.0+eclipse4.21-1` version:
$ sudo apt-mark hold libeclipse-jdt-core-java

5. Delete the line `deb http://de.archive.ubuntu.com/ubuntu/ focal main
universe` from `/etc/apt/sources.list` to restore its original state.

6. Upgrade Apt again ($ sudo apt upgrade)

7. Restart Tomcat ($ sudo systemctl restart tomcat9.service)

This worked for me on Ubuntu 22.04/Tomcat 9/Java 8.

Joel

On Fri, Jun 16, 2023 at 4:35 PM Joel Griffith  wrote:

> This is definitely the issue, I found a bug report to Canonical on the
> very thing:
> https://bugs.launchpad.net/ubuntu/+source/tomcat9/+bug/1972829
> Oh, well.
>
> Thanks for your help, everyone!
>
> On Fri, Jun 16, 2023 at 4:17 AM Mark Thomas  wrote:
>
>> On 16/06/2023 09:07, Rémy Maucherat wrote:
>> > On Thu, Jun 15, 2023 at 9:54 PM Mark Thomas  wrote:
>> >>
>> >> On 15/06/2023 19:23, Joel Griffith wrote:
>> >>> It looks like the JDT you mention is the Ubuntu package
>> >>> `libeclipse-jdt-core-java`.
>> >>>
>> >>> When I installed Tomcat 9 (9.0.31) on the functioning Ubuntu 20.04
>> system,
>> >>> version 3.18.0+eclipse4.12-1 of this JDT package was installed as a
>> >>> dependency.  When I installed Tomcat 9 (9.0.58) on the Ubuntu 22.04
>> system,
>> >>> version 3.27.0+eclipse4.21-1 was installed.  Assuming the "4.12" and
>> "4.21"
>> >>> numbers are the JDT versions you're referring to, it seems like you're
>> >>> right about the cause.
>> >>>
>> >>> According to this table (https://tomcat.apache.org/whichversion.html
>> ),
>> >>> Tomcat 9 is supposed to be compatible with Java 8, yet in this case it
>> >>> seems to have broken compatibility on a patch update between 9.0.31
>> and
>> >>> 9.0.58.  In order to regain compatibility, the dependency on JDT
>> should be
>> >>> adjusted to a lower version.  Is this something the Tomcat people
>> have to
>> >>> handle, or is it the package maintainers at Canonical who make that
>> choice?
>> >>
>> >> That would be Canonical.
>> >>
>> >> If you get Tomcat 9 from the ASF it works out of the box on Java 8.
>> (You
>> >> actually get the reverse issue with really new JDKs and very old JDTs
>> >> but that isn't what is happening here).
>> >
>> > JDT seems to be getting more and more aggressive with bumping Java
>> > requirements. For example, Tomcat 10.1 uses Java 11 as the minimum,
>> > but JDT 4.28 is *already* Java 17+. So Tomcat 10.1 will stay on 4.27
>> > forever basically.
>>
>> Thanks for the info. I hadn't realized that. I guess I would have found
>> out when I did the version updates for the July releases. I've added a
>> note to the 10.1.x build.properties file.
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


What sets Java version at installation?

2021-06-11 Thread Joel Griffith
Hi everyone,

I have two Ubuntu 20.04 servers, both with Tomcat 9 and Java 8 installed
from the standard repositories.

On the first, I installed Java 8 before installing Tomcat 9.  When I
installed Tomcat 9, it evidently found the existing Java 8 installation,
and when I run the server it reports that it's using Java 8
(`/usr/lib/jvm/java-8-openjdk-amd64/bin/java`).

On the second, I installed Tomcat 9 before installing Java.  Thus, Tomcat
found no existing Java on the system, and it installed the additional
packages 'openjdk-11-jre-headless', 'default-jre-headless', and
'java-common' as dependencies that it did not install on the first system.
When I run Tomcat on this one, it reports that it's using Java 11
(`/usr/lib/jvm/default-java/bin/java`, which symlinks to
`/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java`), even though I've since
installed Java 8 on that server, too.

Both systems use Java 8 as their default at the OS level (outside of
Tomcat):

$ java -version
openjdk version "1.8.0_292"

so I think it's a Tomcat-specific discrepancy.

I assume that there's a file Tomcat uses to record which version of Java it
established at installation and which continues to affect how it runs now.
Is that right, and if so, where is this file?

Thanks,
Joel


UserConfig options

2005-12-16 Thread Joel Johnson
I am setting up tomcat 5.5 on a server to be used by multiple users and have 
run into a few issues, most of which I have found mentioned in archived 
messages as problems, but no solutions presented. I'm hoping to get a feel 
for the latest status of the issues, and find out if there are plans to work 
on them.

Per the subject, I am using UserConfig with the HomesUserDatabase userClass to 
enable each user to have a discrete public_webapps directory. It appears as 
though that mechanism only supports one webapp per user, as tomcat searches 
for ~/public_webapps/WEB-INF/web.xml directly. Is it possible to allow each 
user multiple webapps so that tomcat serves requests for 
~username/{webapp1,webapp7}/ from ~/public_webapps/{webapp1,webapp7}?

The previous question is likely related to my next question, which is the 
problem I have with a user's public_webapps directory being created *after* 
tomcat has started. Tomcat only appears to scan at load instead of request 
(ala Apache, etc) requiring a restart of tomcat. Presumably it is because of 
this one-scan approach that multiple webapps per userdir aren't supported, 
but I would love to know otherwise. Is the option to scan on request in 
development, or is there some other reason why it is unfeasible?

Another issue is whether it is possible to autodeploy WARs in a user's 
~/public_webapps ? Unpacking the WAR works as expected, but it would be nice 
to have WARs unpacked (even if only one webapp is supported). Am I missing 
something and this is possible, or am I ahead of myself?

A final question is more of a feature request - it would be great to be able 
to enable a limited manager interface for each Userdir, something like 
http://hostname:8080/~username/manager, where each user can manage their (and 
only their) apps, upload new WARs to deploy, etc.

Any responses or ideas for any/all of these issues would be appreciated.

Joel Johnson

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



Tomcat listening on port but not responding to requests

2006-11-29 Thread Joel Klein

Tomcat 5.0.28 has been running fine on 8 identical servers (Apple
xserve Mac OS 10.3) for a few months, but recently 2 of them have
stopped responding to requests.  By that I mean that a browser spins
for several minutes and eventually says the server is taking too long
to respond.  I tried some variants of my web app, and ended up
removing it, so that only the webapps/ROOT with the default Tomcat
welcome page was left, and Tomcat is not serving that either.

What I want to know from this list is if anyone's heard of this case
history, Tomcat appears to start OK, but doesn't seem to respond to
requests.

Netstat -a says that something is listening on the port, and with
multiple stops and starts I'm careful to make sure the port is not in
use before trying to start Tomcat.

Top shows that the machine is basically idle.

I don't see any obvious difference in catalina.log between the working
TC and the broken TC.  No exception stack traces or warnings or
anything.

The last thing in catalina.log is this:

Nov 29, 2006 10:29:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 18092 ms

Does this indicate that Tomcat has finished all its initialization?

--
Joel [Online at http://jfkbits.blogspot.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 listening on port but not responding to requests

2006-11-30 Thread Joel Klein

Steve and Charles asked a number of diagnostic questions, here are my answers:

Charles wrote:

Is there a stdout.log (or any other log files) in your environment?
Might want to check those as well.  Anything on the console window for
the Tomcat process?


Steve wrote:

Check all logs, are there even incoming requests?


By default I believe catalina.out on Unix corresponds to the
stdout.log and stderr.log files Tomcat uses in Windows.  I also set
verbosity="4" for the the Logger elements in server.xml in hopes of
seeing more detail but didn't notice anything extra.

I just had what I think is the default logging configuration, where
only catalina.out and  localhost_log.* appeared, and I'd already
looked through them.  I enabled the AccessLogValue so I'd see requests
logged, and the localhost_access_log file is empty
(zero bytes).


Can you get a thread dump and see where they're stuck?


That would be nice, something like pstack on Linux would be great, but
I don't know what tools are available for Mac to do this.

Charles wrote:

Have you restarted the two servers?  Has this occurred more than once?


I've stopped and started Tomcat many times, trying various config
tweaks (e.g. running on a different port).  I had one of the servers
rebooted yesterday, didn't seem to help.

Charles wrote:

Is everything else on the two affected boxes working?

Steve wrote:

Seems like a network issue.
1. Try visiting the tomcat page from the server itself


At the moment I only have remote ssh access.  I did try running a
couple simple Java web gets, and they too seem to hang.

Steve wrote:

2. Try pinging the server from another machine


/sbin/ping of the servers works OK.  They're reachable on the network.
I'm able to ssh to them.

Steve wrote:

3. Try connecting to port 80 (or whatever port tomcat is listening on) with 
telnet from another machine and issuing a GET / request manually


Great idea!  On one of the servers, this is what I see:
% telnet  
Trying ...
Connected to .
Escape character is '^]'.
GET /

It hangs on the GET /.  On the other server, it only gets as far as
the "Trying ...", it  never gets to the "Connected to".  If one of
my nonresponsive servers actually "connected" what does that tell me?

--
Joel [Online at http://jfkbits.blogspot.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 listening on port but not responding to requests

2006-12-01 Thread Joel Klein

Tim wrote:

Is there a curses-based browser on the machines you could use via ssh?


Not that I know of.


Can you try doing the same thing from the machines themselves--ssh
in, then telnet localhost 8080?


Connecting via telnet on the machines themselves also doesn't work.


The only other thing I can think of to check offhand is the firewall...


This is what I'm starting to strongly suspect.  I ran nmap against
these servers and it reported that the Tomcat port on one of them is
"filtered", but that the other one is open.  This seems consistent
with the results of telneting to them, the one that is reported
"filtered" times out, the one that is reported "open" telnet was able
to connect to, but the GET request itself timed out.  I checked ipfw
and ip6fw and the rule counts are zero except for the default "allow
anything" rule.  Is there other firewall software for the Mac that
could apply?

The odd thing that needs an explanation, if a firewall is responsible,
is that these machines were working fine.

This is starting to look less like a Tomcat-specific problem, but
nevertheless if anyone on this list has any helpful ideas I'd
appreciate the pointer.

--
Joel [Online at http://jfkbits.blogspot.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]



Loading customized StandardContext subclass

2009-11-17 Thread Joel SCHAAL

Hello all,

First, thank you for releasing Tomcat as free software, it is some really nice 
and valuable software.

At our company we developped an application server under java, and we used to 
have tomcat included as third-party library.
Now we would like to only have a dependency on Tomcat. Thus, we are converting 
our application server to a Tomcat webapp.

In order to have our server started when the Tomcat server starts the webapp, I 
implemented a sub class of org.apache.catalina.core.StandardContext and 
exported it in our JARs.
I set our test application to use that class in the file META-INF/context.xml (through the attribute 
"className" of the tag "")
Since we want to have more than one of our application in the same server, I 
put our jars in ${catalina.home}/lib/ instead of WEB-INF/lib and I added the 
reference of every sub-folder in ${catalina.home}/lib/ to the server.loader 
parameter in ${catalina.home}/conf/catalina.properties (using *.jar)
(tried shared.loader and common.loader as well, with no use)

The problem, I get this exception at server startup :
GRAVE: Erreur lors du déploiement du répertoire upsm de l'application web
java.lang.ClassNotFoundException: eserve.framework.EserveContext
  at 
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2808)
  at 
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2834)
  at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1361)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown 
Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
  at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
 Source)
  at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1628)
  at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:941)
  at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)
  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)
  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
  at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
  at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
  at org.apache.catalina.core.StandardService.start(StandardService.java:516)
  at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

(sorry for the french message, it does approximately mean : Error during the 
upsm directory deployment of the web application)
The eserve.framework.EserveContext class name is the one that was given to 
context/@className

I looked in the source code, and found out that the class loader of the Digest 
at that time is the one used at startup time.
I thought it would be the one from Bootstrap.catalinaLoader.
What have I done wrong ? Should I specify another classloader in a file ? I did 
not find this information in any of the following locations :
- http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
- http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
- http://www.jcp.org/aboutJava/communityprocess/final/jsr053/

Thank you 

Re: Loading customized StandardContext subclass(

2009-11-18 Thread Joel SCHAAL

Hum Shame on me.
I don't know what happened but I was writing an answer and I rechecked 
it with the common.loader key in catalina.properties : it worked !

I guess I mischecked that case (or with the libs not properly set)

So, sorry for the noise and thank you for your quick answer, Konstantin.
Best regards,
Joël.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Preventing or recovering from SocketException: Interrupted system call

2011-05-05 Thread Joel Klein


I'm using Tomcat 5.5 to host a webapp that we deploy on Windows, Linux, 
and OS X.  The webapp includes a Java Native Library.


Right now we're seeing a scenario only on Mac OS X where Tomcat shuts 
down with this message:


SEVERE: StandardServer.await: accept:
java.net.SocketException: Interrupted system call
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:402)
at java.net.ServerSocket.implAccept(ServerSocket.java:450)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:379)

The user scenario that reproduces this is one where we're pretty sure 
system signals are being fired, which could account for why the system 
call is interrupted.


This has been seen with Java 1.5 on OS X 10.5.8 and Java 1.6.0_24 on OS 
X 10.6.7.


My question to the list is whether it will work to modify 
StandardServer.java to ignore the exception and continue on.  My 
understanding is the interrupted system call isn't actually fatal.


Are there other ideas for either preventing or recovering from this 
situation?


--
Joel Klein
Kernel Developer, Wolfram Research, Inc.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Shared library jni under tomcat

2018-11-19 Thread Joel Hirsh
I am running Tomcat 8.0.32 on LInux, and trying to use a jni library under
tomcat, and am hitting a wall.

First I found that only one instance of the native library can be loaded so
the library needs to live in shared/lib for general use.

Then in order to load the native library I found documentation that I both
needed to load the native library from a bootstrap jar that also lives in
shared/lib and that the jar be loaded with the common clasloader
Ref:
https://wiki.apache.org/tomcat/HowTo#I.27m_encountering_classloader_problems_when_using_JNI_under_Tomcat

So I have my code working to do all that.  And if I make a call from the
bootstrap jar to the first native method it works.
But when I try to access the native method from my application code I get
an error "java.lang.UnsatisfiedLinkError:".

I believe that is because the native library has been loaded with the
URLClassLoader and the application is loaded with the WepappClassLoader.
Although I also read that the classloaders are hierarchical, and should go
up the chain to find classes.

I have verified that the URLClassLoader used to load the bootstrap jar is
the same as the parent loader of the application (with .equals())

I did read an ancient thread (2006) that kind of described the problem I am
having, and the last post there indicated that the solution is "to touch
each class that uses native methods (from the loader that loaded the native
library) , forcing the classes to be loaded".  But I don't know how to
'touch' a java class.  And my classes that use native methods are part of
the application and could not be loaded by the URLClassLoader in any case.
Or even if that post is (still) relevant.

I have run out of ideas on what to do or test next.  I've been through doc
like
https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html
and many posts on stackoverflow on this topic, and cannot find anything to
help.

 Any suggestions would be most welcome.


Accessing the manager application in a new Tomcat 8.5 install

2019-01-07 Thread Joel Saunders
I've spent about 2 weeks on and off (I have other projects) and still cant log 
in to the Tomcat 8.5 manager app.
I get the signon box, enter my credentials from the tomcat-users.xml file and 
the signon box is promptly returned.

I read the docs regarding the required roles, and the valve that restricts 
access other than from localhost, restarted each time with no success.   I 
haven't figured out how to set debug on to hopefully give me more info on why 
it's failing.

Does anyone have specific steps that would need to be followed in order to 
allow a user to access the manager app after a new install?

We don't use this that much so it's very frustrating to say the least.   Once I 
get the manager access handled, then I'll be able to deploy the application 
that tomcat8 was required for (I know that you can use commands vs the gui to 
do that, but we're used to using the gui so that's why we need it to work.

Any comments/suggestions would be greatly appreciated as I've already wasted 
way too much time trying to address such a simple request.

Thanks...

Joel

JOEL SAUNDERS

SR. DBA/ARCHITECT, MANAGED SERVICES | Zones, Inc.
W: 518-652-4089| C: 518-265-0771
joel.saund...@zones.com<mailto:joel.saund...@zones.com> | 
zones.com<https://nfrastructure.com/>
[cid:image001.jpg@01D4A694.C404DA50]<http://zones.com/>

[cid:image002.jpg@01D4A694.C404DA50]<https://www.facebook.com/nfrastructure/>[cid:image003.jpg@01D4A694.C404DA50]<https://www.linkedin.com/company/nfrastructure/>
 [cid:image004.jpg@01D4A694.C404DA50] <https://twitter.com/nfrastructure>  
[cid:image005.jpg@01D4A694.C404DA50] 
<https://www.youtube.com/user/nfrastructure1992>



RE: Accessing the manager application in a new Tomcat 8.5 install

2019-01-07 Thread Joel Saunders
Thanks... let me try that... At least that will knock that out of the realm of 
things that could be causing it.

I'll post after I test.


-Original Message-
From: John Larsen [mailto:john.lar...@javapipe.com] 
Sent: Monday, January 07, 2019 2:42 PM
To: Tomcat Users List
Subject: Re: Accessing the manager application in a new Tomcat 8.5 install

You need to allow access in your webapps/manager/META-INF/context.xml file

replace

allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1"

with

allow=".*"


Or set it to more restrictive if needed.
Restart tomcat and you should be able to access.

John


On Mon, Jan 7, 2019 at 12:25 PM Joel Saunders 
wrote:

> I’ve spent about 2 weeks on and off (I have other projects) and still cant
> log in to the Tomcat 8.5 manager app.
>
> I get the signon box, enter my credentials from the tomcat-users.xml file
> and the signon box is promptly returned.
>
>
>
> I read the docs regarding the required roles, and the valve that restricts
> access other than from localhost, restarted each time with no success.   I
> haven’t figured out how to set debug on to hopefully give me more info on
> why it’s failing.
>
>
>
> Does anyone have specific steps that would need to be followed in order to
> allow a user to access the manager app after a new install?
>
>
>
> We don’t use this that much so it’s very frustrating to say the least.
> Once I get the manager access handled, then I’ll be able to deploy the
> application that tomcat8 was required for (I know that you can use commands
> vs the gui to do that, but we’re used to using the gui so that’s why we
> need it to work.
>
>
>
> Any comments/suggestions would be greatly appreciated as I’ve already
> wasted way too much time trying to address such a simple request.
>
>
>
> Thanks…
>
>
>
> Joel
>
>
>
> *JOEL SAUNDERS*
>
>
>
> SR. DBA/ARCHITECT, MANAGED SERVICES | Zones, Inc.
>
> W: 518-652-4089| C: 518-265-0771
> joel.saund...@zones.com | zones.com <https://nfrastructure.com/>
>
> <http://zones.com/>
>
>
>
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.facebook.com_nfrastructure_&d=DwIFaQ&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=WmfTxglUOJXJjpBdJqIUDDk8Kh1IEiu74NSZ7gjiP0M&s=ZCFM6c-c3laQSrjXwgR1zjPHClgxRqaiTaw4cZ0Dyg8&e=>
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_company_nfrastructure_&d=DwIFaQ&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=WmfTxglUOJXJjpBdJqIUDDk8Kh1IEiu74NSZ7gjiP0M&s=kwcUhYT-OcwNfzqcIuvSowxH9jXY5SdFljAvNlWdCDw&e=>
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_nfrastructure&d=DwIFaQ&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=WmfTxglUOJXJjpBdJqIUDDk8Kh1IEiu74NSZ7gjiP0M&s=BrYq9ymyMiuciiqulHrpeX8cILVL2TVzLuc0r_McVXQ&e=>
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.youtube.com_user_nfrastructure1992&d=DwIFaQ&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=WmfTxglUOJXJjpBdJqIUDDk8Kh1IEiu74NSZ7gjiP0M&s=Roa51rpRz27cOPoaoeKZZgroWpRqrLD_W3kqlc6MUZk&e=>
>
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Accessing the manager application in a new Tomcat 8.5 install

2019-01-07 Thread Joel Saunders
Did that this AM and thought that I had it.. until I didn't...

Thanks...


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Monday, January 07, 2019 2:45 PM
To: users@tomcat.apache.org
Subject: Re: Accessing the manager application in a new Tomcat 8.5 install

On 07/01/2019 19:24, Joel Saunders wrote:
> I've spent about 2 weeks on and off (I have other projects) and still
> cant log in to the Tomcat 8.5 manager app.
> 
> I get the signon box, enter my credentials from the tomcat-users.xml
> file and the signon box is promptly returned.
> 
>  
> 
> I read the docs regarding the required roles, and the valve that
> restricts access other than from localhost, restarted each time with no
> success.   I haven't figured out how to set debug on to hopefully give
> me more info on why it's failing.
> 
>  
> 
> Does anyone have specific steps that would need to be followed in order
> to allow a user to access the manager app after a new install?
> 
>  
> 
> We don't use this that much so it's very frustrating to say the least.  
> Once I get the manager access handled, then I'll be able to deploy the
> application that tomcat8 was required for (I know that you can use
> commands vs the gui to do that, but we're used to using the gui so
> that's why we need it to work.
> 
>  
> 
> Any comments/suggestions would be greatly appreciated as I've already
> wasted way too much time trying to address such a simple request.

Have you removed the XMl comment markers in tomcat-users.xml?

Mark


> 
>  
> 
> Thanks.
> 
>  
> 
> Joel
> 
>  
> 
> *JOEL SAUNDERS*
> 
> * *
> 
> SR. DBA/ARCHITECT, MANAGED SERVICES | Zones, Inc.
> 
> W: 518-652-4089| C: 518-265-0771
> joel.saund...@zones.com <mailto:joel.saund...@zones.com> | zones.com
> <https://nfrastructure.com/>__
> 
> <http://zones.com/>
> 
>  
> 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.facebook.com_nfrastructure_&d=DwID-g&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=jr4yxkk-QhRZeZxIueGEO5Xm2kuSWU7iDCF1DkfrJQ4&s=wMauS01ow4RKUwKZgpvwPTItFe-ZT6kRS0lq19Zlz6Q&e=><https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_company_nfrastructure_&d=DwID-g&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=jr4yxkk-QhRZeZxIueGEO5Xm2kuSWU7iDCF1DkfrJQ4&s=TzL8ew5LSoyz0u4kti1Le0PTI8QKleWhxwTsWJMhJ8M&e=>
>  
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_nfrastructure&d=DwID-g&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=jr4yxkk-QhRZeZxIueGEO5Xm2kuSWU7iDCF1DkfrJQ4&s=FBn5U3iNIQZ7Gu4PgUqw-d0Y0bD-skBPyrxeNbLUqYE&e=>
>  
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.youtube.com_user_nfrastructure1992&d=DwID-g&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=jr4yxkk-QhRZeZxIueGEO5Xm2kuSWU7iDCF1DkfrJQ4&s=V9E9P0OdLMR6zx59BCy9KkW9PhUczyPhFTGmPBS7xdE&e=>
>  
> 
>  
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Accessing the manager application in a new Tomcat 8.5 install

2019-01-07 Thread Joel Saunders
What exactly does that mean?   I’m sorry but I really don’t know

Sent from my iPhone

> On Jan 7, 2019, at 5:06 PM, Christopher Schultz 
>  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Joel,
> 
>> On 1/7/19 14:47, Joel Saunders wrote:
>> Did that this AM and thought that I had it.. until I didn't...
> 
> Don't forget to re-instate your RemoteIPValve constraints.
> 
> - -chris
> 
>> -Original Message- From: Mark Thomas
>> [mailto:ma...@apache.org] Sent: Monday, January 07, 2019 2:45 PM 
>> To: users@tomcat.apache.org Subject: Re: Accessing the manager
>> application in a new Tomcat 8.5 install
>> 
>>> On 07/01/2019 19:24, Joel Saunders wrote:
>>> I've spent about 2 weeks on and off (I have other projects) and
>>> still cant log in to the Tomcat 8.5 manager app.
>>> 
>>> I get the signon box, enter my credentials from the
>>> tomcat-users.xml file and the signon box is promptly returned.
>>> 
>>> 
>>> 
>>> I read the docs regarding the required roles, and the valve that 
>>> restricts access other than from localhost, restarted each time
>>> with no success.   I haven't figured out how to set debug on to
>>> hopefully give me more info on why it's failing.
>>> 
>>> 
>>> 
>>> Does anyone have specific steps that would need to be followed in
>>> order to allow a user to access the manager app after a new
>>> install?
>>> 
>>> 
>>> 
>>> We don't use this that much so it's very frustrating to say the
>>> least. Once I get the manager access handled, then I'll be able
>>> to deploy the application that tomcat8 was required for (I know
>>> that you can use commands vs the gui to do that, but we're used
>>> to using the gui so that's why we need it to work.
>>> 
>>> 
>>> 
>>> Any comments/suggestions would be greatly appreciated as I've
>>> already wasted way too much time trying to address such a simple
>>> request.
>> 
>> Have you removed the XMl comment markers in tomcat-users.xml?
>> 
>> Mark
>> 
>> 
>>> 
>>> 
>>> 
>>> Thanks.
>>> 
>>> 
>>> 
>>> Joel
>>> 
>>> 
>>> 
>>> *JOEL SAUNDERS*
>>> 
>>> * *
>>> 
>>> SR. DBA/ARCHITECT, MANAGED SERVICES | Zones, Inc.
>>> 
>>> W: 518-652-4089| C: 518-265-0771 joel.saund...@zones.com
>>> <mailto:joel.saund...@zones.com> | zones.com 
>>> <https://nfrastructure.com/>__
>>> 
>>> <http://zones.com/>
>>> 
>>> 
>>> 
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.facebook.co
> m_nfrastructure_&d=DwID-g&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&
> r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=jr4yxkk-QhRZeZxIueGEO5Xm
> 2kuSWU7iDCF1DkfrJQ4&s=wMauS01ow4RKUwKZgpvwPTItFe-ZT6kRS0lq19Zlz6Q&e=> tps://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_comp
> any_nfrastructure_&d=DwID-g&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvCl
> I&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=jr4yxkk-QhRZeZxIueGEO5
> Xm2kuSWU7iDCF1DkfrJQ4&s=TzL8ew5LSoyz0u4kti1Le0PTI8QKleWhxwTsWJMhJ8M&e=>
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_nfr
> astructure&d=DwID-g&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-p
> l0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=jr4yxkk-QhRZeZxIueGEO5Xm2kuSWU
> 7iDCF1DkfrJQ4&s=FBn5U3iNIQZ7Gu4PgUqw-d0Y0bD-skBPyrxeNbLUqYE&e=>
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.youtube.com
> _user_nfrastructure1992&d=DwID-g&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KN
> xwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=jr4yxkk-QhRZeZxIu
> eGEO5Xm2kuSWU7iDCF1DkfrJQ4&s=V9E9P0OdLMR6zx59BCy9KkW9PhUczyPhFTGmPBS7xdE
> &e=>
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> -
>> 
>> 
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 
>> -
>> 
>> 
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
> -BEGIN P

RE: Accessing the manager application in a new Tomcat 8.5 install

2019-01-08 Thread Joel Saunders
All,Problem resolved!

Ok.   The change to the context.xml file controls if/what external ips can 
access the webapp. That was one thing that had to be changed from an initial 
install, but that wasn’t my final issue.

The final issue was that I couldn't authenticate properly  against my 
tomcat-users.xml file.

I ended up starting back with modifying the original tomcat-users.xml file.
After the comment end for the sample roles and users...
I added a line for the role for manager-gui and 
Added another line for the user for "admin" with the password 
and manager-gui role, 
restarted, and voila it works now.

Must've been something that I did wrong during the multiple attempts to edit 
the tomcat-users.xml file.

Thanks to all who responded.


On to the next fire!

Thanks...

Joel

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, January 07, 2019 11:45 PM
To: users@tomcat.apache.org
Subject: Re: Accessing the manager application in a new Tomcat 8.5 install

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Joel,

On 1/7/19 17:07, Joel Saunders wrote:
> What exactly does that mean?   I’m sorry but I really don’t know

John Larson, in another reply to this thread, suggested that you
change your webapps/manager/META-INF/context.xml file to remove the
IP-based restriction on who can connect to the manager.

I'm suggesting that you undo any changes that you might have made
unless you really understand the security implications.

Hope that helps,
- -chris

>> On Jan 7, 2019, at 5:06 PM, Christopher Schultz
>>  wrote:
>> 
> Joel,
> 
>>>> On 1/7/19 14:47, Joel Saunders wrote: Did that this AM and
>>>> thought that I had it.. until I didn't...
> 
> Don't forget to re-instate your RemoteIPValve constraints.
> 
> -chris
> 
>>>> -Original Message- From: Mark Thomas 
>>>> [mailto:ma...@apache.org] Sent: Monday, January 07, 2019 2:45
>>>> PM To: users@tomcat.apache.org Subject: Re: Accessing the
>>>> manager application in a new Tomcat 8.5 install
>>>> 
>>>>> On 07/01/2019 19:24, Joel Saunders wrote: I've spent about
>>>>> 2 weeks on and off (I have other projects) and still cant
>>>>> log in to the Tomcat 8.5 manager app.
>>>>> 
>>>>> I get the signon box, enter my credentials from the 
>>>>> tomcat-users.xml file and the signon box is promptly
>>>>> returned.
>>>>> 
>>>>> 
>>>>> 
>>>>> I read the docs regarding the required roles, and the valve
>>>>> that restricts access other than from localhost, restarted
>>>>> each time with no success.   I haven't figured out how to
>>>>> set debug on to hopefully give me more info on why it's
>>>>> failing.
>>>>> 
>>>>> 
>>>>> 
>>>>> Does anyone have specific steps that would need to be
>>>>> followed in order to allow a user to access the manager app
>>>>> after a new install?
>>>>> 
>>>>> 
>>>>> 
>>>>> We don't use this that much so it's very frustrating to say
>>>>> the least. Once I get the manager access handled, then I'll
>>>>> be able to deploy the application that tomcat8 was required
>>>>> for (I know that you can use commands vs the gui to do
>>>>> that, but we're used to using the gui so that's why we need
>>>>> it to work.
>>>>> 
>>>>> 
>>>>> 
>>>>> Any comments/suggestions would be greatly appreciated as
>>>>> I've already wasted way too much time trying to address
>>>>> such a simple request.
>>>> 
>>>> Have you removed the XMl comment markers in
>>>> tomcat-users.xml?
>>>> 
>>>> Mark
>>>> 
>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Thanks.
>>>>> 
>>>>> 
>>>>> 
>>>>> Joel
>>>>> 
>>>>> 
>>>>> 
>>>>> *JOEL SAUNDERS*
>>>>> 
>>>>> * *
>>>>> 
>>>>> SR. DBA/ARCHITECT, MANAGED SERVICES | Zones, Inc.
>>>>> 
>>>>> W: 518-652-4089| C: 518-265-0771 joel.saund...@zones.com 
>>>>> <mailto:joel.saund...@zones.com> | zones.com 
>>>>> <https://nfr

Proper way to set up tomcat 8.5 (autostart and service setup)

2019-01-08 Thread Joel Saunders
All,

I just installed Tomcat 8.5 on RedHat.

The previous tomcat6 install was setup so that I could use the linux service 
command to start and stop.
  I'd like to take that feature away from the tomcat6 install and 
add it for the new tomcat85 install.

I'd also like for tomcat85 to be able to autostart upon reboots.

Lastly, I'd like the logs to go to /var/log/tomcat8 if possible.

Can anyone point me to the correct way to accomplish these requirements?

Thanks in advance for your cooperation.

... Joel

JOEL SAUNDERS

SR. DBA/ARCHITECT, MANAGED SERVICES | Zones, Inc.
W: 518-652-4089| C: 518-265-0771
joel.saund...@zones.com<mailto:joel.saund...@zones.com> | 
zones.com<https://nfrastructure.com/>

[cid:image001.jpg@01D4A749.D0A5B940]<http://zones.com/>


[cid:image002.jpg@01D4A749.D0A5B940]<https://www.facebook.com/nfrastructure/> 
[cid:image003.jpg@01D4A749.D0A5B940] 
<https://www.linkedin.com/company/nfrastructure/>  
[cid:image004.jpg@01D4A749.D0A5B940] <https://twitter.com/nfrastructure>  
[cid:image005.jpg@01D4A749.D0A5B940] 
<https://www.youtube.com/user/nfrastructure1992>



RE: Proper way to set up tomcat 8.5 (autostart and service setup)

2019-01-08 Thread Joel Saunders
Unfortunately, I inherited this system from someone who hacked it together 
before he left, so I'm just trying to use a quick/minimal approach.

I think that tomcat6 was setup with the init.d approach and would like to keep 
v8 similar if at all possible.

I'm not bad with scripting and init stuff, but not that strong as a Linux Admin 
and all of the options available to Linux Admin/developers.

I do appreciate all of your comments though, but I just want something easy to 
cut and paste at this time so I can be done with this and get back to my other 
(also demanding) projects.

Thanks,,

Joel

-Original Message-
From: Igal Sapir [mailto:i...@lucee.org] 
Sent: Tuesday, January 08, 2019 1:12 PM
To: Tomcat Users List
Subject: Re: Proper way to set up tomcat 8.5 (autostart and service setup)

On Tue, Jan 8, 2019 at 9:58 AM John Dale  wrote:

> I'm using init.d and a custom script complete with single command
> deploy using git hooks.
>
> git push  master pushes, builds, and  bounces Tomcat. I like
> it very much .. building and deploying can be such a pain.
>
> Is systemd something that is available on debian wheezy?
>

It can be enabled on "Wheezy" (Debian 7, c. 2013, these names only add to
the confusion, I had to look it up), but that was the last Debian version
to use init.d.  Debian 8 (Jessie) already came with systemd in 2015 [1].

Is init.d going out of style?
>

Yes, for the better part of 5 years now.


> I've been using it since .. I can't even remember.  1998 maybe on Fedora?
>

That might be the issue ;)

Igal

[1] 
https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_Debian-5Fversion-5Fhistory-23Debian-5F7-5F-28Wheezy-29&d=DwIFaQ&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=uGtSlmXLamNsmi4gn9t69I5ulozMuYWznu3bdceQS3A&s=2LQygApob8_-Xjdffqqj3RI6PQE_6kvv-DI928BXDYs&e=




>
>
> On 1/8/19, John Larsen  wrote:
> > I simply tie systemd with the init script. Our servers host around 20-30
> > tomcat instances. I found it easier do it this way.
> >
> >
> > John Larsen
> >
> >
> >
> > On Tue, Jan 8, 2019 at 10:26 AM Igal Sapir  wrote:
> >
> >> On Tue, Jan 8, 2019 at 9:08 AM John Larsen 
> >> wrote:
> >>
> >> > Setup an init script.
> >> >
> >>
> >> On modern Linux systems you should really use systemd instead of the old
> >> init scripts.
> >>
> >> I've written in the past a script that can be used as a systemd
> template,
> >> so it allowed for multiple services to be run on different ports with
> >> different settings.  I can't find it easily ATM though.
> >>
> >> I think that it'd be good if Tomcat came with such a script so that it's
> >> easy to install as a systemd service.
> >>
> >> Igal
> >>
> >>
> >> > This is similar to how I do it.
> >> > https://urldefense.proofpoint.com/v2/url?u=https-3A__gist.github.com_katesclau_0ff6e41fd698e94eb43c&d=DwIFaQ&c=bFSfV3JDZVFjkVdrOg1Bnsgwku-x_EGNRi2KNxwvClI&r=WG-pl0WpwyPk-r6oNnUhsoAUBdVNpC8ryokTG8RkffA&m=uGtSlmXLamNsmi4gn9t69I5ulozMuYWznu3bdceQS3A&s=CidLbiu7JPR90A9E2dbdPGBb1aF0BtO99NxJo9OJ4s0&e=
> >> >
> >> > John Larsen
> >> >
> >> >
> >> >
> >> > On Tue, Jan 8, 2019 at 10:01 AM Joel Saunders <
> joel.saund...@zones.com>
> >> > wrote:
> >> >
> >> > > All,
> >> > >
> >> > >
> >> > >
> >> > > I just installed Tomcat 8.5 on RedHat.
> >> > >
> >> > >
> >> > >
> >> > > The previous tomcat6 install was setup so that I could use the linux
> >> > > service command to start and stop.
> >> > >
> >> > >   I’d like to take that feature away from the tomcat6
> >> install
> >> > > and add it for the new tomcat85 install.
> >> > >
> >> > >
> >> > >
> >> > > I’d also like for tomcat85 to be able to autostart upon reboots.
> >> > >
> >> > >
> >> > >
> >> > > Lastly, I’d like the logs to go to /var/log/tomcat8 if possible.
> >> > >
> >> > >
> >> > >
> >> > > Can anyone point me to the correct way to accomplish these
> >> requirements?
> >> > >
> >> > >
> >> > >
> >> > > Thanks in advance for your cooperation.
> >&g

Tomcat gives 404 for file that exists

2019-02-04 Thread Joel Griffith
I've installed Tomcat 8.0.32 a local Ubuntu 16.04 VM (Oracle VirtualBox)
and I'm using it to access a webapp through the laptop the VM is local to.
The VM port-forwards 3081 to 8080, so I can access Tomcat as `
http://127.0.0.1:3081/` in my laptop browser.

Accessing `http://127.0.0.1:3081/` gives the default page stored in
`/var/lib/tomcat8/webapps/ROOT/index.html`.  So, Tomcat is able to find and
serve from the `webapps/` directory.

However, if I try to access `http://127.0.0.1:3081/myWebapp/index.html`,
which exists as `/var/lib/tomcat8/webapps/myWebapp/index.html`, Tomcat
returns a 404, reporting that the requested resource in unavailable.

`/var/lib/tomcat8/webapps/myWebapp/WEB-INF/web.xml` exists and is identical
to that used in a functioning setup on a different server.  It was
originally written for a Tomcat 7 deployment, I think, but there's nothing
in it that seems to have anything to do with these URLs, so I don't think
it's a problem with that file.  Similarly,
`/var/lib/tomcat8/conf/server.xml` exists and is virtually identical to
that used in the other (functioning) deployment.

All of the information I've been able to scrape together from web searches
over the past two days indicate that the presence of a folder within the
`webapps/` directory is sufficient for Tomcat to recognize and register it
as a Context.  I'm at a complete loss for what else I need to do to have
Tomcat serve the file `webapps/myWebapp/index.html`

What am I missing?  Why can Tomcat find `webapps/ROOT/index.html` but not
`webapps/myWebapp/index.html`?

Thanks


Re: Tomcat gives 404 for file that exists

2019-02-05 Thread Joel Griffith
On Mon, Feb 4, 2019 at 4:50 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Joel,
>
> On 2/4/19 16:35, Joel Griffith wrote:
> > I've installed Tomcat 8.0.32 a local Ubuntu 16.04 VM (Oracle
> > VirtualBox) and I'm using it to access a webapp through the laptop
> > the VM is local to. The VM port-forwards 3081 to 8080, so I can
> > access Tomcat as ` http://127.0.0.1:3081/` <http://127.0.0.1:3081/> in
> my laptop browser.
>
> Are you sure it's going to the Tomcat you think it's going to?
>
> I'm not at all certain.  I didn't even know there was more than one.  How
can I tell?

> Accessing `http://127.0.0.1:3081/` <http://127.0.0.1:3081/> gives the
> default page stored
> > in `/var/lib/tomcat8/webapps/ROOT/index.html`.  So, Tomcat is able
> > to find and serve from the `webapps/` directory.
> >
> > However, if I try to access
> > `http://127.0.0.1:3081/myWebapp/index.html`
> <http://127.0.0.1:3081/myWebapp/index.html>, which exists as
> > `/var/lib/tomcat8/webapps/myWebapp/index.html`, Tomcat returns a
> > 404, reporting that the requested resource in unavailable.
> >
> > `/var/lib/tomcat8/webapps/myWebapp/WEB-INF/web.xml` exists and is
> > identical to that used in a functioning setup on a different
> > server.  It was originally written for a Tomcat 7 deployment, I
> > think, but there's nothing in it that seems to have anything to do
> > with these URLs, so I don't think it's a problem with that file.
> > Similarly, `/var/lib/tomcat8/conf/server.xml` exists and is
> > virtually identical to that used in the other (functioning)
> > deployment.
> >
> > All of the information I've been able to scrape together from web
> > searches over the past two days indicate that the presence of a
> > folder within the `webapps/` directory is sufficient for Tomcat to
> > recognize and register it as a Context.  I'm at a complete loss for
> > what else I need to do to have Tomcat serve the file
> > `webapps/myWebapp/index.html`
> >
> > What am I missing?  Why can Tomcat find `webapps/ROOT/index.html`
> > but not `webapps/myWebapp/index.html`?
>
> Do you have an AccessLogVave enabled for the server? Is it showing
> your requests and the 404 response when you make a request?
>

Yes, and yes.


> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxYs5gACgkQHPApP6U8
> pFgDGQ//VQnrKG77d+ciLUx5hgapoTR73DEHIIXD1vrbkPR9XLydjRcgnbTXFWzf
> xIH2rB2hROWAsA0T/GjaG87EfqFehlGmqa5isFNLqoah6Ss3wCvjvquwtdS+1OPX
> 0wxl2uqxgDmFVpMAOgmYGmp3HLi87nP/8h5Rn/Ef/Iqg3Z4CTKjvcUUhKRf3Lupw
> CYoPe3AFUOXTG40EKBDqzJ8IW2+Mt0rNfkU3T5v4BUtrKKc3ARof5CygVvgVS+5Q
> qpjH/p+hskvXWWuAz9is6+qAgu7WPyoV7KhOq93M9yQQ/bR7fNMfjVYg9q6z+UKO
> m6bNf+eQCtXfaHnDJp5Bytied0nUlCfBbHP6tvvNNl9B2jdaV4nT+9ZQIykOXN4E
> p64PvpHk8V2v/6GIlJ04E1LNiMwNycu3l24DnSn27sVxD6JKIMoTlyf4dvPK+zsw
> Jp8Bguiqog6geBpo+CNU1vzToWpiGHP/8rSwh9pbX7xpyTfWgq3bnvJmzNaVYJQ5
> ggPCRiMRFgPurIr5edvvlyaGp8gfeFtb1FgCTKNTg2J9j8yxVI2p30lT8L+I+Rxp
> Tpapvum6q1/NAtKigCuq7ylXpN3XQnOmJq7fb1a7+lYwzA0NQ3IC8uooSys4GNBb
> ijeTnYsCTJqXNZ9k5BiCkUgMEr5yo4qiAtmppTbelGoNsWno+Jc=
> =VZa6
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat gives 404 for file that exists

2019-02-05 Thread Joel Griffith
On Tue, Feb 5, 2019 at 9:49 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Joel,
>
> On 2/5/19 08:56, Joel Griffith wrote:
> > On Mon, Feb 4, 2019 at 4:50 PM Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Joel,
> >
> > On 2/4/19 16:35, Joel Griffith wrote:
> >>>> I've installed Tomcat 8.0.32 a local Ubuntu 16.04 VM (Oracle
> >>>> VirtualBox) and I'm using it to access a webapp through the
> >>>> laptop the VM is local to. The VM port-forwards 3081 to 8080,
> >>>> so I can access Tomcat as ` http://127.0.0.1:3081/`
> <http://127.0.0.1:3081/>
> >>>> <http://127.0.0.1:3081/> in
> > my laptop browser.
> >
> > Are you sure it's going to the Tomcat you think it's going to?
> >
> > I'm not at all certain.  I didn't even know there was more than
> > one.  How can I tell?
>
> I was thinking that maybe you had either more than one Tomcat running
> or that your port-forwarding wasn't working the way you thought it was.
>
> >> Accessing `http://127.0.0.1:3081/` <http://127.0.0.1:3081/> <
> http://127.0.0.1:3081/> gives
> >> the default page stored in
> >> `/var/lib/tomcat8/webapps/ROOT/index.html`.  So, Tomcat is able
> >> to find and serve from the `webapps/` directory.
> >>
> >> However, if I try to access
> >> `http://127.0.0.1:3081/myWebapp/index.html`
> <http://127.0.0.1:3081/myWebapp/index.html>, which exists as
> >> `/var/lib/tomcat8/webapps/myWebapp/index.html`, Tomcat returns a
> >> 404, reporting that the requested resource in unavailable.
> >>
> >> `/var/lib/tomcat8/webapps/myWebapp/WEB-INF/web.xml` exists and
> >> is identical to that used in a functioning setup on a different
> >> server.
> >>
> >> What am I missing?  Why can Tomcat find
> >> `webapps/ROOT/index.html` but not `webapps/myWebapp/index.html`?
> >
> > Do you have an AccessLogVave enabled for the server? Is it showing
> > your requests and the 404 response when you make a request?
> >
> >
> >> Yes, and yes.
>
> Okay, that's (sort of) good. It means that your request is going to
> the right place.
>
> If you delete your log files and start Tomcat cleanly, what does
> catalina.out say about which applications were started? You should
> have some log entries that look like this:
>
> INFO: Deploying web application directory [/path/to/your/webappp]
> ...
> INFO: Deployment of web application directory [/path/to/your/webapp]
> has finished in [6,417] ms
>
> That's the ticket.  The webapp wasn't deploying because I was missing a
class required by the webapp's web.xml.  I'll get that fixed.  Thanks for
your help!

>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxZon8ACgkQHPApP6U8
> pFho+Q//XYLSHMBzQKSWR4luiMXRaml5ahpWUqcgUa8h/753Aeeiks2Dgr0KcXgB
> dwCWxN/9VE1s+MHzKPWcvoaX2pWHW3ceABw8EzpftMQqrl6pMT9cfqY29d8B0Sbz
> mKyaIrV1qJrnG5bb+G89a8DhCyTroRF5BOXvkKQCiHIJhQ4Q6lihRa/HEYWFLA4l
> cKdfaTjSTfBtkJLfDaQ8+BlDRSY+lfk6joi0P3BOqkNn+kEgM6uTDBadN2NwsBP8
> C7rOK8+Fk2t938it9yPdi3lJ67NUCFbjb8HCYyt36UPuurPZV0ZVf4UdOqYmdPWF
> U+0fqh8XFIH+HLnLS85c+y0BSZ+MukjdkVqRGgiVGhF53icTtv6K1SVOUdI5jw8x
> LdOdn3s7QFCTV2Of3er3Vw/s4NcZRchKZhttd1KnEjAH3Op+IHo88YAGk+3R6bAg
> kCCDHXHs378o7SqVRqW10cujkUN4dAWfkt3/agS+VoRH92VtXFy/zOS++UlD+eBm
> 4tglZSwwhqkEs2tYA+ZDXe1A9e+op4dZ7y48yGo91dDo4E0uRnqrVWDNoROE7a4i
> nyCT4C8NrtP1UUyt43fYcUtbiWlYf1pQcUsVuYOSDkGWNA3Ejj7F8hDaj0XuwB9E
> XLxpjgbZSuf5+ifC+lJat8tBqKBDw+vDBJyKYAs1XqLMIm7WgFw=
> =fay0
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


What is `tomcat7/common/` for?

2019-03-12 Thread Joel Griffith
I'm upgrading a webapp server from Tomcat 7 to Tomcat 8 on Ubuntu 16.04.
At installation, Tomcat 7 creates a directory `/var/lib/tomcat7/common/`.
When Tomcat 8 is installed, however, the `/var/lib/tomcat8/` directory it
creates does not include a `common/` directory, and the deployment script
complains that it isn't there.

build.xml:129: /var/lib/tomcat8/common/lib does not exist.

I've been searching for a day and have found exactly zero documentation on
this, including on the official 8.0 migration guide (
https://tomcat.apache.org/migration-8.html).

What is the `/var/lib/tomcat7/common/` directory for, and why does Tomcat 8
not have one?


Re: What is `tomcat7/common/` for?

2019-03-13 Thread Joel Griffith
On Tue, Mar 12, 2019 at 9:01 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Mark,
>
> On 3/12/19 14:39, Mark Thomas wrote:
> > On 12/03/2019 14:42, Christopher Schultz wrote:
> >> Joel,
> >>
> >> On 3/12/19 09:43, Joel Griffith wrote:
> >>> I'm upgrading a webapp server from Tomcat 7 to Tomcat 8 on
> >>> Ubuntu 16.04. At installation, Tomcat 7 creates a directory
> >>> `/var/lib/tomcat7/common/`. When Tomcat 8 is installed,
> >>> however, the `/var/lib/tomcat8/` directory it creates does not
> >>> include a `common/` directory, and the deployment script
> >>> complains that it isn't there.
> >>
> >>> build.xml:129: /var/lib/tomcat8/common/lib does not exist.
> >>
> >> This must be a deployment script that is managed by neither the
> >> Tomcat project nor the Ubuntu package maintainers. You will need
> >> to update it.
> >>
> >>> I've been searching for a day and have found exactly zero
> >>> documentation on this, including on the official 8.0 migration
> >>> guide ( https://tomcat.apache.org/migration-8.html).
> >>
> >> You are right; it isn't mentioned. That should be added to the
> >> migration guide.
> >
> > Is is practical to try and cover changes in file system layout for
> > distributions we don't control?
>
> No, but there is no mention of the classloader re-organization in the
> migration guide.
>
> Oh, hmm. The reason it's not in there, or in the Tomcat 7 migration
> guide... is because this change was made in Tomcat *6*, and it *is* in
> the migration guide... for Tomcat 6.
>
> So, never mind.
>
> For some reason, I thought this change was made more recently, but I
> guess not.
>
> Joel, it looks like your distribution was (still?) using that
> directory in Tomcat 7 even thought Tomcat hasn't shipped that way for
> ... a long time. I wonder if your deployment script was accomplishing
> anything by touching that directory in the first place.
>
> Okay, things are starting to make a bunch more sense now, thanks.

I think it was accomplishing something; tomcat7/common/lib/ contained a
bunch of .jar files that looked like standard Tomcat installation files
(tomcat7-websocket.jar, tomcat-catalina-7.0.68.jar, etc.).  If I switch
directories in the deployment script to tomcat8/lib/, which is empty, javac
complains that it can't find the files to compile.  It looks like I'm going
to need to go through /usr/share/java/ and find tomcat8 versions of all of
the .jar files in tomcat7/common/lib/ and symlink those to tomcat8/lib/,
unless someone knows a better way.

Thanks again!


> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlyIVmsACgkQHPApP6U8
> pFj5AA/8COXrlLOL+LV8JM/qCvVdCWrSEzoFsBQ3yvAiHgaANPFVWaid0q5DGLiQ
> J7mhzCwcT0h5ObDk1vIlTH8f+VFerlXBd6Ucio//xbQ8Gy2VXsuuNnOz42Rxuk4/
> E/LpSFljo4JUkaYs0XApxNx6yo7ZxZlK3rCvTTx2ZgVQ9SlcRIQ/m6QJkM3m153r
> 1EKSTAKmp4lrsVjes4uwhA6sm/ZJDlR0qNuUAu+0g50F170qOeVJrPRQwnTcI8TE
> q0zbnniw5Wlp2UcsW0gI7iLrtwu7/Bcwnjp0r9V6EA7pjagxTOMPWJxuwzF9SyZU
> r+DtUNFikG7EMXl4Z9POy207B2TlBAt1FJlgkR06LxUJaJjPxdTmNhqREfeiYZGW
> f+uFnrXmHK587UTMYQ4DzhEILj7ZItXyvA6fgQ2xDSoXPTdwBU7obxFZTVZwQc+D
> RodvTUY1nh/xik6oFxd5BEAv5+euXR/Aag+89gPo7Qpdq5qPC05t3iHveQqf0CuE
> rZIvclGKDHwMJG0QfG2UJlwU13JPxtorFc5Fh2ubPrkDypSAtw2zMb/LGeOMFDqx
> h/t/i92W/j10NtMegBTvhp5lolMLTl9guRA8LhjZw15gajutdXVv2VBrlgnqhp8p
> fZjNRgI6nDtXjn/OxsXypQ/6uYoJatjQ9i5JWykl42qFBa6TNHE=
> =AERs
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: What is `tomcat7/common/` for?

2019-03-13 Thread Joel Griffith
On Wed, Mar 13, 2019 at 9:38 AM Olaf Kock  wrote:

>
> On 13.03.19 14:22, Joel Griffith wrote:
> > > I think it was accomplishing something; tomcat7/common/lib/ contained a
> > > bunch of .jar files that looked like standard Tomcat installation files
> > > (tomcat7-websocket.jar, tomcat-catalina-7.0.68.jar, etc.).  If I switch
> > > directories in the deployment script to tomcat8/lib/, which is
> > empty, javac
> > > complains that it can't find the files to compile.  It looks like
> > I'm going
> > > to need to go through /usr/share/java/ and find tomcat8 versions of
> > all of
> > > the .jar files in tomcat7/common/lib/ and symlink those to
> tomcat8/lib/,
> > > unless someone knows a better way.
>
> If your tomcat/lib folder is empty, I suggest to download the
> distribution again. It has quite a few files in there. If yours doesn't,
> you can either start over, or figure out where they are instead (e.g. if
> you're using your Linux distribution's packaged tomcat)
>
> I installed it using Ubuntu's apt-get install, so installing it again
won't do anything different.  Is there a documentation page that lists what
files are supposed to be there?  That would help.  I can't seem to find one.


> Olaf
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


case (in)sensitive mime-mapping

2008-09-02 Thread Joel McKee Cooper
The mime-mappings in web.xml look like:

   
   doc
   application/msword
   

Which works fine if your document is named "foo.doc", but fails
miserably for "foo.Doc", "foo.DOC", etc.  Is there a way to configure
Tomcat so that the extensions are case-insensitive?

Thanks!

-Joel

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fwd: Problems loading external jar in my app !

2012-09-12 Thread joel badia escolà
Hello everyone, i have a problem with my jsp app for adding external
jars. First of all I have tried the same code and app directory
structure in netbeans ide "built-in" tomcat and works fine, but when i
try to serve my app in my tomcat installation (installed using
aptitude) it seems that it's impossible to locate the external jar.

Only with this code:

<%@page import="weka.classifiers.trees.RandomTree" %>

<%
RandomTree t = new RandomTree();
out.println();
out.println("It works");
%>

I get this error message:

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 6 in the generated java file
Only a type can be imported. weka.classifiers.trees.RandomTree
resolves to a package

An error occurred at line: 6 in the jsp file:
/DiseaseDiscover/make_diagnosis.jsp
RandomTree cannot be resolved to a type
3: <%@page import="weka.classifiers.trees.RandomTree" %>
4:
5: <%
6: RandomTree t = new RandomTree();
7: out.println();
8: out.println("It works");
9: %>

I tried to put weka.jar in all this directories my-app/WEB-INF/lib/ &
/var/lib/tomcat6/common/ & /var/lib/tomcat6/server/ &
/usr/share/tomcat6/lib/

In all directories I get the same error message.

Greetings,

Joel

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problems loading external jar in my app !

2012-09-18 Thread joel badia escolà
I tried all the things that you expose, but without results :(

Is it possible that the Debian installation disable tomcat auto
WEB-INF checking? If it's possible, can you tell me where I can find
this "magic" configuration file?

I have another theory, Is it possible that the jar i'm using needs
some extra configuration for tomcat recognition? I'm working with weka
if this can help you !

Greetings,

Joel

2012/9/13, Christopher Schultz :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Vishwanath,
>
> On 9/13/12 10:04 AM, Vishwanath Washimkar wrote:
>> Joel,
>>
>> At first look it seemed to me odd, but I google search I got this
>> link. It seems that you have not provided ' ; ' at the end of  your
>> import.
>
> That's not how it is supposed to work. Either there is a bug in Tomcat
> or there is something else wrong. I would be very surprised if adding
> a ";" after the last "import" fixed this problem.
>
>> Also test it out putting the jar in the webapps/lib or
>> /lib.
>
> That first one is the right solution.
>
>> I need to research on aptitude installation though.
>
> Aptitude is a package manager for Debian-based OSs.
>
>> The following link might help.
>>
>> http://stackoverflow.com/questions/1858463/java-error-only-a-type-can-be-imported-xyz-resolves-to-a-package
>
> I
>>
> think the ";" is a red herring.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlBSUCUACgkQ9CaO5/Lv0PAoygCfckVCwmJvMuhSEpgPWqOdQggP
> 20MAn0LeFCrswdcu6vI0zXzA8VbbHYZE
> =s0oX
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problems loading external jar in my app !

2012-09-18 Thread joel badia escolà
The placement it's correct i'm using Debian and my app it's deployed
in /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery (where
$CATALINA_BASE=/var/lib/tomcat6).

This is the full tree of my webapp:

.
|-- disease_discover.jsp
|-- disease_discover.jsp~
|-- disease_simpts.jsp
|-- disease_simpts.jsp~
|-- get_diseases.jsp
|-- get_diseases.jsp~
|-- get_simpts.jsp
|-- get_simpts.jsp~
|-- images
|   |-- icona.png
|   |-- icona.xcf
|   |-- menu_background.png
|   `-- menu_background.xcf
|-- index.html
|-- index.html~
|-- make_completions.jsp
|-- make_completions.jsp~
|-- make_diagnosis.jsp
|-- make_diagnosis.jsp~
|-- make_disease_completions.jsp
|-- make_disease_completions.jsp~
|-- prediction_data
|   |-- rt-test-nonoise-20.model
|   `-- tmp_test.arff
|-- scripts
|   |-- diseasediscover.js
|   |-- diseasediscover.js~
|   |-- disease_simpts.js
|   |-- disease_simpts.js~
|   |-- jquery.js
|   |-- main.js
|   |-- main.js~
|   |-- simpt_diseases.js
|   `-- simpt_diseases.js~
|-- simpt_diseases.jsp
|-- simpt_diseases.jsp~
|-- styles
|   |-- basic_style.css
|   `-- basic_style.css~
`-- WEB-INF
|-- classes
`-- lib
`-- weka.jar

> Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase [...]

I think that it's correct. As you can see i respect the lower and upper cases !

Thank's and best regards,

Joel Badia Escolà

2012/9/18, Konstantin Kolinko :
> 2012/9/18 joel badia escolà :
>> I tried all the things that you expose, but without results :(
>>
>> Is it possible that the Debian installation disable tomcat auto
>> WEB-INF checking? If it's possible, can you tell me where I can find
>> this "magic" configuration file?
>
> 1. It is not possible to disable loading libraries from WEB-INF/lib
> and classes from WEB-INF/classes, as that is required by the Servlet
> specification.
>
> Spelling matters. "WEB-INF" is in uppercase and "lib" is in lowercase,
> and the full path is
>
> ${CATALINA_BASE}/webapps/${web application name}/WEB-INF/lib
>
> The mapping between web application names and their URLs is explained
> in the "Context" chapter of the Configuration Reference.
>
>
> 2. How do you deploy your application into Tomcat?
>
> 3. Note that the examples application that is included with the
> official Apache Tomcat distributive has several libraries in it:
> jstl.jar, standard.jar.
>
> 4.
> http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problems loading external jar in my app !

2012-09-18 Thread joel badia escolà
> 1. The ROOT web application is the wrong place for your files.  All
> web applications are independent. The ROOT application is just one of
> them.

Perfect with this i solve the problem ;)

> 2. You have not read the wikipedia article

I'm not sure if I understand completely the full article, because as
you notice my english skills are some limited (sorry i'm working too
for fix it :P). But I think that one response like that, if I
understood, it's correct?

Best Regards and thanks everyone that helps me,

Joel Badia Escolà

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Problems Increassing -Xmx

2012-10-01 Thread joel badia escolà
Hi all,

I'm trying to set up my max heap size in 2Gb but my tomcat
installation ignores me :( . I'm working with GNU/Linux Debian
"Squeeze" (Current Stable), and my tomcat version it's 6. I tried to
modify my /etc/init.d/tomcat6 file adding this (I add some context for
non Debian users):

# Default Java options
# Set java.awt.headless=true if JAVA_OPTS is not set so the
# Xalan XSL transformer can work without X11 display on JDK 1.4+
# It also looks like the default heap size of 64M is not enough for most cases
# so the maximum heap size is set to 128M
if [ -z "$JAVA_OPTS" ]; then
JAVA_OPTS="-Djava.awt.headless=true -Xmx2000m" < RELEVANT
fi

And i tried to modify /usr/share/tomcat6/bin/catalina.sh like this:

if [ -z "$JPDA_OPTS" ]; then

JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
fi
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS -Xmx2000m"

In two cases i can't obtain favorable results, and it seems that
tomcat ignores me (YES I RESTART THE SERVER) and i get
"java.lang.OutOfMemoryError: Java heap space" error.

Can you help me,

Thanks,

Joel Badia Escolà

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problems Increassing -Xmx

2012-10-02 Thread joel badia escolà
2012/10/2, Konstantin Kolinko :
> 2012/10/2 Caldarale, Charles R :
>>> From: joel badia escolà [mailto:basto...@gmail.com]
>>> Subject: Problems Increassing -Xmx
>>
>>> if [ -z "$JAVA_OPTS" ]; then
>>>   JAVA_OPTS="-Djava.awt.headless=true -Xmx2000m" < RELEVANT
>>> fi
>>
>> And what happens if you don't put quotation marks around the values?
>>
>
> Quotes are OK. It is shell scripting, not Windows one.

Correct !

>
> What is not OK:
> 1. The statement inside of "if" executes only if $JAVA_OPTS is empty.
> Is it empty?
> 2. Learn the difference between JAVA_OPTS and CATALINA_OPTS variables.
>  You should not put such a value into JAVA_OPTS. You should not put it
> info both variables at the same time.
>
>>> And i tried to modify /usr/share/tomcat6/bin/catalina.sh like this:
>>
>> Don't do that; create a setenv.sh script to hold any environment variables
>> you need to set.

This solves the problem, i defined export JAVA_OPTS="$JAVA_OPTS
-Xmx2000m" in setenv.sh and i restarted the server. This has fixed the
problem ;)

Thanks a lot,

Joel Badia Escolà

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org