3.3.X USE (JAXP) v1.1 OR 1.0

2003-03-11 Thread Shawn
Does anyone know if Tomcat 3.3.x uses JAXP 1.1 or 1.0?

Our open source project needs 1.1 and I need to figure out what I should
be telling people in terms of what works.  3.2.x has 1.0 I believe.

TIA,

-- 
Shawn <[EMAIL PROTECTED]>


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



TryCatchFianlly requires servlet 2.3?

2003-03-11 Thread Shawn
Someone told me that since our tags impliment a tryCatchFinally clause,
we need to use servlet2.3.

Is that right?

I though tryCatchFinally was just basic syntax.
-- 
Shawn <[EMAIL PROTECTED]>


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



Re: Simple question on Unicode URL in Tomcat

2003-06-02 Thread Shawn
Hiho,

try something like:

String s = URLEncoder.encode(s, enc);

s is your URL and enc is the java encoding such as "Shift_JIS".  See 
URLEncoder for more info.

Will work from java 1.4 I believe.

Had the same problem and this seems to solve it just fine.
--
Shawn
Happily using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/

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


RE: Does Tomcat support Unicode URL

2003-06-03 Thread Shawn
Well Java 1.4 does.

Did you try something like:

<%=URLEncoder.encode(s, enc)%>

s is your URL and enc is the java encoding such as "Shift_JIS".  See 
URLEncoder for more info.

Will work from java 1.4 I believe.

Had the same problem and this seems to solve it just fine.  I had to set 
the correct encoding though. --




We tried to encode the characters with % URL encoding, but seems not 
working.
Can anyone help?
Thanks.
John
--
Shawn
Happily using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/

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


System Monitor accuracy

2003-01-23 Thread shawn
Is it just me or is the System Monitor unreliable.

It shows my cpu at 100% locked there and my system is responding slowly
but viewing it bye the process listing (all, my and/or active) gives me
nothing using the cpu other than the system monitor and netscape at like
1%).  

Under windows at least I could find and shut the culprit down.  It may
well have to do with the ide I'm using to write some java stuff or a web
app that I'm working on but I hate to just have to kill everything
blindly hoping to get working again.

-- 
shawn <[EMAIL PROTECTED]>


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




System Monitor accuracy --sorry

2003-01-23 Thread shawn

Sorry that was meant to be sent to RedHat.




Is it just me or is the System Monitor unreliable

 
-- 
shawn <[EMAIL PROTECTED]>


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




Re: JNDI jdbc resources

2003-01-26 Thread shawn
What about server.xml?

  try{
> > Context ctx2 = new InitialContext();
> > out.print("Connecting1 : ");
> >  Context envCtx2 = (Context)  
> > ctx2.lookup("java:/comp/env/");
> > out.print("Connecting2 : ");
> >  DataSource ds = (DataSource)  
> > envCtx2.lookup("jdbc/DBmultileague");
> > out.print("Connecting3 : ");
> > 
> >   if (ds != null) {
> > out.print("Query1 : ");
> > Connection conn = ds.getConnection();
> > out.print("Query2 : ");

That part worked for me too.  Is there an advantage to breaking your
Context into two pieces.  Anyway, I tried it like that with no problem.

Shawn


On Mon, 2003-01-27 at 09:21, Peng Tuck Kwok wrote:
> Let's have a look at your web.xml as well. Might be helpful.
> 
> Paul Carpenter wrote:
> > Hi All
> > 
> > I've scoured the list and got so close, yet so far from making the jdbc  
> > stuff work. With some help from Manav and other postings, this is what  
> > i see. can anyone solve the riddle?
> > 
> > Please see the cut'n'pastes below. I draw you attention to the fact  
> > that the connection looks good right up to the point where it's used -  
> > like the DataSource object is good (because "ds != null" is true), yet  
> > the getConnection method throws the often seen "Cannot load JDBC driver  
> > class 'null'" error.
> > 
> > I know this is very close...what's missing?
> > 
> > I'm sure my jars are in the right place, as a regular forClass approach  
> > in the same webapp works with no problems?
> > 
> > 
> > Thanks
> > Paul
> > 
> > tomcat 4.1.12, Mac OSX 10.2.3
> > 
> > Output from my test servlet:
> > Simple lookup test :
> > dbName : org.apache.commons.dbcp.BasicDataSource@25debb
> > list() on /comp/env Context :
> > Binding : jdbc: org.apache.naming.NamingContext
> > listBindings() on /comp/env Context :
> > Binding : jdbc:  
> > org.apache.naming.NamingContext:org.apache.naming.NamingContext@41f80c
> > list() on full Context :
> > Binding : DBmultileague: org.apache.commons.dbcp.BasicDataSource
> > listBindings() on full Context today:
> > Binding : DBmultileague:  
> > org.apache.commons.dbcp.BasicDataSource:org.apache.commons.dbcp.BasicDat 
> > aSource@25debb
> > Connecting1 : Connecting2 : Connecting3 : Query1 :
> > 
> > The relevant servlet code;
> > try {
> > out.println("list() on full Context : ");
> > NamingEnumeration enum2 = ctx.list("java:/comp/env/jdbc/");
> > while (enum2.hasMoreElements()) {
> > out.print("Binding : ");
> > out.println(enum2.nextElement().toString());
> > }
> > out.println("listBindings() on full Context today: ");
> > enum2 = ctx.listBindings("java:/comp/env/jdbc/");
> > while (enum2.hasMoreElements()) {
> > out.print("Binding : ");
> > out.println(enum2.nextElement().toString());
> > }
> > } catch (NamingException e) {
> > out.println("JNDI lookup failed : " + e);
> > }
> > try{
> > Context ctx2 = new InitialContext();
> > out.print("Connecting1 : ");
> >  Context envCtx2 = (Context)  
> > ctx2.lookup("java:/comp/env/");
> > out.print("Connecting2 : ");
> >  DataSource ds = (DataSource)  
> > envCtx2.lookup("jdbc/DBmultileague");
> > out.print("Connecting3 : ");
> > 
> >   if (ds != null) {
> > out.print("Query1 : ");
> > Connection conn = ds.getConnection();
> > out.print("Query2 : ");
> > 
> > The context/resource definition:
> >  > debug="5" reloadable="true"  naming="true" crossContext="true">
> >
> >  > prefix="localhost_DBmultileague_log." suffix=".txt"  
> > timestamp="true"/>
> >
> >  > type="javax.sql.DataSource"/>
> > 
> > 
> > maxIdle3000
> > maxActive10
> > maxWait10
> > usernamesa
> > password
> > 
> > factory
> > org.apache.commons.dbcp.BasicDataSourceFactory
> > 
> >   
> > driverClassName
> > com.sybase.jdbc2.jdbc.SybDriver
> > 
> > 
> > url
> > jdbc:sybase:Tds:PowerBookPaul:11222/multiLeague
> > 
> > initialPoolSize2
> > 
> > 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- 
shawn <[EMAIL PROTECTED]>


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




Re: JNDI jdbc resources

2003-01-27 Thread shawn
Hey catv... used to use them

just to confirm,

this is not your server.xml
 > >   type="javax.sql.DataSource"/>
> > > 
> > > 

that I beleive was an earlier post and different from

jdbc/DBmultileague

anyway, I had a similar prob and it was in my server.xml  that's why I
suggested it.

yours may be different

shawn

On Mon, 2003-01-27 at 19:45, Paul Carpenter wrote:
> Hi Peng
> 
> For Shawn's benefit - the context you see is in my server.xml (well,  
> actually, a separate xml file just like the manager.xml and admin.xml  
> in the /webapps directory).
> 
> Based on the other posting to the list, I've tried both with the  
> web.xml file having nothing for the resource defined, and also as below  
> (after the servlet mappings):
> 
>   
>   
>   Resource reference to a factory for java.sql.Connection
>   instances that may be used for talking to a particular
>   database that is configured in the server.xml file.
>   
>   
>   jdbc/DBmultileague
>   
>   
>   javax.sql.DataSource
>   
>   
>   Container
>   
>   
-- 
shawn <[EMAIL PROTECTED]>


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




DBCP leak ?

2003-01-30 Thread shawn
As noted in Tomcat docs,

A web application has to explicetely close ResultSet's, Statement's, and
Connection's.

I am using a web app that opens a ResultSet locally (in a method) but it
never gets closed (gc'd sometime I presume).

Under Oracle, a user is hitting the maximum number of Oracle process and
I presume it is a leak.

Three questions.

1) must a local ResultSet be explicitely closed to avoid a leak

2) if I use, 
  logAbandoned
  true


to log the stack trace, where is that log?  Under logs in the usual place for that 
context.
I have to tell someone else where to find the log otherwise would just look for it 
myself (ie I'm not running Oracle).

3) If only Oracle shows this behavior what could account for that?  Diff jvm?  (just 
curious)

TIA

-- 
shawn


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




Re: DBCP leak ?

2003-01-30 Thread shawn
On Fri, 2003-01-31 at 12:20, Craig R. McClanahan wrote:


IS IT ESSENTIAL TO DO THIS IN A TRY CLAUSE?  MUCH OF OUR CLOSING ISN'T
AND THAT EXCEPTION ISN'T REARING IT'S UGLY HEAD.  IF AN EXCEPTION WERE
THROWN IN A FINALLY CLAUSE, WOULD WE SEE IT ANYWAY?  STUPID QUESTION (I
WOULD THINK YES BUT IF NOT MAYBE WE ARE LEEKING CONNECTIONS THERE??
MAYBE I JUST WILL DO IT LIKE THAT SINCE BEST PRACTICES ARE JUST THAT.
finally {
> if (rs != null) {
>   try {
> rs.close();
>   } catch (SQLException e) {
> ;
>   }
>   rs = null;
> }
> 
> 

> >
> > 1) must a local ResultSet be explicitely closed to avoid a leak
> 
> Some JDBC drivers will close the ResultSet for you if you close the
> associated Statement, but it sounds like you're probably not doing that
> either.

In most places yes.  Might drivers also close the ResultSet when using a
preparedStatement.

The ps  and connection is always closed.  The ResultSet is closed in
most places (and I'll correct where it's not).

I wonder if the Oracle driver wasn't closing it (not that it should be
expected to) and GC wasn't doing it either, hence the leak.
Anyway, thanks for the help.

Will clean up the few rough spots. 

(if you're old
> enough to remember):  "we have met the enemy and they is us".  :-)
> 
> I remember and will try to keep it more in mind.


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




Re: Help: invalid web.xml

2003-01-30 Thread shawn
Doesn't your  come after the 

I think it should.  I'm not sure about the  though.

Anyway, the order is relevant.



On Fri, 2003-01-31 at 12:59, Rob Cartier wrote:
> I am having a tough time trying to create a valid web.xml
> using taglib
> 
> Is there a document that I can follow that will show me
> to hiearchy of a properly formatted document
> I am supplying my current web.xml for anyones review
> and correction. XMLWriter says the taglib declaration
> I am usng is invalid. I am confused . It looks ok
> 
> thanks in advance
> 
> Rob
> 
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> 
>   
>   Farmington Sports Arena
>   
>   
>   Farmington Sports Arena
>   
>   
>
>   base_href
>   http://www.fsasports.com/fsa/
>   
>   
> 
>   
>   SendMailServlet
>   SendMailServlet
>   SendMailServlet
>   
>   base_href
>   http://www.fsasports.com/fsa/
>   
>   
>   mailhost
>   apollo.homeip.net
>   
>   
>   mailfrom
>   [EMAIL PROTECTED]
>   
>   
>   envelope_from
>   [EMAIL PROTECTED]
>   
>   
>  
>   
>   MailPremierApplication
>   MailPremierApplication
>   MailPremierApplication
>   
>   mailhost
>   apollo.homeip.net
>   
>   
>   
>   
> invoker
> /servlet/*
>   
>  
>   
>   http://jakarta.apache.org/taglibs/dbtags
>   /WEB-INF/dbtags.tld
>   
>  
> 
>   
>   index.html
>   index.htm
>   index.jsp
>   default.html
>   default.htm
>   default.jsp
>   
>   
> 
>   
>   404
>   /error404.jsp
>   
>   
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
shawn <[EMAIL PROTECTED]>


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




class loading issue bug? fw to dev list?

2003-02-04 Thread shawn
Using Tomcat 4.1.17 to upload a servlet I get a Class not found error
when the class is there.

If I put the class into jakarta/common/classes it works fine.

Notice that the error stems from my driver in jakarta/common/lib while
the class it can not find is loaded from a jar in my app's WEB-INF/lib

ERROR [Thread-4] (SqlUtil.java:360) - ::logSqlExceptionSQL - exception
> java.sql.SQLException: Class not found:
> java.lang.ClassNotFoundException: org.dbforms.util.FileHolder while
> reading serialized object
>   at com.mysql.jdbc.ResultSet.getObject(Unknown Source)
>   at org.dbforms.util.ResultSetVector.(ResultSetVector.java:93)

A FileHolder holds data saved from a
com.oreilly.servlet.multipart.FilePart as byteArray 

I would think this is not by design or it would be documented.

I realize this mail might best go to the developers list but ...what's
that address...I don't subscribe...could someone forward this...

..maybe this has already been solved?!?...
-- 
shawn <[EMAIL PROTECTED]>


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




Start hangs indefinately, cpu to 100%

2003-09-01 Thread Shawn
Hello,

Using 4.1.27 (which starts normally except when a particular webapp(ie 
context) is included), starting hangs indefinately and the cpu goes to 
100%.  In the log for that particular webapp, it seems that nothing unsual 
appears for the context and it ends with --> 2003-09-02 13:38:21 
StandardContext[/root]: Starting completed

As for Catlina.out, after about 5 minutes of letting it try to start, I get 
a 4.7 mb file (and growing until I killed it) with entries similar to

25296 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
setDocumentLocator([EMAIL PROTECTED])
25298 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
startDocument()
25321 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 
'http://java.sun.com/dtd/web-app_2_3.dtd')
25324 [main] DEBUG org.apache.commons.digester.Digester  -  Resolving to 
alternate DTD 'jar:file:/home/javauser/jakarta-tomcat- 
4.1.27/common/lib/servlet.jar!/javax/servlet/resources/web-app_2_3.dtd'
25657 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
startPrefixMapping(xml,http://www.w3.org/XML/1998/namespace)
25671 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
startPrefixMapping(xmlns,http://www.w3.org/2000/xmlns/)
25683 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
startElement(,,web-app)
25708 [main] DEBUG org.apache.commons.digester.Digester  -   Pushing body 
text ''
25725 [main] DEBUG org.apache.commons.digester.Digester  -   New 
match='web-app'
25737 [main] DEBUG org.apache.commons.digester.Digester  -   Fire begin() 
for [EMAIL PROTECTED]
25770 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
ignorableWhitespace(

HOWEVER IN A SUCCESSFUL START-UP IT INCLUDES-
39393 [main] INFO  org.apache.coyote.http11.Http11Protocol  - Starting 
Coyote HTTP/1.1 on port 8080
39430 [main] DEBUG org.apache.jk.server.JkMain  - Substituting soTimeout 
channelSocket.soTimeout 0
39437 [main] DEBUG org.apache.jk.server.JkMain  - Substituting port 
channelSocket.port 8009

INSTEAD OF THE DIGESTER DEBUG INFO ABOVE.

ANY IDEAS?

Shawn







RH9, JDK1.4.2
--
Shawn
Happily using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/

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


RE: Start hangs indefinately, cpu to 100% --solved

2003-09-02 Thread Shawn
Apperantly one of the jars in my lib was either corrupted or in conflict 
because after removing unneeded ones and updated others, it seems to be 
likeable Tomcat behavior as usual.

--following was original post---
Using 4.1.27 (which starts normally except when a particular webapp(ie 
context) is included), starting hangs indefinately and the cpu goes to 
100%.  In the log for that particular webapp, it seems that nothing unsual 
appears for the context and it ends with --> 2003-09-02 13:38:21 
StandardContext[/root]: Starting completed
As for Catlina.out, after about 5 minutes of letting it try to start, I 
get a 4.7 mb file (and growing until I killed it) with entries similar to
25296 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
setDocumentLocator([EMAIL PROTECTED])
25298 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
startDocument()
25321 [main] DEBUG org.apache.commons.digester.Digester.sax  - 
resolveEntity('-//Sun 

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


Tomcat w Java1.5 beta problem

2004-02-09 Thread Shawn
Hello,

Under Tomcat 5.0.18 with servlets compiled with 1.5 beta, I get an odd 
message, and  the servlet won't load.  When the same servlet is compiled 
with 1.4.2 it runs fine.

The method signature in the following message is correct.  There is simple 
nothing to complain about.   Is this a problem with Tomcat or Java 
sdk1.5.  Where is the best place to report this to?

No, I have not altertered my common/endorsed jars

2004-02-09 12:00:13 StandardContext[/midp]Servlet /midp threw load() 
exception

	 ...
- Root Cause -
java.lang.VerifyError: (class: com/koyuru/midp/servlets/LessonDownload, 
method: compareAvailableToOnHandset signature: 
(Ljava/util/Vector;Ljava/util/Vector;)[Ljava/lang/String;) Incompatible 
object argument for function call
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:1873)
	at java.lang.Class.getConstructor0(Class.java:2185)
	at java.lang.Class.newInstance0(Class.java:293)
	at java.lang.Class.newInstance(Class.java:275)
	at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1002)



Shawn

Happily using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/

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


Re: Tomcat w Java1.5 beta problem

2004-02-09 Thread Shawn

I suggest rebuilding tomcat with 1.5 beta if you want to run servlets
compiled using 1.5 beta.  I'm not even sure my suggestion will work, as
I haven't tried it myself.  There has not been a tomcat release declared
to support JDK 1.5 yet, although you're welcome to do building and
testing for us ;)
The problem I had, I think, is that my method used an Enumeration and 
under 1.5 enum is a new keyword but 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper used enum many 
places as an identifier, as do some classes in  
org.apache.tomcat.util.compat
--
Shawn

Happily using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/

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


Re: Unable to use getGeneratedKeys() through dbpc

2002-10-21 Thread shawn
Thanks for the help Steve,  here is the code that works...

try {

javax.naming.Context ctx = new javax.naming.InitialContext();
javax.sql.DataSource ds = 
(javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/testDB");
Connection conn = ds.getConnection();


/  
 BEGIN WORKAROUND
org.apache.commons.dbcp.DelegatingStatement dste = 
(org.apache.commons.dbcp.DelegatingStatement)conn.createStatement();
Statement ste = dste.getDelegate();
/  
 END WORKAROUND
ste.execute("INSERT INTO test (name) VALUES ('test name') ");

ResultSet rs = ste.getGeneratedKeys();
rs.next();
out.print(rs.getInt("GENERATED_KEY"));
}
catch ( Exception e  ) {
out.print(e.getMessage());
e.printStackTrace();
}

The root cause is that dbpc's org.apache.commons.dbcp.DelegatingStatement has a 
passthru method for every Statement method as defined by the jdbc2 version of the 
Statement Interface.  
The DelegatingStatement then simply calls the corresponding Statement method i.e.

public int executeUpdate(String sql) throws SQLException { checkOpen(); return 
_stmt.executeUpdate(sql);}

What is needed is the following

public ResultsSet getGeneratedKeys() throws SQLException { checkOpen(); return 
_stmt.getGeneratedKeys();}

Of course the more appropriate way of doing it would be to implement the entire jdbc3 
version of the Statement interface (as well as the other APIs in jdbc).
Perhaps if I get time I will give it a shot


On Monday 21 October 2002 12:36 pm, [EMAIL PROTECTED] wrote:
> Hmmm,
>
> Thats an interesting one, as DelegatingStatement is just a wrapper class
> round a regular Statement...And according to the javadocs it inherits the
> getGeneratedKeys() from the Statement!
>
> You can get access to the wrapped Statement class with
> ((DelegatingStatement)ste).getDelegate() - You could maybe try calling the
> getGeneratedKeys() on that and see what happens!  Its a bit kludgey as you
> really shouldnt have to cast the Statement - but javac/jasper will choke if
> you dont I think!
>
> Without having a JDBC 3.0 driver to try it out myself thats the best I can
> say - hope that helps!
>
> Steve
>
>
>
> -Original Message-
> From: shawn [mailto:shawn@;wnsi.net]
> Sent: Monday, October 21, 2002 2:19 PM
> To: Tomcat Users List
> Subject: Re: Unable to use getGeneratedKeys() through dbpc
>
>
> Thanks for the input Steve,
>
> I agree that it SHOULDN'T be dbpc, but it looks as if it is.
> Actually the driver does support it quite nicely.  Everything works great
> if I create my connection manually.
> Things only break if I retrieve the connection from jndi ( and thus dbpc ).
>
> //This can use getGeneratedKeys()
> Class.forName("com.mysql.jdbc.Driver").newInstance();
> Connection conn =
> DriverManager.getConnection("jdbc:mysql://localhost:3306/testDB?user="+dbUs
>e r+"&password="+dbPass);
>
> //This cannot..
> javax.naming.Context ctx = new javax.naming.InitialContext();
> javax.sql.DataSource ds =
> (javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/testDB");
> Connection conn = ds.getConnection();
>
> As things stand now I must either give up connection pooling ( not a good
> option )  or create a workaround through sql ( decreased performance
> through through additional queries ).
>
> Anybody know a way I can have both?
>
> On Monday 21 October 2002 11:54 am, [EMAIL PROTECTED] wrote:
> > Shawn,
> >
> > It shouldnt be DBCP that would cause getGeneratedKeys() to not work - its
> > the JDBC Driver that doesnt support it - my (limited) knowledge of the
> > various different databases is that very few support the JDBC 3.0
> > specification yet so you might have to do a work-around.
> >
> > Its worth checking the MySQL web page to see what it supports right now
>
> but
>
> > my guess is some subset of JDBC 2.0.
> >
> > You'll probably HAVE to do a workaround by retrieving the new key or
> > something else!
> >
> > Hope this helps,
> > Steve
> >
> > -Original Message-
> > From: shawn [mailto:shawn@;wnsi.net]
> > Sent: Monday, October 21, 2002 1:36 PM
> > To: [EMAIL PROTECTED]
> > Subject: Unable to use getGeneratedKeys() through dbpc
> >
> >
> > Hi folks,
> >
> > It seems to me that dbpc does not support getGeneratedKeys().  If I
> > understand correctly this is a jdbc v3 call and it is possible that dbpc
> > will not yet suppo

Re: Unable to use getGeneratedKeys() through dbpc

2002-10-21 Thread shawn
Thanks for the input Steve,

I agree that it SHOULDN'T be dbpc, but it looks as if it is.  
Actually the driver does support it quite nicely.  Everything works great if I create 
my connection manually.  
Things only break if I retrieve the connection from jndi ( and thus dbpc ).

//This can use getGeneratedKeys()
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = 
DriverManager.getConnection("jdbc:mysql://localhost:3306/testDB?user="+dbUser+"&password="+dbPass);

//This cannot..
javax.naming.Context ctx = new javax.naming.InitialContext();
javax.sql.DataSource ds = 
(javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/testDB");
Connection conn = ds.getConnection();

As things stand now I must either give up connection pooling ( not a good option )  or 
create a workaround through sql ( decreased performance through through additional 
queries ).

Anybody know a way I can have both?


On Monday 21 October 2002 11:54 am, [EMAIL PROTECTED] wrote:
> Shawn,
>
> It shouldnt be DBCP that would cause getGeneratedKeys() to not work - its
> the JDBC Driver that doesnt support it - my (limited) knowledge of the
> various different databases is that very few support the JDBC 3.0
> specification yet so you might have to do a work-around.
>
> Its worth checking the MySQL web page to see what it supports right now but
> my guess is some subset of JDBC 2.0.
>
> You'll probably HAVE to do a workaround by retrieving the new key or
> something else!
>
> Hope this helps,
> Steve
>
> -Original Message-
> From: shawn [mailto:shawn@;wnsi.net]
> Sent: Monday, October 21, 2002 1:36 PM
> To: [EMAIL PROTECTED]
> Subject: Unable to use getGeneratedKeys() through dbpc
>
>
> Hi folks,
>
>   It seems to me that dbpc does not support getGeneratedKeys().  If I
> understand correctly this is a jdbc v3 call and it is possible that dbpc
> will not yet support jdbc3.
>   I would appreciate any suggestions on alternative pooling mechanisms
> that could support this (Or any corrections if I am just being dumb).
>   I would really rather not rely on queries to retrieve the new key
> after the insert.
>
> Here are the setup details..
>
> RedHat 7.3
> Tomcat 4.1.2
> MySQL Connector/J 3.0.1
>
> dbpc is working from within JSP, beans and servlets great, but chokes when
> requesting the generated key after an insert.  Here is some code and
> exceptions
>
>
> try {
>
>   //Doing non-pooled connection works
> Class.forName("com.mysql.jdbc.Driver").newInstance();
> Connection conn =
> DriverManager.getConnection("jdbc:mysql://localhost:3306/testDB?user="+dbUs
>e r+"&password="+dbPass);
>
>   /*
>   //Doing dbpc provided connection throws an exception
>   javax.naming.Context ctx = new javax.naming.InitialContext();
>   javax.sql.DataSource ds =
> (javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/testDB");
>   Connection conn = ds.getConnection();
>   */
>
> Statement ste = conn.createStatement();
> ste.execute("INSERT INTO test (name) VALUES ('test name') ");
>
> ResultSet rs = ste.getGeneratedKeys();
> rs.next();
> out.print(rs.getInt("GENERATED_KEY"));
> }
> catch ( Exception e  ) {
> out.print(e.getMessage());
> e.printStackTrace();
> }
>
>
> Here the message and stack trace
> org.apache.jasper.JasperException:
> org.apache.commons.dbcp.DelegatingStatement.getGeneratedKeys()Ljava/sql/Res
>u ltSet;
> at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
> Source)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
> Source)
> at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
> Source)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
> Source)
> at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
> Source)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo
>k eNext(Unknown Source)
> at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
> at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
> at org.apache.catalina.core.StandardContextValve.invoke(Unknown
> Source)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo
>k eNext(Unknown Source)
&

Unable to use getGeneratedKeys() through dbpc

2002-10-21 Thread shawn
Hi folks,

It seems to me that dbpc does not support getGeneratedKeys().  If I understand 
correctly this is a jdbc v3 call and it is possible that dbpc will not yet support 
jdbc3.
I would appreciate any suggestions on alternative pooling mechanisms that 
could support this (Or any corrections if I am just being dumb).  
I would really rather not rely on queries to retrieve the new key after the 
insert.

Here are the setup details..

RedHat 7.3
Tomcat 4.1.2
MySQL Connector/J 3.0.1

dbpc is working from within JSP, beans and servlets great, but chokes when requesting 
the generated key after an insert.  Here is some code and exceptions


try {
   
//Doing non-pooled connection works
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = 
DriverManager.getConnection("jdbc:mysql://localhost:3306/testDB?user="+dbUser+"&password="+dbPass);
  
/*
//Doing dbpc provided connection throws an exception
javax.naming.Context ctx = new javax.naming.InitialContext();
javax.sql.DataSource ds = 
(javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/testDB");
Connection conn = ds.getConnection();
*/

Statement ste = conn.createStatement();
ste.execute("INSERT INTO test (name) VALUES ('test name') ");

ResultSet rs = ste.getGeneratedKeys();
rs.next();
out.print(rs.getInt("GENERATED_KEY"));
}
catch ( Exception e  ) {
out.print(e.getMessage());
e.printStackTrace();
}


Here the message and stack trace
org.apache.jasper.JasperException: 
org.apache.commons.dbcp.DelegatingStatement.getGeneratedKeys()Ljava/sql/ResultSet;
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
- Root Cause -
javax.servlet.ServletException: 
org.apache.commons.dbcp.DelegatingStatement.getGeneratedKeys()Ljava/sql/ResultSet;
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown 
Source)
at 
org.apache.jsp.testGeneratedKeys_jsp._jspService(testGeneratedKeys_jsp.java:81)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service

Re: Setup of Develoment Environment

2002-10-30 Thread shawn
put a servlet mapping in your web.xml file..  



HelloWorld
HelloWorld
  
  
HelloWorld
/servlet/HelloWorld
  

see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html for 
more info.


shawn


On Wednesday 30 October 2002 02:36 pm, Raghava Rao wrote:
> Hello,
>   I'm new to Servlet programming and need help in starting to develop
> servlets.
> I have downloaded jakarta-tomcat-4.0.6. Once installed, it's installed as
> C:\Program Files\Apache Tomcat 4.0
> Now, I have a development environment of my own, where I write and compile
> my Java files.. Like, C:\servlet\examples\HelloWorld.java
> After providing the servlet.jar file in my CLASSPATH, and compiling
> HelloWorld.java, I got HelloWorld.class. Now, where do I move this class
> file to view it as http://localhost/servlet/HelloWorld??
>
> I copied the classfile to C:\Program Files\Apache Tomcat
> 4.0\webapps\ROOT\WEB-INF\classes, where classes dir was created by me and
> class files copied there.
>
> Now, starting the Tomcat Webserver, I try opening this in Internet Explorer
> as http://localhost/servlet/HelloWorld, I get the webpage error as:
> Apache Tomcat/4.0.6 - HTTP Status 404 - /servlet/HelloWorld
>
> ---
>-
>
> type Status report
>
> message /servlet/HelloWorld
>
> description The requested resource (/servlet/HelloWorld) is not available.
>
> What am I missing? I've thoroughly followed
> http://www.moreservlets.com/Using-Tomcat-4.html, need help at the earliest.
> Thank you.
> Raghava
>
>
>
>
>
> _
> Unlimited Internet access for only $21.95/month.  Try MSN!
> http://resourcecenter.msn.com/access/plans/2monthsfree.asp


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>




Re: Testing Datasources

2002-10-31 Thread shawn
driverClassName is :
com.microsoft.jdbc.sqlserver.SQLServerDriver

 
driverClassName
com.microsoft.jdbc.sqlserver.SQLServerDriver
  


Not :
C:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserver.jar;C:\Tomcat4.1\common\lib\msutil.jar
these need to be somewhere in your classpath


Also do not forget the resource-ref in web.xml

On Thursday 31 October 2002 01:49 pm, John Mattos wrote:
> Ah... interesting. No, I can't see them loading, but they're set up at the
> app and global level. Why wouldn't they be loading?
>
> Here's a snippet from server.xml
> 
>   
> validationQuery
> select top 100 * from Subscriber
>   
>   
> url
>   
> jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHousealue> 
>   
> password
> tibco_user
>   
>   
> maxActive
> 12
>   
>   
> maxWait
> 5000
>   
>   
> driverClassName
>
> C:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserv
>er.jar;C:\Tomcat4.1\common\lib\msutil.jar; 
>   
> username
> tibco_user
>   
> 
> Thoughts?
>  [EMAIL PROTECTED] wrote:Where do you setup your datasource? If Global or
> default context, you should be able to see JNDI reference loading when you
> start your tomcat.
>
> Regards,
>
>
> Phillip Qin
>
> Software Developer
> Canadian Shareowner
> 121 Richmond Street W, 7th Floor
> Toronto, ON M5H 2K1
> (416) 595-9600 ext 291
>
>
> -Original Message-
> From: John Mattos [mailto:mattosj@;yahoo.com]
> Sent: October 31, 2002 3:33 PM
> To: Tomcat Users List
> Subject: Testing Datasources
>
>
> Is there as easy way to test datasources I set up in server.xml (or in the
> Administrator app)?
>
>
> John L. Mattos
> 302 East 88th Street Apt #5B
> New York, New York 10128-4939
> (M) (917) 202-8450
> (www) http://www.mattos.ws
>
>
> -
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
>
>
>
> -
> Yahoo! - We Remember
> 9-11: A tribute to the more than 3,000 lives lost


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Testing Datasources

2002-10-31 Thread shawn
Looks fine,

I would put the DBname as part of the URL, but I think it will work the way 
you have it.
jdbc:microsoft:sqlserver://vc34:1433/TibcoClearHouse


On Thursday 31 October 2002 02:23 pm, John Mattos wrote:
> Ah! Thank you! Good catch. Alright 2 more dumb questions (I'm not above
> that) in web xml, the  is... 
>   DB Connection
>   jdbc/indemand
>   javax.sql.DataSource
>   Container
>   
>
> Correct?
>
> Also, the db url I'm using is...
>
> jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse
>
> and I'm wondering if that's in the right format...
>
> Thanks
>
> John
>
>
>  shawn <[EMAIL PROTECTED]> wrote:driverClassName is :
> com.microsoft.jdbc.sqlserver.SQLServerDriver
>
>
>
> driverClassName
> com.microsoft.jdbc.sqlserver.SQLServerDriver
>
>
>
>
> Not :
> C:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserver.jar;
>C:\Tomcat4.1\common\lib\msutil.jar these need to be somewhere in your
> classpath
>
>
> Also do not forget the resource-ref in web.xml
>
> On Thursday 31 October 2002 01:49 pm, John Mattos wrote:
> > Ah... interesting. No, I can't see them loading, but they're set up at
> > the app and global level. Why wouldn't they be loading?
> >
> > Here's a snippet from server.xml
> >
> >
> >
> > validationQuery
> > select top 100 * from Subscriber
> >
> >
> >
> >
> > url
> >
> > jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse>alue>
> >
> >
> >
> > password
> > tibco_user
> >
> >
> >
> >
> > maxActive
> > 12
> >
> >
> >
> >
> > maxWait
> > 5000
> >
> >
> >
> >
> > driverClassName
> >
> > C:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserv
> >er.jar;C:\Tomcat4.1\common\lib\msutil.jar;
> >
> >
> >
> > username
> > tibco_user
> >
> >
> >
> > Thoughts?
> > [EMAIL PROTECTED] wrote:Where do you setup your datasource? If Global
> > or default context, you should be able to see JNDI reference loading when
> > you start your tomcat.
> >
> > Regards,
> >
> >
> > Phillip Qin
> >
> > Software Developer
> > Canadian Shareowner
> > 121 Richmond Street W, 7th Floor
> > Toronto, ON M5H 2K1
> > (416) 595-9600 ext 291
> >
> >
> > -Original Message-
> > From: John Mattos [mailto:mattosj@;yahoo.com]
> > Sent: October 31, 2002 3:33 PM
> > To: Tomcat Users List
> > Subject: Testing Datasources
> >
> >
> > Is there as easy way to test datasources I set up in server.xml (or in
> > the Administrator app)?
> >
> >
> > John L. Mattos
> > 302 East 88th Street Apt #5B
> > New York, New York 10128-4939
> > (M) (917) 202-8450
> > (www) http://www.mattos.ws
> >
> >
> > -
> > Do you Yahoo!?
> > HotJobs - Search new jobs daily now
> >
> >
> >
> > -
> > Yahoo! - We Remember
> > 9-11: A tribute to the more than 3,000 lives lost


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>




Re: Tomcat just dies

2002-10-31 Thread shawn

Look closely at this line.
jdbc:weblogic:mssqlserver4:Questions@localhost


On Thursday 31 October 2002 02:32 pm, pkrishnaswami wrote:
> I added some entries to the server.xml for database configuration; Here are
> the additions I made:
>
> 
>  type="javax.sql.DataSource">
>   
>
>  driverClassName
>
> weblogic.jdbc.mssqlserver4.Driver
> 
>
>   url
>
> jdbc:weblogic:mssqlserver4:Questions@localhost
>   
>   
> user
> sa
>
> 
>   password
>   
>   
>
>   
>
> When I now startup the server in a DOX box in Windows 2000 env, the tomcat
> icon just shows up and then goes away. If I remove the aboev entry, Tomcat
> server starts up.
>
> Any idea why this would happen. Is there a way to see the messages printed
> by the Tomcat server when it comes up.
>
> Prabhakar


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Apache Index page jsp and sessionid with JKMount *.jsp

2002-11-13 Thread shawn
Use mod_dir in Apache.  It is standard.

add this directive in you apache conf 
DirectoryIndex index.jsp index.php index.html index.htm 

options are listed in order of preference.
the directive can go in the main conf or in a Vitual Host Container.
See the apache docs for more detail.
http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex


On Wednesday 13 November 2002 01:56 pm, Turner, John wrote:
> That's pretty much the solution...this has come up before.
>
> By the time JK gets involved, Apache is just about done with the URL...it
> doesn't perform any rewriting, etc. it's just looking for a match.
>
> The elegant solution is probably using mod_rewrite to rewrite requests
> ending in "/" to "/index.jsp".
>
> John
>
> > -Original Message-
> > From: Chad Cannell [mailto:ccannell@;elogex.com]
> > Sent: Wednesday, November 13, 2002 3:45 PM
> > To: Tomcat Users List
> > Subject: Apache Index page jsp and sessionid with JKMount *.jsp
> >
> >
> > I am trying to set Apache's index file to index.jsp. It is
> > not working.
> >
> > I am using JKmount *.jsp for the dynamic stuff, so for what
> > ever reason,
> > Apache won't server this as the point of entry to our site.
> >
> > We currently use an index.html page to redirect to index.jsp, but want
> > to get rid of that.
> >
> > Any ideas?
> >
> > Using Apache 2.0, ajp13. Tomcat 3.2x
> >
> > Chad
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: coredump using tomcat 3.2.4

2002-11-14 Thread shawn
#] gdb /path/to/executable /path/to/corefile

<...loads all the symbols from the core ...>

(gdb)bt

<.. prints the stack trace of the segfault ..>

I have not done this with tomcat.  your milage may vary.


If you do not have a core you can do it this way

#]gdb /path/to/executable
(gdb) run -X

( cause your app to crash )

(gdb)bt


On Thursday 14 November 2002 04:32 pm, John Park wrote:
> hi, All,
>
> We recently experienced a coredump when using an
> embedded tomcat servlet engine (version 3.2.4). The
> last hint was two stack traces showing socket read
> timeouts. The java version we were using is 1.2.2_12
> on solaris 2.8. Has anyone seen something similar?
>
> I am not trying to solve the problem here but any
> ideas on how to trace the cause of the coredump is
> greatly appreciated.
>
> Thanks a lot,
>
> John
>
> PS: the stack trace looks like:
>
> java.io.InterruptedIOException: Read timed out
> at
> java.net.SocketInputStream.socketRead(Native Method)
> at
> java.net.SocketInputStream.socketRead(Compiled Code)
> at java.net.SocketInputStream.read(Compiled
> Code)
> at java.io.BufferedInputStream.fill(Compiled
> Code)
> at java.io.BufferedInputStream.read(Compiled
> Code)
> at
> org.apache.tomcat.service.http.HttpRequestAdapter.doRead(Compiled
> Code)
> at
> org.apache.tomcat.core.BufferedServletInputStream.doRead(Compiled
> Code)
> at
> org.apache.tomcat.core.BufferedServletInputStream.read(Compiled
> Code)
> at
> javax.servlet.ServletInputStream.readLine(Compiled
> Code)
> at
> org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(Compiled
> Code)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Comp
>iled Code)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
> Code)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled
> Code)
> at java.lang.Thread.run(Compiled Code)
> Segmentation Fault - core dumped
>
>
> __
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




jspC precompiling jsp pages

2001-03-19 Thread Shawn



I noticed an interesting quirk about jspC that I 
just wanted to pass along to novices like myself.  When using the -webinc 
 option with windows, I had to flip the slashes (must 
be it's heritage) around for my servlet to be found.
 
For example the xml file that I was given 
included:
 

 ...
\wiseOwl\JSP.jsp(the\ were 
backslashes
...BUT WHAT WORKED IS AS 
FOLLOWS
 
...
/wiseOwl/JSP.jsp
...
maybe this won't be of use to anyone, but isn't it nice to think that it 
might


Re: Need help identifying the browser a user is using

2001-03-19 Thread Shawn

I dk if this answers your question but one suggestion I've seen suggests
testing for IE first and the netscape afterward. (from JAVAServer pages
H.Bergsten)
 For example...
<%@ page language="java" contentType="text/html" %>



<% if (request.getHeader("User-Agent").indexOf("MSIE") != -1) { %>
  You're using Internet Explorer.
<%
   } else
 if (request.getHeader("User-Agent").indexOf("Mozilla") != 1) {
%>
  You're using Netscape.
<% } else { %>
  You're using a browser I don't know about.
<% } %>



- Original Message -
From: "Gerard Monsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 11:09 AM
Subject: Need help identifying the browser a user is using


>   I'd like my servlet to return content based on the
> browser the user is using.  I know that at least Netscape
> and IE identify themselves using the "user-agent" field.
> However, their syntax between them and at least between
> two different versions of Netscape are very different.
> For example:
>
> Netscape 4.76:
> user-agent: Mozilla/4.76 [en] (WinNT; U)
>
> Netscape 6.0:
> user-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001108
Netscape6/6.0
>
> IE 4.0:
> user-agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)
>
> So, you can see that Netscape 4.76 only identifies itself
> as Mozilla, Netscape 6.0 identifies itself at the end of the
> line, and IE 4.0 identifies itself in the parenthesis.  Who knows
> how other versions (IE 5.0, Netscape 3.1, etc.) and other
> browsers identify themselves?
>
>Does anyone have a simple class that knows all of the
> peculiarities of these browsers can parse the user-agent field
> correctly?  Any help you can give would be very appreciated.
>
> Gerard Monsen
> 1Finder.com




unable to load javabean with jspc

2001-03-19 Thread Shawn



I'm trying to precompile a jsp with a bean so that 
I can use it like a servlet, but get a "bean can't be loaded error".  How 
can I adjust things so that jspc can find the bean.
 
Note, if I use the exact same packages and files 
under Forte it works fine and runs.  Also, I've gotten some examples to 
precomile with beans, so maybe it's a matter of putting something in a jar or a 
war file because simply placing the class in the lib or under web-inf/myPackage 
hasn't worked
 
This is pretty important for me to figure out so if 
you have any suggestions, I'd greatly appreciate 
them!!


RE: always getting 403 Forbidden pages

2001-11-27 Thread shawn

-Original Message-
  Usually a directory permission problem.  Do you have the files marked a
world-readable and the directory to +rx?  Try doing a "chmod 755" on the
directories where you have the files and "chmod 644" on the files.

-- Jason

-Original Message-
From: Peter Matulis [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 11:35 AM
To: Tomcat-User (E-mail)
Subject: always getting 403 Forbidden pages


I keep getting 403 pages when trying to access the test or example jsp's or
servlets.  What can be causing this?

I'm using TC322 on Red Hat 7.1

Peter Matulis

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Java Beans and JSP Question.

2001-07-31 Thread Shawn

Dear Dan,

I believe I'm familiar with the problem you're having and think it's related to Forte. 
  In my case, either Tomcat or Forte complained about methods that were clearly there. 
 What I've had to do is take my bean and put it in two places.  Within Explorer in 
Forte which shows my filesystems I have 
c:\tomcat\webapps\myApp\WEB-INF\classes\com\koyuru.  I have also had to directly mount 
com\koyuru as a filesystem within Forte as well.  If I modify a bean in one, I must 
copy it to the other, otherwise either Tomcat or Forte will complain.

In my case I was using examples from the jspBook and tried to modify them but Forte 
claimed my new method wasn't there. It didn't seem so related to overloading as much 
as the filesystem.  That shut it up though.

Shawn


I have a standard java bean.  The different thing about it is that I
usually have two overloaded set methods per attribute.  For example,

public class MyBean {
private int a;

public setA (int a) throws Exception {
if (a > 100) throw new Exception ("Must be less than 100");
}

public setA (String a) throws Exception {
try {
setA(Integer.parseInt(a));
} catch (NumberFormat Exception exception) {
throw new Exception ("Format incorrect.");
}
}

//I usually have one getA
public int getA() {
return a;
}
}

Now when I use this bean in a JSP that is stored in the request scope,
at times the compiler will complain that it cannot find a get method for
"A".  Even though one get method for that particular attribute is
clearly there.

Some added information, I use Forte Community Edition 2, and Tomcat.
Forte's compiler complains about one attribute while Tomcat complains
about another completely different attribute it cannot find the get
method for.  Which makes me itch with anger.  The note is my example
above is very simple. I used it just to explain my problem.  My actual
bean has about 17 attributes all with 2 setter methods each and 1 get
method each.

Does anyone know how to resolve this issue?

Thanks for your help.
Dan Hinojosa




Java Beans and JSP Question

2001-07-31 Thread Shawn
Dear Dan,

I believe I'm familiar with the problem you're having and think it's related
to Forte.   In my case, either Tomcat or Forte complained about methods that
were clearly there.  What I've had to do is take my bean and put it in two
places.  Within Explorer in Forte which shows my filesystems I have
c:\tomcat\webapps\myApp\WEB-INF\classes\com\koyuru.  I have also had to
directly mount com\koyuru as a filesystem within Forte as well.  If I modify
a bean in one, I must copy it to the other, otherwise either Tomcat or Forte
will complain.

In my case I was using examples from the jspBook and tried to modify them
but Forte claimed my new method wasn't there. It didn't seem so related to
overloading as much as the filesystem.  That shut it up though.

Shawn


I have a standard java bean.  The different thing about it is that I
usually have two overloaded set methods per attribute.  For example,

public class MyBean {
private int a;

public setA (int a) throws Exception {
if (a > 100) throw new Exception ("Must be less than 100");
}

public setA (String a) throws Exception {
try {
setA(Integer.parseInt(a));
} catch (NumberFormat Exception exception) {
throw new Exception ("Format incorrect.");
}
}

//I usually have one getA
public int getA() {
return a;
}
}

Now when I use this bean in a JSP that is stored in the request scope,
at times the compiler will complain that it cannot find a get method for
"A".  Even though one get method for that particular attribute is
clearly there.

Some added information, I use Forte Community Edition 2, and Tomcat.
Forte's compiler complains about one attribute while Tomcat complains
about another completely different attribute it cannot find the get
method for.  Which makes me itch with anger.  The note is my example
above is very simple. I used it just to explain my problem.  My actual
bean has about 17 attributes all with 2 setter methods each and 1 get
method each.

Does anyone know how to resolve this issue?

Thanks for your help.
Dan Hinojosa


install probs

2001-08-06 Thread Shawn
Hello,

I can't get Tomcat up under Win 98.  In my autoexec.bat file that I get to
through the sysedit command I have

C:\>set JAVA_HOME=C:\JDK1.3.1

C:\>set
CLASSPATH=C:\TOMCAT\LIB\SERVLET.JAR;C:\TOMCAT\LIB\JAXP.JAR;C:\TOMCAT\LIB
\ANT.JAR;C:\TOMCAT\LIB\PARSER.JAR;C:\TOMCAT\LIB\WEBSERVER.JAR;C:\TOMCAT\LIB\
JASP
ER.JAR;C:\TOMCAT\CLASSES;C:\JDK1.3.1\LIB\TOOLS.JAR;

C:\>set TOMCAT_HOME=C:\TOMCAT

Then if I try to start Tomcat I get:

C:\tomcat\bin>startup
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Including all jars in C:\TOMCAT\lib in your CLASSPATH.
Out of environment space
Out of environment space

Using CLASSPATH: C:\TOMCAT\classes

Out of environment space
Starting Tomcat in new window
C:\tomcat\bin>

What can I do short of trying the surely superior RedHat?  I've got it
cooking on Win2k but 98 blah.

Shawn


Note: I left xml.jar out of the class path as there isn't one in the LIB,
but even if I put it in there was the same error.  Do I need to find and use
that Jar?


jakarta-tomcat-3.2.3.zip "conf" files are blank

2001-08-15 Thread Shawn

I put in the conf files I had been using for 3.2.2 and 3.2.3 seems to be
working fine.  Could that lead to some problems I haven't discovered yet?

Shawn




DBCP trouble in 4.12

2002-12-22 Thread shawn
Hello,

Not at all sure if this is my own problem or a bigger issue but I moved
from 4.06 to 4.12 recently and...

The example DBCP given for mysql works fine for me with
mysql-connector-java-2.0.14-bin.jar  Thanks for the nice docs!

However, when I move the code to an app I'm trying to move, I get a
"Cannot load JDBC driver class 'null'" error message.  It stems from
Connection conn=dataSource.getConnection();  (see complete snippet
below)

The code was originally in a servlet (and the ds got passed to a bean)
but I moved everything to the bean with the same results.


Connection conn;
// Get the user info from the database
try {
  Context ctx = new InitialContext();
 if(ctx == null ) 
  throw new Exception("Boom - No Context");


DataSource
dataSource2=(DataSource)ctx.lookup("java:comp/env/jdbc/TestDB");
if(dataSource2 == null ) 
  throw new Exception("Boom - No dataSource");
 
  conn = dataSource2.getConnection();
}
catch (Exception e){throw new SQLException("couldn't get conn
from dataSource2 in employeeBean"+e.toString());}

Yes, I recompiled everything after the move and have the driver in the
Catalina_Home/common/lib dir.

TIA,

Shawn






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




ClassCastException Conn=dataSource.getConnection();

2002-12-22 Thread shawn
I am getting a java.lang.ClassCastException

from Connection conn = datasource.getConnection();  
in the folowing:

try {
Context ctx = new InitialContext();
if(ctx == null )
{throw new Exception("Boom - No Context");}

   
DataSource
dataSource2=(DataSource)ctx.lookup("java:comp/env/jdbc/");
if(dataSource2 == null )
{throw new Exception("Boom - No dataSource");}

conn = dataSource2.getConnection();
    }

Why would that be?

TIA

Shawn

PS the ds ="null" error I had earlier was due to not setting up my root
context properly.  That document base threw me off.


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




OK Re: ClassCastException Conn=dataSource.getConnection();

2002-12-23 Thread shawn
I see now. Thanks. 

My confusion was this in server.xml 
 
 

so I had 

... 

instead of 

... 

and 
DataSource
> > dataSource2=(DataSource)ctx.lookup("java:comp/env/jdbc/");
instead of 

DataSource
dataSource2=(DataSource)ctx.lookup("java:comp/env/jdbc/root");

> It's because jdbc is not a datasource, it's a container (or something
> similar.  I have not the time to look it up).
> 
> In your server.xml/web.xml files you should have a resource that's probably
> named "jdbc/myConnection".
> 
> Your code should read
> 
> dataSource2=(DataSource)ctx.lookup( "java:comp/env/jdbc/myConnection" );
> 
> This of course is a guess.  Without your config file, it's hard to tell.
> 
> Sorry if this is a duplicate post, but I replied from the wrong account
> earlier.
> 
> Andy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




session id's really unique?

2002-12-29 Thread shawn
If I use RequestDispatcher.forward(request, response) to another context
am I running the risk of session id conflicts?  

I mean if a session Id is given in one context, another context is
restarted and the java.security.SecureRandom is re-initialized for that
webapp, then it would seem possible that newly generated sessions in the
second context could match the previosly generated session id that was
transferred from the first context.

I doubt I know as much as many on this list, but that is something that
I wondered about.

Shawn

PS  I'm relying on potentially outdated info from a list that was posted
in response to this topic.

 >Tomcat 4 uses an instance of java.security.SecureRandom to generate
> session identifiers for a particular session.  The instance is initialized
> the first time (after Tomcat is started, or after a webapp is restarted)
> that a session identifier is requested.
> 


> More seriously, it is *you* as the application developer that is deciding
> whether or not to execute the RequestDispatcher.include() or
> RequestDispatcher.forward() call -- it's not the container.  It is totally
> up to *you* to decide whether or not this is allowed, because *you* wrote
> the app.
> 
 yes I did but will the sessions tranfer uniquely?


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




Re: Mysql driver problem...

2002-12-30 Thread shawn
I got that same message myself many times.

Are you trying from the root context?

If so, you'll need 
  
DB Connection
jdbc/root
javax.sql.DataSource
Container
  
in web.xml

and 




in server.xml

that's what worked for me anyway

Shawn


On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote:
> Ok, first off sorry if this is a little vague and I can write more
> details later.  Anyway, I am new at this stuff with setting up the mysql
> driver to work with tomcat by setting a JNDI Datasource.  I followed the
> directions under that heading in the documentation from the Tomcat
> website for the mysql driver, but I keep getting a "Cannot load JDBC
> driver class 'null'" message when I try to create a connection using the
> driver.  I put the .jar file in the $TOMCAT/common/lib directory and
> restarted tomcat.  Anyone have any quick tips for me to try?  I can post
> my code later if yall need it; it's just late right now and I don't feel
> like cutting and pasting.  Anyway, thanks in advance!
> 
> Keith  
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- 
shawn <[EMAIL PROTECTED]>


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




Re: Mysql driver problem...

2002-12-30 Thread shawn
just like the example, I should think that would be ok.

my point was

 debug="5" reloadable="true" crossContext="true">

and not sililar to the following which I found in server.xml

   

 
I tried  
and got the same message you did.


On Mon, 2002-12-30 at 17:09, Keith Pemberton wrote:
> Well, my JNDI name for the resource is jdbc/gatep5 and that is what I
> have as the .  Then I translated that
> name into the web.xml which is under the ROOT directory of
> $Tomcat/webapps.  Shouldn't this be ok?  
> 
> Keith
> 
> 
> On Mon, 2002-12-30 at 02:03, shawn wrote:
> > I got that same message myself many times.
> > 
> > Are you trying from the root context?
> > 
> > If so, you'll need 
> >   
> > DB Connection
> > jdbc/root
> > javax.sql.DataSource
> > Container
> >   
> > in web.xml
> > 
> > and 
> > 
> >  > debug="5" reloadable="true" crossContext="true">
> > 
> > 
> > in server.xml
> > 
> > that's what worked for me anyway
> > 
> > Shawn
> > 
> > 
> > On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote:
> > > Ok, first off sorry if this is a little vague and I can write more
> > > details later.  Anyway, I am new at this stuff with setting up the mysql
> > > driver to work with tomcat by setting a JNDI Datasource.  I followed the
> > > directions under that heading in the documentation from the Tomcat
> > > website for the mysql driver, but I keep getting a "Cannot load JDBC
> > > driver class 'null'" message when I try to create a connection using the
> > > driver.  I put the .jar file in the $TOMCAT/common/lib directory and
> > > restarted tomcat.  Anyone have any quick tips for me to try?  I can post
> > > my code later if yall need it; it's just late right now and I don't feel
> > > like cutting and pasting.  Anyway, thanks in advance!
> > > 
> > > Keith  
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> > -- 
> > shawn <[EMAIL PROTECTED]>
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- 
shawn <[EMAIL PROTECTED]>


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




Re: session id's really unique?

2002-12-30 Thread shawn
Just to confirm,

If I send use RequestDispatcher.forward(request, response) and send it
to another context, that session will be newly managed under the new
context (or by the original context) and therefore there is no risk of
duplicate id's.

The other issue is to be patched.

Shawn

Sorry to be paranoid. Can't help it though.

On Mon, 2002-12-30 at 23:58, Glenn Olander wrote:
> You run the risk of getting duplicate session id's. However, across 
> contexts you'll have
> separate Managers, and therefore different sets of sessions. So, you 
> don't run the risk
> of one context gaining access to another context's sessions.
> 
> The risk is the one discussed in the other session id thread where if 
> you get duplicate
> session id's in the same context. Then you've got serious problems.
> 
> shawn wrote:
> 
> >If I use RequestDispatcher.forward(request, response) to another context
> >am I running the risk of session id conflicts?  
> >
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- 
shawn <[EMAIL PROTECTED]>


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




Re: java.sql.SQLException: Cannot load JDBC driver class 'null'

2003-01-01 Thread shawn
Try changing this value 


Shouldn't it be jdbc/InfectedDB ?

That's my guess.

Shawn

On Thu, 2003-01-02 at 12:29, Anastasios Angelidis wrote:
> Hi I downloaded the MySQL Connector/J 2.0.14 JDBC drivers and I copied 
> the mysql-connector-java-2.0.14-bin.jar to the common/lib folder...
> 
> Here is my server.xml  config...
> 
>  crossContext="true">
>  prefix="localhost_infected_log." suffix=".txt" timestamp="true"/>
>  type="javax.sql.DataSource"/>
> 
> 
> 
>factoryorg.apache.commons.dbcp.BasicDataSourceFactory
> maxActive100
> maxIdle30
> maxWait1
> usernamexx
> passwordxx
> 
> 
>driverClassNamecom.mysql.jdbc.Driver
> 
> 
>urljdbc:mysql://localhost:3306/infected
> 
> 
> 
> Here is my web.xml...
> 
> 
> infected rhythms
>   infected rhythms web site
>   
> DB Connection
> jdbc/InfectedDB
> javax.sql.DataSource
> Container
> 
> 
> 
> 
> Then I worte this simple JSP code...
> 
> try
> {
> Context ctx = new InitialContext();
> 
> DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/InfectedDB");
> 
> Connection conn = ds.getConnection();
> 
> The rest of the code...
> }
> catch(Exception ex)
> {
> ex.printStackTrace();
> }
> 
> The exception os caught whne trying to get the connection Connection 
> conn = ds.getConnection(); Any ideas? Thanks
> The stack trace...
> 
> java.sql.SQLException: Cannot load JDBC driver class 'null'
> at 
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
> at 
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
> at org.apache.jsp.artists_jsp._jspService(artists_jsp.java:57)
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
> at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at 
> 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> at 
> 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
> at 
> 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at 
> 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at 
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> at 
> 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
> at 
> 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> at 
> 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
> at 
> 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at 
> org.apache.catalin

Re: Cannot load JDBC driver class 'null'

2003-01-10 Thread Shawn
I had that error too.

In my case it had to do with how I configured web.xml and server.xml.

I was able to get the example from the docs working but when switching to
/root context got mixed up.

You aren't using the root context are you?

In any case, I would double check again server.xml and web.xml and compare
them to the examples.  That's where my driver class 'null' problem arose.

Shawn


- Original Message -
From: "David Durst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 6:43 PM
Subject: Re: Cannot load JDBC driver class 'null'


> > I have experience that before, but that was my fault rather than tomcat.
> > I put the source jar instead of the driver binary. Other than that  DBCP
> >  worked as described in the tomcat documents. Cannot load JDBC driver
> > class null usually means that it couldn't find the jdbc driver that you
> > specified in the server.xml .
>
> that is strange cause I have it in
> $CATALINA_HOME/common/lib
>
> And it is exactly the same class that I used when I was using JDBC
non-jndi.
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Cannot load JDBC driver class 'null'

2003-01-10 Thread shawn
I had that error too and just reproduced it again to be sure of how I
resolved it.

Let's say the following is a correct entry in server.xml:



but I make a mistake and use



**Notice the D vs d in the context path**

Then I get a Cannot load JDBC driver class 'null' error message

With the root context, where I had my problem, it was confusing because
I needed path="/root" and not path="/".  Also, the error message is
seemingly unrelated to the actual problem

Anyway, whether or not this is the origin of your error I do not know,
but only know that I got the same message when my context path was
incorrect.

Shawn

  

On Sat, 2003-01-11 at 05:21, Daren R. Sefcik wrote:
> Yes I have..I have been trying for the last week
> to figure it out. I have found the same thing that
> BasicDataSource does not load the driverClassName.
> I have put my jdbcdriver.jar file in the common/lib
> dir..and I know it's in the classpath of tomcat as I
> can write a jsp page with a Class.forName and have
> it work fine.The problem only surfaces when doing
> jndi Datasource lookups. The driverClassName from
> the server.xml file is never passed to BasicDataSource.
> 
> If anyone can spot errors in my configuration please
> let me know, thanks..
> 
> 
> I know that the server.mxl is being read from my logs:
> 
> 2003-01-10 11:22:29 NamingContextListener[/Apache/localhost/intranet]: Creating JNDI 
>naming context
> 2003-01-10 11:22:29 NamingContextListener[/Apache/localhost/intranet]:   Resource 
>parameters for jdbc/TestDB = ResourceParams[name=jdbc/TestDB, 
>parameters={factory=org.apache.commons.dbcp.BasicDataSourceFactory, password=user, 
>url=jdbc:jtds:sqlserver://ns1:1433/WebDB, 
>driverClassName=net.sourceforge.jtds.jdbcx.TdsDataSource, username=webuser}]
> 2003-01-10 11:22:29 NamingContextListener[/Apache/localhost/intranet]:   Adding 
>resource ref jdbc/TestDB
> 2003-01-10 11:22:29 NamingContextListener[/Apache/localhost/intranet]:   
>ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},{type=auth,content=Container},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFactory},{type=password,content=user},{type=url,content=jdbc:jtds:sqlserver://ns1:1433/WebDB},{type=driverClassName,content=net.sourceforge.jtds.jdbcx.TdsDataSource},{type=username,content=webuser}]
> 
> Here is the error from catalina.out:
> 
> new context
> ctx lookup
> gonna try a ds.getConnection
> java.sql.SQLException: Cannot load JDBC driver class 'null'
> at 
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
> at 
>org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
> at foo.DBTest.init(DBTest.java:34)
> at org.apache.jsp.test_jsp._jspService(test_jsp.java:49)
> 
> 
> Here is my server.xml:
> 
> 
> 
>   
> 
>   
> 
>   
> 
>   port="8008" minProcessors="5" maxProcessors="75"
>  enableLookups="true" appBase="webapps"
>  acceptCount="10" debug="5"/>
> 
> 
>   name="Apache" debug="5">
> 
>   unpackWARs="true" autoDeploy="true">
> 
> debug="5" reloadable="true" crossContext="true">
> 
>   
>   
> 
>   factory
>   org.apache.commons.dbcp.BasicDataSourceFactory
> 
> 
>   driverClassName
>   net.sourceforge.jtds.jdbcx.TdsDataSource
> 
> 
>   url
>   jdbc:jtds:sqlserver://ns1:1433/WebDB
> 
> 
>  username
>  webuser
> 
> 
>  password
>  user
> 
>   
> 
>  prefix="intranet_log." suffix=".txt"
>   timestamp="true"/>
> 
> 
> 
>   
> 
>   
> 
> 
> 
> And here is the webapps/intranet/WEB-INF/web.xml:
> 
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd";>
> 
> 
>   
>   DB Connection
>   jdbc/TestDB
>   javax.sql.DataSource
>   Container
>   
> 
> 
> 
> 
> 
> 
> > Has anyone else experienced this
> > I have read a couple of posts that I found off google,
> > 

Re: Need help w. servlet mapping tag.

2003-01-10 Thread Shawn
I can't ell the problem without seeing your web.xml

Shawn
- Original Message -
From: "Steve R Burrus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 11, 2003 3:08 PM
Subject: Need help w. servlet mapping tag.


> Hello all, I need help with setting the servlet tags as contained in the
web.xml
> file to be able to FINALLY see/view either a JSP or a Servlet!! When I
start up
> Tomcat, I seem to get this damn error msg. :
>
>  SEVERE: Parse Error at line 14 column 46: The content of element type
"servlet-m
> apping" is incomplete, it must match "(servlet-name,url-pattern)".
> org.xml.sax.SAXParseException: The content of element type
"servlet-mapping" is
> incomplete, it must match "(servlet-name,url-pattern)".
> at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Er
> rorHandlerWrapper.java:232)
> at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.
> java:173)
> at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.
> java:371)
> at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.
> java:305)
> at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDVal
> idator.java:1918)
> at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator
> .java:851)
> at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
> XMLDocumentFragmentScannerImpl.java:1008)
> at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
> Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
> at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
> LDocumentFragmentScannerImpl.java:329)
> at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
> a:525)
> at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
> a:581)
> at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
> at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
> ava:1175)
> at org.apache.commons.digester.Digester.parse(Digester.java:1495)
> at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo
> nfig.java:282)
> at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63
> 9)
> at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
> g.java:243)
> at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:166)
> at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
> 567)
> at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>
> at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
> at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>
> at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347
> )
> at
org.apache.catalina.core.StandardService.start(StandardService.java:4
> 97)
> at
org.apache.catalina.core.StandardServer.start(StandardServer.java:218
> 9)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
> at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> 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(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> Jan 10, 2003 8:42:08 PM org.apache.commons.digester.Digester endElement
> SEVERE: End event threw exception
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
> a:228)
> at
org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:49
> 1)
> at
org.apache.commons.digester.Digester.endElement(Digester.java:1036)
> at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXPar
> ser.java:585)

Re: Need help w. servlet mapping tag.

2003-01-10 Thread Shawn
uuh, sorry.  It seems valid according to the check I did.  I was just
assuming it wasn't valid.

I'm not anyone special.

Shawn


- Original Message -
From: "Steve R Burrus" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, January 11, 2003 3:46 PM
Subject: Re: Need help w. servlet mapping tag.


> Dear Shawn, Hi I have never heard from u ever before, but here "in all of
its'
> glory" is the web.xml file in question. Happy Reading!
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com






> 
>
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> 
>
> Tomcat Examples
> 
>   Tomcat Example servlets and JSP pages.
> 
>
> 
> 
> Servlet Mapped Filter
> filters.ExampleFilter
> 
> attribute
> filters.ExampleFilter.SERVLET_MAPPED
> 
> 
> 
> Path Mapped Filter
> filters.ExampleFilter
> 
> attribute
> filters.ExampleFilter.PATH_MAPPED
> 
> 
> 
> Request Dumper Filter
> filters.RequestDumperFilter
> 
>
> 
> 
> Set Character Encoding
> filters.SetCharacterEncodingFilter
> 
> encoding
> EUC_JP
> 
> 
>
> 
> Compression Filter
> compressionFilters.CompressionFilter
>
> 
>   compressionThreshold
>   10
> 
> 
>   debug
>   0
> 
> 
>
> 
> 
> Servlet Mapped Filter
> invoker
> 
> 
> Path Mapped Filter
> /servlet/*
> 
>
>
> 
> 
>
> 
>
> 
>
> 
> 
> listeners.ContextListener
> 
> 
> listeners.SessionListener
> 
>
> 
>
> 
> SendMailServlet
> SendMailServlet
> 
>
> 
> 
> snoop
> 
> 
> SnoopServlet
> 
> 
> 
> Security role for anonymous access
> tomcat
> 
> 
>
> 
>   
>   servletToJsp
>   
>   
>   servletToJsp
>   
> 
> 
> 
> CompressionFilterTestServlet
> 
> 
> compressionFilters.CompressionFilterTestServlet
> 
>
> 
>
> 
> invoker
> /servlet/*
> 
>
> 
> 
> CompressionFilterTestServlet
> 
> 
> /CompressionTest
> 
> 
>
> 
> SendMailServlet
> /SendMailServlet
> 
>
> 
> 
> snoop
> 
> 
> /snoop
> 
> 
> 
> 
> servletToJsp
> 
> 
> /servletToJsp
> 
> 
>
> 
> 
>http://jakarta.apache.org/tomcat/debug-taglib
> 
> 
>/WEB-INF/jsp/debug-taglib.tld
> 
> 
>
> 
> 
>http://jakarta.apache.org/tomcat/examples-taglib
> 
> 
>/WEB-INF/jsp/example-taglib.tld
> 
> 
>
> 
>   mail/Session
>   javax.mail.Session
>   Container
> 
>
> 
>   Example Security Constraint
>   
>  Protected Area
> 
>  /jsp/security/protected/*
> 
> DELETE
>  GET
>  POST
> PUT
>   
>   
>  
>  tomcat
> role1
>   
> 
>
> 
> 
>   FORM
>   Example Form-Based Authentication Area
>   
>
/jsp/security/protected/login.jsp
>
/jsp/security/protected/error.jsp
>   
> 
>
> 
> 
>   role1
> 
> 
>   tomcat
> 
>
> 
> 
> 
>   minExemptions
>   1
>   java.lang.Integer
> 
> 
>   foo/name1
>   value1
>   java.lang.String
> 
> 
>   foo/bar/name2
>   true
>   java.lang.Boolean
> 
> 
>   name3
>   1
>   java.lang.Integer
> 
> 
>   foo/name4
>   10
>   java.lang.Integer
> 
>
> 
> 
>   Example EJB Reference
>   ejb/Account
>   Entity
>   com.mycompany.mypackage.AccountHome
>   com.mycompany.mypackage.Account
> 
>
> 
> 
>   Example Local EJB Reference
>   ejb/ProcessOrder
>   Session
>   com.mycompany.mypackage.ProcessOrderHome
>   com.mycompany.mypackage.ProcessOrder
> 
>
>
> 
>
>






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


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




Re: Need help w. servlet mapping tag.

2003-01-10 Thread Shawn
Stab in the dark.

Try taking out the extra spaces in things like

snoop

to be
snoop

Stupid guess.

Hope it doesn't waste your time.

Shawn


- Original Message -
From: "Steve R Burrus" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, January 11, 2003 3:46 PM
Subject: Re: Need help w. servlet mapping tag.


> Dear Shawn, Hi I have never heard from u ever before, but here "in all of
its'
> glory" is the web.xml file in question. Happy Reading!
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com






> 
>
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> 
>
> Tomcat Examples
> 
>   Tomcat Example servlets and JSP pages.
> 
>
> 
> 
> Servlet Mapped Filter
> filters.ExampleFilter
> 
> attribute
> filters.ExampleFilter.SERVLET_MAPPED
> 
> 
> 
> Path Mapped Filter
> filters.ExampleFilter
> 
> attribute
> filters.ExampleFilter.PATH_MAPPED
> 
> 
> 
> Request Dumper Filter
> filters.RequestDumperFilter
> 
>
> 
> 
> Set Character Encoding
> filters.SetCharacterEncodingFilter
> 
> encoding
> EUC_JP
> 
> 
>
> 
> Compression Filter
> compressionFilters.CompressionFilter
>
> 
>   compressionThreshold
>   10
> 
> 
>   debug
>   0
> 
> 
>
> 
> 
> Servlet Mapped Filter
> invoker
> 
> 
> Path Mapped Filter
> /servlet/*
> 
>
>
> 
> 
>
> 
>
> 
>
> 
> 
> listeners.ContextListener
> 
> 
> listeners.SessionListener
> 
>
> 
>
> 
> SendMailServlet
> SendMailServlet
> 
>
> 
> 
> snoop
> 
> 
> SnoopServlet
> 
> 
> 
> Security role for anonymous access
> tomcat
> 
> 
>
> 
>   
>   servletToJsp
>   
>   
>   servletToJsp
>   
> 
> 
> 
> CompressionFilterTestServlet
> 
> 
> compressionFilters.CompressionFilterTestServlet
> 
>
> 
>
> 
> invoker
> /servlet/*
> 
>
> 
> 
> CompressionFilterTestServlet
> 
> 
> /CompressionTest
> 
> 
>
> 
> SendMailServlet
> /SendMailServlet
> 
>
> 
> 
> snoop
> 
> 
> /snoop
> 
> 
> 
> 
> servletToJsp
> 
> 
> /servletToJsp
> 
> 
>
> 
> 
>http://jakarta.apache.org/tomcat/debug-taglib
> 
> 
>/WEB-INF/jsp/debug-taglib.tld
> 
> 
>
> 
> 
>http://jakarta.apache.org/tomcat/examples-taglib
> 
> 
>/WEB-INF/jsp/example-taglib.tld
> 
> 
>
> 
>   mail/Session
>   javax.mail.Session
>   Container
> 
>
> 
>   Example Security Constraint
>   
>  Protected Area
> 
>  /jsp/security/protected/*
> 
> DELETE
>  GET
>  POST
> PUT
>   
>   
>  
>  tomcat
> role1
>   
> 
>
> 
> 
>   FORM
>   Example Form-Based Authentication Area
>   
>
/jsp/security/protected/login.jsp
>
/jsp/security/protected/error.jsp
>   
> 
>
> 
> 
>   role1
> 
> 
>   tomcat
> 
>
> 
> 
> 
>   minExemptions
>   1
>   java.lang.Integer
> 
> 
>   foo/name1
>   value1
>   java.lang.String
> 
> 
>   foo/bar/name2
>   true
>   java.lang.Boolean
> 
> 
>   name3
>   1
>   java.lang.Integer
> 
> 
>   foo/name4
>   10
>   java.lang.Integer
> 
>
> 
> 
>   Example EJB Reference
>   ejb/Account
>   Entity
>   com.mycompany.mypackage.AccountHome
>   com.mycompany.mypackage.Account
> 
>
> 
> 
>   Example Local EJB Reference
>   ejb/ProcessOrder
>   Session
>   com.mycompany.mypackage.ProcessOrderHome
>   com.mycompany.mypackage.ProcessOrder
> 
>
>
> 
>
>






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


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




Re: Require a secure connection

2003-01-17 Thread shawn
According to
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security5.html another
way would be to specify it in web.xml. 

... 

If you specify CONFIDENTIAL or INTEGRAL as a security constraint, that
type of security constraint applies to all requests that match the URL
patterns in the Web resource collection, not just to the login dialog.

 Specify CONFIDENTIAL when the application requires that data be
transmitted so as to prevent other entities from observing the contents
of the transmission. Specify INTEGRAL when the application requires that
the data be sent between client and server in such a way that it cannot
be changed in transit. The following example code from a web.xml file
shows this setting in context:


  

  WRCollection
  /index.jsp
  GET


  user


  CONFIDENTIAL


Shawn


On Fri, 2003-01-17 at 07:09, neal wrote:
> Does anyone know how to *require* that a page be accessed only via a secure
> connection?
> 
> For instance, I *can* request a secure connection to a page by going to
> "https://"; and the url ... but how do I prevent a user from going to
> "http://"; to request that same page?
> 
> Would this be a proxy thing or is something I can set in Tomcat?  Is there
> something that wouldn't require the overhead of reflecting upon every single
> request at the Java level?
> 
> Thanks.
> neal
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- 
shawn <[EMAIL PROTECTED]>


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




ENCTYPE + SetCharacterEncodingFilter = no go joe for Tomcat 5.0.28

2004-10-25 Thread Shawn
Hello,

When using ENCTYPE="multipart/form-data" in a form on a jsp page, text
sent ignores the SetCharacterEncodingFilter which is calling
request.setCharacterEncoding("UTF-8");

I thought about getting parameter values by using 

String field = request.getParameter("whatever");
field=new String(field.getBytes
("UTF-8"));

Does this seem a reasonable approach or is should the
SetCharacterEncodingFilter *really* be setting the charEncoding?

I don't want to be creating a new string for every parameter unless
necessary.

When ENCTYPE is not set, all works as expected.

This problem is seen on Tomcat 5.0.28, but not 4.x versions.  I
understand something changed around 5.0.27 for UTF-8 handeling but am
not sure if that is realated. 

-- 
Shawn <[EMAIL PROTECTED]>


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



AW: Tomcat Clusterin Multicast Multiinstances

2004-08-18 Thread Shawn
Hello,
This thread hijacked the original about Clustering.
For courtesy to others trying to follow the original thread, it would be appreciated 
if you would start an original thread under your topic.
Not only that, but trimming the unneeded context is nice as well.
Please note:  I am not any kind of moderator and my opinion carries no offical weight 
but am a open source developer who does a great deal of work through mailing lists and 
appreciates it when people follow common courtesy.

Can any one quickly tell the comparison of running tomcat as a service or
without a windows service.
I mean what are the benifits of running tomcat as a windows service.
S H A K E E L   A H M A D

--
Shawn
Karma is immutable, so act accordingly!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Can I get an answer please -- Re: Why integrate Tomcat with a web server?

2003-08-09 Thread Shawn Zernik
It actually makes since.  Most web servers are in native code which is
uasually faster, and tomcat is in java.

-Original Message-
From: Rick Roberts [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 10:38 AM
To: Tomcat Users List
Subject: Re: Can I get an answer please -- Re: Why integrate Tomcat with
a web server?


Of course not.  I'm only regergitating stuff I have read.  But I have seen
it
from several different sources, so I took it as truth.  Do you have
benchmarks
to prove otherwise?

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
* http://www.ait-web.com  *
***
Shapira, Yoav wrote:
> Howdy,
>
>
>>Because a web server serves static content (html, images, etc.) much
>
> faster
>
>>than tomcat will.
>
>
> Really?  Do you have a benchmark using tomcat 4.1.x that supports the
> above?
>
> Yoav Shapira


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



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



RE: Custom Tag Lib

2003-08-14 Thread Shawn Zernik
Mike:

Thanks so very much...  I saw their is a config option in the Jasper to
turn off tag pooling.  do you thing that would work too, of shouldI
impliment it in my source code.  I'm gonna take a look at it right now.

Shawn

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:28 PM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


Shawn,

I ran into this problem as well when switching from 4.0 to 4.1.  I think it
has something to do with 4.1 pooling and re-using tag objects.  What I did
in all of my doStartTag(), doAfterBody(), etc... methods was manually call
release() to reset the data in the tags like so:

public int doStartTag() throws JspException
{
  try
  {
...
  }

  catch (Exception exception)
  {
throw new JspException(exception);
  }

  finally
  {
release();
  }

  return SKIP_BODY;
}

Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
Internet Advertising Delivery Solutions
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346


-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Custom Tag Lib


Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Shawn
jPublish.Tags.site.doEndTag(): End

jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()

RE: Custom Tag Lib

2003-08-14 Thread Shawn Zernik
Mr. Mezick:

>From what I'm gathering, the release should not be implimented to reset the
data and classes used by a tag, but only for things like closing files and
db connections? Just to make sure I'm thinking about this properly, the
doStartTag should be treated like the constructor: make sure my data is
setup properly there. The doEndTag should be used for "normal" completion
without errors.

Does Tomcat impliment object pooling beyon the tags?  Are my supporting
classes for the tag pooled?

Thanks to all who have helped me.

Shawn

-Original Message-
From: Angus Mezick [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 8:06 AM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


It would be best if you went a rewrote your tags not to require release
to be called.  That change will also bring you in-line with the jsp
spec.  These links might help:
http://www.onjava.com/lpt/a/1248
http://www.onjava.com/lpt/a/1250
http://jakarta.apache.org/taglibs/guidelines.html

> -Original Message-
> From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 11:41 PM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: RE: Custom Tag Lib
>
>
> Mike:
>
> Thanks so very much...  I saw their is a config option in
> the Jasper to
> turn off tag pooling.  do you thing that would work too, of shouldI
> impliment it in my source code.  I'm gonna take a look at it
> right now.
>
> Shawn
>
> -Original Message-
> From: Mike Cherichetti (Renegade Internet)
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 10:28 PM
> To: Tomcat Users List
> Subject: RE: Custom Tag Lib
>
>
> Shawn,
>
> I ran into this problem as well when switching from 4.0 to
> 4.1.  I think it
> has something to do with 4.1 pooling and re-using tag
> objects.  What I did
> in all of my doStartTag(), doAfterBody(), etc... methods was
> manually call
> release() to reset the data in the tags like so:
>
> public int doStartTag() throws JspException
> {
>   try
>   {
> ...
>   }
>
>   catch (Exception exception)
>   {
> throw new JspException(exception);
>   }
>
>   finally
>   {
> release();
>   }
>
>   return SKIP_BODY;
> }
>
> Have a nice day ...
>
> Sincerely,
>
> Mike Cherichetti
> Renegade Internet
> Internet Advertising Delivery Solutions
> www.renegadeinternet.com
> Phone (724) 658-6346
> Fax (724) 658-6346
>
>
> -Original Message-
> From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 10:56 PM
> To: [EMAIL PROTECTED]
> Subject: Custom Tag Lib
>
>
> Tomcat Users:
>
> I've been fighting with some version differences in tom cat
> wondering why my
> app acts severly different on Tomcat 4.1.27 then 4.0.6.  It
> appears that
> 4.1.27 is not working from my perspective, and have been
> fighting with it
> since monday.  None of the books I have touch this subject or
> ellude to the
> problem, and I've seached high and low for solutions.
>
> I'm having a problem working with my custom tag library.  The
> stange part to
> this is it appears to work on tomcat 4.0.6 but not on 4.1.27.
>  The library
> has a tage called site that extends a base tag, and those
> tags use other
> classes in my data namespace to hit a database.
>
> The tags are returning the proper data in both versions, but
> in 4.1.27, I
> have to "reload" the contect in the manager for it to
> "register" the changes
> from the database.  I have added some printlns to std out to
> track what's
> going on.  In tomcat 4.0.6 they are going through all the
> code as I would
> exspect it to.  I have included each of the class files that
> are called.  I
> have also included the printouts from both versions of tomcat
> to clierify
> how each version is handling the calls.
>
> The object hiarchey goes as follows:
>
> jPublish.Tags site extends inc_tag.
> jPublish.Data.site_manager extends jPublish.Data.manager,
> managers contain,
> load, and fill datas.
> jPublish.Data.site_data extends jPublish.Data.data, used for
> storing data
> and tracking updates.
>
>
> --- INDEX.JSP ---
> <%@ page contentType="text/html" %>
> <%@ taglib prefix="inc" uri="inc" %>
> 
> 
>   
>
>   
>   Welcome to !
>   © 
>   
> 
>
> --- TOMCAT 4.0.6 STDOUT ---
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.6
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.6
> jPublish.Data.manager()
> jPublish.Tags.site()
> jPublish.Tags.site.setSite()
> jPublish.Data.

NetBeans Debug in JSP Tag Files

2003-08-14 Thread Shawn Zernik
Tomcat-Users:

I have the tag lib working.  Thanks again.

I was wondering if anyone could point me to a good tutorial on how to use
NetBeans with Tomcat that's running.  I can configure tomcat to allow debug
connections and connect using NetBeans, but once I'm online with the server
how do I trace through a JSP page?

Shawn


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



Custom Tag Lib

2003-08-14 Thread Shawn Zernik
Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Shawn
jPublish.Tags.site.doEndTag(): End

jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
INC
jPublish.Tags.site.doEndTag(): End

--- TOMCAT 4.1.27 STDOUT: db INC then Shawn ---
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.i

RE: Custom Tag Lib

2003-08-14 Thread Shawn Zernik
Mike:

I can't resolve that problem.  can I impliment those tags as simple tags:
the JSP spec says that they will not be cached or reused.

Shawn

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:59 PM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


Hi Shawn,

Actually, I wasn't aware that there was an option to disable it.  When I
figured out what was happening, I went ahead and handled it in my code.  No
telling how other application servers might handle it.  If you're only going
to be deploying on Tomcat, disabling pooling would probably save you some
time, but you still might want to handle it in your code to get better
performance.

Mike

-Original Message-----
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 11:41 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Custom Tag Lib


Mike:

Thanks so very much...  I saw their is a config option in the Jasper to
turn off tag pooling.  do you thing that would work too, of shouldI
impliment it in my source code.  I'm gonna take a look at it right now.

Shawn

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:28 PM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


Shawn,

I ran into this problem as well when switching from 4.0 to 4.1.  I think it
has something to do with 4.1 pooling and re-using tag objects.  What I did
in all of my doStartTag(), doAfterBody(), etc... methods was manually call
release() to reset the data in the tags like so:

public int doStartTag() throws JspException
{
  try
  {
...
  }

  catch (Exception exception)
  {
throw new JspException(exception);
  }

  finally
  {
release();
  }

  return SKIP_BODY;
}

Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
Internet Advertising Delivery Solutions
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346


-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Custom Tag Lib


Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
j

RE: security hole on windows tomcat?

2003-08-14 Thread Shawn Zernik
Mr. Sundling:

i'm running tomcat 4.1.27 and that does not appear to be an issue.  I used
"http://localhost:8080/jweb/left.jsp%20"; as my url.

-Original Message-
From: Spam Email [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 10, 2003 4:18 PM
To: [EMAIL PROTECTED]
Subject: security hole on windows tomcat?


I came across what appears to be a security hole when running tomcat.
I'm not sure how widespread it is, but my linux server is safe, yet my
windows XP, tomcat 4.1.24 is vulnerable.

I found that if you append %20 to a jsp page it shows the source code
instead of displaying the page:

http://192.168.1.54:8080/index.jsp  
http://192.168.1.54:8080/index.jsp%20 

So how widespread is this?

Paul Sundling


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



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



RE: NetBeans Debug in JSP Tag Files

2003-08-14 Thread Shawn Zernik
Here's the files...  They set it up but dont tell you how to use it.  It at
the botton of the page.

http://jakarta.apache.org/site/idedevelopers.html

-Original Message-
From: Carlos Cajina - Hotmail [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 5:19 PM
To: Tomcat Users List
Subject: Re: NetBeans Debug in JSP Tag Files


    Hi Shawn... Do you happen to have a How-To somewhere about integrating
Netbeans & Tomcat? :-) I don't want to use Netbeans' internal Tomcat server
and I've been struggling a little to use both together...

Regards,

Carlos

*** Oh, about your question, there's information at
http://developers.sun.com/tools/javatools/tips/tip02-05-17.html that I think
might be useful to you even if it's related to Forte for Java/Sun ONE Studio
(you might also want to check out the viewlet)...

----- Original Message -
From: "Shawn Zernik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 08, 2003 12:40 PM
Subject: NetBeans Debug in JSP Tag Files


> Tomcat-Users:
>
> I have the tag lib working.  Thanks again.
>
> I was wondering if anyone could point me to a good tutorial on how to use
> NetBeans with Tomcat that's running.  I can configure tomcat to allow
debug
> connections and connect using NetBeans, but once I'm online with the
server
> how do I trace through a JSP page?
>
> Shawn
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



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



RE: Processing .html files like JSPs

2003-08-20 Thread Shawn Zernik
It should have some setting in your web.xml to configure you context: exact
syntax, I'm unsure.  Look for "context" documentation.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 11:09 AM
To: [EMAIL PROTECTED]
Subject: Processing .html files like JSPs


In the app I'm working on there's a number JSP files that actually have the
extension .html.  Is there a way to configure Tomcat to treat these files
just as if they had the standard .jsp extension, or do I need to rely on
Apache rewrite rules?

I'm using Tomcat 4.1.27 on Linux.

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



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



RE: E-Mail to CompuServe Customer Service

2003-08-22 Thread Shawn Zernik
Someone needs to cancel this Compuserve email address.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: CompuServe Customer Service [mailto:[EMAIL PROTECTED]
Sent: Friday, August 22, 2003 11:15 AM
To: Tomcat Users List
Subject: E-Mail to CompuServe Customer Service


Thank you for your e-mail message to CompuServe Customer Service.
In order to improve our service to members, the general account
70006,101 ([EMAIL PROTECTED]) has now been replaced
with new mailboxes dedicated to each country/region.

Please re-send your message to one of the following e-mail
addresses and a local CompuServe Representative will respond to
you via e-mail:

United States and Canada:
Technical Support - [EMAIL PROTECTED]
General Support - [EMAIL PROTECTED]
Business Account Support - [EMAIL PROTECTED]

United Kingdom:
Technical Support - [EMAIL PROTECTED]
General Support - [EMAIL PROTECTED]
Business Account Support - [EMAIL PROTECTED]

Germany and Austria:
Technische Mitgliederbetreuung - [EMAIL PROTECTED]
Allgemeine Fragen - [EMAIL PROTECTED]
Fragen zur Abrechnung - [EMAIL PROTECTED]
Firmenkundenbetreuung - [EMAIL PROTECTED]

France:
Assistance Technique - [EMAIL PROTECTED]
Assistance Technique Mac - [EMAIL PROTECTED]
Gestion de votre Compte Personnel - [EMAIL PROTECTED]
Gestion de votre Compte Société - [EMAIL PROTECTED]


Netherlands:
Technical Support - [EMAIL PROTECTED]
General Support - [EMAIL PROTECTED]
Business Account Support - [EMAIL PROTECTED]

Switzerland:
Fragen zur Abrechnung (billing-issues) - [EMAIL PROTECTED]
Allgemeine Anfragen (general demands) - [EMAIL PROTECTED]
Technische Mitgliederbetreuung (technical support) - [EMAIL PROTECTED]
Firmenkundenbetreuung (CBA-issues) - [EMAIL PROTECTED]

All other European Countries:
Technical Support - [EMAIL PROTECTED]
General Support - [EMAIL PROTECTED]
Business Account Support - [EMAIL PROTECTED]

Japan - CompuServe/NIFTYServe:
General Support - [EMAIL PROTECTED]

Australia/Pacific:
General Support - [EMAIL PROTECTED]

Mexico:
General Support - [EMAIL PROTECTED]




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



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



RE: Java/JSP vs C#/.NET

2003-08-26 Thread Shawn Zernik
Lance:

100% Multi-Platform Support: Microsoft doesn't have it.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: Xingqun Jiang [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 4:57 PM
To: Tomcat Users List
Subject: Java/JSP vs C#/.NET


Hi,

I am a pure java supporter. I don't like C# or .Net because of Microsoft's
monopolization (sorry, kind of prejudice). However, I notice that more and
more people pick up C#/.NET due to their new advantages. I also heard that
C# is much faster than Java. My concern is, can Java/JSP still be
competitive to Microsoft's products? I don't like to see java be beaten by
Microsoft since it borrowed so many ideas from java to make up the so-called
"C#".

ok, feel free to talk about this topic.

Lance


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



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



RE: Simple question about JSP page

2003-09-05 Thread Shawn Zernik
you should post you tag code of the code for that page.  It can either be a
problem with your tag, or the connection pooling.  Try stopping and
restarting the app in the manager and see if that makes the updates take
affect.  If so, the issues is with re-use of objects and possible connection
pooling.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: engp0510 [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 9:31 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Simple question about JSP page


Hi,
Maybe it's a stupid question.
Built jsps for adding&searching with MySQL. First listing all existing
records in db and then adding a new one into database, then listing all
records again. Now the list is the same as previous.
How to solve it?

THX


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



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



Tomcat for FreeBSD

2004-04-10 Thread Shawn Zernik
Tomcat Gurus:

Is their a *current* version of Java/Tomcat that been assembled for FreeBSD
5.0?

Shawn Zernik
Internetwork Consulting


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



tomcat jk1.2 connector and IIS logging

2004-04-14 Thread Shawn Swistak
Hello,
 
I am using Tomcat-4.1.29 and the jk1.2 connector  (isapi_redirect.dll)
to interface with IIS 6.
 
Everything works wonderfully, except that IIS logs the cs-uri-stem as
the redirect dll (/jakarta/isapi_redirect.dl).  Is it possible to log
the actual redirected URL (i.e index.jsp)?  Without the actual URL the
IIS logs are pretty much useless.
 
Current Log Entry:
*
2004-03-29 00:12:53 555.55.55.555- GET /jakarta/isapi_redirect.dll - 200
22464
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.0.3705;+.N
ET+CLR+1.1.4322)
GUID=xx----x;+rdm%5Fv3=1;+UserID=<<http://xxx.x.com/xxx.jsp> >>>
 
Wanted Log Entry (/index.jsp):
*
2004-03-29 00:12:53 555.55.55.555- GET /index.jsp- 200 22464
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.0.3705;+.N
ET+CLR+1.1.4322)
GUID=xx----x;+rdm%5Fv3=1;+UserID=<<http://xxx.x.com/xxx.jsp> >>>
 
Thanks in Advance,
Shawn


mod_jk hangs

2004-05-05 Thread Shawn Wilson
Just yesterday we started running into problems requesting pages on our 
production website through mod_jk. Previously everything had been 
working fine for months. Essentially what happens is when you request 
the page for the first time (doesn't seem to matter what browser you're 
using) the browser just sits and spins. Then after hitting refresh 
(Ctrl+R) a couple times it finally comes up. Subsequent visits to the 
same page continue to work for me in Mozilla but after closing IE and 
reopening it after a couple more requests it hangs again. In case it 
helps, the site in question is http://www.atmreports.com.

I simply cannot figure out what is going on. I do see many errors in the 
mod_jk.log, but these had been there before when everything worked fine too:

[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (1137)]: Error reading 
reply from tomcat. Tomcat is down or network problems.
[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving 
from tomcat failed, recoverable operation. err=0
[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (1309)]: sending request to 
tomcat failed in send loop. err=0
[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (738)]: ERROR: can't 
receive the response message from tomcat, network problems or tomcat is 
down. err=-1

A few things to note, any of which may contribute to the problem but for 
the life of me I can't figure out how:

1. On Friday we just moved out datacenter to a new location. However we 
see this problem even internally at the location so I don't believe it 
is any sort of routing issue (and the problem didn't start until Tuesday).

2. The clock on this webserver was many hours off. On Tuesday (yes, the 
day the problems started) the clock was synchronized and the timezone 
correctly set so the machine now has correct time. This seems to be the 
most probable cause simply because it happened around the same time, but 
I just can't understand why or how.

3. Yesterday we rebooted the box to see if that would help. It did. We 
didn't have any more problems at all that day until this morning we see 
the problems again. Today we recycled just tomcat and that seems to have 
fixed it as well, though I expect that by tomorrow I will see the 
problem again.

4. I wouldn't think this could have anything to do with that new Sasser 
worm, but listing that just in case.

The machine is running Linux kernel 2.4.20-8 with httpd-2.0.40-21 and 
jakarta-tomcat-5.0.18. We are running 4 instances of tomcat on the box, 
each started with the following JVM options:

   -Xmn128M -Xmx1024M -Djava.awt.headless=true

Nothing having to do with configuration has changed at all in a long 
time. Here is the relevant configuration sections:

# Mod_jk (Tomcat connector)
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

...and later (in a  section)...

JKMount /myreports balancer
JKMount /myreports/* balancer
Here is our workers.properties file (comments removed):

workers.java_home=/usr/java/j2sdk1.4.2_03
ps=/
worker.list=balancer
worker.ajp13_0.port=8090
worker.ajp13_0.host=localhost
worker.ajp13_0.type=ajp13
worker.ajp13_0.lbfactor=1
worker.ajp13_1.port=8091
worker.ajp13_1.host=localhost
worker.ajp13_1.type=ajp13
worker.ajp13_1.lbfactor=1
worker.ajp13_2.port=8092
worker.ajp13_2.host=localhost
worker.ajp13_2.type=ajp13
worker.ajp13_2.lbfactor=1
worker.ajp13_3.port=8093
worker.ajp13_3.host=localhost
worker.ajp13_3.type=ajp13
worker.ajp13_3.lbfactor=1
worker.balancer.type=lb
worker.balancer.balanced_workers=ajp13_0, ajp13_1, ajp13_2, ajp13_3
worker.balancer.sticky_session=1
Any help would be greatly appreciated!

Thanks,
-shawn
--

Shawn Wilson [EMAIL PROTECTED]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806



smime.p7s
Description: S/MIME Cryptographic Signature


Re: mod_jk hangs

2004-05-05 Thread Shawn Wilson
Okay, here is the section from our server.xml in production:

  




  
  
  

  
I thought it interesting the comment that "this is here for 
compatibility only, not required." It sounds to me that connector is 
required if I want AJP/1.3 isn't it? I can't remember if that comment 
was there or if I (mistakingly) added it. Anyways, I see that I could 
probably do well to add the minSpareThreads and maxSpareThreads 
parameters. Any idea where I should look in my httpd.conf file to see 
what values to set these to?

Thanks,
-shawn
Randall Svancara wrote:

You might want to check to make sure you have enough tomcat threads for
each apache thread. 

I usually give tomcat a few more threads than apache just to make sure I
do not run out.  

---snip



   minSpareThreads="100" maxSpareThreads="300"
   protocol="AJP/1.3" />
---snip

So you might want to increase min and max spare threads to accomodate
more requestes from apache to tomcat via mod_jk. 

Randall 



-Original Message-
From: Shawn Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 05, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: mod_jk hangs
Just yesterday we started running into problems requesting pages on our 
production website through mod_jk. Previously everything had been 
working fine for months. Essentially what happens is when you request 
the page for the first time (doesn't seem to matter what browser you're 
using) the browser just sits and spins. Then after hitting refresh 
(Ctrl+R) a couple times it finally comes up. Subsequent visits to the 
same page continue to work for me in Mozilla but after closing IE and 
reopening it after a couple more requests it hangs again. In case it 
helps, the site in question is http://www.atmreports.com.

I simply cannot figure out what is going on. I do see many errors in the

mod_jk.log, but these had been there before when everything worked fine
too:
[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (1137)]: Error reading 
reply from tomcat. Tomcat is down or network problems.
[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving 
from tomcat failed, recoverable operation. err=0
[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (1309)]: sending request to

tomcat failed in send loop. err=0
[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (738)]: ERROR: can't 
receive the response message from tomcat, network problems or tomcat is 
down. err=-1

A few things to note, any of which may contribute to the problem but for

the life of me I can't figure out how:

1. On Friday we just moved out datacenter to a new location. However we 
see this problem even internally at the location so I don't believe it 
is any sort of routing issue (and the problem didn't start until
Tuesday).

2. The clock on this webserver was many hours off. On Tuesday (yes, the 
day the problems started) the clock was synchronized and the timezone 
correctly set so the machine now has correct time. This seems to be the 
most probable cause simply because it happened around the same time, but

I just can't understand why or how.

3. Yesterday we rebooted the box to see if that would help. It did. We 
didn't have any more problems at all that day until this morning we see 
the problems again. Today we recycled just tomcat and that seems to have

fixed it as well, though I expect that by tomorrow I will see the 
problem again.

4. I wouldn't think this could have anything to do with that new Sasser 
worm, but listing that just in case.

The machine is running Linux kernel 2.4.20-8 with httpd-2.0.40-21 and 
jakarta-tomcat-5.0.18. We are running 4 instances of tomcat on the box, 
each started with the following JVM options:

-Xmn128M -Xmx1024M -Djava.awt.headless=true

Nothing having to do with configuration has changed at all in a long 
time. Here is the relevant configuration sections:

# Mod_jk (Tomcat connector)
LoadModule jk_module modules/mod_jk.so

 JkWorkersFile /etc/httpd/conf/workers.properties
 JkLogFile /var/log/httpd/mod_jk.log
 JkLogLevel info
 JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 JkRequestLogFormat "%w %V %T"

...and later (in a  section)...

 JKMount /myreports balancer
 JKMount /myreports/* balancer
Here is our workers.properties file (comments removed):

workers.java_home=/usr/java/j2sdk1.4.2_03
ps=/
worker.list=balancer
worker.ajp13_0.port=8090
worker.ajp13_0.host=localhost
worker.ajp13_0.type=ajp13
worker.ajp13_0.lbfactor=1
worker.ajp13_1.port=8091
worker.ajp13_1.host=localhost
worker.ajp13_1.type=ajp13
worker.ajp13_1.lbfactor=1
worker.ajp13_2.port=8092
worker.ajp13_2.host=localhost
worker.ajp13_2.type=ajp13
worker.ajp13_2.lbfactor=1
worker.ajp13_3.port=8093
worker.ajp13_3.host=

Re: mod_jk hangs

2004-05-05 Thread Shawn Wilson
Looks like the maximum for everyting in my config was 150 so I'll try 
setting maxSpareThreads for Tomcat to 150 as well. If this is indeed the 
cause of the problem, any idea why it would just start happening 
yesterday after months without problem? My only guess is that perhaps we 
just happened to reach some threshold of traffic yesterday that we never 
did before. Actually, that may indeed be the case since we usually get a 
surge of traffic during the beginning of a month.

Thanks,
-shawn
Randall Svancara wrote:

Well, that depends on what platform and how apache was compiled.  As I
understand on windows, apache uses the mpm modules and unix it uses
forking or it can use mpm.  You need to find the section for you
platform and make the ajustments as neccessary.  Below is the section
where you need to look in your apache configuration file, usually called
httpd.conf, but i have seen them named apache.conf (gentoo anyone).  But
you can see the min and max spare servers/threads listed in each
section.  Just adjust accordingly.  

I hope this helps.




StartServers 75
MinSpareServers  75
MaxSpareServers 300
MaxClients 300
MaxRequestsPerChild  0

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server
process
# MaxRequestsPerChild: maximum number of requests a server process
serves

StartServers 75
MaxClients 300
MinSpareThreads 75
MaxSpareThreads 300
ThreadsPerChild 25
MaxRequestsPerChild  0

# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server
process
# MaxRequestsPerChild: maximum number of connections per server process

NumServers   75
StartThreads 75
MinSpareThreads  75
MaxSpareThreads 300
MaxThreadsPerChild  20
MaxRequestsPerChild  0

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server
process
# MaxRequestsPerChild: maximum  number of requests a server process
serves

ThreadsPerChild 250
MaxRequestsPerChild  0





-Original Message-
From: Shawn Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 05, 2004 10:21 AM
To: Tomcat Users List
Subject: Re: mod_jk hangs
Okay, here is the section from our server.xml in production:

   
 
 
 
 
   
   
   
 
   
I thought it interesting the comment that "this is here for 
compatibility only, not required." It sounds to me that connector is 
required if I want AJP/1.3 isn't it? I can't remember if that comment 
was there or if I (mistakingly) added it. Anyways, I see that I could 
probably do well to add the minSpareThreads and maxSpareThreads 
parameters. Any idea where I should look in my httpd.conf file to see 
what values to set these to?

Thanks,
-shawn
Randall Svancara wrote:


You might want to check to make sure you have enough tomcat threads
for

each apache thread. 

I usually give tomcat a few more threads than apache just to make sure
I

do not run out.  

---snip

   
   
  minSpareThreads="100" maxSpareThreads="300"
  protocol="AJP/1.3" />
---snip

So you might want to increase min and max spare threads to accomodate
more requestes from apache to tomcat via mod_jk. 

Randall 



-Original Message-
From: Shawn Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 05, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: mod_jk hangs
Just yesterday we started running into problems requesting pages on
our 

production website through mod_jk. Previously everything had been 
working fine for months. Essentially what happens is when you request 
the page for the first time (doesn't seem to matter what browser
you're 

using) the browser just sits and spins. Then after hitting refresh 
(Ctrl+R) a couple times it finally comes up. Subsequent visits to the 
same page continue to work for me in Mozilla but after closing IE and 
reopening it after a couple more requests it hangs again. In case it 
helps, the site in question is http://www.atmreports.com.

I simply cannot figure out what is going on. I do see many errors in
the

mod_jk.log, but these had been there before when everything worked
fine

too:

[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (1137)]: Error reading 
reply from tomcat. Tomcat is down or network problems.
[Wed May 05 09:27:46 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving


f

RE: [Q] Tomcat & ZoneAlarm?

2003-12-29 Thread Shawn Zernik
Riaan:

If you are using windows XP you are better off setting the port with the
firewall build into XP.  To do this go into network, right click the adapter
and you should be able to find the fire wall setting there.  you can tell it
to deny all except...  The except is what you would be interested in.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: Riaan Oberholzer [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 1:58 PM
To: Tomcat Users List
Subject: Re: [Q] Tomcat & ZoneAlarm?


Thanks... I know what a firewall is and what it does.
Problem is, with the free version of ZoneAlarm you
cannot manually specify ports to allow access on. I
know you CAN get it to work, but how I do not know.

I need the firewall. It is my home PC on a ADSL
connection, permanently connected to the internet. So
I use it for basicly everything I do on the internet.



--- Philipp Taprogge <[EMAIL PROTECTED]> wrote:
> Hi!
>
> Riaan Oberholzer wrote:
> > This is not a Tomcat issue, but I've tried
> desperately
> > and could find no answer elsewhere... can someone
> > please tell me how to get Tomcat working with
> > ZoneAlarm (free version) as firewall?
>
> In general, it is very advisable to know what a
> firewall does and how
> it works before installing one. In general,
> ZoneAlarm is a (rather
> simple) packet filter, i.e. a piece of software that
> examines network
> packets as they arrive at or depart from the machine
> and decides on a
> set of rules to allow or deny them. If you want a so
> protected machine
> to run tomcat and access it from beyond the
> firewall, you need to add
> a rule that allows requests from external sources
> directed at port 80
> (or whatever you set your tomcat to listen on) on
> the local machine
> and also to allow the responses from tomcat to any
> external host.
> If you want to use SSL, you will have to allow those
>
> request/response-pairs as well.
> You should, however concider wether you really need
> a firewall, if
> your machine is a pure server that does not serve
> other purposes. In
> that case, you should just close all ports you don't
> need. A closed
> port is no risk and if the listening software has
> flaws, a firewall
> wouldn't protect you either.
>
> HTH
>
>   Phil
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



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



Tomcat 5.0 as JK Mod

2003-12-30 Thread Shawn Zernik
Tomcat Guru's:

I was wondering where the documentation to install Tomcat as a module in
Apache HTTPd?  The Project is JK, but when I go to the JK docs, it bringsme
to the binary dist.  Any URL would be appreciated.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net


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



Tomcat 5 with Apache2

2003-12-30 Thread Shawn Zernik
rce)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)


My workers2.properties file is as follows:

[logger]
level=DEBUG

[config:]
#file=${serverRoot}/conf/workers2.properties
file=c:/Apache2/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=${serverRoot}/logs/jk2.shm
size=100
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0

# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[lb:lb]
info=Default load balancer.
debug=0

#[lb:lb_1]
#info=A second load balancer.
#debug=0

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009

#[channel.socket:localhost:8019]
#info=A second tomcat instance.
#debug=0
#tomcatId=localhost:8019
#lb_factor=1
#group=lb
#group=lb_1
#disabled=0

#[channel.un:/opt/33/work/jk2.socket]
#info=A second channel connecting to localhost:8019 via unix socket
#tomcatId=localhost:8019
#lb_factor=1
#debug=0

[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess

[status:]
info=Status worker, displays runtime informations

[vm:]
info=Parameters used to load a JVM in the server process
#JVM=C:\jdk\jre\bin\hotspot\jvm.dll
#OPT=-Djava.class.path=c:/Tomcat/bin/*
#OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/com
mons-logging.jar
#OPT=-Djava.class.path=c:/Tomcat/bin/*;C:/Tomcat/server/lib/*;C:/Tomcat/comm
on/lib/*;
OPT=-Djava.class.path=C:/Tomcat/bin/tomcat-jni.jar;C:/Tomcat/server/lib/tomc
at-jk2.jar;C:/Tomcat/server/lib/commons-logging.jar;C:/Tomcat/common/lib/com
mons-collections.jar;C:/Tomcat/common/lib/naming-common.jar;C:/Tomcat/common
/lib/naming-resources.jar;C:/Tomcat/server/lib/catalina.jar;C:/Tomcat/server
/lib/commons-digester.jar;C:/TomCat/server/lib/commons-beanutils.jar;C:/Tomc
at/server/lib/mx4j-jmx.jar;C:/Tomcat/server/lib/commons-modeler.jar;C:/Tomca
t/common/lib/servlet.jar;C:/Tomcat/server/lib/tomcat-http11.jar;C:/Tomcat/se
rver/lib/servlets-invoker.jar;C:/Tomcat/server/lib/servlets-default.jar;C:/T
omcat/server/lib/servlets-webdav.jar;C:/Tomcat/server/lib/servlets-manager.j
ar;C:/Tomcat/server/lib/servlets-common.jar;c:/j2sdk/j2sdk1.4.2/lib/tools.ja
r;c:/tomcat/bin/BootStrap.jar;c:/tomcat/server/lib/tomcat-util.jar;c:/tomcat
/server/lib/tomcat-coyote.jar
OPT=-Dtomcat.home=c:\Tomcat
OPT=-Dcatalina.home=c:\tomcat
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=0


[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
disabled=0
stdout=c:/Apache2/logs/stdout.log
stderr=c:/Apache2/logs/stderr.log

[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=0

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

#[uri:127.0.0.1:8003]
#info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test
it
#alias=myVirtualHost:8003

#[uri:127.0.0.1:8003/ex]
#info=Example webapp in the virtual host. It'll go to lb_1 ( i.e.
localhost:8019 )
#context=/ex
#group=lb_1

#[uri:/examples]
#info=Example webapp in the default context.
#context=/examples
#debug=0

#[uri:/examples1/*]
#info=A second webapp, this time going to the second tomcat only.
#group=lb_1
#debug=0

#[uri:/examples/servlets/*]
#info=Prefix mapping

#[uri:/examples/*.jsp]
#info=Extension mapping

#[uri:/examples/*]
#info=Map the whole webapp

#[uri:/examples/servlets/HelloW]
#info=Exampel with debug enabled.
#debug=10

[uri:/jsp-examples]
context=/jsp-examples
debug=0

[uri:/admin]
context=/admin
debug=0

[uri:/manager]
context=/manager
debug=0

[uri:/tomcat]
context=/tomcat-docs
debug=0

The other properties file is verbatum what the documentation says.  I just
had to uncomment some lines from the exitsting files.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net


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



RE: MOD JK NOT SUCESSFUL

2003-12-31 Thread Shawn Zernik
Hey:

After playing with it for some time, I found the following VERY useful
(http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html).  It's
probably a run of the mill solution, but I'm not complaining for development
perposes.  I followed these directions and am using Tomcat throug socks, not
JNI. That means tomcat needs to be running, and your workers2.properties
would look something like this:

=

[logger]
level=DEBUG

[config:]
file=c:/Apache2/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=c:/apache2/logs/jk2.shm
size=1048576
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009

[status:]
info=Status worker, displays runtime informations

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:/jsp-examples/*]
context=/jsp-examples
debug=0

[uri:/admin/*]
context=/admin
debug=0

[uri:/manager/*]
context=/manager
debug=0



Every thing else should work just as their directions state.  I'm using
Tomcat5 and Apache2 on XP.  If I try to do the JNI method, I run into hords
of Java errors that are very discouraging and don't speak for managability
of Java: sorry, I'm a little jaded on java right this moment.  Maybe when I
start programming my oppinion will change.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: Suneel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 11:08 PM
To: Tomcat Users List
Subject: MOD JK NOT SUCESSFUL


hi
  i am not able to run Mod JK with
 apache1.3.29/2.0.48 with Tomcat 4.1.29 on RH 9.0. I have followed John
Turners how to and all attempts have failed. The problem is that i am not
getting the SO for the version above. There are various links on the net
that finally fall to the Jakarta binary list. Which dose not work for my
config. i really need to get this working as i have been assigned the
reponsibilty to integrate apache and tomcat. Please help

regards
suneel



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



RE: Regarding Tomcat Start

2003-09-27 Thread Shawn Zernik
What version of windows are you running, and you might want to at the
"pause" command in the batch file so it6 does not disappear to keep the data
from eunning off the screen.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 27, 2003 11:54 AM
To: Tomcat Users List
Subject: Regarding Tomcat Start


I have installed jakarta-tomcat-5.0.12. I set jdk and catalina path. I open
a
command prompt, move to the bin directory of tomcat. I run startup.bat. It
opens another prompt that vanishes in seconds. I dont see anything wrong
(warning or error message) at original command prompt.
I move to localhost in browser. Nothing loads up on browser !
How do i know whether tomcat has really started or not ? (I tried to look at
services running, it does not show up there)
I tried to see log floder, but it is just empty. I tried to run shutdown bat
file. It says, connection not found ! Does it help in answering my question?
I am using Windows XP Operating System.
Regards
~Vishal




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



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



RE: Regarding Tomcat Start

2003-09-28 Thread Shawn Zernik
Vishal:

go through the batch file (.bat) and add PAUSE followed by and enter after
the tomcat or java command to see their responces.  Batch filesare just a
series of DOS command made to run in order.  It has a GOTO statments and
enviorment vars for varibles.  The %1 %2 %3 represent the first command line
argument, the soncond, and the third.  It has if statments.  Just follow it
throug and add some pauses, that'll cuase it to wiat for you to press a key
alowing you to see the error messages.

The second command prompt window is called through the first batch fil
through the CMD command.  Look for the CMD or other betch files and add
pauses to those files.  It's calling another command prompt to free the one
you in when Tomcat starts.  This second command prompt is probably giving an
error like "Port already in use" or something else.  Adding the pause will
allow you to see these errors.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 27, 2003 11:54 AM
To: Tomcat Users List
Subject: Regarding Tomcat Start


I have installed jakarta-tomcat-5.0.12. I set jdk and catalina path. I open
a
command prompt, move to the bin directory of tomcat. I run startup.bat. It
opens another prompt that vanishes in seconds. I dont see anything wrong
(warning or error message) at original command prompt.
I move to localhost in browser. Nothing loads up on browser !
How do i know whether tomcat has really started or not ? (I tried to look at
services running, it does not show up there)
I tried to see log floder, but it is just empty. I tried to run shutdown bat
file. It says, connection not found ! Does it help in answering my question?
I am using Windows XP Operating System.
Regards
~Vishal




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



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



RE: Why should i use Tomcat vs .NET?

2003-10-10 Thread Shawn Zernik
Linux web servers have a lower cost or ownership -> Topcat is a Linux
solution with about the same features as ASPX.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-Original Message-
From: Eduardo Vazquez [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 10:48 AM
To: [EMAIL PROTECTED]
Subject: Why should i use Tomcat vs .NET?


I work for a small company which is seriously considering the .NET route
moving into the future. My mission if I chose to accept is to sway popular
opinion towards Tomcat (Jakarta) for reasons I've yet to summarize because I
can't confidently regurgitate any (I'm new to Linux/Tomcat for the most
part). Is there anyone who has made this argument yet? Are there anyone have
a url with the comparison done already or a list of reasons why .NET isn't
optimal versus the other options or on the flip side of that; why tomcat
rocks? Any help would be appreciated; I'm not looking forward to becoming
even more reliant on one company.



Thanks in advance,

Eduardo



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



Website Performance Clocking

2003-10-15 Thread Shawn Zernik
TomCat Admins:

I am having server performnce issues with my site and was wondering if their
is a website perfoance tacking software that when given a URL will request
all the files referance in that URL like a web browser and track 1) server
responce time, and 2) transfer rate for each file.  some thing that is
command line driven would be best so I can add it to Windows' scheduler.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net


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



Website Throughput

2003-10-16 Thread Shawn Zernik
Is their a program that will report the throuput of a website?

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net 

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



MBean server?

2002-11-25 Thread Shawn Wilson
I have the following packages installed on a RedHat 7.3 box:

   tomcat4-4.1.12-full.2jpp
   tomcat4-admin-webapps-4.1.12-full.2jpp

Tomcat starts up fine and I can log into the admin app without problem. 
However, the moment I try to do anything in the admin app I get a "HTTP 
Status 503 - Servlet action is currently unavailable" error, and I see 
this in my catalina.out log file:

javax.servlet.UnavailableException: MBeanServer is not available
at 
org.apache.webapp.admin.ApplicationServlet.initServer(Unknown Source)
at org.apache.webapp.admin.ApplicationServlet.getServer(Unknown 
Source)
at org.apache.webapp.admin.TomcatTreeBuilder.buildTree(Unknown 
Source)
at org.apache.webapp.admin.SetUpTreeAction.perform(Unknown Source)
at 
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
...
...

What does this exception mean, and what do I need to do to get the admin 
app running?

Thanks,
-shawn

--
====
Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806



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



Re: Admin Webapp Problems (WAS: MBean server?)

2002-11-26 Thread Shawn Wilson
Hi Bill,

Thanks for the info. I checked, but there isn't any xerces jar in 
$CATALINA_HOME/common/endorsed... only jaxp_parser_impl.jar and 
xml-commons-apis.jar. This was just a basic RPM install of Tomcat along 
with the admin webapps. Also, the exception trace I posted _was_ from 
catalina.out, so that's as detailed as it gets.

By the way, what is this MBean server it is looking for anyways?

Thanks,
-shawn

Bill Barker wrote:
I'm guessing that there is a more informative message in 'catalina.out', and
that the problem is that 4.1.12 doesn't work with xerces-2.2.x (other than
'nightly').  Replace the xerces jars in $CATALINA_HOME/common/endorsed with
the 2.1.0 version, and it should be fine.

"Shawn Wilson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


I have the following packages installed on a RedHat 7.3 box:

   tomcat4-4.1.12-full.2jpp
   tomcat4-admin-webapps-4.1.12-full.2jpp

Tomcat starts up fine and I can log into the admin app without problem.
However, the moment I try to do anything in the admin app I get a "HTTP
Status 503 - Servlet action is currently unavailable" error, and I see
this in my catalina.out log file:

javax.servlet.UnavailableException: MBeanServer is not available
at
org.apache.webapp.admin.ApplicationServlet.initServer(Unknown Source)
at org.apache.webapp.admin.ApplicationServlet.getServer(Unknown
Source)
at org.apache.webapp.admin.TomcatTreeBuilder.buildTree(Unknown
Source)
at org.apache.webapp.admin.SetUpTreeAction.perform(Unknown


Source)


at



org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va)


at
org.apache.struts.action.ActionServlet.process(ActionServlet.java)
at


org.apache.struts.action.ActionServlet.doGet(ActionServlet.java)


at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
...
...

What does this exception mean, and what do I need to do to get the admin
app running?

Thanks,
-shawn

--

Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806








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


--

Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806



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




Re: Admin Webapp Problems (WAS: MBean server?)

2002-12-02 Thread Shawn Wilson
Okay, this was just dumb on my part. When I installed Tomcat I installed 
the tomcat-noexamples and tomcat-admin RPM's. However, I noticed that 
installing Tomcat on a different machine (with examples), the first 
section in the server.xml file having to do with (believe it or not!) 
MBean server was not commented out like it was in the noexamples 
server.xml file. So basically that's all the problem was... if I had 
looked at server.xml more closely sooner I could have saved myself lots 
of frustration!

Thanks for all the help,
-shawn

Jacob Kjome wrote:
Hi Shawn,

I'd recommend installing the full non-RPM version that includes all necessary
jars.  In that version, you will see the following files in
common/endorsed:

xercesImpl.jar
xmlParserAPIs.jar

What Bill says it correct, though.  The Xerces version that come with
Tomcat causes problems with Struts apps because of an XML parsing bug
in Xerces which was recently fixed.  You can either do as he says and
go back to using 2.1.0 version or move to the latest jars which
contain the fix:
http://gump.covalent.net/jars/latest/xml-xerces2/


Otherwise, you could also check the xml commons to grab a
xml-commons-api's jar that contains an earlier version of the xerces
packages equivalent to the 2.1.0 release.
http://xml.apache.org/commons/


Jake


Tuesday, November 26, 2002, 10:05:27 AM, you wrote:

SW> Hi Bill,

SW> Thanks for the info. I checked, but there isn't any xerces jar in 
SW> $CATALINA_HOME/common/endorsed... only jaxp_parser_impl.jar and 
SW> xml-commons-apis.jar. This was just a basic RPM install of Tomcat along 
SW> with the admin webapps. Also, the exception trace I posted _was_ from 
SW> catalina.out, so that's as detailed as it gets.

SW> By the way, what is this MBean server it is looking for anyways?

SW> Thanks,
SW> -shawn

SW> Bill Barker wrote:

I'm guessing that there is a more informative message in 'catalina.out', and
that the problem is that 4.1.12 doesn't work with xerces-2.2.x (other than
'nightly').  Replace the xerces jars in $CATALINA_HOME/common/endorsed with
the 2.1.0 version, and it should be fine.

"Shawn Wilson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...



I have the following packages installed on a RedHat 7.3 box:

  tomcat4-4.1.12-full.2jpp
  tomcat4-admin-webapps-4.1.12-full.2jpp

Tomcat starts up fine and I can log into the admin app without problem.
However, the moment I try to do anything in the admin app I get a "HTTP
Status 503 - Servlet action is currently unavailable" error, and I see
this in my catalina.out log file:

javax.servlet.UnavailableException: MBeanServer is not available
   at
org.apache.webapp.admin.ApplicationServlet.initServer(Unknown Source)
   at org.apache.webapp.admin.ApplicationServlet.getServer(Unknown
Source)
   at org.apache.webapp.admin.TomcatTreeBuilder.buildTree(Unknown
Source)
   at org.apache.webapp.admin.SetUpTreeAction.perform(Unknown


Source)



   at



org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va)



   at
org.apache.struts.action.ActionServlet.process(ActionServlet.java)
   at


org.apache.struts.action.ActionServlet.doGet(ActionServlet.java)



   at javax.servlet.http.HttpServlet.service(HttpServlet.java)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
...
...

What does this exception mean, and what do I need to do to get the admin
app running?

Thanks,
-shawn

--

Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806








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








--

Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806



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




Removing files from /lib

2002-08-28 Thread Shawn Wilson

I must not be understanding completely the way the classloaders work under
Tomcat. I thought that if I stop a webapp through the manager application
that should unload its jar files. However, even after it's stopped, I find
that log4j jar file is locked so I can't remove it.

Why would that one file be locked but the others not?

-shawn

====
Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806




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




RE: Removing files from /lib

2002-08-28 Thread Shawn Wilson

It is in WEB-INF/lib, which is why I thought it would be unlocked when I
stop that webapp.

-shawn


Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806



> -Original Message-
> From: Andrew Conrad [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 10:44 AM
> To: 'Tomcat Users List'
> Subject: RE: Removing files from /lib
>
>
> Where are you keeping log4j?  Is it in common/lib or some place such as
> that or is it stored in you WEB-INF/lib folder?
>
> >From my understanding if it's in common or shared, then unloading the
> webapp won't release the files, since webapps inherit common and shared
> classloaders, they don't actually create them.
>
> - Andrew
>
> > -Original Message-
> > From: Shawn Wilson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 28, 2002 12:05 PM
> > To: tomcat
> > Subject: Removing files from /lib
> >
> >
> > I must not be understanding completely the way the
> > classloaders work under Tomcat. I thought that if I stop a
> > webapp through the manager application that should unload its
> > jar files. However, even after it's stopped, I find that
> > log4j jar file is locked so I can't remove it.
> >
> > Why would that one file be locked but the others not?
> >
> > -shawn
> >
> > 
> > Shawn Wilson [[EMAIL PROTECTED]]
> > Software Developer, ATMReports.com
> > PH: 877-327-0873, FAX: 406-294-5806
> > 
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-> [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



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




Tomcat memory usage

2002-08-28 Thread Shawn Wilson

Here's are tomcat version: Apache Tomcat/4.0.4-b3

We've had it running for a while now and I just noticed that it is using a
lot of memory! 142MB physical and 600MB virtual.

I'm wondering if there is any way I can tell what webapp is consuming this
memory? I've disabled all webapps but /manager and two others, but the
memory usage did not go down.

Thanks,
-shawn

====
Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806




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




Announcement: JSP Standard Tag Library (JSTL)

2002-06-22 Thread Shawn Bayern

Tomcat users,

You might have heard about the JSP Standard Tag Library (JSTL), which is a
new standard under the Java Community Process.  JSTL 1.0 was finalized at
the end of May 2002, and its reference implementation was released as part
of Sun's Web Services Developer Pack (WDSP) earlier this month.

The goal of JSTL 1.0 is to simplify the development of JSP pages by
standardizing tags for the following tasks:

   - control flow (iteration, conditional logic, and error handling)
   - URL management (session encoding, cross-context imports, etc.)
   - text formatting and internationalization (i18n)
   - XML manipulation (with XPath)
   - database access (via JDBC)

JSTL also offers an expression language for accessing scoped attributes,
request parameters, and other data.  (This expression language is planned
to be the basis of a core addition to JSP 2.0.)  Using JSTL tags and the
new expression language, you can often avoid scripting elements
("scriptlets" and scripting expressions) in your pages.

JSTL works with a number of different models for web development.  Users
of a "model 2" approach will probably appreciate JSTL's expression
language and core tags for control flow; prototypers and developers of
small applications may appreciate its SQL tags.  Personally, I find JSTL's
XML tags to offer a convenient, powerful alternative to XSLT for many
common XML-manipulation tasks.  And JSTL also offers an API for
programmers who wish to configure JSTL and expose data for their JSP
pages.

I'm sending this message to announce that Jakarta Taglibs has just
released version 1.0 of its "Standard Taglib," an implementation of JSTL.
(The implementation at Jakarta Taglibs is also the basis for Sun's
reference implementation of JSTL.)  You can download the 1.0 release of
the Standard Taglib at

   http://jakarta.apache.org/builds/jakarta-taglibs/releases/standard/

The Standard Taglib requires JSP 1.2; it has been tested with Tomcat
4.0.4.  (Earlier versions of Tomcat may have trouble loading the JAXP 1.2
classes included with our distribution, so I recommend using Tomcat 4.0.4.  
A set of older XML files is available from the URL above if you want to
use an older version of Tomcat.)

I'm happy to answer questions that you have about JSTL; for detailed
discussion, you might be interested in joining the 'taglibs-user' mailing
list at Jakarta; see

http://jakarta.apache.org/site/mail.html

for instructions on how to do so.

For general information about JSTL, as well as a link to the formal
specification, pointers to upcoming books on JSTL, and current articles,
see

http://java.sun.com/products/jsp/jstl/

If you have any comments for future versions of JSTL, you can submit them
to our expert group by mailing [EMAIL PROTECTED]

Enjoy,

-- 
Shawn Bayern
JSTL reference implementation lead
Author, "JSTL in Action"   http://www.manning.com/bayern   (July 2002)


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




Migration from 3.3a to 4.0.4

2002-07-09 Thread Shawn Church

I am new to Tomcat 4, and I am trying to move an existing webapp from 3.3a to 4.0.4.  
I am using Apache as the web server, but I am not quite clear on which portions of 
Tomcat relate specifically to the stand-alone web server configuration versus general 
webapp serving through a connector (Warp or AJP).  For example, the Host container is 
used to define virtual hosts, but is this necessary if Apache is handling the virtual 
hosting?

Any general comparison or migration steps of Tomcat 3.3 to Tomcat 4 would be helpful.  
Currently I have multiple Apache virtual hosts served by multiple Tomcat instances 
(with multiple server.xml, etc.) and everything works fine (in 3.3a).  

Thanks,
Shawn



[Fwd: Enhydra: Enhydra Enterprise Beta 1 Milestone]

2001-03-30 Thread Shawn McMurdo

FYI, Enhydra Enterprise embeds Tomcat 3.2.1 as it's Servlet
and JSP engine.
Tomcat is the "best of breed" open source servlet engine with
some great developers working on it.
Shawn

--
Shawn McMurdo  mailto:[EMAIL PROTECTED]
Lutris Technologieshttp://www.lutris.com
Enhydra.Orghttp://www.enhydra.org




We are happy to announce the first beta milestone release of Enhydra
Enterprise (EE). The prebuilt package is available immediately from
http://enterprise.enhydra.org/software/downloads/index.html We encourage
evaluators and developers using 'alpha' versions to change to this version.

Enhydra Enterprise represents the next generation of application server. It
is structured as an "operating system of the Internet," with a kernel that
provides some essential facilities and a mechanism for selecting additional
services to provide configurable platform functionality. We call the overall
structure the Enhydra Services Architecture (ESA). ESA services can be
deployed at runtime, and started on demand. This allows the deployer to
choose just the services required for a particular deployment, and supports
runtime upgrading of services. We aim to offer a trading post for ESA
services, and we encourage the contribution of services to the community.

In this milestone build we have aggregated a set of API-implementing
services on top of the J2SE 1.3 platform, providing many of those APIs
required by the J2EE[TM] specification: Servlet 2.2, JSP[TM] 1.1, EJB[TM]
1.1, JNDI[TM] 1.2, JDBC[TM] 2.0 with optional package, JTA[TM] 1.0.1. The
configuration includes other APIs, as well as services for deployment,
service initialization, and versioned library support. This sample
configuration lets you write portable enterprise-scale applications.

You can imagine many different configurations and platforms being built on
the Enhydra Enterprise project modular architecture. For example, one
collection of ESA services might be equivalent to Enhydra 3.x today (perhaps
JNDI, JDBC, and Servlet/JSP Container). Another collection of services might
be a communications server (perhaps JNDI, SOAP, BXXP, XML/RPC, etc).
Finally, yet another might be a messaging server (perhaps JNDI, JMS, etc).
When you add a new service to the EE platofrm, that new service can be
available to some or all of the applications running on the platform;
visibility is under your per-application control. We hope that the ability
to create new cross-application services will allow for us all to benefit
from radical customization of the concept of what an application server is
and can be.

What It Does:

The beta 1 configuration of EE provides services and APIs needed by
web-interfaced applications (as described abAlso, tve). It can be run on a
range of deployment configurations, from standalone laptop to multi-tier
multi-machine setups. It includes its own web server, or it can be connected
to a third-party web server front end. EE also includes the complete Enhydra
Application Framework from previous Enhydra versions (most recently Enhydra
3.1); the XMLC ver 2.0 tool for separating web page presentation design from
dynamic data programming; and the Kelp toolset for building applications in
third-party IDEs. There are several examples included showing how to run
J2EE-style applications (including Sun's PetStore demo app) and how to write
your own services. We have run this configuration on Windows NT/2000, RedHat
Linux 6.1, and Solaris 2.7.

The server maintains all configuration information directly in a persistent
JNDI namespace for unified management and rapid system restart. Server
management is provided through JMX-compatible MBeans, exposed through the
Enhydra Web Console. This release begins integration of the Enhydra
Authorization and Authentication Library (EAAL) which will provide JAAS-like
security throughout the server, even when we incorporate J2SE1.2 support.

What It Doesn't Do Yet:

Some of the EE Alpha 4 codebase has not yet been ported to the new ESA-based
server: most importantly, JMS is not yet available. The J2EE API set is not
yet complete. Some capabilities are only partially implemented (in the
security work, for example, permission checking is only partially
implemented, we need more LoginModules, and the toolset is not yet started).
We need to complete the J2EE set of capabilities as a proof of adequacy of
the server, and add more samples as proof of flexibility. Specific current
versions and limitations are listed in the Release Notes, and should be
reflected in the ongoing TODO.txt list.

What You Can Do:

We hope the Enhydra community will lend a hand in shaking down and building
up the new server; there is room for contribution in every part of the
effort. As you begin to use the server, please note bugs and what needs to
be made better, and tell us on the mailto:[EMAIL PROTECTED] mail
list - or fix it yourself (see the various Working Groups to d

IIS/Tomcat - Error: The specified module could not be found.

2002-03-11 Thread Shawn Lindstrom

Hello,

I'm a newcomer to Tomcat.  I have installed v3.3a on Win2k w/ the
isapi_redirect.dll.  I have followed the IIS HowTo to the letter.

I have the green up arrow indicating the filter is working, but something
must be amiss elsewhere and I'm at wits end -- I'm sure it's something
simple and I apologize if this has been answered here before.

Any ideas?

Thanks!
Shawn


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Tomcat port 8080, Apache port 80, jsp?

2001-08-16 Thread Shawn Evans

Here is a simple question... how do I get apache on port 80 to send jsp
requests to the Tomcat server and respond back on port 80.  The reason why I
want to do this is becuase where I work, all ports are blocked except port
80, but I have an applet that needs to get data from the jsp pages.

Shawn



Re: Tomcat port 8080, Apache port 80, jsp?

2001-08-16 Thread Shawn Evans

I am running the latest 4.0(7) and I cannot find the DLL for it.  Does
anyone know where I can d-load one... I know I know NT, but my office is
buying me a new Linux server.


- Original Message -
From: "David Cassidy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 9:14 AM
Subject: Re: Tomcat port 8080, Apache port 80, jsp?


> have a look at mod_jk ?
>
>
>
> Shawn Evans wrote:
> >
> > Here is a simple question... how do I get apache on port 80 to send jsp
> > requests to the Tomcat server and respond back on port 80.  The reason
> > why I
> > want to do this is becuase where I work, all ports are blocked except
> > port
> > 80, but I have an applet that needs to get data from the jsp pages.
> >
> > Shawn
>



Re: Tomcat port 8080, Apache port 80, jsp?

2001-08-16 Thread Shawn Evans

   I read "Installing mod_webapp and using it with Apache 1.3" written by
you, and I have been unsuccessful in getting it to work.  Here is my
configuration:

Win NT4.0 sp6
Apache 1.3.20 d:\webserver\Apache
Tomcat 4.0.7b d:\webserver\Tomcat-4.0.7

   First, I copied 'mod_webapp.so' and 'libapr.dll' to my apache\modules,
then I added this to my httpd.conf

[...]
#AddModule mod_actions.c mod_setenvif.c mod_isapi.c
AddModule mod_webapp.c
[...]
#LoadModule usertrack_module modules/mod_usertrack.so
LoadModule webapp_module modules/mod_webapp.so
[...]
WebAppConnection conn warp localhost:8008
WebAppDeploy examples conn  /examples
WebAppInfo /webapp-info
[...]

   I kick Apache off as a service (Tomcat is already running as a service)
and here is the error that I get "Error 2140:An internal Windows NT error
occurred"... I am able to run Tomcat 4.0.7 as a service without Apache...
and Apache runs fine when I comment out the 5 lines I added above, but I
need to get them working in sequence with one another.

Shawn
- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Shawn Evans"
<[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 1:14 PM
Subject: Re: Tomcat port 8080, Apache port 80, jsp?


>
>
> On Thu, 16 Aug 2001, Shawn Evans wrote:
>
> > I am running the latest 4.0(7) and I cannot find the DLL for it.  Does
> > anyone know where I can d-load one... I know I know NT, but my office is
> > buying me a new Linux server.
> >
>
> I assume you're talking about the mod_webapp connector, right?
>
>   http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b7/bin/
>
> then select "webapp-module-1.0-tc40b7-windows.zip" for the Windows
> connector.
>
> Other files in this directory contain the compiled connector for other
> platforms (Linux, MacOSX, and Solaris/SPARC for now).
>
> Craig McClanahan
>
>
> >
> > - Original Message -
> > From: "David Cassidy" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, August 16, 2001 9:14 AM
> > Subject: Re: Tomcat port 8080, Apache port 80, jsp?
> >
> >
> > > have a look at mod_jk ?
> > >
> > >
> > >
> > > Shawn Evans wrote:
> > > >
> > > > Here is a simple question... how do I get apache on port 80 to send
jsp
> > > > requests to the Tomcat server and respond back on port 80.  The
reason
> > > > why I
> > > > want to do this is becuase where I work, all ports are blocked
except
> > > > port
> > > > 80, but I have an applet that needs to get data from the jsp pages.
> > > >
> > > > Shawn
> > >
> >
>
>



Re: Tomcat port 8080, Apache port 80, jsp?

2001-08-17 Thread Shawn Evans

No error messages in the Apche or tomcat logs


- Original Message -
From: "Pier P. Fumagalli" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 5:29 PM
Subject: Re: Tomcat port 8080, Apache port 80, jsp?


> Shawn Evans at [EMAIL PROTECTED] wrote:
>
> >  I read "Installing mod_webapp and using it with Apache 1.3" written by
> > you, and I have been unsuccessful in getting it to work.  Here is my
> > configuration:
> >
> > Win NT4.0 sp6
> > Apache 1.3.20 d:\webserver\Apache
> > Tomcat 4.0.7b d:\webserver\Tomcat-4.0.7
> >
> >  First, I copied 'mod_webapp.so' and 'libapr.dll' to my apache\modules,
> > then I added this to my httpd.conf
> >
> > [...]
> > #AddModule mod_actions.c mod_setenvif.c mod_isapi.c
> > AddModule mod_webapp.c
> > [...]
> > #LoadModule usertrack_module modules/mod_usertrack.so
> > LoadModule webapp_module modules/mod_webapp.so
> > [...]
> > WebAppConnection conn warp localhost:8008
> > WebAppDeploy examples conn  /examples
> > WebAppInfo /webapp-info
> > [...]
> >
> >  I kick Apache off as a service (Tomcat is already running as a service)
> > and here is the error that I get "Error 2140:An internal Windows NT
error
> > occurred"... I am able to run Tomcat 4.0.7 as a service without
Apache...
> > and Apache runs fine when I comment out the 5 lines I added above, but I
> > need to get them working in sequence with one another.
>
> Nothing in your error_log? That's pretty weird... What about starting it
> from the console?
>
> Pier
>
>
>



mod_webapp --> NT4, Tomcat 4.0.7, Apache 1.3.20, JDK 1.3.1

2001-08-17 Thread Shawn Evans

   I read "Installing mod_webapp and using it with Apache 1.3" written in
mod_webapp, and I have been unsuccessful in getting it to work.  Here is my
configuration:

Win NT4.0 sp6
Apache 1.3.20 d:\webserver\Apache
Tomcat 4.0.7b d:\webserver\Tomcat-4.0.7

   First, I copied 'mod_webapp.so' and 'libapr.dll' to my apache\modules,
then I added this to my httpd.conf

[...]
#AddModule mod_actions.c mod_setenvif.c mod_isapi.c
AddModule mod_webapp.c
[...]
#LoadModule usertrack_module modules/mod_usertrack.so
LoadModule webapp_module modules/mod_webapp.so
[...]
WebAppConnection conn warp localhost:8008
WebAppDeploy examples conn  /examples
WebAppInfo /webapp-info
[...]

   I kick Apache off as a service (Tomcat is already running as a service)
and here is the error that I get "Error 2140:An internal Windows NT error
occurred"... I am able to run Tomcat 4.0.7 as a service without Apache...
and Apache runs fine when I comment out the 5 lines I added above, but I
need to get them working in sequence with one another.

   Plus, there are no error messages in the log files.

Shawn




Working: mod_webapp --> NT4, Tomcat 4.0.7, Apache 1.3.20, JDK 1.3.1

2001-08-17 Thread Shawn Evans

Sorry if it seems as if I reposted it, I was having trouble with the office
machine, so I sent it out under a new subject, since it was different than
the one I posted before...

when I ran Apache from the command line with the webapp modified conf here
is what I get.

D:\webserver\Apache>Apache
Syntax error on line 176 of d:/webserver/apache/conf/httpd.conf:
Cannot add module via name 'mod_webapp.c': not in list of loaded modules

took that line out and it works... I can see webapp-info and

"IT WORKS" ...

INSTALL.txt

[..]

*-
Another note for Windows: copy also the "libapr.dll" file with the module,
or
your Apache 1.3 web server will refuse to start reporting that the WebApp
module cannot be loaded.

Once you have done that, edit your "httpd.conf" configuration file and
add a few lines to load that module at startup (Windows users, read above,
you have to "replace" libexec with "modules" - I'm paranoid, sorry):

LoadModule webapp_module libexec/mod_webapp.so
and
AddModule mod_webapp.c [ DO NOT ADD THIS TO WINDOWS ]

-*

Thanks for the help

Shawn



- Original Message -
From: "Pier P. Fumagalli" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 17, 2001 12:47 PM
Subject: Re: mod_webapp --> NT4, Tomcat 4.0.7, Apache 1.3.20, JDK 1.3.1


> Since Apache 1.3.20 also under windows modules are called ".so" and not
> ".dll" (it was confusing!)
>
> Pier
>
> David Oxley at [EMAIL PROTECTED] wrote:
> >
> > Isn't the .so file only for unix. You need mod_webapp.dll
> >
> > Dave
> >
> > -Original Message-
> > From: Shawn Evans [mailto:[EMAIL PROTECTED]]
> > Sent: 17 August 2001 15:12
> > To: [EMAIL PROTECTED]
> > Subject: mod_webapp --> NT4, Tomcat 4.0.7, Apache 1.3.20, JDK 1.3.1
> >
> >  I read "Installing mod_webapp and using it with Apache 1.3" written in
> > mod_webapp, and I have been unsuccessful in getting it to work.  Here is
my
> > configuration:
> >
> > Win NT4.0 sp6
> > Apache 1.3.20 d:\webserver\Apache
> > Tomcat 4.0.7b d:\webserver\Tomcat-4.0.7
> >
> >  First, I copied 'mod_webapp.so' and 'libapr.dll' to my apache\modules,
> > then I added this to my httpd.conf
> >
> > [...]
> > #AddModule mod_actions.c mod_setenvif.c mod_isapi.c
> > AddModule mod_webapp.c
> > [...]
> > #LoadModule usertrack_module modules/mod_usertrack.so
> > LoadModule webapp_module modules/mod_webapp.so
> > [...]
> > WebAppConnection conn warp localhost:8008
> > WebAppDeploy examples conn  /examples
> > WebAppInfo /webapp-info
> > [...]
> >
> >  I kick Apache off as a service (Tomcat is already running as a service)
> > and here is the error that I get "Error 2140:An internal Windows NT
error
> > occurred"... I am able to run Tomcat 4.0.7 as a service without
Apache...
> > and Apache runs fine when I comment out the 5 lines I added above, but I
> > need to get them working in sequence with one another.
> >
> >  Plus, there are no error messages in the log files.
> >
> > Shawn
>
>



mod_webapp performace issues... NT4, Apache 1.3.20, Tomcat 4.0.7, JDK 1.3.1

2001-08-17 Thread Shawn Evans

Since I finally got the mod_webapp working, I have been banging on the
machine.  Tomcat is solid when I access it from port 8080, and Apache
screams like it should... but
when I access Tomcat thru mod_webapp (examples) I get random errors and even
hello world doesn't work... sometimes

Apache
access.log
216.174.11.51 - - [17/Aug/2001:14:59:22 -0400] "GET
/examples/servlets/index.html HTTP/1.1" 304 0
216.174.11.51 - - [17/Aug/2001:14:59:22 -0400] "GET
/examples/images/execute.gif HTTP/1.1" 304 0
-->216.174.11.51 - - [17/Aug/2001:14:59:22 -0400] "GET
/examples/images/return.gif HTTP/1.1" 500 305
-->216.174.11.51 - - [17/Aug/2001:15:01:20 -0400] "GET
/examples/servlet/HelloWorldExample HTTP/1.1" 500 305
-->216.174.11.51 - - [17/Aug/2001:15:01:21 -0400] "GET
/examples/images/return.gif HTTP/1.1" 500 316
-->216.174.11.51 - - [17/Aug/2001:15:01:21 -0400] "GET
/examples/images/code.gif HTTP/1.1" 500 325
-->216.174.11.51 - - [17/Aug/2001:15:01:21 -0400] "GET
/examples/images/code.gif HTTP/1.1" 500 0

error.log
-->[Fri Aug 17 14:59:22 2001] [error] (null)
-->[Fri Aug 17 15:01:20 2001] [error] (null)
-->[Fri Aug 17 15:01:21 2001] [error] Invalid packet 16
-->[Fri Aug 17 15:01:21 2001] [error] Communitcation interrupted
-->[Fri Aug 17 15:01:21 2001] [error] Communitcation interrupted

Tomcat
apache_log.2001-08-17.txt
2001-08-17 14:59:22 WarpEngine[Apache]: Mapping request
2001-08-17 14:59:22 WarpHost[216.174.11.51]: Mapping request for Host
2001-08-17 14:59:22 WarpEngine[Apache]: Mapping request
2001-08-17 14:59:22 WarpHost[216.174.11.51]: Mapping request for Host
2001-08-17 14:59:22 WarpEngine[Apache]: Mapping request
2001-08-17 14:59:22 WarpHost[216.174.11.51]: Mapping request for Host
2001-08-17 14:59:22 WarpEngine[Apache]: Mapping request
2001-08-17 14:59:22 WarpHost[216.174.11.51]: Mapping request for Host
2001-08-17 14:59:22 WarpEngine[Apache]: Mapping request
2001-08-17 14:59:22 WarpHost[216.174.11.51]: Mapping request for Host
2001-08-17 15:01:20 WarpEngine[Apache]: Mapping request
2001-08-17 15:01:20 WarpHost[216.174.11.51]: Mapping request for Host
2001-08-17 15:01:20 org.apache.catalina.INVOKER.HelloWorldExample: init
2001-08-17 15:01:20 InvokerFilter(ApplicationFilterConfig[name=Servlet
Mapped Filter, filterClass=filters.ExampleFilter]): 47 milliseconds
2001-08-17 15:01:20 InvokerFilter(ApplicationFilterConfig[name=Path Mapped
Filter, filterClass=filters.ExampleFilter]): 47 milliseconds
2001-08-17 15:01:21 WarpEngine[Apache]: Mapping request
2001-08-17 15:01:21 WarpHost[216.174.11.51]: Mapping request for Host
2001-08-17 15:01:21 [org.apache.catalina.connector.warp.WarpConnection]
Exception on socket
java.net.SocketException: Connection aborted by peer: socket write error
 at java.net.SocketOutputStream.socketWrite(Native Method)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:62)
 at
org.apache.catalina.connector.warp.WarpConnection.send(WarpConnection.java:2
18)
 at
org.apache.catalina.connector.warp.WarpResponse$Stream.close(WarpResponse.ja
va:301)
 at
org.apache.catalina.connector.warp.WarpResponse$Stream.finish(WarpResponse.j
ava:311)
 at
org.apache.catalina.connector.warp.WarpResponse.finishResponse(WarpResponse.
java:152)
 at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHand
ler.java:213)
 at
org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:19
4)
 at java.lang.Thread.run(Thread.java:484)

Thanks,

Shawn



Problem with JSP... Tomcat 4.0.7

2001-08-21 Thread Shawn Evans

I probally done something wrong here... but the error is at the end
[error]... here is the [JSP]... I have 2 classes in a jar file in the lib

lib/connectionpool.jar
ConnectionPool.class
PooledConnection.class

[JSP]




<%@ page errorPage="errorpage.jsp" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>

<%--  --%>

<%

  Connection con = null;

  try {

// The pool is not initialized
if ( pool.getDriver() == null ) {

  // initialize the pool
  // FileInputStream inStream = new
FileInputStream(ForceBrowserJDB.properties);
  // properties.load(inStream);

  pool.setDriver=oracle.jdbc.driver.OracleDriver
  pool.setURL=jdbc:oracle:thin:@216.174.11.54:1521:warf
  pool.setSize=10
  pool.Username=warfighter
  pool.setPassword=srcv3000

  pool.initializePool();
}

[.]

[error]

2001-08-21 15:27:20 StandardWrapperValve[jsp]: Servlet.service() for servlet
jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:176)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:188)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1000)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
)
 at java.lang.Thread.run(Thread.java:484)
- Root Cause -
java.lang.NumberFormatException: oracle
 at java.lang.Integer.parseInt(Integer.java:414)
 at java.lang.Integer.parseInt(Integer.java:463)
 at org.apache.jasper.compiler.Compiler.getJspLineErrors(Compiler.java:321)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:280)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:176)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:188)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardConte

Tomcat, JSP, BEAN, /lib

2001-08-22 Thread Shawn Evans

I have a connectionpool bean that I am using in myapp.  I added
connectionpool.jar to /lib.

I added this to the beginning of my jsp.


Here is what I get when I access it... any ideas what I have done wrong?
http://localhost:8080/ForceBrowserJ/index.jsp

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

An error occurred at line: 8 in the jsp file: /index.jsp

Generated servlet error:
D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java:
75: Class com.sterling.util.db.connectionpool not found.
com.sterling.util.db.connectionpool pool = null;
^


An error occurred at line: 8 in the jsp file: /index.jsp

Generated servlet error:
D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java:
78: Class com.sterling.util.db.connectionpool not found.
pool= (com.sterling.util.db.connectionpool)
   ^


An error occurred at line: 8 in the jsp file: /index.jsp

Generated servlet error:
D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java:
83: Class com.sterling.util.db.connectionpool not found.
pool = (com.sterling.util.db.connectionpool)
java.beans.Beans.instantiate(this.getClass().getClassLoader(),
"com.sterling.util.db.connectionpool");
^
3 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:176)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1000)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
)
at java.lang.Thread.run(Thread.java:484)





Tomcat 4.0.7b and lib help

2001-08-23 Thread Shawn Evans

I have a servlet FBJServlet that uses a DB connection pool, and I have the
JDBC driver for Oracle installed as well in the /lib/classes12.jar... I open
the jar and see OracleDataSource... but I get the error below.
Root Cause:
java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
at com.sterling.util.db.pooling.DBPoolManager.init(DBPoolManager.java:110)
at com.sterling.util.db.pooling.DBPoolManager.(DBPoolManager.java:17)
at
com.sterling.util.db.pooling.DBPoolManager.getInstance(DBPoolManager.java:23
)
at com.sterling.ForceBrowserJ.FBJServlet.init(FBJServlet.java:15)
at javax.servlet.GenericServlet.init(GenericServlet.java:366)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:833)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1000)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
)
at java.lang.Thread.run(Thread.java:484)





Re: Tomcat 4.0.7b and lib help (FIXED)

2001-08-24 Thread Shawn Evans

I don't know about everyone else, but I got my Oracle classes12.zip in my
lib and it wouldn't work so after looking at my code, wondering what I
messed up (4 hours), I decided to change it to *.jar.  OMG it decided to
work... might want to have TomCat be able to do both zip & jar's in the
lib

just my 2 cents.

Shawn

- Original Message -
From: "Jonathan Eric Miller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Evans, Shawn"
<[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 12:52 PM
Subject: Re: Tomcat 4.0.7b and lib help


> My guess is that this may be the same problem that I ran into while trying
> to use JDBCRealm. I think you have to put the .jar file in
> TOMCAT_HOME/server/lib instead of TOMCAT_HOME/lib for low-level .jar files
> that get used by Tomcat itself? I'm not an expert, that just seemed to be
> experience that I had.
>
> Jon
>
> - Original Message -
> From: "Shawn Evans" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 23, 2001 11:45 AM
> Subject: Tomcat 4.0.7b and lib help
>
>
> > I have a servlet FBJServlet that uses a DB connection pool, and I have
the
> > JDBC driver for Oracle installed as well in the /lib/classes12.jar... I
> open
> > the jar and see OracleDataSource... but I get the error below.
> > Root Cause:
> > java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
> > at
com.sterling.util.db.pooling.DBPoolManager.init(DBPoolManager.java:110)
> > at com.sterling.util.db.pooling.DBPoolManager.(DBPoolManager.java:17)
> > at
> >
>
com.sterling.util.db.pooling.DBPoolManager.getInstance(DBPoolManager.java:23
> > )
> > at com.sterling.ForceBrowserJ.FBJServlet.init(FBJServlet.java:15)
> > at javax.servlet.GenericServlet.init(GenericServlet.java:366)
> > at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:833)
> > at
> >
>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
> > at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > va:214)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > va:215)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> > at
> >
>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
> > 46)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 64)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
> > at
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> > )
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> > at
> >
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 64)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> > :163)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> > 1000)
> > at
> >
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
> > )
> > at java.lang.Thread.run(Thread.java:484)
> >
> >
> >
>



Re: Tomcat 4.0.7b and lib help (FIXED)

2001-08-24 Thread Shawn Evans

Understand I am an idiot... but oh well... just a suggestion then for people
like me that read... in Developing Applications with Tomcat, in 4.1
Directory Structure... in the lib/ portions, just put a note... 'JAR's only
(No zips)'... I know it says 'JAR files' but I thought zips and jars were
interchangeable... :-)


- Original Message -
From: "Dmitri Colebatch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Shawn Evans"
<[EMAIL PROTECTED]>
Sent: Friday, August 24, 2001 9:26 AM
Subject: Re: Tomcat 4.0.7b and lib help (FIXED)


> This has come up before...  tomcat follows the spec - loading all jars in
> WEB-INF/lib... no mention of zips (o:
>
> On Fri, 24 Aug 2001, Shawn Evans wrote:
>
> > I don't know about everyone else, but I got my Oracle classes12.zip in
my
> > lib and it wouldn't work so after looking at my code, wondering what
I
> > messed up (4 hours), I decided to change it to *.jar.  OMG it decided to
> > work... might want to have TomCat be able to do both zip & jar's in the
> > lib
> >
> > just my 2 cents.
> >
> > Shawn
> >
> > - Original Message -
> > From: "Jonathan Eric Miller" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; "Evans, Shawn"
> > <[EMAIL PROTECTED]>
> > Sent: Thursday, August 23, 2001 12:52 PM
> > Subject: Re: Tomcat 4.0.7b and lib help
> >
> >
> > > My guess is that this may be the same problem that I ran into while
trying
> > > to use JDBCRealm. I think you have to put the .jar file in
> > > TOMCAT_HOME/server/lib instead of TOMCAT_HOME/lib for low-level .jar
files
> > > that get used by Tomcat itself? I'm not an expert, that just seemed to
be
> > > experience that I had.
> > >
> > > Jon
> > >
> > > - Original Message -
> > > From: "Shawn Evans" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, August 23, 2001 11:45 AM
> > > Subject: Tomcat 4.0.7b and lib help
> > >
> > >
> > > > I have a servlet FBJServlet that uses a DB connection pool, and I
have
> > the
> > > > JDBC driver for Oracle installed as well in the
/lib/classes12.jar... I
> > > open
> > > > the jar and see OracleDataSource... but I get the error below.
> > > > Root Cause:
> > > > java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
> > > > at
> > com.sterling.util.db.pooling.DBPoolManager.init(DBPoolManager.java:110)
> > > > at
com.sterling.util.db.pooling.DBPoolManager.(DBPoolManager.java:17)
> > > > at
> > > >
> > >
> >
com.sterling.util.db.pooling.DBPoolManager.getInstance(DBPoolManager.java:23
> > > > )
> > > > at com.sterling.ForceBrowserJ.FBJServlet.init(FBJServlet.java:15)
> > > > at javax.servlet.GenericServlet.init(GenericServlet.java:366)
> > > > at
> > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:833)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > > > va:214)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > > 66)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > > > at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > > > va:215)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > > 66)
> > > > at
> > > >
> > >
> >
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
> > > > 46)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > > 64)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > > > at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943

RE: Help Preventing VM & Tomcat Crash

2002-02-23 Thread Shawn Church

Looks like you are using the JDBC-ODBC bridge (maybe to an MS Access or MS
SQL Server database?), which is not thread-safe and is not intended for use
in production environments.  My guess is that one thread (the current thread
servicing the Thumbnail servlet) has a db connection open, and the next
request (the user clicking the thumbnail) opens another db connection.  This
guess is based on these lines in your exception:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : unknown exception code occurred at PC=0x77fb16cc
Function name=RtlTraceDatabaseEnumerate
Library=C:\WINNT\System32\ntdll.dll

If this is the case, try finding a pure Java (type 4) JDBC driver for your
database.

Shawn


-Original Message-
From: Kennedy Clark [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 23, 2002 5:36 AM
To: [EMAIL PROTECTED]
Subject: Help Preventing VM & Tomcat Crash


I'm working on a servlet that shrinks JPEG photos on the fly to create
thumbnails.  When the user selects the thumbnail page, a JSP generates HTML
that results in many calls to the thumbnail servlet.  If the user is
patient and waits for all of the thumbnails to load, everything works great
-- they can click on a thumbnail to see the full-size version of that
JPEG.  However, if the use clicks on a photo while they are still loading,
I get the exception dump and crash shown at the bottom.  Any help greatly
appreciated!  Regards, Kennedy

Here is my thumbnail servlet:
/*
  * Note: JPEG manipulation code comes from Sun:
  * http://developer.java.sun.com/developer/TechTips/1999/tt1021.html#tip1
  */
package gallery.servlet;

import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.awt.Image;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;


/**
  * Return a thumbnail of the image specified in the name parameter
  */

public class Thumbnail extends HttpServlet {


 public void doGet(HttpServletRequest request,
   HttpServletResponse response)
 throws IOException, ServletException
 {
 response.setContentType("image/jpeg");
 File f = new File(request.getParameter("name"));
 if (!f.exists())
 return;
 OutputStream os = response.getOutputStream();
 createThumbnail(request.getParameter("name"), os, 150);
 }

 /**
  * Reads an image in a file and creates a thumbnail to the output
stream
  *
  * @param orig  The name of image file.
  * @param thumb The name of thumbnail file.
  * Will be created if necessary.
  * @param maxDim The width and height of the thumbnail must
  * be maxDim pixels or less.
  */
 public static void createThumbnail(String orig, OutputStream os, int
maxDim) {
 try {
 // Get the image from a file.
 Image inImage = new ImageIcon(orig).getImage();

 // Determine the scale.
 double scale = (double)maxDim/(double)inImage.getHeight(null);
 if (inImage.getWidth(null) > inImage.getHeight(null)) {
 scale = (double)maxDim/(double)inImage.getWidth(null);
 }

 // Determine size of new image.
 // One of them should equal maxDim.
 int scaledW = (int)(scale*inImage.getWidth(null));
 int scaledH = (int)(scale*inImage.getHeight(null));

 // Create an image buffer in which to paint on.
 BufferedImage outImage =
   new BufferedImage(scaledW, scaledH,
BufferedImage.TYPE_INT_RGB);

 // Set the scale.
 AffineTransform tx = new AffineTransform();

 // If the image is smaller than
 //the desired image size,
 // don't bother scaling.
 if (scale < 1.0d) {
 tx.scale(scale, scale);
 }

 // Paint image.
 Graphics2D g2d = outImage.createGraphics();
 g2d.drawImage(inImage, tx, null);
 g2d.dispose();

 // JPEG-encode the image and write to file.
 //OutputStream os = new FileOutputStream(thumb);
 JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
 encoder.encode(outImage);
 //os.close();
 } catch (IOException e) {
 e.printStackTrace();
 }
 }
}



And here is the exception/crash:
java.io.IOException: reading encoded JPEG Stream
 at sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native
Method)
 at
sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:47
5)

 at
sun.awt.image.codec.JPEGImag

RE: Help Preventing VM & Tomcat Crash

2002-02-23 Thread Shawn Church

So much for that theory.

However, your guess is pretty close.  I found something which you might find
interesting.  This is a known bug, which you can check out here:

http://developer.java.sun.com/developer/bugParade/bugs/4502892.html

The problem occurs when the socket is prematurely closed.  The workaround is
to buffer the output via ByteArrayOutputStream, isolating the native method
from stream disconnections.

The evaluation of the bug I will include here for convenience:

***
The JPEG library is not MT-safe.  In particular, there is a definition of
a global variable "struct error_mgr ek_err" which is used by all threads
for error handling -- including a setjmp buffer.  Consequently, when an
error does occur while more than one thread is executing in the native
library, it is common for that thread to longjmp to another thread's state.
It then uses the wrong JNIEnv pointer and trashes the VM.
x@x 2001-10-09

This bug has indeed been fixed in merlin-rc1, but its associated regression
test
(JPEGMultithread.java) is confusing and potentially misleading.  This is
addressed by another bug (4546112 - Reg-test JPEGMultithread.java Failing).
The regression test currently throws exceptions endlessly if bug 4502892 is
not
present, and hangs or crashes the VM if bug 4502892 is present.  This is bad
behavior for a regression test, so it will be updated in accordance with
4546112.
x@x 2001-12-19
***

Hope this helps more,
Shawn


-Original Message-
From: Kennedy Clark [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 23, 2002 2:32 PM
To: Tomcat Users List
Subject: RE: Help Preventing VM & Tomcat Crash


Hi Shawn,

Many thanks for the note & the suggestion!  I am using MySQL as my Db and
MM.MySQL is my driver (mm.mysql-2.0.11-bin.jar).  Given that this is a Type
4 driver, I don't think I should be getting a native code crash involving
database access, right?

I could be missing something, but it seems that the
sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream() method (which is
native code) is trying to write to my output stream and running into
trouble.  I assume this is because the user has clicked on an image serving
as a link to another web page and now Tomcat is off trying to handle the
new page.  My best guess is that in the process of doing so, the output
streams used by writeJPEGStream() are being torn down, but the native code
doesn't know this and it's causing the VM to puke.  Does anyone think my
logic makes sense?  Better yet, does anyone know a way to prevent it? :-)

Regards, Kennedy

At 09:02 AM 2/23/2002 -0600, Shawn Church wrote:
>Looks like you are using the JDBC-ODBC bridge (maybe to an MS Access or MS
>SQL Server database?), which is not thread-safe and is not intended for use
>in production environments.  My guess is that one thread (the current
thread
>servicing the Thumbnail servlet) has a db connection open, and the next
>request (the user clicking the thumbnail) opens another db connection.
This
>guess is based on these lines in your exception:
>
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : unknown exception code occurred at PC=0x77fb16cc
>Function name=RtlTraceDatabaseEnumerate
>Library=C:\WINNT\System32\ntdll.dll
>
>If this is the case, try finding a pure Java (type 4) JDBC driver for your
>database.
>
>Shawn
>
>
>-Original Message-
>From: Kennedy Clark [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, February 23, 2002 5:36 AM
>To: [EMAIL PROTECTED]
>Subject: Help Preventing VM & Tomcat Crash
>
>
>I'm working on a servlet that shrinks JPEG photos on the fly to create
>thumbnails.  When the user selects the thumbnail page, a JSP generates HTML
>that results in many calls to the thumbnail servlet.  If the user is
>patient and waits for all of the thumbnails to load, everything works great
>-- they can click on a thumbnail to see the full-size version of that
>JPEG.  However, if the use clicks on a photo while they are still loading,
>I get the exception dump and crash shown at the bottom.  Any help greatly
>appreciated!  Regards, Kennedy
>
>Here is my thumbnail servlet:
>/*
>   * Note: JPEG manipulation code comes from Sun:
>   * http://developer.java.sun.com/developer/TechTips/1999/tt1021.html#tip1
>   */
>package gallery.servlet;
>
>import java.io.*;
>import java.text.*;
>import java.util.*;
>import javax.servlet.*;
>import javax.servlet.http.*;
>import java.awt.Image;
>import java.awt.Graphics2D;
>import java.awt.geom.AffineTransform;
>import java.awt.image.BufferedImage;
>import javax.swing.ImageIcon;
>import com.sun.image.codec.jpeg.JPEGCodec;
>import com.sun.image.codec.jpeg.JPEGImageEncoder;
>
>
>/**
>   * Return a thumbnail of the image specified in the name parame

RE: Help Preventing VM & Tomcat Crash

2002-02-23 Thread Shawn Church

One more thing.  There is a fix in jdk1.4.0 which addresses this problem,
where the native code exception is handled correctly.  With this version,
the IOExceptions may be caught and treated as normal behavior.

Here's the fix:

http://developer.java.sun.com/developer/bugParade/bugs/4546112.html

Shawn


-Original Message-
From: Shawn Church [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 23, 2002 3:32 PM
To: Tomcat Users List
Subject: RE: Help Preventing VM & Tomcat Crash


So much for that theory.

However, your guess is pretty close.  I found something which you might find
interesting.  This is a known bug, which you can check out here:

http://developer.java.sun.com/developer/bugParade/bugs/4502892.html

The problem occurs when the socket is prematurely closed.  The workaround is
to buffer the output via ByteArrayOutputStream, isolating the native method
from stream disconnections.

The evaluation of the bug I will include here for convenience:

***
The JPEG library is not MT-safe.  In particular, there is a definition of
a global variable "struct error_mgr ek_err" which is used by all threads
for error handling -- including a setjmp buffer.  Consequently, when an
error does occur while more than one thread is executing in the native
library, it is common for that thread to longjmp to another thread's state.
It then uses the wrong JNIEnv pointer and trashes the VM.
x@x 2001-10-09

This bug has indeed been fixed in merlin-rc1, but its associated regression
test
(JPEGMultithread.java) is confusing and potentially misleading.  This is
addressed by another bug (4546112 - Reg-test JPEGMultithread.java Failing).
The regression test currently throws exceptions endlessly if bug 4502892 is
not
present, and hangs or crashes the VM if bug 4502892 is present.  This is bad
behavior for a regression test, so it will be updated in accordance with
4546112.
x@x 2001-12-19
***

Hope this helps more,
Shawn


-Original Message-
From: Kennedy Clark [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 23, 2002 2:32 PM
To: Tomcat Users List
Subject: RE: Help Preventing VM & Tomcat Crash


Hi Shawn,

Many thanks for the note & the suggestion!  I am using MySQL as my Db and
MM.MySQL is my driver (mm.mysql-2.0.11-bin.jar).  Given that this is a Type
4 driver, I don't think I should be getting a native code crash involving
database access, right?

I could be missing something, but it seems that the
sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream() method (which is
native code) is trying to write to my output stream and running into
trouble.  I assume this is because the user has clicked on an image serving
as a link to another web page and now Tomcat is off trying to handle the
new page.  My best guess is that in the process of doing so, the output
streams used by writeJPEGStream() are being torn down, but the native code
doesn't know this and it's causing the VM to puke.  Does anyone think my
logic makes sense?  Better yet, does anyone know a way to prevent it? :-)

Regards, Kennedy

At 09:02 AM 2/23/2002 -0600, Shawn Church wrote:
>Looks like you are using the JDBC-ODBC bridge (maybe to an MS Access or MS
>SQL Server database?), which is not thread-safe and is not intended for use
>in production environments.  My guess is that one thread (the current
thread
>servicing the Thumbnail servlet) has a db connection open, and the next
>request (the user clicking the thumbnail) opens another db connection.
This
>guess is based on these lines in your exception:
>
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : unknown exception code occurred at PC=0x77fb16cc
>Function name=RtlTraceDatabaseEnumerate
>Library=C:\WINNT\System32\ntdll.dll
>
>If this is the case, try finding a pure Java (type 4) JDBC driver for your
>database.
>
>Shawn
>
>
>-Original Message-
>From: Kennedy Clark [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, February 23, 2002 5:36 AM
>To: [EMAIL PROTECTED]
>Subject: Help Preventing VM & Tomcat Crash
>
>
>I'm working on a servlet that shrinks JPEG photos on the fly to create
>thumbnails.  When the user selects the thumbnail page, a JSP generates HTML
>that results in many calls to the thumbnail servlet.  If the user is
>patient and waits for all of the thumbnails to load, everything works great
>-- they can click on a thumbnail to see the full-size version of that
>JPEG.  However, if the use clicks on a photo while they are still loading,
>I get the exception dump and crash shown at the bottom.  Any help greatly
>appreciated!  Regards, Kennedy
>
>Here is my thumbnail servlet:
>/*
>   * Note: JPEG manipulation code comes from Sun:
>   * http://developer.java.sun.com/developer/TechTips/1999/tt1021.html#tip1
>   */
>package gallery.servlet;
&g

  1   2   >