Re: 'referer' header contains Servlet path, not referrer

2004-09-11 Thread Keith Hankin
Yes, this is exactly what I'm doing. I've got code that uses reflection to
automatically populate the objects on the Server so that I don't have to
write code to do this.

- Original Message -
From: QM [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, September 10, 2004 7:35 PM
Subject: Re: 'referer' header contains Servlet path, not referrer


 On Fri, Sep 10, 2004 at 11:19:09AM +0530, Keith Hankin wrote:
 : Here's the scenario: I am getting input data from the user and have
 : determined that the user has made an error. I want to redisplay the last
 : page so they can fix the errors.

 Someone mentioned Struts as a solution.  That, in and of itself, is too
 heavy a solution; but you can borrow some of those ideas:

 Setup your form to pull data from request-scope vars.

 - user goes to page first time: vars are empty, fields are blank

 - user fills out some fields and clicks submit button: at least
   some fields are populated

 - the servlet checks the form (based on request-scoped vars).  If some
   are missing, dispatch (not redirect!) to an error page.

 - user sees form, some fields are prepopulated based on the information
   still in the request from when they clicked submit

 -QM

 --

 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.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]



java.io.InterruptedIOException

2004-09-11 Thread avi arora
Hi,
   I am using tomcat 4.0.5. I am getting the
java.io.InterruptedIOException in one of the context of my web
application. I am having the similar jsp file in another context which
uses the same libraries in that context. But there it works fine. Can
some one please suggest, some solution to this problem. I am attaching
the exception message below--
Thanks--


 java.io.InterruptedIOException: Read timed out
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at java.net.SocketInputStream.read(SocketInputStream.java:63)
at java.io.InputStreamReader.fill(InputStreamReader.java:168)
at java.io.InputStreamReader.read(InputStreamReader.java:244)
at java.io.BufferedReader.fill(BufferedReader.java:134)
at java.io.BufferedReader.readLine(BufferedReader.java:294)
at java.io.BufferedReader.readLine(BufferedReader.java:357)
at 
org.vovida.prov.psLib.HttpPSConnection.sendRequest(HttpPSConnection.java:175)
at org.vovida.prov.psLib.HostInterface.sendRequest(HostInterface.java:73)
at org.vovida.prov.psLib.PSInterface.sendRequest(PSInterface.java:77)
at 
org.vovida.prov.psLib.SocketProvisioningInterface.getFieldsInDomain(SocketProvisioningInterface.java:194)
at 
org.vovida.prov.util.ProvisioningServerWrapper.hasFeatures(ProvisioningServerWrapper.java:825)
at 
org.vovida.prov.util.ProvisioningServerWrapper.describeUser(ProvisioningServerWrapper.java:157)
at org.telverse.tollsaver.userutil.showuser(userutil.java:38)
at org.apache.jsp.addUserResult$jsp._jspService(addUserResult$jsp.java:395)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:414)
at org.apache.jsp.configureserver$jsp._jspService(configureserver$jsp.java:381)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
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:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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:2347)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at 

Re: 'referer' header contains Servlet path, not referrer

2004-09-11 Thread Keith Hankin
OK, I tried the 'history.go(-1)' solution. That *did* go back to the proper
page. However, it shows the page as it was before the user entered data,
forcing the user to re-enter all of their data, not just the field in error.
All I need to do is determine what the last page was so that I can forward
the existing request to it.

- Original Message -
From: [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, September 10, 2004 8:15 PM
Subject: Re: 'referer' header contains Servlet path, not referrer


 On Fri, Sep 10, 2004 at 12:58:30PM +0200, Bedrijven.nl wrote:
  I think you should use struts.
 How would that help?  Struts is completely useless for figuring out
 which page a user came from.

  -Oorspronkelijk bericht-
  Van: Keith Hankin [mailto:[EMAIL PROTECTED]
  Verzonden: Friday, September 10, 2004 11:52 AM
  Aan: Tomcat Users List
  Onderwerp: Re: 'referer' header contains Servlet path, not referrer
 
 
  My code is in the Servlet, and I can't access Javascript within the
Servlet.
 
   Keith Hankin wrote:
  
Here's the scenario: I am getting input data from the user and have
determined that the user has made an error. I want to redisplay the
last
page so they can fix the errors.

 well, your servlet could generate a small page that has the javascript
 in it.  (although then it would be javascript:history.go(-2) instead
of -1)
 If you have control over the input page (and feel like changing it)
 you could always add a hidden form field that describes which page the
user
 is looking at.  You could even use a bit of javascript (hiddenfield.value
=
 location.href) to grab the url.  Probably not the best way to do this,
 however.

 eric

 -
 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: using my own classes in my web-app

2004-09-11 Thread Arniel Pepito
To moderator:
 
 
PLEASE REMOVE ME FROM THIS MAILING LISTS
 
THANK YOU!

Sjoerd van Leent [EMAIL PROTECTED] wrote:
Peter Jarunek wrote:

Hello,

I'm new to Tomcat and need a help. I'd like to use my own classes in my JSPs, 
but I can not reach them from my JSPs. I added them (already compiled .class 
files) into WEB-INF/classes directory of my war file, but the JSP doesn't 
work. It shows the message of unknown class. How to use them?

Thanks for your answer! Peter

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


 

Did you try to use any packages?

Regards,
Sjoerd


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



-
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.

Re: using my own classes in my web-app

2004-09-11 Thread Atishay Kumar
To unsubscribe, e-mail: [EMAIL PROTECTED]


On Sat, 11 Sep 2004 05:03:52 -0700 (PDT), Arniel Pepito
[EMAIL PROTECTED] wrote:
 To moderator:
 
 PLEASE REMOVE ME FROM THIS MAILING LISTS
 
 THANK YOU!
 
 Sjoerd van Leent [EMAIL PROTECTED] wrote:
 Peter Jarunek wrote:
 
 Hello,
 
 I'm new to Tomcat and need a help. I'd like to use my own classes in my JSPs,
 but I can not reach them from my JSPs. I added them (already compiled .class
 files) into WEB-INF/classes directory of my war file, but the JSP doesn't
 work. It shows the message of unknown class. How to use them?
 
 Thanks for your answer! Peter
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 Did you try to use any packages?
 
 Regards,
 Sjoerd
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Do you Yahoo!?
 Shop for Back-to-School deals on Yahoo! Shopping.
 



-- 
:)
Atishay Kumar
Btech, SEM VII
DA-IICT
Gandhinagar - 382009
India
ph: +91 9825383948
/
 * Learn the rules as you would need them to break them properly *
 /

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



Re: 'referer' header contains Servlet path, not referrer

2004-09-11 Thread Tim Funk
In that case - you should use a hidden parameter to notify you of the next 
URL to goto on failure. This way you don't need to rely on the referer.

-Tim
Keith Hankin wrote:
OK, I tried the 'history.go(-1)' solution. That *did* go back to the proper
page. However, it shows the page as it was before the user entered data,
forcing the user to re-enter all of their data, not just the field in error.
All I need to do is determine what the last page was so that I can forward
the existing request to it.
- Original Message -
From: [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, September 10, 2004 8:15 PM
Subject: Re: 'referer' header contains Servlet path, not referrer

On Fri, Sep 10, 2004 at 12:58:30PM +0200, Bedrijven.nl wrote:
I think you should use struts.
How would that help?  Struts is completely useless for figuring out
which page a user came from.

-Oorspronkelijk bericht-
Van: Keith Hankin [mailto:[EMAIL PROTECTED]
Verzonden: Friday, September 10, 2004 11:52 AM
Aan: Tomcat Users List
Onderwerp: Re: 'referer' header contains Servlet path, not referrer
My code is in the Servlet, and I can't access Javascript within the
Servlet.
Keith Hankin wrote:

Here's the scenario: I am getting input data from the user and have
determined that the user has made an error. I want to redisplay the
last
page so they can fix the errors.
well, your servlet could generate a small page that has the javascript
in it.  (although then it would be javascript:history.go(-2) instead
of -1)
If you have control over the input page (and feel like changing it)
you could always add a hidden form field that describes which page the
user
is looking at.  You could even use a bit of javascript (hiddenfield.value
=
location.href) to grab the url.  Probably not the best way to do this,
however.

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


Re: java.io.InterruptedIOException

2004-09-11 Thread Tim Funk
It looks like custom vendor code making an HTTP connection as part of its 
processing.
	at org.vovida.prov.psLib.HttpPSConnection.sendRequest(HttpPSConnection.java:175)

-Tim
avi arora wrote:
Hi,
   I am using tomcat 4.0.5. I am getting the
java.io.InterruptedIOException in one of the context of my web
application. I am having the similar jsp file in another context which
uses the same libraries in that context. But there it works fine. Can
some one please suggest, some solution to this problem. I am attaching
the exception message below--
Thanks--
 java.io.InterruptedIOException: Read timed out
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at java.net.SocketInputStream.read(SocketInputStream.java:63)
at java.io.InputStreamReader.fill(InputStreamReader.java:168)
at java.io.InputStreamReader.read(InputStreamReader.java:244)
at java.io.BufferedReader.fill(BufferedReader.java:134)
at java.io.BufferedReader.readLine(BufferedReader.java:294)
at java.io.BufferedReader.readLine(BufferedReader.java:357)
at 
org.vovida.prov.psLib.HttpPSConnection.sendRequest(HttpPSConnection.java:175)
at org.vovida.prov.psLib.HostInterface.sendRequest(HostInterface.java:73)
at org.vovida.prov.psLib.PSInterface.sendRequest(PSInterface.java:77)
at 
org.vovida.prov.psLib.SocketProvisioningInterface.getFieldsInDomain(SocketProvisioningInterface.java:194)
at 
org.vovida.prov.util.ProvisioningServerWrapper.hasFeatures(ProvisioningServerWrapper.java:825)
at 
org.vovida.prov.util.ProvisioningServerWrapper.describeUser(ProvisioningServerWrapper.java:157)
at org.telverse.tollsaver.userutil.showuser(userutil.java:38)
at org.apache.jsp.addUserResult$jsp._jspService(addUserResult$jsp.java:395)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

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


RE: at the tomcat start up...log4j error..

2004-09-11 Thread Shilpa Nalgonda
Thanks a lot jake it works.

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 11, 2004 1:43 AM
To: Tomcat Users List
Subject: Re: at the tomcat start up...log4j error..


At 05:21 PM 9/10/2004 -0400, you wrote:
log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.D
igester).
log4j:WARN Please initialize the log4j system properly.
Starting service Tomcat-Standalone

I am getting the above error as the tomcat starts up, i hav elog4j.jar
under
commom/lib and log4j.proprties
under webapps/myapps/WEB-INF/lib... any clue..

Tomcat itself won't see the log4j.properties in your webapp.  There are two
issues here:

1.  Log4j tries to perform autoconfiguration at Tomcat startup and isn't
finding a config file.  The solution here is to put a simple
log4j.properties or log4j.xml file in common/classes

2.  Log4j won't perform automatic configuration for your webapp since the
one in common/lib can't see WEB-INF/classes.  In this case, there are a few
different solutions
a.  add a copy of log4j.jar to WEB-INF/lib and your config file to
WEB-INF/classes and autoconfiguration will happen and only affect your
webapp logging.

b.  perform manual configuration at webapp startup and provide Log4j
with the URL of the config file.  However, keep in mind that this will
configure logging not only for your webapp, but also for any other app that
is using Log4j.  This is because Log4j is global to all apps.  The solution
is to do as described in a or do c below...

c.  use a repository selector so that Log4j can be global, but use a
separate logger repository for each application.  This is certainly more
complex than a, but it is a good option.  See more here...
http://wiki.apache.org/logging-log4j/AppContainerLogging

If you check out the log4j-sandbox code mentioned at that link, make sure
to checkout the 0_3_alpha tag, as there are certain files that are required
that were removed from the HEAD branch because they were moved into
Log4j-1.3 HEAD.

Jake


-
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-Apache and SSL

2004-09-11 Thread Wade Billings
Here is a fun one for ya all... We recently decided to migrate from a
Jrun/Apahe platform to an Apache2.0/Tomcat5.0 platform. Everything went
great until we placed it into production and found that our SSL sites
were broken.

 

Here are the details, and forgive me, as I am not a developer so I may
misquote some Java terminology Be patient...

 

WE determine whether or not a page is secured via which port it is
sourced from. We have a pair of load balancers, which handle all of the
SSL, and pass only HTTP/1.1 back to the actual web servers where the JVM
sits. IN order for the app to determine whether or not it is secure, we
source all SSL'ized traffic from port 8000. This setup works very well
on Jrun, but not so well on Tomcat. It appears that for some reason, the
source port of 8000 is either lost or ignored during the
Apache/AJP13/Tomcat conversation. 

 

What I need to be able to do is to get Tomcat to recognize that the
source port from the load balancer has changed from port 80 to port 8000
so our app will behave correctly and will present our pages as secure.

 

Any help is greatly appreciated.

 

Cheers,

 

Q. Wade Billings

 



trying a jsp forum script

2004-09-11 Thread FRANCOIS Dufour
hi everybody its been a while but iam actualy tring a forum script
and iget JasperException folowed by an SAXParseException
and i realy dont found what it is
any idee that could help mee make it work?
here the eror i get from my tomcat4.0
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error

type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) 
that prevented it from fulfilling this request.

exception
org.apache.jasper.JasperException: Validation error messages from tag 
library fmtorg.xml.sax.SAXParseException: Attribute xmlns:c was already 
specified for element jsp:root.Validation error messages from tag library 
corg.xml.sax.SAXParseException: Attribute xmlns:c was already specified 
for element jsp:root.
	at 
org.apache.jasper.compiler.JspParseEventListener.validate(JspParseEventListener.java:1154)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:219)
	at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
	at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
	at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
	at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
	at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
	at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
	at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
	at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	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 com.terac.filters.GZIPFilter.doFilter(GZIPFilter.java:18)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at com.terac.filters.EncodingFilter.doFilter(EncodingFilter.java:21)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	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.java:190)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	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:2347)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	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:174)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at 

Re: trying a jsp forum script

2004-09-11 Thread Tim Funk
Sounds like a tag lib was declared twice in the JSP source.
-Tim
FRANCOIS Dufour wrote:
hi everybody its been a while but iam actualy tring a forum script
and iget JasperException folowed by an SAXParseException
and i realy dont found what it is
any idee that could help mee make it work?
here the eror i get from my tomcat4.0
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
 

type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server 
Error) that prevented it from fulfilling this request.

exception
org.apache.jasper.JasperException: Validation error messages from tag 
library fmtorg.xml.sax.SAXParseException: Attribute xmlns:c was 
already specified for element jsp:root.Validation error messages from 
tag library corg.xml.sax.SAXParseException: Attribute xmlns:c was 
already specified for element jsp:root.
at 
org.apache.jasper.compiler.JspParseEventListener.validate(JspParseEventListener.java:1154) 

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:219)

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


Other Question - RE: Help - Newbie questions - where are the uplo aded files stored ?

2004-09-11 Thread MATHOT Jacques
Hello,

Thanks a lot for the information and the link to the upload handling. So far it works 
very well, uploading the files in a temp directory.
The purpose is to upload archive for specific users (after authentication) in the 
archive directory of the application (called icaoref); consequently i would like to 
have those files stored in icaoref/archives instead of the temp directory.
But so far I do not succeed to do it.

Sorry of the part at the end of the message but it is generated automatically at the 
Agency, for legal reasons.

Thanks in advance,
Regards,
Jacques Mathot

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: vendredi 10 septembre 2004 14:54
To: Tomcat Users List; Arun Prasad R
Subject: RE: Help - Newbie questions - where are the uploaded files stored ?



Hi,
Both this and the original poster's intent are pretty bad as far as portability goes.

First, instead of re-inventing the wheel, use a good and proven componet for upload 
handling, like commons-fileupload 
(http://jakarta.apache.org/commons/fileupload/using.html).

Second, know that the Servlet Specification guarantees only one place where you can 
write files: the directory accessible via
(File) getServletContext().getAttribute(javax.servlet.context.tempdir).

If you want another directory, set it as an init-parameter to your upload servlet or 
your servlet context, or maybe even a JNDI Environment reference.  Don't rely on the 
concept of current working directory as that's wildly different from one server 
implementation to another, and it's highly insecure.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Arun Prasad R [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 8:00 AM
To: Tomcat Users List
Subject: Re: Help - Newbie questions - where are the uploaded files
stored
?

hi

you can set a session property like System.setProperty(user.dir, 
/your/application/home); this will change the applications current 
working dir.

i have not checked the side effects. whether tomcat will be affected by 
this action or not arun

On Fri, 10 Sep 2004 12:00:45 +0200, MATHOT Jacques 
[EMAIL PROTECTED] wrote:
 Hi All,

 I am implementing an upload function for my web applications using
Tomcat
4.0.14 server. I was expecting the files to be stored on the root
directory
of my application and not in one of the own Tomcat directories.
 How can I specify that the directory to be used is my application
root
directory ?
 Thanks in advance.
 Regards,
 Jacques Mathot

 FileInputStream fis = new FIleInputStream(Doc8585.zip);
 ...

 

 This message and any files transmitted with it are legally privileged
and
intended for the sole use of the individual(s) or entity to whom they
are
addressed. If you are not the intended recipient, please notify the
sender
by reply and delete the message and any attachments from your system.
Any
unauthorised use or disclosure of the content of this message is
strictly
prohibited and may be unlawful.

 Nothing in this e-mail message amounts to a contractual or legal
commitment on the part of EUROCONTROL unless it is confirmed by 
appropriately signed hard copy.

 Any views expressed in this message are those of the sender.

 -
 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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



This message and any files transmitted with it are legally privileged and intended for 
the sole use of the individual(s) or entity to whom they are addressed. If you are not 
the intended recipient, please notify the sender by reply and delete the message and 
any attachments from your system. Any unauthorised use or disclosure of the content of 
this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the 
part of EUROCONTROL unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.

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

error: duplicate local variable

2004-09-11 Thread Jack Lauman
I have the following piece of code that changes a password.  Eclipse 
gives the following
error message for line 11: duplicate local variable 'values'

Any help would be appreciated.
Thanks,
Jack
else if(pathInfo.equals(/changePassword)) {
  sql.setSqlValue(SELECT * FROM User WHERE UserID = ? AND Password = 
MD5(?));
 List values = new ArrayList();
 values.add(request.getParameter(userName));
 values.add(request.getParameter(oldPassword));
 sql.setValues(values);
 Result res = sql.executeQuery();
 if(res != null  res.getRowCount()  0)
{
 sql.setSqlValue(UPDATE User SET Password = MD5(?) WHERE 
UserID = ?);
   List values = new ArrayList();  Error 
duplicate local variable 'values'
   values.add(request.getParameter(newPassword));
   values.add(request.getParameter(userName));
   sql.setValues(values);
   sql.executeUpdate();
   result = 1;
   }
   else{
  response.sendError(500, Incorrect old password.);
  }
   }

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


Re: java.io.InterruptedIOException

2004-09-11 Thread avi arora
Hi,
But is there a way to correct it. The same library when used
within another context of same installation of tomcat doesnot give
this exception and works correctly (I just copied those libraries from
that context to this new context and I started getting this exception.
Infact I was not getting this exception few days back in this new
context as  well, but I started getting it when I restarted my
machine).
Thanks.
Avi



On Sat, 11 Sep 2004 10:20:40 -0400, Tim Funk [EMAIL PROTECTED] wrote:
 It looks like custom vendor code making an HTTP connection as part of its
 processing.
at 
 org.vovida.prov.psLib.HttpPSConnection.sendRequest(HttpPSConnection.java:175)
 
 
 -Tim
 
 
 avi arora wrote:
 
  Hi,
 I am using tomcat 4.0.5. I am getting the
  java.io.InterruptedIOException in one of the context of my web
  application. I am having the similar jsp file in another context which
  uses the same libraries in that context. But there it works fine. Can
  some one please suggest, some solution to this problem. I am attaching
  the exception message below--
  Thanks--
 
 
   java.io.InterruptedIOException: Read timed out
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at java.net.SocketInputStream.read(SocketInputStream.java:63)
at java.io.InputStreamReader.fill(InputStreamReader.java:168)
at java.io.InputStreamReader.read(InputStreamReader.java:244)
at java.io.BufferedReader.fill(BufferedReader.java:134)
at java.io.BufferedReader.readLine(BufferedReader.java:294)
at java.io.BufferedReader.readLine(BufferedReader.java:357)
at 
  org.vovida.prov.psLib.HttpPSConnection.sendRequest(HttpPSConnection.java:175)
at org.vovida.prov.psLib.HostInterface.sendRequest(HostInterface.java:73)
at org.vovida.prov.psLib.PSInterface.sendRequest(PSInterface.java:77)
at 
  org.vovida.prov.psLib.SocketProvisioningInterface.getFieldsInDomain(SocketProvisioningInterface.java:194)
at 
  org.vovida.prov.util.ProvisioningServerWrapper.hasFeatures(ProvisioningServerWrapper.java:825)
at 
  org.vovida.prov.util.ProvisioningServerWrapper.describeUser(ProvisioningServerWrapper.java:157)
at org.telverse.tollsaver.userutil.showuser(userutil.java:38)
at org.apache.jsp.addUserResult$jsp._jspService(addUserResult$jsp.java:395)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
 
 -
 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]