Re: [OT]How can i reply to the thread ???

2003-10-30 Thread Kwok Peng Tuck
What kind of email client are you using ?
AFAIK, email clients based on Mozilla don't have such problems.
I'm using it and I just clicked on reply to send to the mailling list.
Looser wrote:

Hi,

sorry by this OT post, but i need to know how to reply to another 
reply in a thread. When i open an message, there´s  just one button 
'reply via email to xxx'. When i use this button, my answer is 
obviously send to the author, but not to the mailing-list. How do i 
achieve this ???

Thanx for your answer...

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


[OT]How can i reply to the thread ???

2003-10-30 Thread Looser
Hi,

sorry by this OT post, but i need to know how to reply to another reply 
in a thread. When i open an message, there´s  just one button 'reply via 
email to xxx'. When i use this button, my answer is obviously send to 
the author, but not to the mailing-list. How do i achieve this ???

Thanx for your answer...

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


Re: two resource bundles?!

2003-10-30 Thread Manish Singla
Try this..
// second bundle
MessageResources res2 = (MessageRessource)request.getAttribute("prop2").

I assume you are not using struts modules.

see following also...
org.apache.struts.action.Action
protected MessageResources getResources(javax.servlet.http.HttpServletRequest request,
java.lang.String key)



"Otto, Frank" wrote:

> Hi,
>
> I have defined two properties files in my struts-config.xml:
>
> 
> 
>
> If I want to access the second properties-file in a jsp-page I will use this:
>
> 
>
> It functions, but how must I use it in action classes?
>
> // standard bundle
> MessageResources res1 = (MessageRessource)request.getAttribute(Globals.MESSAGES_KEY)
>
> // second bundle
> MessageResources res2 = (MessageRessource)request.getAttribute(???)
>
>
> Has anyone an idea?
>
>
>
> Regards,
>
> Frank


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



RE: two resource bundles?!

2003-10-30 Thread Navjot Singh
not sure by might be 
Globals.MESSAGES_KEY + prop2


>-Original Message-
>From: Otto, Frank [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 30, 2003 6:01 PM
>To: Struts-User (E-Mail)
>Subject: two resource bundles?!
>
>
>Hi,
> 
>I have defined two properties files in my struts-config.xml:
> 
>
>
> 
>If I want to access the second properties-file in a jsp-page I 
>will use this:
> 
>
> 
>It functions, but how must I use it in action classes?
> 
>// standard bundle
>MessageResources res1 = 
>(MessageRessource)request.getAttribute(Globals.MESSAGES_KEY)
> 
>// second bundle
>MessageResources res2 = (MessageRessource)request.getAttribute(???)
> 
> 
>Has anyone an idea?
> 
> 
> 
>Regards,
> 
>Frank
>

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



Hidden Field

2003-10-30 Thread Caroline Jen

works well because "author" is expected literally as
the value of a property called "dispatch".

I also want to pass 
String username = request.getRemoteUser(); 
as the value of a property called "keyValue".

But,

or


gives me problems.  What is the proper way of doing it?

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



anyone used multiple struts configuration file and tiles work together?

2003-10-30 Thread kean
doesn't seem to work on mine ... being spending sometime trying to 
figure out:P Any help to point to the right direction will be appreciated.

I do it step by step and make sure it's work on single struts 
configuration files and single tile configuration file, then I move it 
to multiple struts configuration file and follow the example given by 
Ted, but without using the tile. it's work fine. Then I put in the tiles 
in, and thing start to get unstable, sometime it's display fine and 
sometime it's wouldn't fine.
I can't seem to track down the problem, here is my configuration file:
*struts-config.xml*




*struts-system-config.xml*


*tile-config.xml*



the error message:
is path "system.index" doesn't start with the character "/"
my altimate goal is to used multiple struts configuration file and 
multiple tiles configuration file, but now I would be happy to settle 
for multiple struts configuration file and single tiles configuration file.

kean

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


Re: Iterating List of Lists

2003-10-30 Thread Chris Gastin
Yea I already have a scenario like where it works, but I have List Object,
which contains a List of Data Objects

di3List is a List in the request scope, which is holding Lists of Data. If
di3List is returning a List of Lists, how do I get access to the Data
Objects


HOT

 - 




The code above is giving the following error. I understand why I am getting
this error, but how do I access the Data Objects in the inner list?
javax.servlet.ServletException: Cannot create iterator for this collection
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
at org.apache.jsp.iterate_jsp._jspService(iterate_jsp.java:314)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:356)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.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(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:2416)
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:601)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)


- Original Message - 
From: "Choopong C." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 10:03 PM
Subject: Re: Iterating Lis

Re: Iterating List of Lists

2003-10-30 Thread Choopong C.
Try like this








-







From: "Chris Gastin" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Iterating List of Lists
Date: Thu, 30 Oct 2003 21:55:53 -0600
I have List of Lists of DataObjects. I want to iterate through that List of
Lists to get access to the Data Object, where I will print the values of 
the
attributes on the data object. I have the outer loop working, but I don't
understand how to get the Data out of the list in the inner loop.

This is my latest attempt:



 -



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


Re: Iterating List of Lists

2003-10-30 Thread Choopong C.



From: "Chris Gastin" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Iterating List of Lists
Date: Thu, 30 Oct 2003 21:55:53 -0600
I have List of Lists of DataObjects. I want to iterate through that List of
Lists to get access to the Data Object, where I will print the values of 
the
attributes on the data object. I have the outer loop working, but I don't
understand how to get the Data out of the list in the inner loop.

This is my latest attempt:



 -



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


Iterating List of Lists

2003-10-30 Thread Chris Gastin
I have List of Lists of DataObjects. I want to iterate through that List of
Lists to get access to the Data Object, where I will print the values of the
attributes on the data object. I have the outer loop working, but I don't
understand how to get the Data out of the list in the inner loop.

This is my latest attempt:



 -





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



Tiles tab- Struts

2003-10-30 Thread Lim Huat Heng
To anyone who may advice:
   Can I know how to control the size of the tab pane display area, such that it is 
always a fix size. Currently it is auto resize based on the content of my page in the 
display area. 
   Besides, how can I pass the parameter to tiles-defs.xml, in which I define the page 
for each tab display area?


Re: Phone Mask

2003-10-30 Thread Rhet Behler
This code works just as I wanted it to. I had it wrong in the validation.xml
file
  
phone






  ^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$
  


- Original Message - 
From: "Rhet Behler" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 6:56 PM
Subject: Phone Mask


Does anyone know how to set the phone mask in the validation to only accept
3 integers then a dash 3 integers a dash then 4 integers?

example:
123-456-7890

would be valid

123-a34-5780

would not be valid

right now my phone mask look like this:
  
phone






  ^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$
  

but it accepts letters and numbers.

TIA


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



Re: attribut vs name in action definition

2003-10-30 Thread Craig R. McClanahan
Steven Woody wrote:

Hi,

In the MailReader examples's struts-config.xml, I noticed there are two different config mthod to associate a ActionForm to a Action.  One use attribute,

   
others use  'name',

   
What is the difference?

And, Struts-1.1 come with a JavaDoc for classes, but I did not find a reference manual for configuration files.  Is there anyone?

 

Thanks for looking for the docs -- it always makes me feel better when 
people at least *try* to look up the answers for themselves :-).  The 
"reference manual" for the configuration files is the comments in the 
DTD itself.  Open "lib/struts-config_1_1.dtd" in your favorite text 
editor, and you'll see the information about all the available elements 
and attributes.

That includes the fact that form beans are normally stored as a request 
or session scope attribute under a key equal to the form name.  If you 
want to reuse a particular  element, but store the actual form 
bean instance under different request scope or session scope keys, 
that's what the "attribute" attribute is for.

Regards.
--
Steven Woody
[EMAIL PROTECTED]
 

Craig



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


attribut vs name in action definition

2003-10-30 Thread Steven Woody
Hi,

In the MailReader examples's struts-config.xml, I noticed there are two different 
config mthod to associate a ActionForm to a Action.  One use attribute,



others use  'name',



What is the difference?


And, Struts-1.1 come with a JavaDoc for classes, but I did not find a reference manual 
for configuration files.  Is there anyone?


Regards.
--
Steven Woody
[EMAIL PROTECTED]

Re: html:options maximum length?

2003-10-30 Thread Richard Yee
I think you should re-think your UI design. Besides being very slow, the 
select box will be very annoying and difficult for the end user to use. You 
should try and narrow down the users choices before they get to the select 
box page so that you only need to show a few dozen options at most.

Regards,

Richard

At 04:22 PM 10/30/2003, you wrote:
I have a an Array with a large list of names in it (up to about 1000+ or
more).
I need to display these names in a drop down list, but when The page loads
it
simply stops loading after about 837 lines.
The code I am using is:

labelProperty="consultantName" /> Any ideas why it only displays a part of 
the Array and not the full thing? Any help is appreciated, Matt 
__ Disclaimer: 
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error, please notify the addressee by 
return email and delete the email. This email transmission is the property 
of HAS Solutions and any information it contains is legally protected. HAS 
Solutions has no liability (including liability in negligence) to any 
person for any loss or damage consequential or otherwise suffered or 
incurred by that person resulting directly or indirectly from either the 
use of, or reliance on, the information contained herein. 
__


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


Re: Phone Mask

2003-10-30 Thread Saul Q Yuan
I think it's like this:

\d{3}\-\d{3}\-\d{4}


Saul


- Original Message -
From: "Rhet Behler" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 8:56 PM
Subject: Phone Mask


Does anyone know how to set the phone mask in the validation to only accept
3 integers then a dash 3 integers a dash then 4 integers?

example:
123-456-7890

would be valid

123-a34-5780

would not be valid

right now my phone mask look like this:
  
phone






  ^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$
  

but it accepts letters and numbers.

TIA


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



Re: Unit Test Actions

2003-10-30 Thread Steven Woody

- Original Message - 
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 31, 2003 3:58 AM
Subject: Re: Unit Test Actions


> Steven Woody wrote:
> > Ted,
> > 
> > 1)
> > How do you implement the Action Adapter?  Derived from Action and make it 
> > composite a substential Action Adaptee object which know nothing about web stuff? 
> > If this is the case, I want to know what the Action Adaptee's execute() return?  
> > Actually, I want to know if or not the Action Adaptee get knowledge of forwarding. 
> >  Thanks.
> 
> There's this, for example.
> 
> http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/ProcessAction.java?rev=HEAD&content-type=text/vnd.viewcvs-markup
> 
> Though as adapters go, the ProcessAction is rather extreme. :)
> 
> Basically, you bundle everything into a transfer object and hand that 
> down to the business layer. Then the business layer hands another 
> transfer object back.
> 

I skimmed through the code, but dont get a concrete ideal.  Does ProcessAction.java is 
a part of 'Scaffold'?  Would you please point me to a full documentation about the 
project?  Thanks!

> The (relatively new) Commons Chain Context is an ideal transfer object 
> for this sort of thing.
> 
> http://jakarta.apache.org/commons/sandbox/chain/
> 
> 
> > 
> > 2)
> > I think I like the WebTest.  Before use it, I still want to get some opinion from 
> > you about how do you compare WebTest and HttpTest.  Thanks in advance.
> 
> HttpUnit is a good thing if you have code based on the http package to 
> test. I have very little of that of my own now-a-days, so HttpUnit isn't 
> something I feel a need to use.
> 
> WebTest exercises the actual pages. You can start using it from page one 
> of your first storyboard. (Matter of a fact, started a new one today, 
> and first thing I did was setup the WebTest.) Since it's run by an XML 
> script, it's very easy to keep the WebTest up-to-date. And, it's 
> something anyone can do, not just the Java engineers.
> 
> HTH, Ted.
> 

Ok, I'm abou to use WebTest.   And, if not so boring I still want to ask, how do you 
compare WebTest with Fitness?

> 
> 
> -- 
> Ted Husted,
>Junit in Action  - ,
>Struts in Action - ,
>JSP Site Design  - .
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

Phone Mask

2003-10-30 Thread Rhet Behler
Does anyone know how to set the phone mask in the validation to only accept 3 integers 
then a dash 3 integers a dash then 4 integers?

example:
123-456-7890

would be valid

123-a34-5780

would not be valid

right now my phone mask look like this:
  
phone
^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$
  

but it accepts letters and numbers.

TIA

Re: Design decision for Globals class

2003-10-30 Thread Craig R. McClanahan
Justin Mahoney wrote:

Hi guys,
Thanks for your replies.
Can you give examples of usage patterns that would dictate that it is ok to
move constants away from their owning classes?
I also think the type safe enum pattern is a great idea, but I do not see
this being used a lot in practice (though I think it should be).
Justin
 

Constants are not always "owned" or strongly related to any particular 
class -- in those scenarios, you definitely want to move to a common one 
(like we did with Globals in Struts 1.1).  It can also lead to cleaner 
imports if you only have to import one class to get the constant 
declarations.

A related hack I've seen used on occasion is to define the global 
constants in an interface, rather than a class.  Then, your logic class 
can say "implements Globals" and reference the constant names directly 
(without having to prefix them with the class name, as you do to 
reference static constants in other classes).

Typesafe enums make sense when the underlying data really is an 
enumeration of values that represents the total set of valid inputs to a 
method.  This is true, for example, when the constants are the integer 
subscripts into a fixed size array, and you want to avoid the 
possibility of IndexOutOfBound exceptions.  (On the other hand, it makes 
iterating through the values harder.)  I don't find them of much use 
when the constants are Strings, because in most of those scenarios the 
number of legal values is usually not limited -- the constants are just 
well-known identifiers rather than being the only valid values.  For 
example, it wouldn't make sense to define a typesafe enum class for 
request attribute keys.

Craig

-Original Message-
From: John Cavacas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 7:43 PM
To: Struts Users Mailing List
Subject: Re: Design decision for Globals class
I agree with David. Constants should be defined where they are relevant. 
But once you start using them in other places, then refactor them out to a 
common Constants class. The Type Safe Enum pattern might also be something 
worth looking at depending on your use of such constants.

John

At 04:15 PM 29/10/2003 -0800, you wrote:
 

In general, constants should be defined in the class they're relevant in.
The Struts Globals constants used to be defined in Action; however,
they're used in many places other than Action so it made sense to move
them to the new Globals class.
David

--- Justin Mahoney <[EMAIL PROTECTED]> wrote:
   

Hi,
A colleague of mine and I are discussing the relative merits of having
something like a Globals class.
I argue that it removes the constants from their proper association with
a
parent/owning class, ignoring the concept of object orientation and
losing a
self-documenting aspect regarding its relationship in the class
hierarchy.
By making the constants global they inherently lose scope, type
association,
and encapsulation. Another drawback is that you now have to flip between
two
JavaDocs pages when looking at a class and its constants.
My friend argues that it's easier to reference a Globals class when
programming since all constant Strings useful in the architecture are
collected within, and therefore this is reason enough to have a Globals
class (works great obviously with IDE auto-complete).
If anyone has the time or inclination to comment, what were the design
decisions that led to the Struts Globals class?
Thanks,
Justin
 

__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
-
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]


Modifying the ParameterAction Class in the org.apache.struts.scaffold

2003-10-30 Thread Caroline Jen
I am trying to modify the behavior of the
ParameterAction.java in the org.apache.struts.scaffold
to tailor it to my specific need.  

I put the struts.jar and struts-scaffold.jar in my
classpath while compiling the sub-class.  Nonetheless,
I got 

cannot resolve symbol
symbol: class ParameterAction

Here is my AuthorParameterAction that extends
ParameterAction:

package org.apache.artimus.article;

import java.io.IOException;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.scaffold.lang.Tokens;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;

public class AuthorParameterAction extends
ParameterAction {

protected ActionForward findSuccess(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {

// Get "dispatch" parameter
String parameter =
request.getParameter(Tokens.DISPATCH);

   // Get stub URI from mapping
(/do/whatever?paramName=)
StringBuffer path = new StringBuffer(64);
   
path.append(mapping.findForward(parameter).getPath());
// Append the value passed
(/do/whatever?paramName=paramProperty)
path.append(request.getRemoteUser());

// Return a new forward based on
stub+value
return new ActionForward(path.toString());

}

} // end AuthorParameterAction


__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



html:options maximum length?

2003-10-30 Thread Matt Redman
I have a an Array with a large list of names in it (up to about 1000+ or
more).
I need to display these names in a drop down list, but when The page loads
it
simply stops loading after about 837 lines.
 
The code I am using is:
 



 
Any ideas why it only displays a part of the Array and not the full thing?
 
Any help is appreciated,
 
Matt
__
Disclaimer: 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom 
they are addressed. 

If you have received this email in error, please notify the addressee 
by return email and delete the email. 

This email transmission is the property of HAS Solutions and any 
information it contains is legally protected. HAS Solutions has no liability

(including liability in negligence) to any person for any loss or damage
consequential or otherwise suffered or incurred by that person resulting
directly or indirectly from either the use of, or reliance on, the
information contained herein.
__



Re: Deploying on TOMCAT

2003-10-30 Thread Jacob Wilson
Vinitha,
 
Assume 'Tomcat\webapps\root' is your project folder...
 
Create separate folders of images, js, html, styles etc. and place the respective 
files in the respective folders...
 
Place all your jsps in the root directly...
 
the web-inf should be in your root...
 
in the web-inf place your web.xml and struts-config and all tld files...
 
create a folder lib in your web-inf and place all the jars in the lib folder
 
set your java classpath in your catalina.bat that lies in the bin folder...
 
Run the server and write a action and check... This should work...
 
Hope this helps...
 
-J


Vinita Keswani <[EMAIL PROTECTED]> wrote:

Hello,



I am trying to deploy my struts application on tomcat..does somebody have a list of 
do's and dont's for that which paths to set etc...for eg: where does struts-config go?



Thanks in advance



-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

Re: Tiles Redirect Bug on a per Tile basis? Help!

2003-10-30 Thread David Erickson
Ya I wish I knew why the redirects inside a tile aren't working..
theoretically they should unless there is a specific reason they were coded
not too... but nobody else seems to know either :p
-David

- Original Message - 
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 4:09 PM
Subject: Re: Tiles Redirect Bug on a per Tile basis? Help!


> On 10/30/2003 11:26 PM David Erickson wrote:
> > I was able to make it work using the  tag.  I
found
> > some interesting stuff with it though.  The page url is relative to your
> > context.  So if my context was /salesweb, and i wanted the page at
> > /salesweb/forum/transition-.jsp  I would need to send it
> > /forum/transition-.jsp.  Also when I tried  > request.getContextPath() %>/forum/transition-.jsp"/> I would get a
compile
> > error (this was before I figured out it was context relative), however
> > "/> would work.  Very odd.  I
just
> > wish the original redirect would work, so my code doens't look all
sloppy ;)
>
> Nobody else has jumped in on this thread to say anything different, but
> I don't actually claim that the tiles redirect can't work. Originally I
> thought you wanted the whole lot to redirect, not just the tile, which I
> know will work.
>
> I just don't know enough about the internal Tiles machinations.
>
> Adam
>
> -- 
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> -
> 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: Tiles Redirect Bug on a per Tile basis? Help!

2003-10-30 Thread Adam Hardy
On 10/30/2003 11:26 PM David Erickson wrote:
I was able to make it work using the  tag.  I found
some interesting stuff with it though.  The page url is relative to your
context.  So if my context was /salesweb, and i wanted the page at
/salesweb/forum/transition-.jsp  I would need to send it
/forum/transition-.jsp.  Also when I tried /forum/transition-.jsp"/> I would get a compile
error (this was before I figured out it was context relative), however
"/> would work.  Very odd.  I just
wish the original redirect would work, so my code doens't look all sloppy ;)
Nobody else has jumped in on this thread to say anything different, but 
I don't actually claim that the tiles redirect can't work. Originally I 
thought you wanted the whole lot to redirect, not just the tile, which I 
know will work.

I just don't know enough about the internal Tiles machinations.

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Deploying on TOMCAT

2003-10-30 Thread Vinita Keswani

Hello,

 

I am trying to deploy my struts application on tomcat..does somebody have a list of 
do's and dont's for that which paths to set etc...for eg: where does struts-config go?

 

Thanks in advance



-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

RE: quick html:link question

2003-10-30 Thread Ghanakota, Vishu
No.

-Original Message-
From: Sonam Belbase [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 3:02 PM
To: Struts Users Mailing List
Subject: quick html:link question


Does  have to be within a  section?

Thanks,
SB

--
NOTICE: If received in error, please destroy and notify sender.  Sender
does not waive confidentiality or privilege, and use is prohibited.



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


"MMS " made the following
 annotations on 10/30/2003 03:03:05 PM
--
"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY
FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL,
PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE ADDRESSEE INDICATED
IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON)
YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES
TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT
THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM
YOUR SYSTEM."
==


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



quick html:link question

2003-10-30 Thread Sonam Belbase
Does  have to be within a  section?

Thanks,
SB

--
NOTICE: If received in error, please destroy and notify sender.  Sender
does not waive confidentiality or privilege, and use is prohibited.



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



Re: Tiles Redirect Bug on a per Tile basis? Help!

2003-10-30 Thread David Erickson
Adam,
I agree with you.. I'm not a big fan of logic in jsps other than minimal
stuff, but in this circumstance we are retooling a jsp based forum and
eventually will port it to struts but at the moment time is scarce.

I was able to make it work using the  tag.  I found
some interesting stuff with it though.  The page url is relative to your
context.  So if my context was /salesweb, and i wanted the page at
/salesweb/forum/transition-.jsp  I would need to send it
/forum/transition-.jsp.  Also when I tried /forum/transition-.jsp"/> I would get a compile
error (this was before I figured out it was context relative), however
"/> would work.  Very odd.  I just
wish the original redirect would work, so my code doens't look all sloppy ;)
Thanks Adam,
David

- Original Message - 
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 1:30 PM
Subject: Re: Tiles Redirect Bug on a per Tile basis? Help!


> On 10/30/2003 07:01 PM David Erickson wrote:
> > Adam,
> > Essentially I just want to display a different content in that area of
my
> > layout.  And I considered using a jsp:include, but by the point the
logic
> > determines that a different page needs to be in that spot it has already
> > loaded a bunch of JSP variables and stuff into the page, by including
> > another page with variables potentially the same would it mess
everything
> > up?  Also for example was:
> >
> > if (x condition is met)
> > {
> > %>
> > 
> > <%
> > return;
> > }
> >
> > %>
> >
> > Would that return successfully quit running any logic from my original
jsp?
>
> Regarding the variables getting messed up: there are 2 types of includes
> - I think the one you have used above would be OK. There is also the
> straight <@% include file="" %>. Again though JSP is not my forte.
>
> I'm not sure whether the return would end the JSP. A check in the
> compiled JSP file would show you. I never do too much logic in my JSPs
> so I'm not too hot on that.
>
> Perhaps you should make an else {} that encompasses the whole of the
> rest of the JSP. Horrible, but I take it you are modifying existing
> code, so it might be the easiest way.
>
> Adam
>
> -- 
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> -
> 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]



Like to use html-el:link to add query string params

2003-10-30 Thread Jim Kennedy
Why doesn't this work

Rent


The implicit param var is not found in any scope.  Seems like this should work.  Doing 
something wrong here.  What's the best way to apply existing query string Plus one 
param.

thanks


RE: Design decision for Globals class

2003-10-30 Thread Justin Mahoney
Hi guys,
Thanks for your replies.
Can you give examples of usage patterns that would dictate that it is ok to
move constants away from their owning classes?
I also think the type safe enum pattern is a great idea, but I do not see
this being used a lot in practice (though I think it should be).
Justin

-Original Message-
From: John Cavacas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 7:43 PM
To: Struts Users Mailing List
Subject: Re: Design decision for Globals class


I agree with David. Constants should be defined where they are relevant. 
But once you start using them in other places, then refactor them out to a 
common Constants class. The Type Safe Enum pattern might also be something 
worth looking at depending on your use of such constants.

John

At 04:15 PM 29/10/2003 -0800, you wrote:
>In general, constants should be defined in the class they're relevant in.
>The Struts Globals constants used to be defined in Action; however,
>they're used in many places other than Action so it made sense to move
>them to the new Globals class.
>
>David
>
>--- Justin Mahoney <[EMAIL PROTECTED]> wrote:
> > Hi,
> > A colleague of mine and I are discussing the relative merits of having
> > something like a Globals class.
> > I argue that it removes the constants from their proper association with
> > a
> > parent/owning class, ignoring the concept of object orientation and
> > losing a
> > self-documenting aspect regarding its relationship in the class
> > hierarchy.
> > By making the constants global they inherently lose scope, type
> > association,
> > and encapsulation. Another drawback is that you now have to flip between
> > two
> > JavaDocs pages when looking at a class and its constants.
> > My friend argues that it's easier to reference a Globals class when
> > programming since all constant Strings useful in the architecture are
> > collected within, and therefore this is reason enough to have a Globals
> > class (works great obviously with IDE auto-complete).
> > If anyone has the time or inclination to comment, what were the design
> > decisions that led to the Struts Globals class?
> > Thanks,
> > Justin
> >
>
>
>__
>Do you Yahoo!?
>Exclusive Video Premiere - Britney Spears
>http://launch.yahoo.com/promos/britneyspears/
>
>-
>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: tiles configuration

2003-10-30 Thread Adam Hardy
On 10/30/2003 08:15 PM [EMAIL PROTECTED] wrote:
Hi y'all,

I just started using struts and I have some questions on tiles.

In my definitions file, I have a definition called tiles.index for my main page.

In index.jsp, I do an insert:

Is there anyway for me to avoid creating the index.jsp?  

I know you can forward to a tiles definition in the struts config like so:

type="my login action"
name="loginForm"
scope="session"
input="tiles.login">



or


Is there a way for struts to recognize that a url like "http://mysite.com/main"; should use the definition or do I have to create a jsp file for all my pages?
I'm not sure I completely understand what you're driving at, but here is 
a simple action mapping that takes a Tile:



and the tiles-def config


  
  
  


  

where classiclayout.jsp contains tiles:inserts which insert the header, 
body & menu in the desired places.

Actually I think I'm more or less paraphrasing Ted Husted's Struts in 
Action, which is where I learnt it (plus lots of other stuff).

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:select

2003-10-30 Thread Rhet Behler
set the country in the action before the page if null

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 1:41 PM
Subject: html:select


> how can i default a countrylist, i mean set the selected country ?
> I want the selected to be 'BE'
>
> my code:
>
> 
>  
> 
>
>
> Thanks !
>
>
> -
> 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: How do I disable struts logging?

2003-10-30 Thread Jeremy Nix
I'm looking for exact instructions on how to turn off struts logging.
Can somebody help me out?  I've tried log4j.properties with no avail.


_
Jeremy Nix
Southwest Financial Services, LTD.
[EMAIL PROTECTED]
(513) 621-6699 ext.1158



-Original Message-
From: Jeremy Nix 
Sent: Wednesday, October 29, 2003 3:25 PM
To: [EMAIL PROTECTED]
Subject: How do I disable struts logging?


The debug init-param no longer works with v1.1, so what other options do
we have on disable the struts internal logging?


_
Jeremy Nix
Southwest Financial Services, LTD.
[EMAIL PROTECTED]
(513) 621-6699 ext.1158


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



html:select

2003-10-30 Thread [EMAIL PROTECTED]
how can i default a countrylist, i mean set the selected country ?
I want the selected to be 'BE'

my code:


 



Thanks !


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



Re: Tiles Redirect Bug on a per Tile basis? Help!

2003-10-30 Thread Adam Hardy
On 10/30/2003 07:01 PM David Erickson wrote:
Adam,
Essentially I just want to display a different content in that area of my
layout.  And I considered using a jsp:include, but by the point the logic
determines that a different page needs to be in that spot it has already
loaded a bunch of JSP variables and stuff into the page, by including
another page with variables potentially the same would it mess everything
up?  Also for example was:
if (x condition is met)
{
%>

<%
return;
}
%>

Would that return successfully quit running any logic from my original jsp?
Regarding the variables getting messed up: there are 2 types of includes 
- I think the one you have used above would be OK. There is also the 
straight <@% include file="" %>. Again though JSP is not my forte.

I'm not sure whether the return would end the JSP. A check in the 
compiled JSP file would show you. I never do too much logic in my JSPs 
so I'm not too hot on that.

Perhaps you should make an else {} that encompasses the whole of the 
rest of the JSP. Horrible, but I take it you are modifying existing 
code, so it might be the easiest way.

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


findByProperty() in the scaffold.sql.AccessBase - Need One Additional Parameter to the Pair of Property/Value

2003-10-30 Thread Caroline Jen
I am using the findByProperty method in the
org.apache.commons.scaffold.sql.AccessBase.  The
findByProperty method takes "one" pair of
property/value as it parameters.  As such, visitors of
the web site can query all articles in the database by
providing 'author' as the property and supply the name
of the author (xyz) as value.

public static final Collection findByProperty
(
Object target,
String property,
String value
) throws ParameterException, PopulateException,
ResourceException

I have this field "category" in my database.  I want
to search and get all the articles written by
author(property) with name xyz (value) within the
HISTORY category.  The value of the category will be
supplied by the application developer (NOT BY THE
VISITOR of the web site via selecting from a drop-down
list and fill out the value in the text field).

I need help in handling this kind of situation. 
Thanks in advance.

-Caroline

__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



tiles relative path in put tag

2003-10-30 Thread bessette
I have a definition like this:


  
  
  
  
  


And I'd like to overload it like this: (index.jsp)


  
  


Where index.jsp, sidebar.jsp, and content.jsp are all in the same directory.

When I access this page, nothing gets displayed and no errors are logged.  However, if 
I use 
the full path, then everything works fine.

Is there some way to use relative paths in the put tag?

Thanks,
Eric


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



RE: Workaround for IE "streamer bug"?

2003-10-30 Thread Nicholson, Robb
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 );
}

>>>


Re: Unit Test Actions

2003-10-30 Thread Ted Husted
Steven Woody wrote:
Ted,

1)
How do you implement the Action Adapter?  Derived from Action and make it composite a 
substential Action Adaptee object which know nothing about web stuff? If this is the 
case, I want to know what the Action Adaptee's execute() return?  Actually, I want to 
know if or not the Action Adaptee get knowledge of forwarding.  Thanks.
There's this, for example.

http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/ProcessAction.java?rev=HEAD&content-type=text/vnd.viewcvs-markup

Though as adapters go, the ProcessAction is rather extreme. :)

Basically, you bundle everything into a transfer object and hand that 
down to the business layer. Then the business layer hands another 
transfer object back.

The (relatively new) Commons Chain Context is an ideal transfer object 
for this sort of thing.

http://jakarta.apache.org/commons/sandbox/chain/


2)
I think I like the WebTest.  Before use it, I still want to get some opinion from you 
about how do you compare WebTest and HttpTest.  Thanks in advance.
HttpUnit is a good thing if you have code based on the http package to 
test. I have very little of that of my own now-a-days, so HttpUnit isn't 
something I feel a need to use.

WebTest exercises the actual pages. You can start using it from page one 
of your first storyboard. (Matter of a fact, started a new one today, 
and first thing I did was setup the WebTest.) Since it's run by an XML 
script, it's very easy to keep the WebTest up-to-date. And, it's 
something anyone can do, not just the Java engineers.

HTH, Ted.



--
Ted Husted,
  Junit in Action  - ,
  Struts in Action - ,
  JSP Site Design  - .


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


Re: easy struts plugin

2003-10-30 Thread Sergey Smirnov
Exadel Struts Studio 5.1 plugin for eclipse 3.0 will be available for public
download since the middle of November.

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi

Is there any struts plugin for eclipse 3.0?
I've been using EasyStruts 0.6.4 which is good and works nicely with 2.1
eclipse , just wanted to know if the same plugin can be recompiled to work
with eclipse 3.0 version?

I know its bit of the topic but just wanted to know

Thanks and regards
Shishir






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



Re: Oracle data-source problem with struts 1.1

2003-10-30 Thread Yann Cébron
Hi,

I stumbled upon the same thing..

The property "url" is "URL" (all uppercase) with the OracleDataSource ;-)

HTH,
Yann

> I recently upgraded my struts setup to the 1.1 release version.
> Now I find that the data source used by my application to
> connect to the database no longer works:
>
>   
> 
>   
> value="jdbc:oracle:thin:user/[EMAIL PROTECTED]:1521:milk"/>
>   
>   
>   
>  value="oracle.jdbc.pool.OracleConnectionPoolDataSource" />
>   
>   
> 
>   
>
> If left like this, the container (tomcat) fails to start with
> the exception:
>
> java.lang.NullPointerException
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:258)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source)
> at
>
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:163)
> at
>
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:18
7)
> at
>
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j
ava:813)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:389)
> at javax.servlet.GenericServlet.init(GenericServlet.java)
> at org.apache.catalina.core.StandardWrapper.loadServlet(Unknown
> Source)
> at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
>
>
> I've tried adding type="oracle.jdbc.pool.OracleConnectionPoolDataSource"
> to the data source element. This causes the following exception:
>
> java.sql.SQLException: Invalid Oracle URL specified:
> OracleDataSource.makeURL
> at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130)
> at
> oracle.jdbc.pool.OracleDataSource.makeURL(OracleDataSource.java:966)
> at
> oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:134)
> at
> oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:108)
> at
> taco.struts.GetCourseWorkAction.execute(GetCourseWorkAction.java:39)
> at
>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:449)
> at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264)
>
> I've tried giving the URL without the username/password and setting them
> in properties. Nothing seems to work. Any suggestions would be very much
> appreciated. As I said, all this worked before upgrading the struts
> jars.
>
> Richard




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



tiles configuration

2003-10-30 Thread roy-strutsuser
Hi y'all,

I just started using struts and I have some questions on tiles.

In my definitions file, I have a definition called tiles.index for my main page.

In index.jsp, I do an insert:


Is there anyway for me to avoid creating the index.jsp?  

I know you can forward to a tiles definition in the struts config like so:




or



Is there a way for struts to recognize that a url like "http://mysite.com/main"; should 
use the definition or do I have to create a jsp file for all my pages?

Roy.

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



Re: "A Walking Tour of the Struts Example Application" does not match the code!

2003-10-30 Thread Ted Husted
Steven Woody wrote:
> I'm new to Struts, so a begining example is very important for me. 
Is this a version conflict?  Where is the correct tour for the 
MailReader example?

I originally wrote the tour when I was new to Struts and trying to 
figure out the example.

Learning Struts by updating the tour document might be an excellent 
exercise for someone who's truly interested in figuring out how things 
work. :)

-Ted.


Hi, list

The "A Walking Tour of the Struts Example Application" (MailReader example) seems not to match the code come with release 1.1.   A few minutes after I began to read the document, I got:

--- cut ---
If you check the application's web.xml, you will see how these objects are loaded. The 
message resource is loaded by the application parameter to the ActionServlet. When the 
ActionServlet initializes, it parses the ApplicationResources.properties in the 
package folder into the default message resource. If you change a message in the 
resource, and then reload the application, it will appear throughout the application.
--- end ---
But in the web.xml, I dont find anything to loading those mentioned objects and message resource.  They are loaded in the strut-config.xml in fact.

I'm new to Struts, so a begining example is very important for me.  Is this a version conflict?  Where is the correct tour for the MailReader example?

--
Steven Woody
[EMAIL PROTECTED]
--
Ted Husted,
  Junit in Action  - ,
  Struts in Action - ,
  JSP Site Design  - .


-
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 Prabhat Kumar (IT)
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]



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: declaring action mappings at runtime

2003-10-30 Thread Kirk Wylie
I know this is a little OT, but had you thought about doing it with 
xdoclet? Particularly if the Hibernate configurations are coming out of 
xdoclet in the first place (and everything's set at compile time), you 
could probably extend the Hibernate templates pretty easily to generate 
the action mappings automatically. Then you'd have everything based on 
Hibernate, done dynamically, and a faster startup time as well.

Just an idea.

Kirk Wylie
M7 Corporation
Ahmet ISIK wrote:
I'm doing it in a plugin.
My purpose is to develop generic CRUD operations, views and forms for
any model object that is persisted using Hibernate. For this, I
introspect Hibernate config and provide form fields according to
underlying object's properties.
I'm declaring actionmappings at runtime because I'm asking Hibernate for
a list of entities that are declared.
Martin Cooper wrote:
 > "Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
 > news:[EMAIL PROTECTED]
 >
 >>thanks Martin,
 >>I have found a solution. I have acquired module config by
 >>Globals.MODULE_KEY key from app context. Then I added programmatically
 >>configured ActionMappings to module config object. after that it is
 >>possible to use those action mappings. Is this a bad practice?
 >
 >
 > Where are you doing this? (And why?)
 >
 > If you're doing it in a plug-in, then I believe it will work, but I 
don't
 > see how that would be any more "dynamic" than adding them to your Struts
 > config file. (Also in that case, you are already passed the module 
config,
 > so you wouldn't need to look it up, as you mentioned you are doing.)
 >
 > If you're doing it outside of a plug-in, then I'm puzzled. Once 
Struts loads
 > the config, it freezes it and throws IllegalStateException if you 
attempt to
 > modify it.
 >
 > --
 > Martin Cooper
 >
 >
 >
 >>Martin Cooper wrote:
 >>
 >>>"Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
 >>>news:[EMAIL PROTECTED]
 >>>
 >>>
 Hi,
 Is it possible to declare struts action mappings at runtime, and how?
 >>>
 >>>
 >>>No, it's not possible. The config is read in at application startup and
 >
 > is
 >
 >>>then frozen. (The reason it's done this way is so that access to the
 >
 > config
 >
 >>>does not need to be synchronised once the app is up and running, thus
 >>>leading to much improved overall performance.)
 >>>
 >>>--
 >>>Martin Cooper
 >>>
 >>>
 >>>
 >>>
 Thanks in advance
 
 --
 Ahmet ISIK
 Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
 Yazilim Muhendisi
 http://www.idealteknoloji.com
 >>>
 >>>
 >>>
 >>>
 >>>
 >>>-
 >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
 >>>For additional commands, e-mail: [EMAIL PROTECTED]
 >>>
 >>>
 >>
 >>
 >>--
 >>Ahmet ISIK
 >>Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
 >>Yazilim Muhendisi
 >>[EMAIL PROTECTED]
 >>http://www.idealteknoloji.com
 >
 >
 >
 >
 >
 > -
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail: [EMAIL PROTECTED]
 >
 >

--
Ahmet ISIK
Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
Yazilim Muhendisi
[EMAIL PROTECTED]
http://www.idealteknoloji.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: Connection pool and MessageRessources

2003-10-30 Thread James Mitchell
Hi Ovidiu

I also wrote my own DBMessageResources.  With a simple hack, I was able
to overcome the limitations of the existing API.

The source code and example are available for download at:

 
http://sourceforge.net/project/showfiles.php?group_id=49385&release_id=1
54972



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




> -Original Message-
> From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 30, 2003 1:07 PM
> To: [EMAIL PROTECTED]
> Subject: Connection pool and MessageRessources
> 
> 
> Hi,
> I'm working with Struts 1.1 and I have a problem with the 
> MessageRessource and I
> don't know to handle it  the right way.
> In my application I have two constraints,among others :) ,
> - i must use an oci connection to the database
> - the error messages will be stored in the database
> For that I took two aproaches :
> ## One ##:  I have written a Struts plugin which builds the 
> connection pool, and
> I've extended MessageRessourceFactory and MessageRessources 
> with my own classes
> DBRessourceFactory and DBRessource to have my own mechanism 
> for message
> retrivial. My problem is now how can I get a connection to 
> the database from the
> connection pool I've just made ? Is there a way to 
> communicate between my plugin
> and my DBRessource class ?
> 
> 
> ## Two ##: I make a class which will handle the connection 
> pool creation and the
> retrivial of messages from the database.
> It will look like this :
> public class MessagesDBPool extends MessageRessources implements
> PlugIn,Serializable {
> public MessageDBPool (){
> super();
> }
> public MessageDBPool(MessageRessourcesFactory 
> factory,String config){
> this(factory,config,false);
> }
> public MessageDBPool(MessageRessourcesFactory 
> factory,String config,boolean
> returnNull){
> super(factory,config,returnNull);
> }
> public void init(ActionServlet servlet, ModuleConfig 
> config) throws
> ServletException{
> //pool initialisation here
> }
> public void destroy(){
> //destroy pool here
> }
> }
> Can I do this in the first place ?
> 
> Now the question is which one of this two solutions can work? 
> Is there another
> way to do this ?
> Any suggestions are welcome .
> 
> Thanks,
> Ovidiu EFTIMIE
> 
> 
> 
> 
> -
> 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]



Connection pool and MessageRessources

2003-10-30 Thread Ovidiu EFTIMIE
Hi,
I'm working with Struts 1.1 and I have a problem with the MessageRessource and I
don't know to handle it  the right way.
In my application I have two constraints,among others :) ,
- i must use an oci connection to the database
- the error messages will be stored in the database
For that I took two aproaches :
## One ##:  I have written a Struts plugin which builds the connection pool, and
I've extended MessageRessourceFactory and MessageRessources with my own classes
DBRessourceFactory and DBRessource to have my own mechanism for message
retrivial. My problem is now how can I get a connection to the database from the
connection pool I've just made ? Is there a way to communicate between my plugin
and my DBRessource class ?


## Two ##: I make a class which will handle the connection pool creation and the
retrivial of messages from the database.
It will look like this :
public class MessagesDBPool extends MessageRessources implements
PlugIn,Serializable {
public MessageDBPool (){
super();
}
public MessageDBPool(MessageRessourcesFactory factory,String config){
this(factory,config,false);
}
public MessageDBPool(MessageRessourcesFactory factory,String config,boolean
returnNull){
super(factory,config,returnNull);
}
public void init(ActionServlet servlet, ModuleConfig config) throws
ServletException{
//pool initialisation here
}
public void destroy(){
//destroy pool here
}
}
Can I do this in the first place ?

Now the question is which one of this two solutions can work? Is there another
way to do this ?
Any suggestions are welcome .

Thanks,
Ovidiu EFTIMIE




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



Re: Tiles Redirect Bug on a per Tile basis? Help!

2003-10-30 Thread David Erickson
Adam,
Essentially I just want to display a different content in that area of my
layout.  And I considered using a jsp:include, but by the point the logic
determines that a different page needs to be in that spot it has already
loaded a bunch of JSP variables and stuff into the page, by including
another page with variables potentially the same would it mess everything
up?  Also for example was:

if (x condition is met)
{
%>

<%
return;
}

%>

Would that return successfully quit running any logic from my original jsp?
Thanks,
David

- Original Message - 
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 1:14 AM
Subject: Re: Tiles Redirect Bug on a per Tile basis? Help!


> On 10/29/2003 11:52 PM David Erickson wrote:
> > Ya sorry that is a hard question.. here let me give more explanation:
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> >
> >
> > These are my two tile definitions in my tiles-defs.xml file.  I call a
jsp
> > file, for example test.jsp it contains:
> >
> > <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> >
> >
> >
> > 
> >
> > 
> >
> > 
> >
> > (which is basically just a way to call a definition without using a
struts
> > action for right now)
> >
> > The above fills everything into our page layout and overrides body with
> > test-.jsp.  Now test-.jsp goes into the body slot, the main area on the
> > page.  I do some logic in it and determine, before its rendered, that
the
> > user is not logged in or whatever else, and instead of it going into the
> > body area it needs to redirect to another page to fill that slot.
However
> > when I try that the body area just comes up blank.  And thats just
using:
> >
> > url = response.encodeRedirectURL(request.getContextPath() +
> > "/forum/transition.jsp");
> >
> > response.sendRedirect(url);
> >
> > return;
> >
> > I know the above redirect code works, because when I put it in a .jsp
that
> > does not includes our tiles layout it works fine.
>
> It's not clear whether you want to do a redirect to take the user to a
> different page, which is what I assumed from your first message, or
> whether you want to stay on that page and just have different content in
> your body slot.
>
> If you only need different content, why do a redirect? Why can't you
> just do a straight jsp:include?
>
> Adam
>
> -- 
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> -
> 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 Prabhat Kumar (IT)
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]



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: collection iterate

2003-10-30 Thread Srinivas Kusunam

Hey Ajay,

 Here is the way I am doing.

on JSP:


  


<%=wbpBORFacade.getWbpAgreementNumber()%>

   
 

Try it...Best of luck.

-srini   

Srinivas Kusunam

Sr. Software Engineer
US Department of Agriculture
Missouri, USA.


>>> [EMAIL PROTECTED] 10/30/03 11:16AM >>>
hi!
my problem is that the above doesn't print anything.
there is data in the vector, it however prints out nothing
any suggestions
thanks
ajay


>From: "Appel, Jeremy D" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: collection iterate
>Date: Thu, 30 Oct 2003 10:23:17 -0600
>
>Ajay,
>
>   use the struts-bean taglibrary and  tag.  Something like this:
>
> 
>   
>   ..
>   
>
>
>
>HTH
>jeremy
>
>-Original Message-
>From: ajay brar [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, October 30, 2003 11:19 AM
>To: [EMAIL PROTECTED] 
>Subject: collection iterate
>
>
>hi!
>i have a collection that i would like to iterate over and print the 
>contents
>out
>i am currently doing this as
>
>
>here ResVector is a collection that has been placed in session.
>it is a collection of transaction beans.
>i want to iterate over the collection, and print the details of the
>transaction bean stored in the collection.
>
>pleas help
>thanks
>ajay
>
>_
>Hot chart ringtones and polyphonics. Go to
>http://ninemsn.com.au/mobilemania/default.asp 
>
>
>-
>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] 
>

_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp 


-
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: Multiple -- How to access? Struts 1.1

2003-10-30 Thread Lukas Bradley
It appears as if the properties file can not contain the "." character.
This makes sense, because properties are considered to be Class files at run
time.  The dot-notation probably gets a little confusing.

This works:





Where the properties file is named MyForum.properites.

Lukas


"Lukas Bradley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I feel rather odd asking about this, because it seems it should be a VERY
> simple task.
>
> I've been using a single message-resource within my struts-config.xml
file.
> It's been working beautifully defined as:
> 
>
> When I have a file "MyTerms.properties" in my /WEB-INF/classes directory.
I
> access my properties as such:
>
> 
>
> And everything the world is perfect.
>
> Except that my properties file has filled up with hundreds of terms, and
it
> is getting impossible to manage.  To make this easier, I decided to define
> multiple message-resources in my struts-config.
>
> 
>
>  null="false" />
>
> 
>
> It is my understanding that the initial "MyTerms" file will be stored
under
> the default resources property, and the other two will be stored as
> "msg.errors" and "msg.forum" respectively.
>
> However, when I try to access them, I get nothing.
>
> 
>
> 
>
> 
>
> None of the tags above work.  I even tried
>
> 
>
> But that gives a NullPointerException.
>
> So I'm stumped.  In the logs, the property file is being loaded during
> startup, and my default property file still returns messages.
>
> Any help?
>
> Lukas




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



RE: collection iterate

2003-10-30 Thread ajay brar
hi!
my problem is that the above doesn't print anything.
there is data in the vector, it however prints out nothing
any suggestions
thanks
ajay

From: "Appel, Jeremy D" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: collection iterate
Date: Thu, 30 Oct 2003 10:23:17 -0600
Ajay,

use the struts-bean taglibrary and  tag.  Something like this:



  ..
  
   

HTH
jeremy
-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 11:19 AM
To: [EMAIL PROTECTED]
Subject: collection iterate
hi!
i have a collection that i would like to iterate over and print the 
contents
out
i am currently doing this as


here ResVector is a collection that has been placed in session.
it is a collection of transaction beans.
i want to iterate over the collection, and print the details of the
transaction bean stored in the collection.

pleas help
thanks
ajay
_
Hot chart ringtones and polyphonics. Go to
http://ninemsn.com.au/mobilemania/default.asp
-
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]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


Re: declaring action mappings at runtime

2003-10-30 Thread Craig R. McClanahan
Ahmet ISIK wrote:

I'm doing it in a plugin.
My purpose is to develop generic CRUD operations, views and forms for 
any model object that is persisted using Hibernate. For this, I 
introspect Hibernate config and provide form fields according to 
underlying object's properties.
I'm declaring actionmappings at runtime because I'm asking Hibernate 
for a list of entities that are declared.

Modifying the configuration information in a PlugIn is specifically 
allowed, for precisely this kind of purpose.  It is safe, because 
plugins are called from the init() method of ActionServlet, and must all 
complete successfully before the first request is processed.

Struts freezes the configuration information *after* the plugins have 
been initialized; from that point on, you'll get IllegalStateExceptions 
if you try to modify existing XxxConfig beans in any way.

Craig


Martin Cooper wrote:

"Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
thanks Martin,
I have found a solution. I have acquired module config by
Globals.MODULE_KEY key from app context. Then I added programmatically
configured ActionMappings to module config object. after that it is
possible to use those action mappings. Is this a bad practice?


Where are you doing this? (And why?)

If you're doing it in a plug-in, then I believe it will work, but I 
don't
see how that would be any more "dynamic" than adding them to your Struts
config file. (Also in that case, you are already passed the module 
config,
so you wouldn't need to look it up, as you mentioned you are doing.)

If you're doing it outside of a plug-in, then I'm puzzled. Once 
Struts loads
the config, it freezes it and throws IllegalStateException if you 
attempt to
modify it.

--
Martin Cooper


Martin Cooper wrote:

"Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Hi,
Is it possible to declare struts action mappings at runtime, and how?


No, it's not possible. The config is read in at application startup 
and

is

then frozen. (The reason it's done this way is so that access to the

config

does not need to be synchronised once the app is up and running, thus
leading to much improved overall performance.)
--
Martin Cooper



Thanks in advance

--
Ahmet ISIK
Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
Yazilim Muhendisi
http://www.idealteknoloji.com






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



--
Ahmet ISIK
Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
Yazilim Muhendisi
[EMAIL PROTECTED]
http://www.idealteknoloji.com






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





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


RE: [OT]Struts App and Utility computing ?

2003-10-30 Thread Greg Hess








Joe, 

 

Check out www.wrappedapps.com.

 

Wrapped Apps Corporation offers a utility computing solution supporting
J2EE web applications and has been tested extensively with struts based apps.
If you have any questions let me know I would be glad to help.

 

Kind Regards,

 


 
  
  Greg
   Hess
  
 
 
  
  Software
  Engineer
  
 
 
  
  Wrapped
  Apps Corporation
  
 
 
  
  275 Michael Cowpland Dr.
  
 
 
  
  Suite
   201
  
 
 
  
  Ottawa, Ontario
  
 
 
  
  K2M
  2G2
  
 
 
  
  Tel:
  (613) 591 -7552
  
 
 
  
  Fax:
  (613) 591-0523
  
 
 
  
  1 (877) 388-6742
  
 
 
  
  www.wrappedapps.com
  
 
 
  
  
  
 


 

> -Original Message-

> From: Joe Grissom [mailto:[EMAIL PROTECTED]

> Sent: Wednesday,
 October 29, 2003 4:52 PM

> To: [EMAIL PROTECTED]

> Subject: [OT]Struts App and Utility computing ?

> 

> Hi,

> 

> “Utility computing” is a popular buzz word today. I
have been assigned to

> research this and find out if there are any frameworks or
commercial

> products that will enable utility computing for struts based web

> application.

> 

> Does anyone know of any frameworks/tools/products that support the
utility

> computing enablement of struts app?

> 

> Thanks in advance,

> 

> Joe

> 

> 

> -

> To unsubscribe, e-mail: [EMAIL PROTECTED]

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

 








RE: jdbc realms: cannot log into tomcat manager

2003-10-30 Thread David Friedman
Ajay,

I tried a JDBC realm with MySQL (on Tomcat 4.1.24) earlier this week and had
to add the keys 'connectionName="MySQLusername"' and
'connectionPassword="MySQLpassword"'.  Using a jdbc realm had no effect on
my ability to login to the tomcat manager.

Did you put the JDBC realm in the " ... " section of
your server.xml Tomcat configuration files or another section?  When it is
in the context section, it applies only to your application context.  If it
is somewhere else in the server.xml configuration files, it may wreak havok
on other applications.  This could possibly also affect your Tomcat manager,
which normally uses the flat text file "conf/tomcat-managers.xml".

Regards,
David

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 3:56 AM
To: [EMAIL PROTECTED]
Subject: jdbc realms: cannot log into tomcat manager


hello

i just got a problem implementing JDBC realms
i have setup a mysql database with tables:
roles, users, user_roles with all feilds specified
i have populated the database with user role mappings
but now i cant log into tomcat manager:

from looking around i found out that i had to add the role "manager"
to be able to login, but this doesnt seem to help things

any suggestions will be greatly appreciated
thanks

_
Hot chart ringtones and polyphonics. Go to
http://ninemsn.com.au/mobilemania/default.asp


-
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: Doing an action and get back to executing page?

2003-10-30 Thread shishir.katdare

instead define the two action mapping to the same action class with input from both 
the jsp's and returning the both of them and then well u have the two different flows.
-Original Message-
From: Frers Michael [mailto:[EMAIL PROTECTED]
Sent: 30 October 2003 16:41
To: Struts Users Mailing List
Subject: Doing an action and get back to executing page?


Hello

is there anyway to get back to the side which called an action?

here more specific example

i have 2 jsp sides: a.jsp and b.jsp

from both i can call a strutsaction  dosomething.do

after executing i want to get back to a or to b (depending who called the side)

i think best solution would be adding a hidden field telling the action who was the 
caller
(with probably much handling of beans from request etc)

any other (better) ideas?

thx in advance

Michael

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



Doing an action and get back to executing page?

2003-10-30 Thread Frers Michael
Hello

is there anyway to get back to the side which called an action?

here more specific example

i have 2 jsp sides: a.jsp and b.jsp

from both i can call a strutsaction  dosomething.do

after executing i want to get back to a or to b (depending who called the side)

i think best solution would be adding a hidden field telling the action who was the 
caller
(with probably much handling of beans from request etc)

any other (better) ideas?

thx in advance

Michael

RE: Multiple -- How to access? Struts 1.1

2003-10-30 Thread Rabago, Hubert
I'm worried about getting the same problem, except I don't want to go
back into all my components to add "key" parameters later on.  Is there
a way to break down a huge global properties file into several files
which all get added to the global resources?
Is this a feature worth asking for/working on?

-Original Message-
From: Lukas Bradley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2003 10:26 AM
To: [EMAIL PROTECTED]
Subject: Multiple  -- How to access? Struts 1.1


Hi all,

I feel rather odd asking about this, because it seems it should be a
VERY simple task.

I've been using a single message-resource within my struts-config.xml
file. It's been working beautifully defined as: 

When I have a file "MyTerms.properties" in my /WEB-INF/classes
directory.  I access my properties as such:



And everything the world is perfect.

Except that my properties file has filled up with hundreds of terms, and
it is getting impossible to manage.  To make this easier, I decided to
define multiple message-resources in my struts-config.







It is my understanding that the initial "MyTerms" file will be stored
under the default resources property, and the other two will be stored
as "msg.errors" and "msg.forum" respectively.

However, when I try to access them, I get nothing.







None of the tags above work.  I even tried



But that gives a NullPointerException.

So I'm stumped.  In the logs, the property file is being loaded during
startup, and my default property file still returns messages.

Any help?

Lukas










-
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: Locale - how to set?

2003-10-30 Thread Kris Schneider
Okay, this seemed like a useful utility action to have hanging around, so here's
an example. Note that I've included a couple of lines the also update JSTL's
FMT_LOCALE config variable. Also note that the action expects a form that
exposes the following properties: language, country, and variant (it doesn't
matter if the form's a vanilla ActionForm or a flavor of DynaActionForm).

import java.util.Locale;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import javax.servlet.jsp.jstl.core.Config;

import org.apache.commons.beanutils.BeanUtils;

import org.apache.commons.lang.StringUtils;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class LocaleAction extends Action {

public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response) throws Exception {
String language = StringUtils.clean(BeanUtils.getProperty(form,
"language"));
String country = StringUtils.clean(BeanUtils.getProperty(form, "country"));
String variant = StringUtils.clean(BeanUtils.getProperty(form, "variant"));
if (language.length() > 0) {
Locale locale = new Locale(language, country, variant);
setLocale(request, locale);
HttpSession session = request.getSession(true);
Config.set(session, Config.FMT_LOCALE, locale);

}
return mapping.findForward("success");
}
}

Quoting Kris Schneider <[EMAIL PROTECTED]>:

> See Action.setLocale
> 
> Quoting Philip Mark Donaghy <[EMAIL PROTECTED]>:
> 
> > 
> > --- Frers Michael <[EMAIL PROTECTED]> wrote:
> > > Hello
> > > 
> > > just a simple question
> > > 
> > > how can set the actual used local?
> > > 
> > > i have two propertie files:
> > > 
> > > application.properties
> > > application_de.properties
> > > application_en.properties
> > > 
> > > struts takes as default application_de.properties
> > > 
> > > how can i make it that a user can click a
> > > GreatBritain flag and then the application is
> > > displayed in english?
> > 
> > You should take a look at the struts-validator webapp.
> > Here is the basic code...
> > 
> > locale = new java.util.Locale(language, country);
> > 
> > or
> > 
> > locale = new java.util.Locale(language, "");
> > 
> > and
> > 
> > session.setAttribute(Globals.LOCALE_KEY, locale);
> > 
> > where language is en and country is UK
> > 
> > That should do it.
> > 
> > Phil
> > 
> > > 
> > > Thanks for any help
> > > 
> > > Michael
> 
> -- 
> Kris Schneider 
> D.O.Tech   
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Kris Schneider 
D.O.Tech   

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



Multiple -- How to access? Struts 1.1

2003-10-30 Thread Lukas Bradley
Hi all,

I feel rather odd asking about this, because it seems it should be a VERY
simple task.

I've been using a single message-resource within my struts-config.xml file.
It's been working beautifully defined as:


When I have a file "MyTerms.properties" in my /WEB-INF/classes directory.  I
access my properties as such:



And everything the world is perfect.

Except that my properties file has filled up with hundreds of terms, and it
is getting impossible to manage.  To make this easier, I decided to define
multiple message-resources in my struts-config.







It is my understanding that the initial "MyTerms" file will be stored under
the default resources property, and the other two will be stored as
"msg.errors" and "msg.forum" respectively.

However, when I try to access them, I get nothing.







None of the tags above work.  I even tried



But that gives a NullPointerException.

So I'm stumped.  In the logs, the property file is being loaded during
startup, and my default property file still returns messages.

Any help?

Lukas










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



easy struts plugin

2003-10-30 Thread shishir.katdare
Hi 

Is there any struts plugin for eclipse 3.0? 
I've been using EasyStruts 0.6.4 which is good and works nicely with 2.1 eclipse , 
just wanted to know if the same plugin can be recompiled to work with eclipse 3.0 
version?

I know its bit of the topic but just wanted to know

Thanks and regards 
Shishir


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



RE: collection iterate

2003-10-30 Thread Appel, Jeremy D
Ajay,

use the struts-bean taglibrary and  tag.  Something like this:



  ..
  
   


HTH
jeremy

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 11:19 AM
To: [EMAIL PROTECTED]
Subject: collection iterate


hi!
i have a collection that i would like to iterate over and print the contents 
out
i am currently doing this as


here ResVector is a collection that has been placed in session.
it is a collection of transaction beans.
i want to iterate over the collection, and print the details of the 
transaction bean stored in the collection.

pleas help
thanks
ajay

_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp


-
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: How to use multiple Tiles definition file

2003-10-30 Thread Zaili_Xu
Thank you for your help. It works.

Zaili

-Original Message-
From: Manish Singla [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 6:24 PM
To: Struts Users Mailing List
Subject: Re: How to use multiple Tiles definition file


You may list all tiles-def files with comma delimiter in struts-config.xml.
eg tiles-def1.xml,tiles-def2.xml

hmmm I have not tried it but may be place tiles-global.xml in front of 
tiles-client.xml. If last one overwrites than you may achieve inheritence..

Manish Singla


[EMAIL PROTECTED] wrote:
> Hi, guys
> 
> Is it possible to use multiple Tiles definition files ? For example, we have a core 
> Tiles definition file, such as tiles-core-defs.xml, and then we could have 
> additional client specific Tiles definitions specified in another definition file, 
> such as tiles-client1-defs.xml. How could we make Tile framework to check 
> tiles-client1-defs.xml first and if the defition is there use it otherwise it will 
> check tiles-core-defs.xml, sort of like how multiple css files work in a inheritance 
> way. Is this possible ?
> 
> Zaili
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Thanks
Manish Singla
x73166


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



collection iterate

2003-10-30 Thread ajay brar
hi!
i have a collection that i would like to iterate over and print the contents 
out
i am currently doing this as


here ResVector is a collection that has been placed in session.
it is a collection of transaction beans.
i want to iterate over the collection, and print the details of the 
transaction bean stored in the collection.

pleas help
thanks
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


RE: problem whith saveMessages

2003-10-30 Thread Rabago, Hubert
I have an object which I use to collect parameters.  Let's call this
RedirectParameters.Among the parameters it knows to collect (String,
int, etc) are ActionMessage and ActionError objects.  When I pass it a
message, it expands the message and adds it as a URL.  The
RedirectParameters gets saved in the request scope.  (Another option is
to extend ActionForward to handle this, and return a new instance of
this subclass instead of mapping.findForward().)
In my RequestProcessor, I check if the forward is for a redirect
(forward.getRedirect() returns true), and if so, I get the
RedirectParameters from the request scope and form my URL parameters.
ActionMessage and ActionError messages are given a unique parameter to
avoid conflicts (com.mycompany.myapp.something).  I append this to the
URL passed to response.sendRedirect().  
Also in my RequestProcessor, I check for the unique request parameters,
and when they are present, I instantiate ActionMessage and ActionError
objects as appropriate and save them in the request scope so it gets
handled as usual.
To summarize:
1. I see I need a redirect, so I collect my parameters
2. Before my RequestProcessor calls sendRedirect(), it collects the
parameters and appends them to the URL
3. When my RequestProcessor processes a ForwardConfig, it checks for
request params designated to ActionMessage and ActionError messages, and
stores them in the request scope where the JSP or Action object can
access them like other messages/errors.

-Original Message-
From: Adrian Baisch [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2003 10:07 AM
To: Struts Users Mailing List
Subject: RE: problem whith saveMessages


I do not understand, you can offer me but details, Thanks .

At 12:48 30/10/2003, you wrote:
>I do this my passing the message as a parameter, having the 
>RequestProcessor intercept it, and re-save in the request scope.
>
>-Original Message-
>From: Adrian Baisch [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 30, 2003 9:36 AM
>To: [EMAIL PROTECTED]
>Subject: problem whith saveMessages
>
>
>Hi, I have a question I'd like to ask:
>
>
>
>I have a ConfirmationAction that sets up some success messages using:
>
>messages.add(new ActionMessage("timesheetManage.save.success"));
>saveMessages(request, messages);
>
>
>And upon this save, the findForward("success") forwards to another 
>action class with:
>
>name="success"
>path="/do/confirmation.jsp" redirect="true" />
>
>But on the JSP after, there are no messages displayed.  I know the 
>answer why, and that is because "redirect=true". However, this is the 
>only way I can forward to another action class in iPlanet.
>
>   But on the JSP after, there are no messages displayed.  I know the 
>answer why,
>and that is because "redirect=true".
>
>Anyone know of a workaround to carry these messages into the next page?
>
>Any suggestions?
>Thanks in advance
>
>
>
>-
>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]



Solved: Please help: Cannot find message resources under key org .apache.struts.action. MESSAGE

2003-10-30 Thread Prashanth Narayanan
thanks for all the help in this.
turns out that for it to work on the new version of struts and apache, you
must also add all the commons*.jar files as well.
it's fine now
thanks,
-prash.

ps: is there a file called struts.tld anymore? it is referred to in the
tutorial but is not part of struts 1.1
any pointers?

-Original Message-
From: Rajat Pandit [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 11:53 PM
To: 'Struts Users Mailing List'
Subject: RE: Please help: Cannot find message resources under key
org.apache.struts.action. MESSAGE






According to your struts config, the path for the res. File should be
something like this.
/WEB-INF/classes/ApplicationResources/properties.properties

The res file being named properties.properties which Is not wrong just
that it sounds funny. 
I guess you got my hint. So you will need to make osme changes. And I
guess RTFM!!
Take care and hope this helps!
Rajat


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



logic iterate + radio

2003-10-30 Thread ajay brar
hi!
i have a code segment that displays a form. part of the form consists of a 
selection from a bunch of plans that can be selected through a radio button 
tag
here's how it goes

..








what that is supposed to do is 'serviceTypes' contains a list of service 
plans. the plans are of type ServiceType an empty bean of which is stored in 
the session under serviceType
the form bean is ServiceAccountForm and has a field called serviceTypeId.
the user is basically supposed to select a plan through the radio button and 
the code for the plan should become the serviceTypeId.

i am however getting an error when i run this saying it cant find a getter 
for 'code'
however i have getCode in ServiceType

please help
thanks
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


RE: problem whith saveMessages

2003-10-30 Thread Adrian Baisch
I do not understand, you can offer me but details, Thanks .

At 12:48 30/10/2003, you wrote:
I do this my passing the message as a parameter, having the
RequestProcessor intercept it, and re-save in the request scope.
-Original Message-
From: Adrian Baisch [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 9:36 AM
To: [EMAIL PROTECTED]
Subject: problem whith saveMessages
Hi, I have a question I'd like to ask:



I have a ConfirmationAction that sets up some success messages using:

messages.add(new ActionMessage("timesheetManage.save.success"));
saveMessages(request, messages);
And upon this save, the findForward("success") forwards to another
action
class with:

But on the JSP after, there are no messages displayed.  I know the
answer why, and that is because "redirect=true". However, this is the
only way I can forward to another action class in iPlanet.
  But on the JSP after, there are no messages displayed.  I know the
answer
why,
and that is because "redirect=true".
Anyone know of a workaround to carry these messages into the next page?

Any suggestions?
Thanks in advance


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


frames and validation

2003-10-30 Thread koen boutsen

I'm using framesets to build my gui. 
What do I have to put in the 'input' attribute of my actionmapping in the 
struts-config to make sure that I'm sent back to the frame I came from in case of 
validation error.
I tried putting the .jsp that is put in the frame, I tried putting 
the frame name, but none of these works.

Thanks in advance

Koen Boutsen




FREE ADHD DVD or CD-Rom (your choice) - click here!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
AOL users go here: 
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
This offer applies to U.S. Residents Only

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



R: struts plugin

2003-10-30 Thread Mario
I'll like to integrate with ibernate but i found a problem, it manage
dynabean as component and nota s root object.
I would like to find other people that want to collaborate.



-Messaggio originale-
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 30 ottobre 2003 16.13
A: Struts Users Mailing List
Oggetto: Re: struts plugin


Sounds very interesting. I am going to be working onto something similar to
this focusing on
Self Describing Business object. Trying to steer away from doing any
duplicate work and also
cut down code written. Are you going to intergrate with Hibernate or
Ibatis?


Mike



|-+>
| |   "Mario"  |
| |   <[EMAIL PROTECTED]|
| |   idea.com>|
| ||
| |   30/10/2003 01:17 |
| |   PM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
|-+>
 
>---
-|
  |
|
  |   To:   <[EMAIL PROTECTED]>
|
  |   cc:
|
  |   Subject:  struts plugin
|
 
>---
-|




XMoon demo 0.2 released



http://www.xmoon.it 













The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.




-
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: problem whith saveMessages

2003-10-30 Thread Rabago, Hubert
I do this my passing the message as a parameter, having the
RequestProcessor intercept it, and re-save in the request scope.

-Original Message-
From: Adrian Baisch [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2003 9:36 AM
To: [EMAIL PROTECTED]
Subject: problem whith saveMessages


Hi, I have a question I'd like to ask:



I have a ConfirmationAction that sets up some success messages using:

messages.add(new ActionMessage("timesheetManage.save.success"));
saveMessages(request, messages);


And upon this save, the findForward("success") forwards to another
action 
class with:



But on the JSP after, there are no messages displayed.  I know the
answer why, and that is because "redirect=true". However, this is the
only way I can forward to another action class in iPlanet.

  But on the JSP after, there are no messages displayed.  I know the
answer 
why,
and that is because "redirect=true".

Anyone know of a workaround to carry these messages into the next page?

Any suggestions?
Thanks in advance
  


-
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: Locale - how to set?

2003-10-30 Thread Kris Schneider
See Action.setLocale

Quoting Philip Mark Donaghy <[EMAIL PROTECTED]>:

> 
> --- Frers Michael <[EMAIL PROTECTED]> wrote:
> > Hello
> > 
> > just a simple question
> > 
> > how can set the actual used local?
> > 
> > i have two propertie files:
> > 
> > application.properties
> > application_de.properties
> > application_en.properties
> > 
> > struts takes as default application_de.properties
> > 
> > how can i make it that a user can click a
> > GreatBritain flag and then the application is
> > displayed in english?
> 
> You should take a look at the struts-validator webapp.
> Here is the basic code...
> 
> locale = new java.util.Locale(language, country);
> 
> or
> 
> locale = new java.util.Locale(language, "");
> 
> and
> 
> session.setAttribute(Globals.LOCALE_KEY, locale);
> 
> where language is en and country is UK
> 
> That should do it.
> 
> Phil
> 
> > 
> > Thanks for any help
> > 
> > Michael

-- 
Kris Schneider 
D.O.Tech   

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



Problem with html:select tag calling set method in form

2003-10-30 Thread damian_bradicich




I have a jsp that creates a select tag w/ size = 2 and multiple also true,
which gives me a list box w/ multi selection.

So, I open up the page, and I see all the data fine, I select a couple of
items in the list box and save, everything is great, my setter in the form
is getting called.  However, if i deselect all entries in the list box, and
save, the setter method in the form is not being called, has anyone else
noticed this?  If so, does anyone have a workaround?
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Web Site: www.stchome.com
"Advancing Public Health Core Capacities While Leveraging the Resources of
a Community"
___


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



Re: Locale - how to set?

2003-10-30 Thread Philip Mark Donaghy

--- Frers Michael <[EMAIL PROTECTED]> wrote:
> Hello
> 
> just a simple question
> 
> how can set the actual used local?
> 
> i have two propertie files:
> 
> application.properties
> application_de.properties
> application_en.properties
> 
> struts takes as default application_de.properties
> 
> how can i make it that a user can click a
> GreatBritain flag and then the application is
> displayed in english?

You should take a look at the struts-validator webapp.
Here is the basic code...

locale = new java.util.Locale(language, country);

or

locale = new java.util.Locale(language, "");

and

session.setAttribute(Globals.LOCALE_KEY, locale);

where language is en and country is UK

That should do it.

Phil

> 
> Thanks for any help
> 
> Michael


__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



RE: Locale - how to set?

2003-10-30 Thread Paananen, Tero
> how can i make it that a user can click a GreatBritain flag 
> and then the application is displayed in english?

Locale yourLocale = fooBar();
HttpSession session = request.getSession();
session.setAttribute(Action.LOCALE_KEY, yourLocale);

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



Re: How do I disable struts logging?

2003-10-30 Thread Philip Mark Donaghy
--- Jeremy Nix <[EMAIL PROTECTED]> wrote:
> The debug init-param no longer works with v1.1

I'm not sure about that? But...

> what other options do
> we have on disable the struts internal logging?

I found this nice log4j config file xml. I am using
log4j version 1.2.8 and it outputs all org.apache
packages in mode INFO and my packages in mode DEBUG.

Put the log4j jar in your WEB-INF/lib and this file
(log4j.xml) in WEB-INF/classes.




http://jakarta.apache.org/log4j/";>
  

  

  
  
  
  
  
  
  
  
  
  


  


Good luck,

Phil

=
Java Web Application Architect
mapimage.com - Java and GIS
struts1.1:tomcat4.1.27:linuxRH8

__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



problem whith saveMessages

2003-10-30 Thread Adrian Baisch
Hi, I have a question I'd like to ask:



I have a ConfirmationAction that sets up some success messages using:

messages.add(new ActionMessage("timesheetManage.save.success"));
saveMessages(request, messages);
And upon this save, the findForward("success") forwards to another action 
class with:


But on the JSP after, there are no messages displayed.  I know the answer why,
and that is because "redirect=true".
However, this is the only way I can forward to another action class in iPlanet.
 But on the JSP after, there are no messages displayed.  I know the answer 
why,
and that is because "redirect=true".

Anyone know of a workaround to carry these messages into the next page?

Any suggestions?
Thanks in advance
 

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


Locale - how to set?

2003-10-30 Thread Frers Michael
Hello

just a simple question

how can set the actual used local?

i have two propertie files:

application.properties
application_de.properties
application_en.properties

struts takes as default application_de.properties

how can i make it that a user can click a GreatBritain flag and then the application 
is displayed in english?

Thanks for any help

Michael

Re: struts plugin

2003-10-30 Thread MBrewer

Sounds very interesting. I am going to be working onto something similar to
this focusing on
Self Describing Business object. Trying to steer away from doing any
duplicate work and also
cut down code written. Are you going to intergrate with Hibernate or
Ibatis?


Mike



|-+>
| |   "Mario"  |
| |   <[EMAIL PROTECTED]|
| |   idea.com>|
| ||
| |   30/10/2003 01:17 |
| |   PM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
|-+>
  
>|
  |
|
  |   To:   <[EMAIL PROTECTED]>
   |
  |   cc:  
|
  |   Subject:  struts plugin  
|
  
>|




XMoon demo 0.2 released



http://www.xmoon.it 












The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.



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



RE: tiles question

2003-10-30 Thread shirishchandra.sakhare
If you use Tiles Definitions, you can get rid of this second jsp(holder jsp) per 
page.So you end up writing just one jsp(te body part jsp)per page..

Following is what you do.

Write one jsp which include all the reusable jsps and have the common layout for your 
site.
I call this CLassicLayout_template.jsp

It will have includes like this.






with proper layout offcourse.

Then define a base definition for u r site like this in tiles-defs.xml..
 
  
  
  
  
  

Then per page you just extend this page and overridfe the body portion..



 


In fact, ted Husteds book(Struts In Action)has a very chapter about it.That should 
ehlp u.

Regards,
Shirish

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 3:48 PM
To: Struts Users Mailing List
Subject: Re: tiles question


There's a method of reducing this duplication in Ted Husted's "Struts in 
Action" book - the method, I believe, is called the "body wrap" method 
and it addresses a particular situation that is common, that allows you 
to eliminate this duplication. Also, you can define and extend tile 
definitions in XML, that also help mitigate and leverage the 
scaleability of Tiles.

I recommend you check out Ted's book or other Struts books that also 
address Tiles.

Kalra, Ashwani wrote:

>hi,
>I tiles you have to maintain two pages. One that includes all the sections
>like header, footer, variable content jsp, etc. and one jsp which contains
>your code(varible part).
>This doubles up the no of jsps ?  Is it ok. any work around ?
>
>TIA
>Ashwani Kalra
>http://www.geocities.com/ashwani_kalra
>
>
>
>
>
>
>
>
>
>This message contains information that may be privileged or confidential and
>is the property of the Cap Gemini Ernst & Young Group. It is intended only
>for the person to whom it is addressed. If you are not the intended
>recipient, you are not authorised to read, print, retain, copy, disseminate,
>distribute, or use this message or any part thereof. If you receive this
>message in error, please notify the sender immediately and delete all copies
>of this message.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



-
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: Tiles, Tabs, Actions - Looking for Tiles experts

2003-10-30 Thread Caroline Lauferon
Well, I think you can't do it if you keep using SimpleMenuItem and the basic
tabsLayout.
You have to implement your own menu item, adding an attribute indicating
which tab has to be selected. Then you can even not associate a body with a
tab.
and you have to make a tile-definition for each possible view.

// define a layout with 2 tabs














// define the different  "pages" using this layout



 // the action of the form has to
forward to myResultPage1 definition













Hope it helps
Caroline


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



Re: EL Expression in html:hidden tag

2003-10-30 Thread Ruth, Brice
Is ${pageContext.request.servletPath} returning anything? Try something like



Use the JSTL core tag library at http://java.sun.com/jstl/core to get 
"c:out" ...

Arne Brutschy wrote:

Hello,

I'm having a problem with the html:hidden tag. What I'm trying to do is:

On every page, there is a logout button included. When the user hits
the button, the request will be send to an logoutAction. Afterwards,
the request should be redirected back to the page where the user was
before he hit the button. My problem is, that the including page is
every time another one. So I tried to get it by
${pageContext.request.servletPath}. This works, but I cannot use it as
value in the html:hidden tag. I've seen people on this list doing
this, but my html-el.tld permits it. Does anyone know why? I'm using
struts 1.1 with the standard taglib ea 1.1, tomcat 5.0.12.
Here is my jsp include:

   <%@ taglib uri="http://jakarta.apache.org/struts/tags-html-el"; prefix="html" %>
 .
 .
 .
   
 
 
 
   
and the action:

 public ActionForward logout(ActionMapping mapping, ActionForm form, 
HttpServletRequest request,
  HttpServletResponse response) throws Exception {
   // get session and loginForm
   HttpSession session = request.getSession(true);
   DynaActionForm loginForm = (DynaActionForm)form;
   // remove the user from the session
   session.removeAttribute("user");
 .
 .
   // stay on this page
   String requestedPage = loginForm.get("requestedPage").toString();
   response.sendRedirect(requestedPage);
   return null;
 }
Regards,
Arne Brutschy


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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Some design questions/Specific form access rights

2003-10-30 Thread Arne Brutschy
Hello,

I have to implement group scpecific forms and I wanted to ask around what the best
way to do this. The basic idea is: We have a form, and only a specific group of
read/write a subset of the values. Take a user form as example, only
the mailadmin may edit the mailhost and address values, the dialup
admin may edit the dialup access values, other user can only read the
users name and the user himself can see al values, but may edit only
his password.

The optimal way would be for a dynaactionform, to configure for every
single property the access rights. read means, it will be displayed as
"disabled", write is normal, none no display at all. I want to check
the users' group memberships in a database and display the appropriate
form for him. Has anyone done this before? Is there a
comfortable/efficant way to do this? Somesort of subclassing
DynaActionForm and use the struts-config.xml to configure the access
rights and required group memberships...

Regards,
Arne Brutschy


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



Re: How To Submit A Propery/Value Pair That Is Not Selected/Filled-Out By Visitors of the Website?

2003-10-30 Thread Ruth, Brice
Can you just use hidden form variables? Check out the Struts-HTML 
 tag - that might get you through this.

Caroline Jen wrote:

In the welcome page, all visitors of the web site can
choose to view any article that is available in the
database.  But, visitors will not be able to delete or
update any of those articles (DELETE, UPDATE, etc.
buttons are not provided).  This part of my struts
application works well.  I have a drop-down list
enclosed in  for visitors to make a
selection and submit it for an action to be taken:


Find articles by: 





maxlength="50"/>

GO

 

Visitor can choose articles by title, author,
category, content, or article ID.  If "author" is
selected from the drop-down list and the name of the
author "Victor Hugo" is supplied, keyName will be set
as creator and keyValue will be set as Victor Hugo for
further processing as shown in my struts-config.xml
below:
   
   path="/menu/Find"
  
type="org.apache.struts.scaffold.ParameterAction"
   name="menuForm"
   validate="false"
   parameter="keyValue">
   
   name="title"
  
path="/do/find/Property?keyName=title&keyValue="/>
   
   name="author"
  
path="/do/find/Property?keyName=creator&keyValue="/>
   
   name="journal_category"
  
path="/do/find/Property?keyName=journal_category&keyValue="/>
   
   name="content"
  
path="/do/find/Property?keyName=content&keyValue="/>
   
   name="article"
   path="/do/article/View?article="/>
   

After a registered visitor successfully logs in, a
user specific page is displayed.  For example, after
the author Victor Hugo who has submitted several of
his articles at the web site logs in, he will see a
page with "Submit Article" and "View Article" (IT IS A
LINK OR A BUTTON.  IT IS NOT A DROP DOWN LIST), etc. 
The author can view his own articles only because
DELETE, UPDATE, etc. buttons will be provided.

I am stuck here.  There is no drop-down list for
Victor Hugo.  How do I supply keyName (which is
"creator") and keyValue (request.getRemoteUser) to the
action below if Victor Hugo clicks on the "View
Article" button?
   
   path="/menu/Find"
   
   parameter="keyValue">
   
   
   name="author"
  
path="/do/find/Property?keyName=creator&keyValue="/>
   
   



__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


RE: javascript question...

2003-10-30 Thread Syed, Nazeer
Try this 



function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open("a.html?Name="+namVal);
}





Thanks
Nazeer


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: javascript question...

Hi...
 
Is it possible to send a value of a form element from the parent window
to the child window like this???
 

function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open("a.html?Name=namVal");
}

 

 
 

 
The above does not work... it will give me 'namVal' as the value rather
than the actual typed in value when I try to get
request.getParameter
 
How can I achieve this functionality??? I need to pass a form element
value when opening a new window. This value is essential at this point
coz I perform an action based on this value and then bring the pop up
page
 
Suggestions requested please...
 
Thanks!
 
Jacob


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

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



Re: tiles question

2003-10-30 Thread Ruth, Brice
There's a method of reducing this duplication in Ted Husted's "Struts in 
Action" book - the method, I believe, is called the "body wrap" method 
and it addresses a particular situation that is common, that allows you 
to eliminate this duplication. Also, you can define and extend tile 
definitions in XML, that also help mitigate and leverage the 
scaleability of Tiles.

I recommend you check out Ted's book or other Struts books that also 
address Tiles.

Kalra, Ashwani wrote:

hi,
I tiles you have to maintain two pages. One that includes all the sections
like header, footer, variable content jsp, etc. and one jsp which contains
your code(varible part).
This doubles up the no of jsps ?  Is it ok. any work around ?
TIA
Ashwani Kalra
http://www.geocities.com/ashwani_kalra







This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Modular Struts Application - Cross-WebApp Tiles? Best practices?

2003-10-30 Thread Andreas Steinwachs
Hello,

does anyone of you have experience with the following:

I try to create a modular webapp/website that (for example) might
consist of a forum, a guestbook and other "modules".

Granted that I had a folder "greatsite" in the webapps folder of my
servlet container, and make my domain point to this folder, I would
usually create a sub folder called "forum" to make it available under
http://mydomain.eu/forum.

If I did that, the disadvantage would be obvious: For example, in order
to install new classes for the forum, I would have to restart the whole
"greatsite" web application to make my servlet container recognize the
new classes. (Granted that class reloading were impossible)

Is there a smooth way to avoid this? My first guess was to install
separate web applications (for my forum and guestbook) in the servlet
container (Tomcat or Enhydra).

Tell me if I'm wrong, but this would prevent me from using the Struts'
Tiles framework across the independent web applications, wouldn't it?
Maybe Tiles can even be used between independent web apps, maybe it is
a simple configuration problem that can be solved easily, but I didn't
figure out a solution yet.

I hope I was able to explain my concern comprehensibly, please let me
know how to come closer to my objective. :-)

I'm very much looking forward to your answers. Thank you in advance.

Best regards,
Andreas


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



Dynamic "input" property in tag

2003-10-30 Thread EL AKARI Mehdi
Hello,
How can I dynamically change the input page (declaratively in struts-config.xml or 
programmatically in an ActionForm class) in an action :
In deed, i need to create a tag  that rendrers a form "myForm"
I would like myForm to call one single  in the hole application 
independently of the page in wich it is rendered. Off course i would like that the 
error messages coming from the validation method, to be rendrered in the same page as 
the one in wich  was rendered.

Any suggestions ??
Thanks
Mehdi

RE: Struts and frames: what about the request scope?

2003-10-30 Thread Jose Ramon Diaz
hi all,

 We use Frames in our application. We have had this problem a we use
different approach.
 We suppose the form data is ONLY needed for the action, so the action
executes and change the model as needed. The action decides which is the
next page, and if it can have frames it sets a variable "next" in session,
which indicates what the frames that must be loades in this way:

 Every frame in frameset is redirected to an special action frames.do with
two parameters: the place where the frame is loaded and the "next" variable.
For example:


">
">


  And we have implemented the frames.do action to know which JSP must be
loaded, with parameters position and next. In fact, the page that must be
loaded is written in struts-config.xml in this way:

   
  
  ç



So the frames.do makes a forward to the String created with "position+next"
(the two parameter of frames.do) and we can establish the JSP in the xml
file...

Is this a complicated way of doing this? Sure,... above all because of my
poor english :-)


 Regards

Jose R. Díaz


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



Re: Shouldn't this work?

2003-10-30 Thread Caroline Lauferon
>  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:
 [...]

Hope it helps

Caroline



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



Re: Tiles, Tabs, Actions - Looking for Tiles experts

2003-10-30 Thread Joseph . Sadove
Lim,
You describe exactly the problem I am having, as well. 
I started on this yesterday and tried a few things to try to help me 
understand how it should work. One idea I have had but not yet had time to 
test (hopefully today if me other production problems go away!), is 
passing the "selectedBody" back into the session from the Action that is 
invoked and just re-invoking the jsp that inserts the tabs page. Of 
course, this could be totally inefficient or downright wrong. But it's the 
only clue I have right now of how to make it work.

Post it if you make any progress and I'll do likewise and we'll hope in 
the meantime Cedric or some other real tiles authority can shed light on 
how to do it.

Later, Joe





"Lim Huat Heng" <[EMAIL PROTECTED]>
10/30/2003 02:16 AM
Please respond to "Struts Users Mailing List"

 
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
cc: 
Subject:Re: Tiles, Tabs, Actions


Joseph:
   I would like to know how to develop application wth Tiles, Tabs and
Actions.
   I have three JSPs that I have done with Struts and the action and
forwarding works well. Now I created another JSP with tabs, in which each
tab display the 3 JSPs respectively. When I submit, the result is 
displayed
on a new screen rather on the tab, so how can I forward the result to be
displayed on the same tab?
   Do you refer to any reference to perform this task? Please 
advice.Thanks.


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 1:48 AM
Subject: Tiles, Tabs, Actions


> I have an application that I have tried to wind into a tabbed display
> using the Tab Example from Cedric DuMoulin's site. The application is
> already a Struts/Tiles application that works just fine. I would just 
like
> to embed the functions/screens in the tabs and make is work normally.
>
> Currently, there are two tabs, one for each function of the application.
> Each of these is an initialization Action that routes to display/process
> actions. These are defined in the tilesdefinition.xml like this:
>
>   
>  
>   
>   
>   
>   
>   
>   
>   
>
>  
> 
> 
> 
>classtype="org.apache.struts.tiles.beans.SimpleMenuItem"
> />
> classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> 
>   
>
> Further down in the tilesdefinition.xml I have the individual 
definitions
> for these. The actual Action.do's have their inputs set to the 
definitions
> in the tilesdefinition.xml like this (TimeSheetStatus is unconditionally
> forwarded to by TimeSheetLogin.do):
>
>  type="mizuho.mtts.struts.actions.TimeSheetStatusAction"
>   name="TimeSheetStatusBean" input="statusDef"
>  scope="session">
>   
>
> On the first invocation, everything is right. The application's two
> functions (TimeSheetEntry.do and TimeSheetStatus.do) display ok and you
> can tab between them. However, the minute you perform any kind of action
> (submit a form action or click a link) the "tabbed" version is gone and
> the plain application is displayed.
>
> I kind of understand why this would be, but I can't think of how it 
ought
> to be fixed so it works. Do you need to define and put all bean 
variables
> in the tilesdefinition? How do the actions know to use the right layout?
>
> I tried to understand how the example application made this work, but 
the
> version that I downloaded doesn't seem to work either. There are no 
active
> "actions" in any of the tabbed applications that work.
>
> I apologize if this is not clear. I didn't want to be too verbose or 
dump
> too much code into this first mail, in case it's just something real
> obvious and simple and everyone in the world out there has done it
> already.
>
> Thanks much IA.
>
> = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =
> This transmittal and any attachments may contain confidential, 
privileged
or sensitive information and is solely for the use of the intended
recipient. If you are not intended recipient, you are hereby notified that
you have received this transmittal and any such attachments in error and 
any
review, dissemination, distribution or copying thereof is strictly
prohibited. If you have received this transmittal and any attachments in
error please notify the sender and immediately destroy the message and all
its attachments. Any opinions herein expressed may be those of the author
and not necessarily of Mizuho Corporate Bank, Ltd (the "Bank"). The Bank
accepts no responsibility for the accuracy or completeness of any
information herein contained.
>  = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =
>
>


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





= = = = = = = = = == = = = = = == = = = = = = = == = = = = = 

validation and frames

2003-10-30 Thread koen boutsen
For some reason I'm using framesets to build my gui. What do I have to put in the 
'input' attribute of my actionmapping in the struts-config to make sure that I'm send 
back to the frame I came from.
I tried putting the .jsp that is put in the frame, I tried putting the frame name, but 
none of these works.

Thanks in advance

Koen Boutsen



FREE ADHD DVD or CD-Rom (your choice) - click here!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
AOL users go here: 
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
This offer applies to U.S. Residents Only

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



Re: Struts and frames: what about the request scope?

2003-10-30 Thread Kris Schneider
Here's another possibility. In the action that forwards to frameset-page.jsp,
create a Map (or Maps) containing the request parameters you want submitted to
the topFrame and bottomFrame actions. Save this Map as a request attribute.
Then, in frameset-page.jsp:


  
  


If the parameters you want to propogate are already contained in an action form,
you could use either BeanUtils.describe of DynaActionForm.getMap to create the
Map for you.

Quoting George Steimer <[EMAIL PROTECTED]>:

> I had this same problem on the project I am working on.  Based on the
> functionality of the application, I could not put the form in session scope. 
> I got around this problem by having each frame call an action that recreated
> the form bean in request scope and then forwarded to the frame jsp.
> 
> George
> 
> > Its not found in the request scope of the frames because each frame has a
> > DIFFERENT request. The browser will sent a seperate simultaneous request
> for
> > each individual frame.
> > 
> > If using session scope beware of potential concurrency issues as you will
> > have multiple threads accessing the same form object. Probably wont be an
> > issue if your just reading values for display though.
> > 
> > -Original Message-
> > From: Jeroen Breedveld [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, 30 October 2003 18:49
> > To: [EMAIL PROTECTED]
> > Subject: Struts and frames: what about the request scope?
> > 
> > 
> > Hi all,
> > 
> > I'm trying to use struts with frame but the problem I have is that forms
> > disappear from the request scope when I forward to an jsp containing a
> > frameset to other actions like this:
> > 
> > 
> > 
> > 
> >  >input="/somePage.do"
> >   name="SomeForm" scope="request"
> > type="com.mycompany.actions.SomeAction">
> >   
> >   
> > 
> > 
> > 
> >  > forward="/WEB-INF/pages/frameset-page.jsp"/>
> > 
> > The frameset-jsp.page contains a frameset like this:
> > 
> > 
> >> action="topFrame.do"/>
> >> action="bottomFrame.do"/>
> > 
> > 
> > Now in the actions topFrame and bottomFrame the form SomeForm does not
> > appear in the request scope. Why is this? Rightnow I solved it by
> > putting SomeForm in the session scope is that the only solution? I don't
> > think that is a clean one anyway.
> > 
> > Thanks for any help and regards,
> > 
> > Jeroen
> > 
> > --
> > 
> > X-Hive Corporation
> > e-mail: [EMAIL PROTECTED]
> > phone: +31 10 2818080
> > http://www.x-hive.com

-- 
Kris Schneider 
D.O.Tech   

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



Re: Workaround for IE "streamer bug"?

2003-10-30 Thread barantes
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]





struts plugin

2003-10-30 Thread Mario
XMoon demo 0.2 released

 

http://www.xmoon.it  

 

 



  1   2   >