Struts tag external resource?

2004-02-17 Thread Bjørn T Johansen
I need to configure my IDE with an external link, as well as local, to 
the tld tag files, so I was just wondering which URI I can use for the 
external resource files?

Regards,

BTJ

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


Re: Positional problem?

2003-12-05 Thread Bjørn T Johansen
Well, it kind of works... The focus is being set on the correct field,
but the browser doesn't scroll the page down to that field.
Is it something I am missing?


BTJ

On Thu, 2003-12-04 at 08:01, John Ferguson Smart wrote:
> When we submit the form, we call a Javascript function to set a hidden 
> field ('target_field'), which is where we want to go on the updated page :
> 
> function submitForm(theForm, actionChoice, targetFieldName) {
> setValue(theForm.query, actionChoice);
> setValue(theForm.target_field, targetFieldName);
> theForm.submit();
> }
> 
> 
> Then, when we display the page, we use  another Javascript function to 
> scroll to the right place :
> 
> function jumpField(oForm,ofield) {
> var i=0;
> var elementsLength = oForm.elements.length;
> 
> for ( i=0 ; i <= elementsLength-1 ; i++ ) {
> var fName = oForm.elements[i].name;
> if ( fName == ofield.name ) {
> oForm.elements[i+1].focus();
> break;
> } else {
> continue;
> }
> }
> }
> 
> Cheers,
> 
> Bjørn T Johansen wrote:
> 
> >Does anyone have any examples? My javascript knowledge isn't where it
> >should be yet
> >
> >
> >BTJ
> >
> >On Wed, 2003-12-03 at 14:49, John Smart wrote:
> >  
> >
> >>We did something like that using an extra field (focus) to know where 
> >>you are and some javascript to place the focus at the right place when 
> >>the page is redisplayed.
> >>
> >>Bjørn T Johansen wrote:
> >>
> >>
> >>
> >>>I have a number of jsp pages that are longer than one page and if I am
> >>>at the bottom of a page and submit the page, I get back at the top of
> >>>the page. Is there a way to get back, after the submit, to the place you
> >>>were before the submit?
> >>>
> >>>
> >>>Regards,
> >>>
> >>>BTJ
> >>>
> >>>
> >>>-
> >>>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]
> >
> >  
> >


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



Re: Positional problem?

2003-12-04 Thread Bjørn T Johansen
Oki, thanks... I will try this... :)

BTJ

On Thu, 2003-12-04 at 08:01, John Ferguson Smart wrote:
> When we submit the form, we call a Javascript function to set a hidden 
> field ('target_field'), which is where we want to go on the updated page :
> 
> function submitForm(theForm, actionChoice, targetFieldName) {
> setValue(theForm.query, actionChoice);
> setValue(theForm.target_field, targetFieldName);
> theForm.submit();
> }
> 
> 
> Then, when we display the page, we use  another Javascript function to 
> scroll to the right place :
> 
> function jumpField(oForm,ofield) {
> var i=0;
> var elementsLength = oForm.elements.length;
> 
> for ( i=0 ; i <= elementsLength-1 ; i++ ) {
> var fName = oForm.elements[i].name;
> if ( fName == ofield.name ) {
> oForm.elements[i+1].focus();
> break;
> } else {
> continue;
> }
> }
> }
> 
> Cheers,
> 
> Bjørn T Johansen wrote:
> 
> >Does anyone have any examples? My javascript knowledge isn't where it
> >should be yet
> >
> >
> >BTJ
> >
> >On Wed, 2003-12-03 at 14:49, John Smart wrote:
> >  
> >
> >>We did something like that using an extra field (focus) to know where 
> >>you are and some javascript to place the focus at the right place when 
> >>the page is redisplayed.
> >>
> >>Bjørn T Johansen wrote:
> >>
> >>
> >>
> >>>I have a number of jsp pages that are longer than one page and if I am
> >>>at the bottom of a page and submit the page, I get back at the top of
> >>>the page. Is there a way to get back, after the submit, to the place you
> >>>were before the submit?
> >>>
> >>>
> >>>Regards,
> >>>
> >>>BTJ
> >>>
> >>>
> >>>-
> >>>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]
> >
> >  
> >


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



Re: Positional problem?

2003-12-03 Thread Bjørn T Johansen
Does anyone have any examples? My javascript knowledge isn't where it
should be yet


BTJ

On Wed, 2003-12-03 at 14:49, John Smart wrote:
> We did something like that using an extra field (focus) to know where 
> you are and some javascript to place the focus at the right place when 
> the page is redisplayed.
> 
> Bjørn T Johansen wrote:
> 
> >I have a number of jsp pages that are longer than one page and if I am
> >at the bottom of a page and submit the page, I get back at the top of
> >the page. Is there a way to get back, after the submit, to the place you
> >were before the submit?
> >
> >
> >Regards,
> >
> >BTJ
> >
> >
> >-
> >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]



Positional problem?

2003-12-03 Thread Bjørn T Johansen
I have a number of jsp pages that are longer than one page and if I am
at the bottom of a page and submit the page, I get back at the top of
the page. Is there a way to get back, after the submit, to the place you
were before the submit?


Regards,

BTJ


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



Re: This code works in Tomcat & Sun One 7 Appsvr but not WLS 8.1

2003-11-07 Thread Bjørn T Johansen
This is a bug in WLS 8.1 which is going to be fixed in SP 2.. Meanwhile
a patch is available from BEA...

BTJ

On Fri, 2003-11-07 at 13:37, Joshua White wrote:
> Has anyone else had a problem with the bean:define tag?
>  
> 
> 
> 
> 
> This is a little frustrating! Any help would be appreciated.
> 
> Following code works in Tomcat & Sun One 7 Appserver but not in WLS 8.1.
> 
> 
> 
>  type="java.lang.String" 
> property="someProperty" scope="session" toScope="page" />
>  value="<%=propertyThatCausesProblems%>">
> ...
> 
> 
> The first line works in all environments and demonstrates that the form bean is 
> there and that the property is not null. (No problem here)
> The next line, I define a page scoped variable (I have tried omitting the toSocpe 
> attribute all togeather as well). No errors are generated from this line.
> 
> An error gets generated from the third line. The error message explains that the 
> "propertyThatCausesProblems" is not defined.
> 
> If I sneek a line between lines two and three which defines a string named 
> "propertyThatCausesProblems", the problem goes away.
> 
> I am not sure what to do here. It seem as though the bean:define tag does not every 
> create a variable (Only when deployed on WLS 8.1).
> 
> Any ideas?
> 
> Regards,
> 
> Joshua
> 
> 
> 
> 


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



RE: Workaround for IE "streamer bug"?

2003-10-31 Thread Bjørn T Johansen
Ok, now I have tried adding a dummy=.pdf on the url, but it still tells
me that it is downloading a file of Filetype = Adobe Acrobat Control for
ActiveX and ask me to open og save file. If I then choose open, IE
always ask me which application to use, even if it just told me that the
filetype was acrobat!??


BTJ

On Thu, 2003-10-30 at 19:41, Prabhat Kumar (IT) wrote:
> JavaScript?
> 
> -Original Message-
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 30, 2003 1:36 PM
> To: Struts Users Mailing List
> Subject: RE: Workaround for IE "streamer bug"?
> 
> 
> Oki, that sounds like an idea :)
> But how do I add a querystring to my url when submitting a form?
> 
> BTJ
> 
> On Thu, 2003-10-30 at 19:05, Prabhat Kumar (IT) wrote:
> > I guess this is a known problem with IE. I can't remember but I think we had the 
> > same problem with IE, and we came across a suggestion somewhere to end the pdf 
> > requesting URL with a .pdf (something like 
> > http://servername/xyz/something.do?your-param=xyz&dummy=.pdf) 
> > 
> > 
> > -Original Message-
> > From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 30, 2003 12:59 PM
> > To: Struts Users Mailing List
> > Subject: Re: Workaround for IE "streamer bug"?
> > 
> > 
> > Well, I have tried both inline and attachment, the only difference is
> > that when using attachment I get question of where to save the file on
> > all the other browsers instead of just opening (as expected), and IE
> > still doesn't work. In fact, using attachment is worse for IE...
> > 
> > Any more suggestions are appreciated...
> > 
> > BTJ
> > 
> > On Thu, 2003-10-30 at 15:19, [EMAIL PROTECTED] wrote:
> > > This header currently works for me in a similar case. Try changing your 
> > > code:
> > > 
> > > response.setHeader("Content-Disposition", "attachment; filename=\"" + 
> > > filename + "\"");
> > > 
> > > HTH.
> > >  
> > > Atenciosamente,
> > > Bruno Arantes de Andrade Bueno
> > > Webdeveloper Pleno
> > > 
> > > Fone: +55 (34) 3231-1073
> > > Solution WEB - Soluções Para Internet!
> > > www.solutionweb.com.br
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Bjørn T Johansen <[EMAIL PROTECTED]>
> > > 10/30/2003 07:05 AM
> > > Please respond to "Struts Users Mailing List"
> > > 
> > >  
> > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > cc: 
> > > Subject:Workaround for IE "streamer bug"?
> > > 
> > > 
> > > I have a little problem. I am using the following code to stream pdf
> > > files to the browser..:
> > > 
> > > fis = new FileInputStream(filename);
> > >   byte[] buf = new byte[fis.available()];
> > > 
> > >   response.setHeader("Content-Disposition", "inline;filename=" +
> > > filename + ";");
> > >   response.setContentType("application/pdf");
> > >   response.setHeader("Connection", "keep-alive");
> > >   response.setContentLength(buf.length);
> > >   response.getOutputStream().write(buf,0,fis.read(buf));
> > >   response.getOutputStream().flush();
> > >   response.getOutputStream().close();
> > >   fis.close();
> > > 
> > > This works ok in all browsers except for IE. When using IE, a dialog box
> > > asking the user for which application to open the file in, is always
> > > displayed. Why? And is there a workaround for this?
> > > 
> > > 
> > > Thanks...
> > > 
> > > BTJ
> > > 
> > > 
> > > -
> > > 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]
> > 
> 
> 
> -
> 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: Workaround for IE "streamer bug"?

2003-10-30 Thread Bjørn T Johansen
As far as I can tell, this is the exact same code that I am using and
this doesn't work on my IE (or at work)
Are there any settings I can change on IE?

BTJ

On Thu, 2003-10-30 at 21:16, Nicholson, Robb wrote:
> PDF files work OK for us. It displays right in Explorer (with the plug-in
> from Adobe). For files that Explorer does not know how to handle, I put in
> the content-disposition fix I got from this list, and that worked great.
> 
> Here's the basics of my code...
> 
> (The method "writeContent" is basically a loop that gets a byte stream from
> the file and writes that directly to the output stream.)
> 
> >>>
> 
> protected void processRequest(HttpServletRequest request, 
>   HttpServletResponse response)
>   throws ServletException, IOException
> {
>   FormFile file = (FormFile) request.getAttribute("uploadedFile");
> 
>   // Set servlet response type -- if not set assume text
>   response.setContentType( (file.getContentType() == null) ?
> "text/plain" : 
>   file.getContentType() );
>   // Set the content type so download displays filename instead of
> request URI
>   response.setHeader("Content-Disposition","attachment; filename=\"" +
> 
>   file.getFileName() + "\"");
> 
>   // Get an output stream
>   ServletOutputStream out =  response.getOutputStream();
> 
>   // output the file
>   writeContent( out, file );
> }
> 
> >>>


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



RE: Workaround for IE "streamer bug"?

2003-10-30 Thread Bjørn T Johansen
Ok, I have a small hole at the moment in my Javascript knowledge; I have
just started using js :(

BTJ

On Thu, 2003-10-30 at 19:41, Prabhat Kumar (IT) wrote:
> JavaScript?
> 
> -Original Message-
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 30, 2003 1:36 PM
> To: Struts Users Mailing List
> Subject: RE: Workaround for IE "streamer bug"?
> 
> 
> Oki, that sounds like an idea :)
> But how do I add a querystring to my url when submitting a form?
> 
> BTJ
> 
> On Thu, 2003-10-30 at 19:05, Prabhat Kumar (IT) wrote:
> > I guess this is a known problem with IE. I can't remember but I think we had the 
> > same problem with IE, and we came across a suggestion somewhere to end the pdf 
> > requesting URL with a .pdf (something like 
> > http://servername/xyz/something.do?your-param=xyz&dummy=.pdf) 
> > 
> > 
> > -Original Message-
> > From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 30, 2003 12:59 PM
> > To: Struts Users Mailing List
> > Subject: Re: Workaround for IE "streamer bug"?
> > 
> > 
> > Well, I have tried both inline and attachment, the only difference is
> > that when using attachment I get question of where to save the file on
> > all the other browsers instead of just opening (as expected), and IE
> > still doesn't work. In fact, using attachment is worse for IE...
> > 
> > Any more suggestions are appreciated...
> > 
> > BTJ
> > 
> > On Thu, 2003-10-30 at 15:19, [EMAIL PROTECTED] wrote:
> > > This header currently works for me in a similar case. Try changing your 
> > > code:
> > > 
> > > response.setHeader("Content-Disposition", "attachment; filename=\"" + 
> > > filename + "\"");
> > > 
> > > HTH.
> > >  
> > > Atenciosamente,
> > > Bruno Arantes de Andrade Bueno
> > > Webdeveloper Pleno
> > > 
> > > Fone: +55 (34) 3231-1073
> > > Solution WEB - Soluções Para Internet!
> > > www.solutionweb.com.br
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Bjørn T Johansen <[EMAIL PROTECTED]>
> > > 10/30/2003 07:05 AM
> > > Please respond to "Struts Users Mailing List"
> > > 
> > >  
> > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > cc: 
> > > Subject:Workaround for IE "streamer bug"?
> > > 
> > > 
> > > I have a little problem. I am using the following code to stream pdf
> > > files to the browser..:
> > > 
> > > fis = new FileInputStream(filename);
> > >   byte[] buf = new byte[fis.available()];
> > > 
> > >   response.setHeader("Content-Disposition", "inline;filename=" +
> > > filename + ";");
> > >   response.setContentType("application/pdf");
> > >   response.setHeader("Connection", "keep-alive");
> > >   response.setContentLength(buf.length);
> > >   response.getOutputStream().write(buf,0,fis.read(buf));
> > >   response.getOutputStream().flush();
> > >   response.getOutputStream().close();
> > >   fis.close();
> > > 
> > > This works ok in all browsers except for IE. When using IE, a dialog box
> > > asking the user for which application to open the file in, is always
> > > displayed. Why? And is there a workaround for this?
> > > 
> > > 
> > > Thanks...
> > > 
> > > BTJ
> > > 
> > > 
> > > -
> > > 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]
> > 
> 
> 
> -
> 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: Workaround for IE "streamer bug"?

2003-10-30 Thread Bjørn T Johansen
Oki, that sounds like an idea :)
But how do I add a querystring to my url when submitting a form?

BTJ

On Thu, 2003-10-30 at 19:05, Prabhat Kumar (IT) wrote:
> I guess this is a known problem with IE. I can't remember but I think we had the 
> same problem with IE, and we came across a suggestion somewhere to end the pdf 
> requesting URL with a .pdf (something like 
> http://servername/xyz/something.do?your-param=xyz&dummy=.pdf) 
> 
> 
> -Original Message-
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 30, 2003 12:59 PM
> To: Struts Users Mailing List
> Subject: Re: Workaround for IE "streamer bug"?
> 
> 
> Well, I have tried both inline and attachment, the only difference is
> that when using attachment I get question of where to save the file on
> all the other browsers instead of just opening (as expected), and IE
> still doesn't work. In fact, using attachment is worse for IE...
> 
> Any more suggestions are appreciated...
> 
> BTJ
> 
> On Thu, 2003-10-30 at 15:19, [EMAIL PROTECTED] wrote:
> > This header currently works for me in a similar case. Try changing your 
> > code:
> > 
> > response.setHeader("Content-Disposition", "attachment; filename=\"" + 
> > filename + "\"");
> > 
> > HTH.
> >  
> > Atenciosamente,
> > Bruno Arantes de Andrade Bueno
> > Webdeveloper Pleno
> > 
> > Fone: +55 (34) 3231-1073
> > Solution WEB - Soluções Para Internet!
> > www.solutionweb.com.br
> > 
> > 
> > 
> > 
> > 
> > Bjørn T Johansen <[EMAIL PROTECTED]>
> > 10/30/2003 07:05 AM
> > Please respond to "Struts Users Mailing List"
> > 
> >  
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > cc: 
> > Subject:Workaround for IE "streamer bug"?
> > 
> > 
> > I have a little problem. I am using the following code to stream pdf
> > files to the browser..:
> > 
> > fis = new FileInputStream(filename);
> >   byte[] buf = new byte[fis.available()];
> > 
> >   response.setHeader("Content-Disposition", "inline;filename=" +
> > filename + ";");
> >   response.setContentType("application/pdf");
> >   response.setHeader("Connection", "keep-alive");
> >   response.setContentLength(buf.length);
> >   response.getOutputStream().write(buf,0,fis.read(buf));
> >   response.getOutputStream().flush();
> >   response.getOutputStream().close();
> >   fis.close();
> > 
> > This works ok in all browsers except for IE. When using IE, a dialog box
> > asking the user for which application to open the file in, is always
> > displayed. Why? And is there a workaround for this?
> > 
> > 
> > Thanks...
> > 
> > BTJ
> > 
> > 
> > -
> > 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]
> 


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



Re: Workaround for IE "streamer bug"?

2003-10-30 Thread Bjørn T Johansen
Well, I have tried both inline and attachment, the only difference is
that when using attachment I get question of where to save the file on
all the other browsers instead of just opening (as expected), and IE
still doesn't work. In fact, using attachment is worse for IE...

Any more suggestions are appreciated...

BTJ

On Thu, 2003-10-30 at 15:19, [EMAIL PROTECTED] wrote:
> This header currently works for me in a similar case. Try changing your 
> code:
> 
> response.setHeader("Content-Disposition", "attachment; filename=\"" + 
> filename + "\"");
> 
> HTH.
>  
> Atenciosamente,
> Bruno Arantes de Andrade Bueno
> Webdeveloper Pleno
> 
> Fone: +55 (34) 3231-1073
> Solution WEB - Soluções Para Internet!
> www.solutionweb.com.br
> 
> 
> 
> 
> 
> Bjørn T Johansen <[EMAIL PROTECTED]>
> 10/30/2003 07:05 AM
> Please respond to "Struts Users Mailing List"
> 
>  
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> cc: 
> Subject:Workaround for IE "streamer bug"?
> 
> 
> I have a little problem. I am using the following code to stream pdf
> files to the browser..:
> 
> fis = new FileInputStream(filename);
>   byte[] buf = new byte[fis.available()];
> 
>   response.setHeader("Content-Disposition", "inline;filename=" +
> filename + ";");
>   response.setContentType("application/pdf");
>   response.setHeader("Connection", "keep-alive");
>   response.setContentLength(buf.length);
>   response.getOutputStream().write(buf,0,fis.read(buf));
>   response.getOutputStream().flush();
>   response.getOutputStream().close();
>   fis.close();
> 
> This works ok in all browsers except for IE. When using IE, a dialog box
> asking the user for which application to open the file in, is always
> displayed. Why? And is there a workaround for this?
> 
> 
> Thanks...
> 
> BTJ
> 
> 
> -
> 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: Shouldn't this work?

2003-10-30 Thread Bjørn T Johansen
Yes, I did some trying back and forth and discovered that... :)
But now I have another problem. I found another article that said that I
could not use this event and at the same time have a submit button.. And
that looks to be correct?
But when I need the submit button to submit the rest of the form, how do
I solve this? (I just need submit one the onchange event to fill another
combobox...)


BTJ

On Thu, 2003-10-30 at 15:01, Caroline Lauferon wrote:
> >  > onchange="document.forms["logFortrykkForm"].submit()" >
> > ---
> > ---
> > 
> 
> I think it shouldn't have even compiled the JSP, because of the bad parsing
> of the double quotes. It works with me if I replace the inner double quotes
> by single quotes:
>  property="errorLogTypeID"onchange="document.forms['logFortrykkForm'].submit(
> )" > [...]
> 
> Hope it helps
> 
> Caroline
> 
> 
> 
> -
> 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]



Shouldn't this work?

2003-10-30 Thread Bjørn T Johansen
I have a form named logFortrykkForm and I trying to submit the form
using the onchange event on a combo box but when I choose something from
the box, nothing happens. Isn't this enough..:



---
---



or am I missing something?


Regards,

BTJ


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



Workaround for IE "streamer bug"?

2003-10-30 Thread Bjørn T Johansen
I have a little problem. I am using the following code to stream pdf
files to the browser..:

fis = new FileInputStream(filename);
  byte[] buf = new byte[fis.available()];

  response.setHeader("Content-Disposition", "inline;filename=" +
filename + ";");
  response.setContentType("application/pdf");
  response.setHeader("Connection", "keep-alive");
  response.setContentLength(buf.length);
  response.getOutputStream().write(buf,0,fis.read(buf));
  response.getOutputStream().flush();
  response.getOutputStream().close();
  fis.close();

This works ok in all browsers except for IE. When using IE, a dialog box
asking the user for which application to open the file in, is always
displayed. Why? And is there a workaround for this?


Thanks...

BTJ


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



[OT] Javascript window.open and Macintosh?

2003-10-01 Thread Bjørn T Johansen
I am using the following code in my html page:

window.open("/index.jsp","","status,scrollbars,resizable=yes")

to remove the menubar and basically strip the window with all browser
features. This works like a charm on windows/linux platform and all the
browsers
but trying to open this page on mac using IE, all the browser feature
are
still there. How can I fix this?? (At least remove the menubar, so they
can't use the back button...)


Cheers,

BTJ



Re: Access to the form bean from jsp?

2003-09-27 Thread Bjørn T Johansen
Yes, you are absolutely correct; it uses the name I defined in
struts-config, I should have known...

Thanks :)


BTJ

On Sat, 2003-09-27 at 19:11, Anders Hermansen wrote:
> * Bjørn T Johansen ([EMAIL PROTECTED]) wrote:
> > I need to access the form from my jsp page, but I can't seem to find a
> > way to do this.. I need a name of the form to access but what is the
> > name of the form instance that Struts generate? If I have a form named
> > LoginForm does Struts make an instance called loginForm or does it
> > choose a random name or?
> 
> You specify the name when you declare a form bean in struts-config.xml
> 
> in example:
>   
> 
> In the jsp you can define a variable to point to this form using:
>/>
> you can then use myLoginForm in any scriptlet.
> 
> You can also easily extract specific properties:
>   
> 
> or you can print them directly:
>   
> 
> This is all from memory, so I hope it's correct.
> 
> 
> Hope this helps,
> Anders
> 
> --
> Anders Hermansen
> YoYo Mobile as
> 
> -
> 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]



Access to the form bean from jsp?

2003-09-27 Thread Bjørn T Johansen
I need to access the form from my jsp page, but I can't seem to find a
way to do this.. I need a name of the form to access but what is the
name of the form instance that Struts generate? If I have a form named
LoginForm does Struts make an instance called loginForm or does it
choose a random name or?


Regards,

BTJ


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



Streaming pdf and also updating the webpage?

2003-09-20 Thread Bjørn T Johansen
I have a page where the user can download (using the response object)
pdf-files and that's working ok.. But I also would like to update the
webpage after the user has submited the page to my action, can this be
done? (since I can't use return(mapping.findForward("OK"))


Regards,

BTJ



and accept?

2003-09-16 Thread Bjørn T Johansen
I am trying to set accept = application/pdf, so that only pdf files can
be uploaded, but this doesn't work.. Do I need to do something else as
well?


BTJ


RE: Slow file upload?

2003-09-16 Thread Bjørn T Johansen
I just tried this from another PC running Windows and IE, and then the
upload took less than a second..
Is this a "bug" in Mozilla or?


BTJ

On Tue, 2003-09-16 at 15:58, Kurt Post wrote:

> If you are running on a Windows box, I would try using IE instead of Mozilla
> for your timing tests.  On windows, Netscape and thus probably Mozilla,
> seems to spin in a hard loop poling for new data while its trying to receive
> data over the network.  This results in 100% CPU utilization and really
> slows things down.  It might just be that it also spins in a hard loop when
> its waiting for the transmit buffer to empty enough so it can continue to
> send more data.
> 
> -Original Message-
> From: Daniel Washusen [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 15, 2003 11:54 PM
> To: Struts Users Mailing List
> Subject: RE: Slow file upload?
> 
> 
> > Yes, I am using Struts 1.1 and the default upload in commons-fileupload.
> > The hw I am running on is a 2.4GHz PC with 1GB memory, with at least
> > half of it free.. The browser I tried the upload with was Mozilla..
> >
> > BTJ
> >
> 
> I'm running a P4 1.7 with 512MB of RAM and I can upload a 1.8 MB file in
> about 1 second and a 8 MB file in about 3 seconds... Struts 1.1,
> commons-fileupload and Tomcat 4.1.27.  Not really much help for you but it
> would confirm that it all works...
> 
> 
> -
> 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: Slow file upload?

2003-09-15 Thread Bjørn T Johansen
Nope

On Tue, 2003-09-16 at 08:48, Mohd Amin Mohd Din wrote:

> Hmm, just checking, are you doing any processing other than just simply
> storing the file.
> 
> -Original Message-----
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 16, 2003 12:51 PM
> To: Struts Users Mailing List
> Subject: Re: Slow file upload?
> 
> On Tue, 2003-09-16 at 06:19, Robert Leland wrote:
> 
> > Bjørn T Johansen wrote:
> > 
> > >On Tue, 2003-09-16 at 04:12, Robert Leland wrote:
> > >
> > >  
> > >
> > >>Bjørn T Johansen wrote:
> > >>
> > >>
> > >>
> > >>>I am testing file upload using Struts and FormFile but the upload
> seems
> > >>>really slow. Uploading a 1,5MB file takes about 15-20 sec. and I am
> > >>>running both the server and the browser on the same PC. Is this
> normal
> > >>>or should the upload be faster?
> > >>> 
> > >>>
> > >>>  
> > >>>
> > >>Your upload will be slower all on one machine as opposed to going
> across 
> > >>a fast LAN.
> > >>However, that does seem slow. I have uploaded a 650MB file in about
> 7 
> > >>minutes across a LAN.
> > >>650MB/7 minutes  =~ 1.5 MB/sec.
> > >>Are you using Strust 1.1 and the default fileupload implementation
> which 
> > >>is commons-fileupload ?
> > >>What browser, How much free RAM, CPU etc..
> > >>
> > >>
> > >>
> > >
> > >Yes, I am using Struts 1.1 and the default upload in
> commons-fileupload.
> > >The hw I am running on is a 2.4GHz PC with 1GB memory, with at least
> > >half of it free.. The browser I tried the upload with was Mozilla..
> > >  
> > >
> > 
> > What does your CPU utilization look like ?
> > What does your (physical/virtual)  memory utilization look like, what
> % 
> > is available ?
> > Is it high, low, which process is taking the most CPU/memory ?
> > How many process are running in your JVM(s) and what are the JVM
> virtual 
> > memory settings at startup.
> > Usually there is a  setting something like  -Xm256 for java.exe are
> you 
> > setting this ?
> > Look at the docs for java.exe for the exact options, then try
> increasing 
> > say by 50% and see if
> > it helps, or crashes your machine because windows doesn't have enough 
> > Virtual memory to give to the
> > JVM. Then you increase Windows virtual memory if needed.
> > 
> > Also note that if Mozilla is like Netscape then it makes a copy of the
> 
> > file before beginning sending it.
> > The temp file is either under C:\temp or C:\Documents and 
> > Settings\User\Local Settings\Temp.
> > If it make the copy fairly quickly, less than 1 second, then look at
> your
> 
> Well, I am running this on Linux and the load is almost 0, so it's not a
> question of the load on my computer..
> But I'll try increasing the memory given to the Java VM when I get home
> tonight and also try another browser
> 
> 
> BTJ
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


Re: Slow file upload?

2003-09-15 Thread Bjørn T Johansen
On Tue, 2003-09-16 at 06:19, Robert Leland wrote:

> Bjørn T Johansen wrote:
> 
> >On Tue, 2003-09-16 at 04:12, Robert Leland wrote:
> >
> >  
> >
> >>Bjørn T Johansen wrote:
> >>
> >>
> >>
> >>>I am testing file upload using Struts and FormFile but the upload seems
> >>>really slow. Uploading a 1,5MB file takes about 15-20 sec. and I am
> >>>running both the server and the browser on the same PC. Is this normal
> >>>or should the upload be faster?
> >>> 
> >>>
> >>>  
> >>>
> >>Your upload will be slower all on one machine as opposed to going across 
> >>a fast LAN.
> >>However, that does seem slow. I have uploaded a 650MB file in about 7 
> >>minutes across a LAN.
> >>650MB/7 minutes  =~ 1.5 MB/sec.
> >>Are you using Strust 1.1 and the default fileupload implementation which 
> >>is commons-fileupload ?
> >>What browser, How much free RAM, CPU etc..
> >>
> >>
> >>
> >
> >Yes, I am using Struts 1.1 and the default upload in commons-fileupload.
> >The hw I am running on is a 2.4GHz PC with 1GB memory, with at least
> >half of it free.. The browser I tried the upload with was Mozilla..
> >  
> >
> 
> What does your CPU utilization look like ?
> What does your (physical/virtual)  memory utilization look like, what % 
> is available ?
> Is it high, low, which process is taking the most CPU/memory ?
> How many process are running in your JVM(s) and what are the JVM virtual 
> memory settings at startup.
> Usually there is a  setting something like  -Xm256 for java.exe are you 
> setting this ?
> Look at the docs for java.exe for the exact options, then try increasing 
> say by 50% and see if
> it helps, or crashes your machine because windows doesn't have enough 
> Virtual memory to give to the
> JVM. Then you increase Windows virtual memory if needed.
> 
> Also note that if Mozilla is like Netscape then it makes a copy of the 
> file before beginning sending it.
> The temp file is either under C:\temp or C:\Documents and 
> Settings\User\Local Settings\Temp.
> If it make the copy fairly quickly, less than 1 second, then look at your

Well, I am running this on Linux and the load is almost 0, so it's not a
question of the load on my computer..
But I'll try increasing the memory given to the Java VM when I get home
tonight and also try another browser


BTJ


RE: Slow file upload?

2003-09-15 Thread Bjørn T Johansen
On Tue, 2003-09-16 at 05:53, Daniel Washusen wrote:

> > Yes, I am using Struts 1.1 and the default upload in commons-fileupload.
> > The hw I am running on is a 2.4GHz PC with 1GB memory, with at least
> > half of it free.. The browser I tried the upload with was Mozilla..
> >
> > BTJ
> >
> 
> I'm running a P4 1.7 with 512MB of RAM and I can upload a 1.8 MB file in
> about 1 second and a 8 MB file in about 3 seconds... Struts 1.1,
> commons-fileupload and Tomcat 4.1.27.  Not really much help for you but it
> would confirm that it all works...
> 
> 
> -

Hmmm, strange... I am running almost the same, except for better hw.


BTJ


Re: Slow file upload?

2003-09-15 Thread Bjørn T Johansen
On Tue, 2003-09-16 at 04:12, Robert Leland wrote:

> Bjørn T Johansen wrote:
> 
> >I am testing file upload using Struts and FormFile but the upload seems
> >really slow. Uploading a 1,5MB file takes about 15-20 sec. and I am
> >running both the server and the browser on the same PC. Is this normal
> >or should the upload be faster?
> >  
> >
> Your upload will be slower all on one machine as opposed to going across 
> a fast LAN.
> However, that does seem slow. I have uploaded a 650MB file in about 7 
> minutes across a LAN.
> 650MB/7 minutes  =~ 1.5 MB/sec.
> Are you using Strust 1.1 and the default fileupload implementation which 
> is commons-fileupload ?
> What browser, How much free RAM, CPU etc..
> 

Yes, I am using Struts 1.1 and the default upload in commons-fileupload.
The hw I am running on is a 2.4GHz PC with 1GB memory, with at least
half of it free.. The browser I tried the upload with was Mozilla..

BTJ


Slow file upload?

2003-09-15 Thread Bjørn T Johansen
I am testing file upload using Struts and FormFile but the upload seems
really slow. Uploading a 1,5MB file takes about 15-20 sec. and I am
running both the server and the browser on the same PC. Is this normal
or should the upload be faster?


BTJ


Re: java.lang.ArrayIndexOutOfBoundsException

2003-09-15 Thread Bjørn T Johansen
Well, the problem seems to be that I initialized the array too much...
Thx...


BTJ

On Mon, 2003-09-15 at 19:30, Adam Hardy wrote:

> The exception is occurring when the struts preprocessor tries to 
> populate your form bean with request parameters. I expect you have 
> indexed properties and you have not initialized your form bean with an 
> array to accept them.
> 
> Adam
> 
> 
> On 09/15/2003 02:04 PM Bj?rn T Johansen wrote:
> > I have a jsp page that is using  to show a list of
> > records, based on some input on the same page. The first time I press
> > the submit button to get the records, everything works like it should.
> > But if I try to get the records one more time, I get this exception:
> > 
> > javax.servlet.ServletException: BeanUtils.populate
> > 
> > at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)


java.lang.ArrayIndexOutOfBoundsException

2003-09-15 Thread Bjørn T Johansen
I have a jsp page that is using  to show a list of
records, based on some input on the same page. The first time I press
the submit button to get the records, everything works like it should.
But if I try to get the records one more time, I get this exception:

javax.servlet.ServletException: BeanUtils.populate

at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
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.havleik.dt.framework.filter.AuthFilter.doFilter(AuthFilter.java:78)
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:256)
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:2416)
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:171)
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.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
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.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)


root cause



java.lang.ArrayIndexOutOfBoundsException
at java.lang.reflect.Array.get(Native Method)
at 
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:525)
at 
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)
at 
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:770)
at 
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action

Re: Problem with is actually a problem with and Weblogic 8.1

2003-09-14 Thread Bjørn T Johansen
I tried just running


Test: <%= username %> 

in a jsp file under Tomcat and that works ok, but doing the same under
Weblogic 8.1 with SP 1, generates a "cannot resolve symbol" error.

Is this a bug in WL or am I doing something wrong?


BTJ

On Sun, 2003-09-14 at 13:46, Bjørn T Johansen wrote:

> I have this code in my jsp page:
> 
>   
> 
>   
>  property="annCreated" />
>  property="filnavn" />
>  idName="elem" value="annID"/>
>   
>   
>  scope="session" property="user.username" />
>  value="<%= (String) username %>" >
>property="annCreated" />
>property="filnavn" />
>idName="elem" value="annID"/>
> 
>  value="<%= (String) username %>" >
>property="annCreated" />
>property="filnavn" />
>property="caseworker" />
> 
>   
> 
>   
> 
> But this just gives me an error message telling me that "cannot resolve
> symbol
> 
> symbol  : variable username"
> But this variable has been defined, hasn't it??
> 
> Any suggestions?
> 
> 
> 
> Regards,
> 
> BTJ


Problem with ?

2003-09-14 Thread Bjørn T Johansen
I have this code in my jsp page:

  

  



  
  


  
  
  


  
  
  

  

  

But this just gives me an error message telling me that "cannot resolve
symbol

symbol  : variable username"
But this variable has been defined, hasn't it??

Any suggestions?



Regards,

BTJ


Exxception in Tomcat.....

2003-09-11 Thread Bjørn T Johansen
My struts app is running under Tomcat 4.1.27 and now and then I get this
in my log:

11.sep.2003 10:44:13 org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:385)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:268)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
11.sep.2003 10:44:13 org.apache.jk.common.ChannelSocket
processConnection
INFO: server has been restarted or reset this connection

Is this something I should worry about or? My app is working even if I
get these...

Regards,

BTJ

-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---



Re: Strange filter problem?

2003-09-10 Thread Bjørn T Johansen




Yes, you are absolutely correct; I had the filter def after the servlet def...
Thx... 


BTJ

On Thu, 2003-09-11 at 00:25, Mike Deegan wrote:

Ensure u have the web.xml file in the right order of elements as per the
appropriate DTD
And the right DTD for that matter ...
Plus I'm not sure if *filter-mapping* element is mandatory ...

eg  http://java.sun.com/dtd/web-app_2_3.dtd



I may be wrong, but I'm sure web-app2.2 doesn't allow filters
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd



If removing the element from the web.xml fixes your problem it really seems
to point to the web.xml syntax as being the culprit.

Regards,
Mike

An example filter mapping that works for me ...

after  elements...


compressionFilter
CompressionFilter

  compressionThreshold
  10




compressionFilter
compressionTest


before ...  elements




- Original Message - 
From: "Bjørn T Johansen" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 3:55 PM
Subject: Strange filter problem?


> Hi..
>
> I am trying to write my very first filter running on Tomcat, but when I
> include the definition of the filter in my web.xml file, I get this
> exeption..:
>
> org.apache.jasper.JasperException: File "/tags/struts-logic" not found
>
> at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:105)
> at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430
)
> at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154
)
> at
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:180)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
> at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381)
> at org.apache.jasper.compiler.Parser.parseElements(Parser.java:795)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
> at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
> at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
> at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
> at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
> at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
> 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(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:256)
> at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
> at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(StandardPipeline.java:643)
> at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
> at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
> at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
> at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
> at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
c

Strange filter problem?

2003-09-10 Thread Bjørn T Johansen
Hi..

I am trying to write my very first filter running on Tomcat, but when I
include the definition of the filter in my web.xml file, I get this
exeption..:

org.apache.jasper.JasperException: File "/tags/struts-logic" not found

at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:105)
at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430)
at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:180)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:795)
at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
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:256)
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:171)
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.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
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.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)

When I remove the filter def, everything works again...

Any suggestions?

Btw, does using filter drain much performance? Is there any other way to ensure 
that one can't access the jsp files without being logged in? A bean in every jsp page?


Cheers,

BTJ


RE: Icon?

2003-09-09 Thread Bjørn T Johansen
Oki, thanks.. It seems I've been doing it right with one of my methods,
but I need to use an icon in size 16x16 and not 32x32...


BTJ

On Tue, 2003-09-09 at 08:20, Ramesh Kannery wrote:
> search for favicon in google, u may get the answer!!
> 
> 
> -Original Message-----
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 09, 2003 11:43 AM
> To: Struts Users Mailing List
> Subject: Re: Icon?
> 
> 
> On Mon, 2003-09-08 at 03:27, Max Cooper wrote:
> > Two things come to mind:
> > 
> > 1. Do you want an icon that will show up in a browser when a user accesses
> > your application/site? If so, you need to do something else -- the 
> > part of the servlet spec seems to indicate that it is for GUI tools (like
> > your app server's management console) rather than for browser access to the
> > webapp itself. I am not totally sure about this as I have not tried it
> > myself, but that is my impression from reading the servlet spec.
> 
> Well, I want to change the icon that appear in front of the url in the
> browser, I see other use it...
> > 
> > 2. Is the  element in the right place in the web.xml file? An editor
> > that does XML validation (like IntelliJ IDEA and other IDEs and XML editors)
> > is very helpful for pointing out such errors.
> 
> I tried moving it around and the only thing that happens is that I am
> getting an error msg if I am putting it under the servlet tag and under
> the web tag nothing happens.
> I also tried setting this in the header:
> "
> type="image/x-icon" />
> 
> but nothing...
> 
> Anyone?
> 
> > 
> > -Max
> > 
> > - Original Message - 
> > From: "Bjørn T Johansen" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Sunday, September 07, 2003 8:44 AM
> > Subject: Icon?
> > 
> > 
> > > I am trying to customize the icon my webapp is using by adding
> > >
> > > 
> > >   
> > > path-to-icon
> > >   
> > > 
> > >
> > > in my web.xml file, but nothing happens. What am I overlooking?
> > >
> > >
> > > Regards,
> > >
> > > BTJ
> > >
> > 
> > 
> > 
> > -
> > 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: Icon?

2003-09-08 Thread Bjørn T Johansen
On Mon, 2003-09-08 at 03:27, Max Cooper wrote:
> Two things come to mind:
> 
> 1. Do you want an icon that will show up in a browser when a user accesses
> your application/site? If so, you need to do something else -- the 
> part of the servlet spec seems to indicate that it is for GUI tools (like
> your app server's management console) rather than for browser access to the
> webapp itself. I am not totally sure about this as I have not tried it
> myself, but that is my impression from reading the servlet spec.

Well, I want to change the icon that appear in front of the url in the
browser, I see other use it...
> 
> 2. Is the  element in the right place in the web.xml file? An editor
> that does XML validation (like IntelliJ IDEA and other IDEs and XML editors)
> is very helpful for pointing out such errors.

I tried moving it around and the only thing that happens is that I am
getting an error msg if I am putting it under the servlet tag and under
the web tag nothing happens.
I also tried setting this in the header:
"
type="image/x-icon" />

but nothing...

Anyone?

> 
> -Max
> 
> - Original Message - 
> From: "Bjørn T Johansen" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Sunday, September 07, 2003 8:44 AM
> Subject: Icon?
> 
> 
> > I am trying to customize the icon my webapp is using by adding
> >
> > 
> >   
> > path-to-icon
> >   
> > 
> >
> > in my web.xml file, but nothing happens. What am I overlooking?
> >
> >
> > Regards,
> >
> > BTJ
> >
> 
> 
> 
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---



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



Icon?

2003-09-07 Thread Bjørn T Johansen
I am trying to customize the icon my webapp is using by adding 


  
path-to-icon
  


in my web.xml file, but nothing happens. What am I overlooking?


Regards,

BTJ


log4j:WARN No appenders could be found for logger...

2003-08-22 Thread Bjørn T Johansen
I just upgraded to Struts 1.1 from rc2 and now I am getting this error
msg when I start Tomcat.:

log4j:WARN No appenders could be found for logger
(org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.


I remember reading about something like this a couple a months ago but I
can't remember if there were any solutions, is there?
The effect of the upgrade is that the logging from my system to file is
working fine, but the logging to catalina.out doesn't work anymore...


Regards,

BTJ

-- 
-------
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


Next/Previous buttons?

2003-08-14 Thread Bjørn T Johansen
Any comments on how to best implement a next and previous button in a
Struts app (to goto previus page and next page)? 
Just use html:link and save the actions in session variblas and use this
actions in the link or?


Regards,

BTJ

-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


Back and forward?

2003-08-01 Thread Bjørn T Johansen
I was wondering how to best implement going back and forward between
pages in Struts? Or does one not need to implement this and just use the
back and forward feature of the browser without any problems?


Regards,

BTJ

-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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



Re: RE : Automatic redirect in jsp page?

2003-06-27 Thread Bjørn T Johansen




Yes, I do... But I am using ActionForward someplaces and I need this feature in those pages... 

Thanks..

BTJ

On Fri, 2003-06-27 at 14:51, Franck Lefebure wrote:

Hi,
Something like 

But you should do also this check in actions

--
Franck Lefebure



> -Message d'origine-
> De : Bjørn T Johansen [mailto:[EMAIL PROTECTED] 
> Envoyé : jeudi 26 juin 2003 15:59
> À : Struts Users Mailing List
> Objet : Automatic redirect in jsp page?
> 
> 
> Is it possible to check for an session object in a jsp page 
> and if it doesn't exist, automatic redirect to an action?
> 
> 
> Regards,
> 
> BTJ
> 
> -- 
> ------
> -
> Bjørn T Johansen (BSc,MNIF)
> Executive Manager
> [EMAIL PROTECTED]  Havleik Consulting
> Phone : +47 67 54 15 17 Conradisvei 4
> Fax : +47 67 54 13 91   N-1338 Sandvika
> Cellular : +47 926 93 298   http://www.havleik.no
> --
> -
> "The stickers on the side of the box said "Supported 
> Platforms: Windows 98, Windows NT 4.0, Windows 2000 or 
> better", so clearly Linux was a supported platform."
> --
> -
> 


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




-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---








Automatic redirect in jsp page?

2003-06-26 Thread Bjørn T Johansen
Is it possible to check for an session object in a jsp page and if it
doesn't exist, automatic redirect to an action?


Regards,

BTJ

-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


Selecting a row in nested:iterate?

2003-06-25 Thread Bjørn T Johansen
I display x rows from a table using nested:iterate and I need to select
one row from these rows (and know which was selected in my Action), how
can I do this?


Regards,

BTJ

-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


RE: DispatchAction?

2003-06-18 Thread Bjørn T Johansen
Aaah, maybe that's the way to go... I'll look into
LookupDispatchAction...

Thanks... :)

On Thu, 2003-06-19 at 07:22, Brandon Goodin wrote:
> Why don't you just use a hidden form field with the name of your specified
> parameter?
> 
> 
> 
> You don't have to use the strugs tags for constant values.
> 
> Personally I like to use the LookupDispatchAction. It uses the name of the
> button pressed to map to the method name in the LookupDispatchAction. So,
> you don't have to deal with creating hidden fields. All you have to do is
> make sure your ApplicationResources.properties conatins a button key for the
> button name (button.add=Add) and that your LookupDispatchAction has that key
> mapped to a method in it's getKeyMethodMap().
> 
> Brandon Goodin
> 
> -Original Message-
> From: Ashutosh Satyam [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 18, 2003 11:01 PM
> To: Struts Users Mailing List
> Subject: RE: DispatchAction?
> 
> 
> Other parameters can go as part of action. In your case you can put it as.
> 
> 
> I have not tried this but mostly I feel it should work.
> 
> Cheers,
> Ashutosh
> 
> -Original Message-
> From: Bjorn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 19, 2003 10:16 AM
> To: [EMAIL PROTECTED]
> Subject: DispatchAction?
> 
> I am starting to use DispatchAction instead of some of my actions to
> simplify CRUD operations, but I have a question.
> How do I integrate which method to call in a html:form tag? I.e. if I could
> write http://localhost/app/order?method=create then it wouldn't be a
> problem, but how do I write the same thing using html:form?
> ( where should I put the method
> parameter? )
> 
> 
> Regards,
> 
> BTJ
> 
> 
> 
> ---
> Bjørn T Johansen (BSc,MNIF)
> Executive Manager
> [EMAIL PROTECTED]  Havleik Consulting
> Phone : +47 67 54 15 17 Conradisvei 4
> Fax : +47 67 54 13 91   N-1338 Sandvika
> Cellular : +47 926 93 298   http://www.havleik.no
> 
> ---
> "The stickers on the side of the box said "Supported Platforms: Windows
> 98, Windows NT 4.0,
> Windows 2000 or better", so clearly Linux was a supported platform."
> 
> ---
> 
> 
> -
> 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]



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



RE: Checkbox problem?

2003-06-11 Thread Bjørn T Johansen
Oki, thanks for all your suggestions; I'll try them out and see what
happens... :)


BTJ

On Tue, 2003-06-10 at 22:11, Steve Raeburn wrote:
> The suggested method requires two actions.
> 
>   SetupAction -> Form -> ProcessAction
> 
> The first action prepares any values required by your form, including
> setting the value of your checkboxes to true. The second action is the one
> that actually processes the user input gathered by the form.
> 
> Hope this clarifies things.
> 
> Steve
> 
> > -Original Message-
> > From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> > Sent: June 10, 2003 12:38 PM
> > To: Struts Users Mailing List
> > Subject: Re: Checkbox problem?
> >
> >
> > oki, maybe my explanation isn't the best :) (I know that I can't do it
> > in the reset method, as it is clearly not working)  but I am still not
> > sure where to put the code to set the checkbox to true then.
> > As far as I know, the action class isn't called before after the form
> > bean has called the reset method and the page has been rendered (and the
> > submit button has been pressed), or is it something I am missing?
> >
> > BTJ
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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



Re: Checkbox problem?

2003-06-10 Thread Bjørn T Johansen
oki, maybe my explanation isn't the best :) (I know that I can't do it
in the reset method, as it is clearly not working)  but I am still not
sure where to put the code to set the checkbox to true then.
As far as I know, the action class isn't called before after the form
bean has called the reset method and the page has been rendered (and the
submit button has been pressed), or is it something I am missing?

BTJ

On Tue, 2003-06-10 at 20:28, James Mitchell wrote:
> On Tuesday 10 June 2003 14:11, Bjørn T Johansen wrote:
> > You are missing my point! If I just could set the checkbox value to
> > false in the reset method, everything is fine. But there are times when
> > that value has to be reset to true and not false and if I do that in my
> > reset method, I am not able to see of the user unchek the checkbox,
> > because the boolean variable is still true after the form has been
> > posted!
> 
> No, actually *YOU* are missing the point!  Several people have tried to 
> explain how this works to you.
> 
> So, for one last effort
> 
> 
> DO *NOT* SET THE FIELDS YOU INTENT TO USE AS CHECKBOXES (booleans) TO TRUE IN 
> THE RESET METHOD!  
> 
> 
> If you want the field to be true when the page is rendered, set it to true 
> from your action class, NOT in the reset of your formbean.
> 
> I hope that clears it up for you.
> 
> 
> >
> >
> > BTJ
> >
> > On Tue, 2003-06-10 at 19:22, Tor Henrik Hanken wrote:
> > > [EMAIL PROTECTED]
> > >
> > > | Yes, but to clarify...
> > > | I am showing a jsp page with values read from a database. If the
> > > | checkbox value is true, how do I then make the checkbox on my jsp-page
> > > | checked and how do I then find out if the checkbox has been unchecked?
> > > | Do I have to manually read the posted data and see if the checkbox
> > > | attribute is missing or is there a better way?
> > >
> > > I assume that you are using an Action with an ActionForm.
> > >
> > > To make the value of the checkbox come up correctly, import
> > > struts tags into your jsp-page:
> > >
> > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="strb" %>
> > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="strh" %>
> > > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="strl" %>
> > >
> > > Then use the Struts checkbox tag:
> > >
> > > 
> > >
> > > Assuming that your form has the methods getDone and setDone,
> > > these methods will be used to render the value of the checkbox
> > > correctly.
> > >
> > > As to the question of boolean values that are set to false by the
> > > user: You don't have to parse the posted data manually.  The
> > > method reset() in ActionForm is run before the posted data is
> > > used to populate the form.  Write your own reset() method where
> > > you set the boolean fields to false.



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



Re: Checkbox problem?

2003-06-10 Thread Bjørn T Johansen
You are missing my point! If I just could set the checkbox value to
false in the reset method, everything is fine. But there are times when
that value has to be reset to true and not false and if I do that in my
reset method, I am not able to see of the user unchek the checkbox,
because the boolean variable is still true after the form has been
posted!


BTJ

On Tue, 2003-06-10 at 19:22, Tor Henrik Hanken wrote:
> [EMAIL PROTECTED]
> 
> | Yes, but to clarify...
> | I am showing a jsp page with values read from a database. If the
> | checkbox value is true, how do I then make the checkbox on my jsp-page
> | checked and how do I then find out if the checkbox has been unchecked?
> | Do I have to manually read the posted data and see if the checkbox
> | attribute is missing or is there a better way?
> 
> I assume that you are using an Action with an ActionForm.
> 
> To make the value of the checkbox come up correctly, import
> struts tags into your jsp-page: 
> 
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="strb" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="strh" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="strl" %>
> 
> Then use the Struts checkbox tag:
> 
> 
> 
> Assuming that your form has the methods getDone and setDone,
> these methods will be used to render the value of the checkbox
> correctly.
> 
> As to the question of boolean values that are set to false by the
> user: You don't have to parse the posted data manually.  The
> method reset() in ActionForm is run before the posted data is
> used to populate the form.  Write your own reset() method where
> you set the boolean fields to false.
-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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



RE: Checkbox problem?

2003-06-10 Thread Bjørn T Johansen
Yes, but to clarify...
I am showing a jsp page with values read from a database. If the
checkbox value is true, how do I then make the checkbox on my jsp-page
checked and how do I then find out if the checkbox has been unchecked?
Do I have to manually read the posted data and see if the checkbox
attribute is missing or is there a better way?


BTJ

On Tue, 2003-06-10 at 15:45, Kandi Potter wrote:
> I would suggest not doing the propagate in the reset.   Just use it for the original 
> values.   The values entered on the form are automatically propagated by struts 
> after the reset by the setters and getters.   Just put in some logging or print 
> statements in those methods and you will see when they are invoked.
> 
> -Original Message-
> From: Bjorn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 4:27 AM
> To: [EMAIL PROTECTED]
> Subject: Checkbox problem?
> 
> 
> I use checkboxes to input some variables in a form and as long as I
> insert new records, i.e. the checkbox variable gets set to false in the
> form's reset method, it works fine.
> But when I, say, edit the same record (and propagate the values of the
> form in the reset method), I never can uncheck the checkbox if it was
> set to true in the reset method.
> 
> Are there any solutions/work around for this?
> 
> 
> Regards,
> 
> BTJ
> 
> 
> 
> -------
> Bjørn T Johansen (BSc,MNIF)
> Executive Manager
> [EMAIL PROTECTED]  Havleik Consulting
> Phone : +47 67 54 15 17 Conradisvei 4
> Fax : +47 67 54 13 91   N-1338 Sandvika
> Cellular : +47 926 93 298   http://www.havleik.no
> ---
> "The stickers on the side of the box said "Supported Platforms: Windows
> 98, Windows NT 4.0,
> Windows 2000 or better", so clearly Linux was a supported platform."
> ---
> 
> 
> -
> 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]
-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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



StrutsMenu 1.2?

2003-06-09 Thread Bjørn T Johansen
I need some kind of dynamic generation of menu items in my webapp, is
StrutsMenu the way to go or should I look into something else, or
implement it myself?


Regards,

BTJ

-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 926 93 298   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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



Using reporting "tools" in Struts?

2003-05-30 Thread Bjørn T Johansen
I need to show reports in my Struts application (which can be shown as
both html and pdf, at least) and I did a search and came up with 3
alternatives: DataVision, JasperReports and JFreeReport.

Have anyone used these and have some recommendation, or perhaps a
recommendation of another one?


Regards,

BTJ

-- 
---
Bjørn T Johansen

---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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



Logging and log4j?

2003-02-10 Thread Bjørn T Johansen
I was just wondering what is the pro's and con's for using
Commons-Logging contra log4j?


Regards,

BTJ

---
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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




Re: Why doesn't the application resource file get loaded?

2003-01-30 Thread Bjørn T Johansen
I haven't done anything with the Tomcat's classpath and jarring up all my 
classes didn't work either... :(

Anymore suggestions?


BTJ

On Thursday 30 January 2003 20:35, David Graham wrote:
> I have had this same problem in the past.  Make sure you're not putting
> anything on Tomcat's classpath.  That seemed to fix my problem.  You might
> also try jarring up all your class files and putting it in /WEB-INF/lib
> instead.
>
> David
>
>
>
>
>
>
> From: Bjørn T Johansen <[EMAIL PROTECTED]>
>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Why doesn't the application resource file get loaded?
> >Date: Thu, 30 Jan 2003 19:24:19 +0100
> >
> >In theory it should, but it ain't.
> >I am running Struts 1.1 Beta 3 and TomCat 4.1.18 under Linux...
> >
> >My ApplicationResources.properties file is in the folder
> >webapp/WEB-INF/classes/com/havleik and in the web.xml file I have:
> >
> >...snip
> >action
> > org.apache.struts.action.ActionServlet
> > 
> >   application
> >   com.havleik.ApplicationResources
> > 
> >...snip
> >
> >and likewise in struts-config.cml...:
> >
> >...snip...
> > >null="false"
> >/>
> >...snip
> >
> >I have tried every possible way all day, but I can't get the resource file
> >loaded. According to books and examples, this is the way to do it!??
> >
> >Any help out there?
> >
> >
> >Regards,
> >
> >BTJ
> >
> >--
> >--
> >- Bjørn T Johansen (BSc,MNIF)
> >Executive Manager
> >[EMAIL PROTECTED]   Havleik Consulting
> >Phone : +47 67 54 15 17  Conradisvei 4
> >Fax : +47 67 54 13 91N-1338 Sandvika
> >Cellular : +47 913 32 280http://www.havleik.no
> >--
> >- "The stickers on the side of the box said "Supported
> > Platforms: Windows 98, Windows NT 4.0,
> >Windows 2000 or better", so clearly Linux was a supported platform."
> >--
> >-
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
> _
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager   
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 913 32 280   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows 98, 
Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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




Why doesn't the application resource file get loaded?

2003-01-30 Thread Bjørn T Johansen
In theory it should, but it ain't.
I am running Struts 1.1 Beta 3 and TomCat 4.1.18 under Linux...

My ApplicationResources.properties file is in the folder 
webapp/WEB-INF/classes/com/havleik and in the web.xml file I have:

...snip
action
org.apache.struts.action.ActionServlet

  application
  com.havleik.ApplicationResources

...snip

and likewise in struts-config.cml...:

...snip...

...snip

I have tried every possible way all day, but I can't get the resource file 
loaded. According to books and examples, this is the way to do it!??

Any help out there?


Regards,

BTJ

-- 
-------
Bjørn T Johansen (BSc,MNIF)
Executive Manager   
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91   N-1338 Sandvika
Cellular : +47 913 32 280   http://www.havleik.no
---
"The stickers on the side of the box said "Supported Platforms: Windows 98, 
Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
---


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