New Windows, Struts, IE 5 and sessions dying

2001-05-31 Thread Graeme Miller

Summary: Any known bugs and workarounds with Multiple Windows in IE5,
Servlet Sessions and Struts 1.0b1?

Detailed Version:

We are using Struts 1.0b1 and Tomcat J2EE form-based login security on our
website.  The user requests a protected page and is automatically redirected
by Tomcat to the login page from which they login and enter the site.  The
password and username gets stored in a session automatically by Tomcat for
use in further protected pages.  No problem there - it works perfectly.

However when we open a new window using the javascript functions
window.open(url), window.showModelessDialog(url) or
window.showModalDialog(url), things go badly wrong.  The moment the new
window is opened the user has to log in again in the main window before they
can do anything else.  Had a look at the HttpServletRequest and the the
j_username and j_password variables appear to be deleted from the session
attributes the moment you open the new window, but the cookie with the
session id still appears to be present.

After considerable effort we have narrowed the problem down to Struts
itself.  If we open the new window with a url that is just a static file
(html,gif etc) the session doesn't get lost.  If we open the new window with
a url that is a jsp file that doesn't involve struts once again everything
continues working fine.  But the moment we open the new window with a struts
url (ie *.do) the session gets lost in the main window.

Has anyone else had this problem?  Any known bugs in Struts 1.0b1 that we
should be aware of?  Any known solutions/workarounds?  Help! 

Thanks,
 
Graeme.



Moving from Struts 1.0b1 to Struts 1.0b3

2001-06-04 Thread Graeme Miller

Currently having a problem with migrating code from using Struts 1.0b1 to
Struts 1.0b3

Everything seems to work fine apart from the fact that the validate methods
on our form beans (ie subclasses of org.apache.struts.action.ActionForm) no
longer get called successfully.  I have had a look through the release notes
and cannot find any reasons why these methods would no longer work.  

Any ideas people?  The following error is what gets thrown in the tomcat
log.

java.lang.ClassCastException
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java, Compiled Code)
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java,
Compiled Code)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java, Compiled
Code)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java, Com
piled Code)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)

Thanks in advance.
Graeme.



Moving from Struts 1.0b1 to Struts 1.0b3

2001-06-05 Thread Graeme Miller

As no-one has provided any thoughts on this one I thought I would repost and
give a bit more detail on how the error is being caused.

Problem: The validate(mapping, request) method on the ActionForm class is
not completing sucessfully in Struts 1.0b3 where it was in Struts 1.0b1.  

Detail: This is a form that has a couple of struts file upload controls on
it (as well as text fields etc) so I suppose that might be related somehow.
The exception being thrown in the log is :-

java.lang.ClassCastException:
org.apache.struts.upload.MultipartRequestWrapper
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:144)
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:21
37)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)

at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)

Does anyone have any ideas?  This one has got me totally stumped and without
a solution we will have to remain on Struts 1.0b1.

Thanks in advance,

Graeme.

-Original Message-
From: Graeme Miller [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 5 June 2001 5:02 p.m.
To: '[EMAIL PROTECTED]'
Subject: Moving from Struts 1.0b1 to Struts 1.0b3


Currently having a problem with migrating code from using Struts 1.0b1 to
Struts 1.0b3

Everything seems to work fine apart from the fact that the validate methods
on our form beans (ie subclasses of org.apache.struts.action.ActionForm) no
longer get called successfully.  I have had a look through the release notes
and cannot find any reasons why these methods would no longer work.  

Any ideas people?  The following error is what gets thrown in the tomcat
log.

java.lang.ClassCastException
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java, Compiled Code)
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java,
Compiled Code)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java, Compiled
Code)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java, Com
piled Code)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)

Thanks in advance.
Graeme.



RE: invalid multipart request in beta 3

2001-06-06 Thread Graeme Miller

Peter that's a very similar error to what I am getting and I am doing the
same thing (migrating from b1 to b3 with file uploading).  Although the
symptom I am getting is the ActionForm.validate method not working.

If you find the answer please let me know!


> -Original Message-
> From: Peter Doyle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 7 June 2001 2:45 a.m.
> To: [EMAIL PROTECTED]
> Subject: invalid multipart request in beta 3
> 
> 
> Hi,
>  I recently changed from Struts b1 to b3. (I skipped b2) I 
> have doe working
> with b1 to handle uploading, based on the upload application 
> that came with
> struts. Since changed to b3 I get the following error:
> 
> javax.servlet.ServletException: MultipartIterator: invalid 
> multipart request
> data, doesn't start with boundary
> 
> I cannot find what has changed between struts b1 and b3 that 
> would cause
> this. I cannot find a way to resolve it. The code in my upload action
> executes and finishes. Control is passed to the controller 
> servlet where
> this problem occurs.
> 
> I would appreciate any help
> 
> Thanks,
> Peter
> 
> 
> 
> javax.servlet.ServletException: MultipartIterator: invalid 
> multipart request
> data, doesn't start with boundary
>   at
> org.apache.struts.upload.MultipartIterator.parseRequest(Multip
> artIterator.ja
> va:345)
>   at 
> org.apache.struts.upload.MultipartIterator.(MultipartIterator.
> java:152)
>   at
> org.apache.struts.upload.DiskMultipartRequestHandler.handleReq
> uest(DiskMulti
> partRequestHandler.java:65)
>   at 
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
>   at
> org.apache.struts.action.ActionServlet.processPopulate(ActionS
> ervlet.java:20
> 53)
>   at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1563)
>   at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
>   at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
>   at
> allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequest
> Dispatcher.jav
> a:88)
>   at
> org.apache.struts.action.ActionServlet.processActionForward(Ac
> tionServlet.ja
> va:1758)
>   at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1595)
>   at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
>   at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
>   at
> allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequest
> Dispatcher.jav
> a:88)
>   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
>   at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
>   at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
>   at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
>   at allaire.jrun.WorkerThread.run(WorkerThread.java:74)
> 
> 
> 
> 
> 
> --
> __
> Peter Doyle  TEO Media Ireland
> [EMAIL PROTECTED] http://www.teomedia.com
> Ph +353 1 888 1353  Fx +353 1 888 1354
> Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
> __
> 



RE: invalid multipart request in beta 3

2001-06-06 Thread Graeme Miller

Are you using IE 5.5?  Coz there are some documented issues with IE5 and
below and file uploads in Struts.  

Unfortunately I AM using IE5.5 and this is not working for me in Struts
1.0b3 where it was in Struts 1.0b1 so something has definitely been broken
in either b2 or b3.

> -Original Message-
> From: Peter Doyle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 7 June 2001 4:29 a.m.
> To: [EMAIL PROTECTED]
> Subject: RE: invalid multipart request in beta 3
> 
> 
> The form tag uses enctype "multipart/form-data". Uploading is not the
> problem. The file uploads okay. When I forward to the next 
> action I get the
> error. I'm wondering if the request is wrapped in a Mulitpart 
> request of
> some kind.
> 
> Peter
> 
> 
> -Original Message-
> From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
> Sent: 06 June 2001 16:42
> To: [EMAIL PROTECTED]
> Subject: Re: invalid multipart request in beta 3
> 
> 
> Hi Peter,
> 
> I have a file upload program and I am using b3 and everything 
> is working
> just fine. Would you make sure that you set the enctype to
> "multipart/form-data" on your form tag.
> 
> Thanks,
> Amalendu Biswas.
> 
> 
> >From: "Peter Doyle" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: <[EMAIL PROTECTED]>
> >Subject: invalid multipart request in beta 3
> >Date: Wed, 6 Jun 2001 15:44:58 +0100
> >
> >Hi,
> >  I recently changed from Struts b1 to b3. (I skipped b2) I have doe
> >working
> >with b1 to handle uploading, based on the upload application 
> that came with
> >struts. Since changed to b3 I get the following error:
> >
> >javax.servlet.ServletException: MultipartIterator: invalid multipart
> >request
> >data, doesn't start with boundary
> >
> >I cannot find what has changed between struts b1 and b3 that 
> would cause
> >this. I cannot find a way to resolve it. The code in my upload action
> >executes and finishes. Control is passed to the controller 
> servlet where
> >this problem occurs.
> >
> >I would appreciate any help
> >
> >Thanks,
> >Peter
> >
> >
> >
> >javax.servlet.ServletException: MultipartIterator: invalid multipart
> >request
> >data, doesn't start with boundary
> > at
> >org.apache.struts.upload.MultipartIterator.parseRequest(Multi
> partIterator.j
> a
> >va:345)
> > at 
> org.apache.struts.upload.MultipartIterator.(MultipartIterator.
> java:152)
> > at
> >org.apache.struts.upload.DiskMultipartRequestHandler.handleRe
> quest(DiskMult
> i
> >partRequestHandler.java:65)
> > at 
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
> > at
> >org.apache.struts.action.ActionServlet.processPopulate(Action
> Servlet.java:2
> 0
> >53)
> > at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1563)
> > at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> > at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
> > at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
> > at
> >allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunReques
> tDispatcher.ja
> v
> >a:88)
> > at
> >org.apache.struts.action.ActionServlet.processActionForward(A
> ctionServlet.j
> a
> >va:1758)
> > at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1595)
> > at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> > at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
> > at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
> > at
> >allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunReques
> tDispatcher.ja
> v
> >a:88)
> > at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
> > at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
> > at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
> > at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
> > at allaire.jrun.WorkerThread.run(WorkerThread.java:74)
> >
> >
> >
> >
> >
> >--
> >__
> >Peter Doyle  TEO Media Ireland
> >[EMAIL PROTECTED] http://www.teomedia.com
> >Ph +353 1 888 1353  Fx +353 1 888 1354
> >Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
> >__
> >
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 



RE: Moving from Struts 1.0b1 to Struts 1.0b3

2001-06-06 Thread Graeme Miller

Unfortunately in my case the controller is not reused but the form bean is,
meaning if I was to do this validation in the controller I would have to do
it for every Action that uses this bean.  Thanks for the suggestion but it
looks like I will have to stay on b1 until a more stable release of Struts
comes out (maybe the 1.0 final release?)

> -Original Message-
> From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 7 June 2001 3:31 a.m.
> To: [EMAIL PROTECTED]
> Subject: Re: Moving from Struts 1.0b1 to Struts 1.0b3
> 
> 
> Graeme Miller,
> 
> As a solution you can have your controller do the validation 
> instead of 
> validating in the form bean. Let me know if you need any further help.
> 
> Thanks,
> Amalendu Biswas.
> 
> >From: Graeme Miller <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: "'[EMAIL PROTECTED]'" 
> <[EMAIL PROTECTED]>
> >Subject: Moving from Struts 1.0b1 to Struts 1.0b3
> >Date: Wed, 6 Jun 2001 18:07:59 +1200
> >
> >As no-one has provided any thoughts on this one I thought I 
> would repost 
> >and
> >give a bit more detail on how the error is being caused.
> >
> >Problem: The validate(mapping, request) method on the 
> ActionForm class is
> >not completing sucessfully in Struts 1.0b3 where it was in 
> Struts 1.0b1.
> >
> >Detail: This is a form that has a couple of struts file 
> upload controls on
> >it (as well as text fields etc) so I suppose that might be 
> related somehow.
> >The exception being thrown in the log is :-
> >
> >java.lang.ClassCastException:
> >org.apache.struts.upload.MultipartRequestWrapper
> > at
> >org.apache.tomcat.facade.RequestDispatcherImpl.forward(Reques
> tDispatcherImpl
> >.java:144)
> > at
> >org.apache.struts.action.ActionServlet.processValidate(Action
> Servlet.java:21
> >37)
> > at
> >org.apache.struts.action.ActionServlet.process(ActionServlet.
> java:1564)
> > at
> >org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
> > at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >org.apache.tomcat.core.ServletWrapper.doService(ServletWrappe
> r.java:404)
> > at 
> org.apache.tomcat.core.Handler.service(Handler.java, Compiled
> >Code)
> > at
> >org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.
> java, Compiled
> >Code)
> > at
> >org.apache.tomcat.core.ContextManager.internalService(Context
> Manager.java:79
> >7)
> > at
> >org.apache.tomcat.core.ContextManager.service(ContextManager.
> java:743)
> > at
> >org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pr
> ocessConnection
> >(Ajp12ConnectionHandler.java:166)
> >
> > at
> >org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
> >Compiled Code)
> > at
> >org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadP
> ool.java,
> >Compiled Code)
> > at java.lang.Thread.run(Thread.java:479)
> >
> >Does anyone have any ideas?  This one has got me totally stumped and 
> >without
> >a solution we will have to remain on Struts 1.0b1.
> >
> >Thanks in advance,
> >
> >Graeme.
> >
> >-Original Message-
> >From: Graeme Miller [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, 5 June 2001 5:02 p.m.
> >To: '[EMAIL PROTECTED]'
> >Subject: Moving from Struts 1.0b1 to Struts 1.0b3
> >
> >
> >Currently having a problem with migrating code from using 
> Struts 1.0b1 to
> >Struts 1.0b3
> >
> >Everything seems to work fine apart from the fact that the 
> validate methods
> >on our form beans (ie subclasses of 
> org.apache.struts.action.ActionForm) no
> >longer get called successfully.  I have had a look through 
> the release 
> >notes
> >and cannot find any reasons why these methods would no longer work.
> >
> >Any ideas people?  The following error is what gets thrown 
> in the tomcat
> >log.
> >
> >java.lang.ClassCastException
> > at
> >org.apache.tomcat.facade.RequestDispatcherImpl.forward(Reques
> tDispatcherImpl
> >.java, Compiled Code)
> > at
> >org.apache.struts.action.ActionServlet.processValidate(Action
> Servlet.java,
> >Compiled Code)
> > at
> >org.apache.struts.action.ActionServ

RE: SOLVED invalid multipart request in beta 3 Controller Wrapping Request

2001-06-07 Thread Graeme Miller

Hmm... it actually looks like someone has beaten me to this. See
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1947

--

Thanks Peter.  Have logged this bug with your comments.  See
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2039

> -Original Message-
> From: Peter Doyle [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 8 June 2001 4:58 a.m.
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: SOLVED invalid multipart request in beta 3 Controller
> Wrapping Request
> 
> 
> HAHA!
> 
> Right for anyone (not many) who came across this problem here 
> is how to
> solve it.
> 
> In the struts upload application you will see that control is 
> sent to a JSP
> after the uploading. If you send it to another action you get the
> MultipartIterator problem. This is *I think* because the 
> request is wrapped
> in a MultipartRequest, as of beta 2. Now the action you 
> forward to does not
> expect the multipart request, I think, so it causes the 
> exception... I guess
> you could change the encrypt type of the destination action... anyway
> 
> What I did was forward control to a JSP that only contains a
>  to the action I want it to go to in the 
> first place. As I'm
> dumping everything into session anyway I don't need to worry about
> replicating the request query.
> The redirect jsp is rendered and control is redirected. You 
> don't even know
> its there.
> 
> The reason I don't use multipart in my original action is its 
> not designed
> to use multipart. I do the uploading in a separate form and 
> action (that is
> multipart) and then go back to the original action with the 
> result, not to a
> jsp.
> 
> Well it works for me :)
> 
> Peter
> 
> 
> -Original Message-
> From: Peter Doyle [mailto:[EMAIL PROTECTED]]
> Sent: 07 June 2001 11:34
> To: [EMAIL PROTECTED]
> Subject: RE: invalid multipart request in beta 3 Controller Wrapping
> Request
> 
> 
> Hi,
>  I'm using IE 6 beta. I tired it with Netscape 6 and there 
> was no change.
> Its not a browser issue. The struts upload example works I 
> think because the
> forward is to a jsp and not to another action. In my case I 
> forward to an
> action that takes in the request from the controller. I guess 
> the request is
> Multipart but should be a regualar requestor the other 
> way around.. Its
> just confusing.
> 
> At least I'm not alone :)
> 
> Peter
> 
> -Original Message-
> From: Graeme Miller [mailto:[EMAIL PROTECTED]]
> Sent: 06 June 2001 23:17
> To: '[EMAIL PROTECTED]'
> Subject: RE: invalid multipart request in beta 3
> 
> 
> Are you using IE 5.5?  Coz there are some documented issues 
> with IE5 and
> below and file uploads in Struts.
> 
> Unfortunately I AM using IE5.5 and this is not working for me 
> in Struts
> 1.0b3 where it was in Struts 1.0b1 so something has 
> definitely been broken
> in either b2 or b3.
> 
> > -Original Message-
> > From: Peter Doyle [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 7 June 2001 4:29 a.m.
> > To: [EMAIL PROTECTED]
> > Subject: RE: invalid multipart request in beta 3
> >
> >
> > The form tag uses enctype "multipart/form-data". Uploading 
> is not the
> > problem. The file uploads okay. When I forward to the next
> > action I get the
> > error. I'm wondering if the request is wrapped in a Mulitpart
> > request of
> > some kind.
> >
> > Peter
> >
> >
> > -Original Message-
> > From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
> > Sent: 06 June 2001 16:42
> > To: [EMAIL PROTECTED]
> > Subject: Re: invalid multipart request in beta 3
> >
> >
> > Hi Peter,
> >
> > I have a file upload program and I am using b3 and everything
> > is working
> > just fine. Would you make sure that you set the enctype to
> > "multipart/form-data" on your form tag.
> >
> > Thanks,
> > Amalendu Biswas.
> >
> >
> > >From: "Peter Doyle" <[EMAIL PROTECTED]>
> > >Reply-To: [EMAIL PROTECTED]
> > >To: <[EMAIL PROTECTED]>
> > >Subject: invalid multipart request in beta 3
> > >Date: Wed, 6 Jun 2001 15:44:58 +0100
> > >
> > >Hi,
> > >  I recently changed from Struts b1 to b3. (I skipped b2) 
> I have doe
> > >working
> > >with b1 to handle uploading, based on the upload application
> > that came with
> > >struts. Since changed to b3 I get the following error:
> > >
> > >javax.servlet.

RE: SOLVED invalid multipart request in beta 3 Controller Wrapping Request

2001-06-07 Thread Graeme Miller

Thanks Peter.  Have logged this bug with your comments.  See
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2039

> -Original Message-
> From: Peter Doyle [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 8 June 2001 4:58 a.m.
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: SOLVED invalid multipart request in beta 3 Controller
> Wrapping Request
> 
> 
> HAHA!
> 
> Right for anyone (not many) who came across this problem here 
> is how to
> solve it.
> 
> In the struts upload application you will see that control is 
> sent to a JSP
> after the uploading. If you send it to another action you get the
> MultipartIterator problem. This is *I think* because the 
> request is wrapped
> in a MultipartRequest, as of beta 2. Now the action you 
> forward to does not
> expect the multipart request, I think, so it causes the 
> exception... I guess
> you could change the encrypt type of the destination action... anyway
> 
> What I did was forward control to a JSP that only contains a
>  to the action I want it to go to in the 
> first place. As I'm
> dumping everything into session anyway I don't need to worry about
> replicating the request query.
> The redirect jsp is rendered and control is redirected. You 
> don't even know
> its there.
> 
> The reason I don't use multipart in my original action is its 
> not designed
> to use multipart. I do the uploading in a separate form and 
> action (that is
> multipart) and then go back to the original action with the 
> result, not to a
> jsp.
> 
> Well it works for me :)
> 
> Peter
> 
> 
> -Original Message-
> From: Peter Doyle [mailto:[EMAIL PROTECTED]]
> Sent: 07 June 2001 11:34
> To: [EMAIL PROTECTED]
> Subject: RE: invalid multipart request in beta 3 Controller Wrapping
> Request
> 
> 
> Hi,
>  I'm using IE 6 beta. I tired it with Netscape 6 and there 
> was no change.
> Its not a browser issue. The struts upload example works I 
> think because the
> forward is to a jsp and not to another action. In my case I 
> forward to an
> action that takes in the request from the controller. I guess 
> the request is
> Multipart but should be a regualar requestor the other 
> way around.. Its
> just confusing.
> 
> At least I'm not alone :)
> 
> Peter
> 
> -Original Message-
> From: Graeme Miller [mailto:[EMAIL PROTECTED]]
> Sent: 06 June 2001 23:17
> To: '[EMAIL PROTECTED]'
> Subject: RE: invalid multipart request in beta 3
> 
> 
> Are you using IE 5.5?  Coz there are some documented issues 
> with IE5 and
> below and file uploads in Struts.
> 
> Unfortunately I AM using IE5.5 and this is not working for me 
> in Struts
> 1.0b3 where it was in Struts 1.0b1 so something has 
> definitely been broken
> in either b2 or b3.
> 
> > -Original Message-
> > From: Peter Doyle [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 7 June 2001 4:29 a.m.
> > To: [EMAIL PROTECTED]
> > Subject: RE: invalid multipart request in beta 3
> >
> >
> > The form tag uses enctype "multipart/form-data". Uploading 
> is not the
> > problem. The file uploads okay. When I forward to the next
> > action I get the
> > error. I'm wondering if the request is wrapped in a Mulitpart
> > request of
> > some kind.
> >
> > Peter
> >
> >
> > -Original Message-
> > From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
> > Sent: 06 June 2001 16:42
> > To: [EMAIL PROTECTED]
> > Subject: Re: invalid multipart request in beta 3
> >
> >
> > Hi Peter,
> >
> > I have a file upload program and I am using b3 and everything
> > is working
> > just fine. Would you make sure that you set the enctype to
> > "multipart/form-data" on your form tag.
> >
> > Thanks,
> > Amalendu Biswas.
> >
> >
> > >From: "Peter Doyle" <[EMAIL PROTECTED]>
> > >Reply-To: [EMAIL PROTECTED]
> > >To: <[EMAIL PROTECTED]>
> > >Subject: invalid multipart request in beta 3
> > >Date: Wed, 6 Jun 2001 15:44:58 +0100
> > >
> > >Hi,
> > >  I recently changed from Struts b1 to b3. (I skipped b2) 
> I have doe
> > >working
> > >with b1 to handle uploading, based on the upload application
> > that came with
> > >struts. Since changed to b3 I get the following error:
> > >
> > >javax.servlet.ServletException: MultipartIterator: invalid 
> multipart
> > >request
> > >data, doesn't start 

RE: Override the presentation of html:errors

2001-05-01 Thread Graeme Miller

You have some control over the format of the font and background etc by
setting the errors.header and errors.footer properties in your
ApplicationResources.properties file

You can put html tags in these headers and footers

eg.

errors.header=
errors.footer=

where errorMessage is configured via a stylesheet

Regards,

Graeme.

-Original Message-
From: Jeff Trent [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 May 2001 8:36 a.m.
To: [EMAIL PROTECTED]
Subject: Override the presentation of html:errors


Short of writing my own taglib (which I'd like to avoid if I can), how does
one iterate over the errors collection to present them in a different way.
Any examples would be helpful...

Thanks,
Jeff



File uploads and Struts

2001-05-02 Thread Graeme Miller

Anyone here know where I can find a tutorial or explanation on using the
 tag for file uploads?  The struts documentation is fairly thin
on this area.

Regards,

Graeme.



RE: Newbie question about form beans

2001-05-08 Thread Graeme Miller

To be specific go the following url and just click the Thread --> link
repeatedly to follow the thread

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg05429.html

> -Original Message-
> From: Jean-Noel Ribette [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 4 May 2001 12:08 a.m.
> To: [EMAIL PROTECTED]
> Subject: Re: Newbie question about form beans
> 
> 
> Hi Jim,
> 
> There has been discussions about this on the mailing list. I 
> suggest you have a look at the archive at
> http://www.mail-archive.com/struts-user%40jakarta.apache.org/.
 Look for "EJB" and specially "communicating with EJB".

Jean-Noel

- Original Message -
From: Jim Downing <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 1:42 PM
Subject: Newbie question about form beans


> Hi,
> I'm new to struts, we're planning to use it to access an EJB tier.  I'm
> bothered by what seems to be an inefficient and difficult to maintain
> pattern were using as a consequence:
>
> A large portion of what our app does is pretty standard - getting a record
> out of a database, presenting it to the user in form(s) to be edited, and
> then saving the changes back to the database.  The structure can be viewed
> something like this:- the entity EJB has a set of attributes, with a set
of
> accessors, and some other stuff.  To reduce network traffic we use
> ValueObjects, which have the same set of attributes and accessors. This
will
> get passed into the struts application, where it interacts with a form
bean
> which has, oh look!: the same set of attributes and accessors, and some
> methods to do other stuff.
>
> Surely it should be possible to define a single bean for attributes and
> accessors, and wrap it with the functionality it needs at different
stages.
> I can see my way through doing this in the EJB tier, but not when it comes
> to struts - since my form bean already extends ActionForm and multiple
> inheritance is unavailable.
>
> Please somebody telling I'm totally missing the trick here!
> jim
>
>