RE: RequestDispatcher throws Exception on server

2008-04-13 Thread Bob Riaz
Sorry! No. Eclipse is on my local machine!

Server:
Windows Server 2003
Enterprise Edition
Service Pack 2

JDK 1.5.0_04
JRE 1.6.0_03

Thanks.

Bob

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 09, 2008 2:33 PM
To: Tomcat Users List
Subject: RE: RequestDispatcher throws Exception on server


 From: Bob Riaz [mailto:[EMAIL PROTECTED] 
 Subject: RequestDispatcher throws Exception on server
 
 Here's my environment:
 
 Eclipse Europa
 Tomcat 6

You're not really running Tomcat on your server via Eclipse, are you?

Want to give us a hint about the platform and JVM you're using?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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





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



RequestDispatcher throws Exception on server

2008-04-09 Thread Bob Riaz
Hi,

Here's my environment:

Eclipse Europa
Tomcat 6

I'm running a simple app that receives a request, and redirects to the
appropriate page depending on the request url. This works fine when I test
it on my local machine. But when I run it on the server an exception is
thrown at RequestDispatcher.forward(req, res) resulting in a white page.

StackTrace:
org.apache.jasper.servlet.JspServletWrapper.getServlet at Line:156
org.apache.jasper.servlet.JspServletWrapper.service at Line:329
org.apache.jasper.servlet.JspServlet.serviceJspFile at Line:320
org.apache.jasper.servlet.JspServlet.service at Line:266
javax.servlet.http.HttpServlet.service at Line:803
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter at Line:290
org.apache.catalina.core.ApplicationFilterChain.doFilter at Line:206
org.apache.catalina.core.ApplicationDispatcher.invoke at Line:654
org.apache.catalina.core.ApplicationDispatcher.processRequest at Line:445
org.apache.catalina.core.ApplicationDispatcher.doForward at Line:379
org.apache.catalina.core.ApplicationDispatcher.forward at Line:292
edu.cs.mum.applicant.Login.service at Line:55  **
this line in my code: dispatcher.forward(request, response);
javax.servlet.http.HttpServlet.service at Line:803
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter at Line:290
org.apache.catalina.core.ApplicationFilterChain.doFilter at Line:206
org.apache.catalina.core.StandardWrapperValve.invoke at Line:233
org.apache.catalina.core.StandardContextValve.invoke at Line:175
org.apache.catalina.core.StandardHostValve.invoke at Line:128
org.apache.catalina.valves.ErrorReportValve.invoke at Line:102
org.apache.catalina.core.StandardEngineValve.invoke at Line:109
org.apache.catalina.connector.CoyoteAdapter.service at Line:263
org.apache.coyote.http11.Http11Processor.process at Line:844
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process at
Line:584 org.apache.tomcat.util.net.JIoEndpoint$Worker.run at Line:447
java.lang.Thread.run at Line:-1

Your thoughts would be greatly appreciated.

Many thanks.

Bob



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



Class cast exception thrown from jsp servlet

2008-03-07 Thread Bob Riaz
Hello all,

I'm running a JSF application in Netbeans 6.0.
OS: Windows XP pro
DB:  SQL Server 2000

I'm running into the following problem (the name of my jsp is
ResumeList.jsp). The same application is being run on our production server
and it works! Any thoughts on this would be greatly appreciated. Many
thanks!

Bob

java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Boolean
at
javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1078)
at
javax.faces.webapp.UIComponentTag.isSuppressed(UIComponentTag.java:884)
at
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:316)
at
org.apache.jsp.admin.AdminSecure.ResumeList_jsp._jspx_meth_h_005foutputText_
005f6(ResumeList_jsp.java:711)
at
org.apache.jsp.admin.AdminSecure.ResumeList_jsp._jspService(ResumeList_jsp.j
ava:220)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
93)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:654)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
patcher.java:445)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:379)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:292)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:419)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:211)
at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseEx
ecutor.java:41)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.
java:100)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.
java:100)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.
java:147)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:584)
at

Reload modifed servlet

2008-01-26 Thread Bob Riaz
Hello all,

My environment:
Windows XP-Pro
Tomcat 6
JDK 6
Eclipse JEE IDE

I find that whenever I make a change to my servlet, I need to
Clean/Rebuild the project in order for the changes to take effect. Even
restarting Tomcat doesn't take the change. It didn't used to be this way!!
I've set reloadable=true in Context.xml - doesn't help. This is the
situation on one machine. On a different machine using the same environment
I don't have this problem. Something about the way Tomcat was configured on
this machine then?
If anybody's had this probelm, please share your thoughts!

Many thanks.

Bob



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



New jsp not being read

2008-01-17 Thread Bob Riaz
Hi all,

Here is my environment:

Eclipse Europa
Tomcat 5.5
Windows XP Pro

My application goes like this:
 request -- servletA -- form.jsp -(post)- servletB

My problem is this: when I make a change to form.jsp, this change is not
reflected in the jsp that gets displayed. An older version of the jsp is
displayed. I have checked path specified in my servlet to make sure it's
poitning to the right jsp. In fact, the version that's displayed doesn't
exist in any of my folders, so I'm not sure where this form would be coming
from. I've had this result using IE and Firefox. I thought it might be an
Europa issue, so i tried running the app on Eclipse 3.2 - same result.
Cleaning and rebuilding the project makes no difference. Also, it doesn't
seem possible anymore make a change to the servlet, and have it hot
deployed. I don't get a message from Tomcat saying it couldn't hot deploy,
but in order to make the modified version of the servlet current I need to
do a Clean/Rebuild of the project.

Everybody's thoughts on this would be greatly appreciated!!

Thanks.

Bob


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



RE: New jsp not being read

2008-01-17 Thread Bob Riaz
Thank you, David. The jsp is on my development machine. I'm doing all my
testing locally, so I wouldn't think this would be an issue. However, I have
been changing my system clock to test some time sensitive aspects of the
application. I will look into this more closely. I wonder if you could give
me a pointer how to clean tomcat's  work directory.
Thanks again for your thoughts.

--Bob

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 17, 2008 10:35 AM
To: Tomcat Users List
Subject: Re: New jsp not being read


I see this most often when the jsp is on a remote server and the clocks
are out of sync between my desktop system and the server.  Check to be
sure the clocks are in sync if tomcat is on a remote system and transfer
the jsp again.  You may want to also consider cleaning out tomcat's work
directory where compiled jsps are stored at least once whether the clock
was at fault or not.

--David

Bob Riaz wrote:

Hi all,

Here is my environment:

Eclipse Europa
Tomcat 5.5
Windows XP Pro

My application goes like this:
 request -- servletA -- form.jsp -(post)- servletB

My problem is this: when I make a change to form.jsp, this change is not
reflected in the jsp that gets displayed. An older version of the jsp is
displayed. I have checked path specified in my servlet to make sure it's
poitning to the right jsp. In fact, the version that's displayed doesn't
exist in any of my folders, so I'm not sure where this form would be coming
from. I've had this result using IE and Firefox. I thought it might be an
Europa issue, so i tried running the app on Eclipse 3.2 - same result.
Cleaning and rebuilding the project makes no difference. Also, it doesn't
seem possible anymore make a change to the servlet, and have it hot
deployed. I don't get a message from Tomcat saying it couldn't hot deploy,
but in order to make the modified version of the servlet current I need to
do a Clean/Rebuild of the project.

Everybody's thoughts on this would be greatly appreciated!!

Thanks.

Bob


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





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


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



Request parameters incorrect

2007-12-05 Thread Bob Riaz
Hello all,

We're using the following:

Java 5.0
Tomcat6.0
SQL Server 2000

Our webapp does the following:
Get the request parameters from the request object from a page, concatenate
them into a string, store the string in the db. When we retrieve the string
from the db, we know what parameters to expect to find because we know the
page they came from. This works. In one instance, however, we found
parameters in this string that belonged to a different webapp running on our
server. Would anyone be able to shed any light on this? The parameters we
find in this string come from 3 different pages! We're baffled!!

Many thanks!

Bob



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



RE: Request parameters incorrect

2007-12-05 Thread Bob Riaz
Thanks, Chuck.
We had considered concurrency as an issue. The string in question is entered
into a logging table - every request gets logged, and the log entry includes
a timestamp. So we know there was no other request in process concurrent.
Also, we're not using a Session object to store request-specific data - we
use hidden fields to identify users, and pass the hidden fields form page to
page. (We have our reasons for doing it this way!!)
From the doPost(...) we simply pass the request object to a method that
does:

Enumeration e = request.getParameterNames();
while(e.hasMoreElements()){
String name = (String)e.nextElement();
strngBldr.append(request.getParameter(name));
}
log(strngBldr); //enters the string into the db along with a timestamp

So we're keeping things as simple as possible.

Also, examining this particular string we find that it contains parameter
name/values from a requqest that was logged hours before this one.
Your thoughts would be deeply appreciated.

Thanks!
Bob

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 05, 2007 2:27 PM
To: Tomcat Users List
Subject: RE: Request parameters incorrect


 From: Bob Riaz [mailto:[EMAIL PROTECTED]
 Subject: Request parameters incorrect

 The parameters we find in this string come from 3
 different pages! We're baffled!!

This is pretty much always a problem with incorrect scoping or
synchronization in the webapp.  For example, code processing a Request
stores request-specific data into the Session or Servlet object, then
comes back later to find that a different concurrent request has
overwritten it.  Or, two request processing threads are accessing a
Session field via some method that isn't synchronized appropriately.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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




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



Configure webapp Session timeout

2007-11-20 Thread Bob Riaz
Hello all,

We're running a servlet that processes responses from an online test. The
test is 2 hrs long, and we find that if a user does not make a request from
his browser (saves a test answer) the sesion times out, and when he does
next try to save an answer the servlet bounces him back to the login page.
I know it's possible to configure the Tomcat session length in conf/web.xml,
which would affect the sessions of all the webapps running on Tomcat, but I
wondered if anybody knew how to configure the session for one particular
webapp.
Many thanks.

Bob



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



RE: [OT] Tomcat causing high CPU load

2007-11-08 Thread Bob Riaz
Thanks. StringBuilder seems to be the most popular suggestion! I'm going to 
implement this and report on any changes I see in Tomcat's behavior. 
I'm also looking at other possiblities, such as Tomcat's I/O activities causing 
thrashing if I/O is excessive. Would anybody know how I could monitor Tomcat's 
I/O activities? 
Also, is there a way to configure Tomcat so that a connection times out after a 
certain period of time?
Thanks to everyone for your attention and help.

Bob 

-Original Message-
From: Kev Jackson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 07, 2007 11:14 PM
To: Tomcat Users List
Subject: Re: [OT] Tomcat causing high CPU load


Hi,
 From a programmatic point of view


 Many thanks for all the suggestions. I found a simple tool called StackTrace 
 from http://www.adaptj.com/root/main/tracehowtos#ht0 to help me take thread 
 dumps from Tomcat. I found when the CPU load was high that there was a thread 
 from the suspect web app running. In contrast, thread dumps taken when CPU 
 load was normal showed no such threads. The line that the web app thread was 
 running at is a simple - data += \n; - this is in a loop collecting form 
 data from hidden vars created by JavaScript code. It's been suggested by ny 
 colleagues that the JVM could be running out of memory since a new String 
 object is created for each +=. The String data ends up being very long 
 anyway. Any thoughts on this would be appreciated.
 Also, would anyone know how to monitor Tomcat's I/O activities? I understand 
 that thrashing could be a drain on memory resources.
 Thanks again for everybody's help!

You could replace the data += \n code with a StringBuilder (Java6) or 
a StringBuffer - this would reduce the number of intermediate objects 
being created quite significantly

Kev

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




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



RE: [OT] Tomcat causing high CPU load

2007-11-07 Thread Bob Riaz
Many thanks for all the suggestions. I found a simple tool called StackTrace 
from http://www.adaptj.com/root/main/tracehowtos#ht0 to help me take thread 
dumps from Tomcat. I found when the CPU load was high that there was a thread 
from the suspect web app running. In contrast, thread dumps taken when CPU load 
was normal showed no such threads. The line that the web app thread was running 
at is a simple - data += \n; - this is in a loop collecting form data from 
hidden vars created by JavaScript code. It's been suggested by ny colleagues 
that the JVM could be running out of memory since a new String object is 
created for each +=. The String data ends up being very long anyway. Any 
thoughts on this would be appreciated.
Also, would anyone know how to monitor Tomcat's I/O activities? I understand 
that thrashing could be a drain on memory resources.
Thanks again for everybody's help!

bob

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 06, 2007 9:21 AM
To: Tomcat Users List
Subject: Re: [OT] Tomcat causing high CPU load


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Charlie,

Charlie Wingate wrote:
 There is a kill.exe (older version in resource kits) and a newer
 taskkill.exe included with XP [onward]

Note that taskkill.exe and UNIX kill are completely different. taskkill
actually kills tasks, while the UNIX kill sends signals to processes.

 but neither of them will provide a
 stack dump/trace.

That is because of the lack of signaling ability of taskkill.exe.

 Although they are very useful as tools and parts.

Definitely. I had no idea this program existed. My experience with MS
Windows is that programs kill themselves frequently enough that I
probably will continue to never need this tool ;)

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHMIZp9CaO5/Lv0PARApJmAJ4p55P3qwyLtMmLDVlc6jyPayhQ2wCgh//n
zSjOq8EFoYEqbQz9ZLqq0bE=
=poDw
-END PGP SIGNATURE-

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



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



Heap out of memory error

2007-11-05 Thread Bob Riaz
Hi all,

I have web apps using the following:
JDK 1.5
Tomcat 6
SQL Server 2000
Windows 2000 server

From time to time I have come across this error in the Tomcat logs:
java.lang.OutOfMemoryError: Java heap space

I understand the default heap size is 64M, and that it is possibe to
configure Tomcat with a larger heap size. Would any one know how this is
done? The instructions I've found on the web so far have not been helpful.

Thanks.

-bob



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