Re: Spring + Tiles not working

2007-12-19 Thread Antonio Petrelli
Todd, please repost, since your message is unreadable!!!

Antonio

2007/12/19, Todd Prickett <[EMAIL PROTECTED]>:
>
> I'm trying to wire tiles (from Struts 1.3 jars) into Spring 2.0.7 and
> Spring Web Flow 1.0.5.In doing so, I'm receiving the error: No Tiles
> definition found for name '/WEB-INF/jsp/defs/loginForm.jsp'My
> tiles-defs.xml looks like: page="/WEB-INF/jsp/defs/template.jsp" controllerClass="
> org.apache.struts.tiles.actions.T ilesAction" > value="/WEB-INF/jsp/fragments/heading.jspf"/> value="/WEB-INF/jsp/fragments/header.jspf"/> value="/WEB-INF/jsp/fragments/nav.jspf"/> value="/WEB-INF/jsp/fragments/empty.jspf"/> value="/WEB-INF/jsp/fragments/footer.jspf"/>My
> servlet-config.xml looks like: name="order" value="10"/> name="requestContextAttribute" value="requestContext"/> name="viewClass" 
> value="eyemed.web.spring.tiles.CustomTilesJstlView"/> value="/WEB-INF/jsp/defs/" /> name="suffix" value=".jsp" /> name="factoryClass" 
> value="org.apache.struts.tiles.xmlDefinition.I18nFactorySet"/> name="definitions">/WEB-INF/defs/tiles-
> defs.xmlThe flow I'm executing
> is: bean="loginAction" method="setupForm"/> on="submit" to="landingPage"> method="bindAndValidate"/>WEB-INF/jsp/defs/loginForm.jsp
> looks like: > value="/WEB-INF/jsp/fragments/loginForm.jspf" />Can anyone
> please help me? I'm at wit's end. (note: there are spaces showing in the
> code above that don't really exist in my source code. They are either
> CR/LF's or I had to add them to avoid having the edit convert them to
> smilies)TIA
> _
> Share life as it happens with the new Windows Live.
>
> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007


Re: Loading dojo.js in struts2.0.9 is very slow

2007-12-19 Thread Yoge
Thanks. I will try and let you know.

-- 
Yoge,
AdventNet, Inc.
925-965-6528
site24x7.com



On Dec 19, 2007 3:36 PM, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:

> Hi,
>
> i think this mail thread will help you.
>
> http://www.mail-archive.com/user@struts.apache.org/msg67703.html
>
> Thanks,
> Nuwan
> (http://code.google.com/p/struts2-ssl-plugin/)
>
> Yoge wrote:
> > My App is using ajax theme of struts2.0.9.
> > It takes more than 3 seconds to load
> /struts/ajax/dojoRequire.js
> > and /struts/dojo/dojo.js.
> >
> > The JS files are served static and not served by struts filter.
> >
> > Is there any way to improve the load time of dojo*.js ???
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
--Yoge
91-9840425388


Re: validation and CSS

2007-12-19 Thread [EMAIL PROTECTED]
Thanks so much, Alberto. Your guide is very helpful.


On Dec 19, 2007 10:21 PM, Alberto A. Flores <[EMAIL PROTECTED]> wrote:

> As the matter of fact, I found several ways in which you can modify the
> outcome of the tag.
>
> The basic (and in my opinion, a hack) is to look at the generated HTML
> code and then use your own CSS to modify the look and feel of your view.
> I'm currently using the "simple" theme and in all my "textfield" tags I
> don't see any span associated, but if you do, take a look at the
> generated HTML code and see whether there is any span associated there
> (this is how I figured how to modify the errors generated with the
> .
>
> If you want to get fancy, you can certainly write your own template
> (freemarker). This gives you full support as to how to modify the entire
> HTML code. I would warn you about this one, since it adds additional
> code that unless you are familiar with, you may not want to touch, so
> consider yourself warned :) - This helped me changed some errors to use
> a "div" instead of "ul, li" combination (in the generated HTML code).
> This is done using the "template" and "templateDir" attributes within
> the UI tags. Playing with this can prove very entertaining. I originally
> started by copying the template (ftl template) from the source
> distribution and modifying it so that I can see how things can be done
> (and also to learn some Freemarker).
>
> Note that even if you are not using the *simple* theme, the  is
> meant to give you additional CSS for you. So consider this as you do
> your UI. This is a practice I don't like since personally, I prefer to
> have more control over the produced HTML code, however it's up to you.
>
> Good luck!
>
> [EMAIL PROTECTED] wrote:
> > Thanks Alberto.
> >
> > Which class contains style for ? I need to customize
> it so
> > that no  is around it and the text associated with it is in
> bold.
> >
> > e.g., 
> >
> > If the value of the "some key" is Password, I want the "Password" is in
> > bold.
> >
> > Any suggestion?
> >
> > Thanks again.
> >
> > On Dec 19, 2007 10:00 PM, Alberto A. Flores <[EMAIL PROTECTED]> wrote:
> >
> >> I believe the errors are within a "span" with class "errorField" (it
> may
> >> be something else). Custom CSS can make you look like whatever you
> want.
> >>
> >>
> >> [EMAIL PROTECTED] wrote:
> >>> Thanks Dave. It seems the simple theme is used so the message is in
> >> black.
> >>> I overrode the ..errorMessage style in JSP which solved my problem but
> >> I'm
> >>> not sure if it's a right way to do that.
> >>>
> >>> Thanks again.
> >>>
> >>>
> >>> On Dec 19, 2007 8:09 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> >>>
>  Er, the default stylesheet *does* make it show up in read. Are you
> >> using
>  the
>   tag? IIRC that is what includes the CSS file.
> 
>  d.
> 
>  --- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> 
> > Is there a way to apply style sheet (CSS) to the message validator
> > generates? For example, how to make the "Color me red" message in
> red
>  when
> > it is shown up?
> >
> >
> > 
> >
> > 
> >
> > 
> >
> > *Color me red*
> >
> > 
> >
> > 
> >
> > 
> >
> > Many thanks.
> >
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> >> --
> >>
> >> Alberto A. Flores
> >> http://www.linkedin.com/in/aflores
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
>
> --
>
> Alberto A. Flores
> http://www.linkedin.com/in/aflores
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


Re: validation and CSS

2007-12-19 Thread Alberto A. Flores
As the matter of fact, I found several ways in which you can modify the 
outcome of the tag.


The basic (and in my opinion, a hack) is to look at the generated HTML 
code and then use your own CSS to modify the look and feel of your view.
I'm currently using the "simple" theme and in all my "textfield" tags I 
don't see any span associated, but if you do, take a look at the 
generated HTML code and see whether there is any span associated there 
(this is how I figured how to modify the errors generated with the 
.


If you want to get fancy, you can certainly write your own template 
(freemarker). This gives you full support as to how to modify the entire 
HTML code. I would warn you about this one, since it adds additional 
code that unless you are familiar with, you may not want to touch, so 
consider yourself warned :) - This helped me changed some errors to use 
a "div" instead of "ul, li" combination (in the generated HTML code). 
This is done using the "template" and "templateDir" attributes within 
the UI tags. Playing with this can prove very entertaining. I originally 
started by copying the template (ftl template) from the source 
distribution and modifying it so that I can see how things can be done 
(and also to learn some Freemarker).


Note that even if you are not using the *simple* theme, the  is 
meant to give you additional CSS for you. So consider this as you do 
your UI. This is a practice I don't like since personally, I prefer to 
have more control over the produced HTML code, however it's up to you.


Good luck!

[EMAIL PROTECTED] wrote:

Thanks Alberto.

Which class contains style for ? I need to customize it so
that no  is around it and the text associated with it is in bold.

e.g., 

If the value of the "some key" is Password, I want the "Password" is in
bold.

Any suggestion?

Thanks again.

On Dec 19, 2007 10:00 PM, Alberto A. Flores <[EMAIL PROTECTED]> wrote:


I believe the errors are within a "span" with class "errorField" (it may
be something else). Custom CSS can make you look like whatever you want.


[EMAIL PROTECTED] wrote:

Thanks Dave. It seems the simple theme is used so the message is in

black.

I overrode the ..errorMessage style in JSP which solved my problem but

I'm

not sure if it's a right way to do that.

Thanks again.


On Dec 19, 2007 8:09 PM, Dave Newton <[EMAIL PROTECTED]> wrote:


Er, the default stylesheet *does* make it show up in read. Are you

using

the
 tag? IIRC that is what includes the CSS file.

d.

--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:


Is there a way to apply style sheet (CSS) to the message validator
generates? For example, how to make the "Color me red" message in red

when

it is shown up?








*Color me red*







Many thanks.


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



--

Alberto A. Flores
http://www.linkedin.com/in/aflores



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





--

Alberto A. Flores
http://www.linkedin.com/in/aflores


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

Re: validation and CSS

2007-12-19 Thread [EMAIL PROTECTED]
Thanks Alberto.

Which class contains style for ? I need to customize it so
that no  is around it and the text associated with it is in bold.

e.g., 

If the value of the "some key" is Password, I want the "Password" is in
bold.

Any suggestion?

Thanks again.

On Dec 19, 2007 10:00 PM, Alberto A. Flores <[EMAIL PROTECTED]> wrote:

> I believe the errors are within a "span" with class "errorField" (it may
> be something else). Custom CSS can make you look like whatever you want.
>
>
> [EMAIL PROTECTED] wrote:
> > Thanks Dave. It seems the simple theme is used so the message is in
> black.
> >
> > I overrode the ..errorMessage style in JSP which solved my problem but
> I'm
> > not sure if it's a right way to do that.
> >
> > Thanks again.
> >
> >
> > On Dec 19, 2007 8:09 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> >
> >> Er, the default stylesheet *does* make it show up in read. Are you
> using
> >> the
> >>  tag? IIRC that is what includes the CSS file.
> >>
> >> d.
> >>
> >> --- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> >>
> >>> Is there a way to apply style sheet (CSS) to the message validator
> >>> generates? For example, how to make the "Color me red" message in red
> >> when
> >>> it is shown up?
> >>>
> >>>
> >>> 
> >>>
> >>> 
> >>>
> >>> 
> >>>
> >>> *Color me red*
> >>>
> >>> 
> >>>
> >>> 
> >>>
> >>> 
> >>>
> >>> Many thanks.
> >>>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> --
>
> Alberto A. Flores
> http://www.linkedin.com/in/aflores
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


Re: validation and CSS

2007-12-19 Thread Alberto A. Flores
I believe the errors are within a "span" with class "errorField" (it may 
be something else). Custom CSS can make you look like whatever you want.



[EMAIL PROTECTED] wrote:

Thanks Dave. It seems the simple theme is used so the message is in black.

I overrode the ..errorMessage style in JSP which solved my problem but I'm
not sure if it's a right way to do that.

Thanks again.


On Dec 19, 2007 8:09 PM, Dave Newton <[EMAIL PROTECTED]> wrote:


Er, the default stylesheet *does* make it show up in read. Are you using
the
 tag? IIRC that is what includes the CSS file.

d.

--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:


Is there a way to apply style sheet (CSS) to the message validator
generates? For example, how to make the "Color me red" message in red

when

it is shown up?








*Color me red*







Many thanks.



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






--

Alberto A. Flores
http://www.linkedin.com/in/aflores


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

Re: validation and CSS

2007-12-19 Thread [EMAIL PROTECTED]
Thanks Dave. It seems the simple theme is used so the message is in black.

I overrode the ..errorMessage style in JSP which solved my problem but I'm
not sure if it's a right way to do that.

Thanks again.


On Dec 19, 2007 8:09 PM, Dave Newton <[EMAIL PROTECTED]> wrote:

> Er, the default stylesheet *does* make it show up in read. Are you using
> the
>  tag? IIRC that is what includes the CSS file.
>
> d.
>
> --- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Is there a way to apply style sheet (CSS) to the message validator
> > generates? For example, how to make the "Color me red" message in red
> when
> > it is shown up?
> >
> >
> > 
> >
> > 
> >
> > 
> >
> > *Color me red*
> >
> > 
> >
> > 
> >
> > 
> >
> > Many thanks.
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: validation and CSS

2007-12-19 Thread Dave Newton
Er, the default stylesheet *does* make it show up in read. Are you using the
 tag? IIRC that is what includes the CSS file.

d.

--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> Is there a way to apply style sheet (CSS) to the message validator
> generates? For example, how to make the "Color me red" message in red when
> it is shown up?
> 
> 
> 
> 
> 
> 
> 
> 
> *Color me red*
> 
> 
> 
> 
> 
> 
> 
> Many thanks.
> 


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



validation and CSS

2007-12-19 Thread [EMAIL PROTECTED]
Is there a way to apply style sheet (CSS) to the message validator
generates? For example, how to make the "Color me red" message in red when
it is shown up?








*Color me red*







Many thanks.


Re: Printing a PDF file from JSP

2007-12-19 Thread Jeff Amiel
On Dec 19, 2007 4:03 PM, Zoran Avtarovski <[EMAIL PROTECTED]> wrote:
> I don't know if you can print the file without displaying it first.

> I'm just trying to think how you could set it up to print only. Maybe Flash
> where you have greater control.

Not really..I went through this last monththere is simply NO
way to feed a PDF to a pure web (browser) application for direct
printing (without viewing).

The solution I ended up with was to pass it down (via the response)
with some javascript embedded in the PDF to auto-pop up the print
dialog and disable the menu/toolbars and auto-close after printing

There is a product out there called Advanced PDF Printer which can
utilize an active X control to 'remote' print a PDF...but it is
commercial..

Good Luck!

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



Re: Printing a PDF file from JSP

2007-12-19 Thread Zoran Avtarovski
I don't know if you can print the file without displaying it first.

To display it, I'd just use the stream result in S2 and S1, just hijack the
request and stream the file to the user.

I'm just trying to think how you could set it up to print only. Maybe Flash
where you have greater control.

Z. 

> 
> Hi,
>  
> Is it possible to print a PDF file from a JSP.The pdf resides in my
> application server.
> 
> Regards
> Srinivasa Prasad
> 
> -Original Message-
> From: Jake Robb [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 19, 2007 2:30 PM
> To: Struts Users Mailing List
> Subject: RE: Struts 2 and SSL
> 
> Have a look at the implementation of the plugin's interceptor:
> 
> http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
> com/googlecode/sslplugin/interceptors/SSLInterceptor.java
> 
> Just change it so that it looks at something else instead of the
> annotation.
> 
> -Jake
> 
> 
> -Original Message-
> From: Maxx [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 19, 2007 2:10 PM
> To: Struts Users Mailing List
> Subject: Re: Struts 2 and SSL
> 
> Hello,
> 
> Good idea, but when it's about "annotations", is it about Java 5?
> How to handle/use this in Java (1.)4 ?
> 
> Thanks,
> Maxx
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - -
> 
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended recipient of
> this message you are hereby notified that any review, dissemination,
> distribution or copying of this message is strictly prohibited.  This
> communication is for information purposes only and should not be regarded as
> an offer to sell or as a solicitation of an offer to buy any financial
> product, an official confirmation of any transaction, or as an official
> statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
> secure or error-free.  Therefore, we do not represent that this information is
> complete or accurate and it should not be relied upon as such.  All
> information is subject to change without notice.
> 
> 
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within
> this communication (including any attachments) is not intended or written to
> be used and cannot be used for the purpose of (i) avoiding U.S. tax related
> penalties or (ii) promoting, marketing or recommending to another party any
> transaction or matter addressed herein.
> 
> 
> 
> -
> 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 do logic in struts tags?

2007-12-19 Thread Dave Newton
Exposing the values you want as action properties is probably the easiest
way, but you should be able to use OGNL as values, so I would have thought
that "%{#parameters.lang}" (or whatever it is) would have worked.

--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> I need to pass a request parameter value to a form action. If using a
> hidden
> fild, I can do it like  as the tag
> doesn't allow an experssion as its value. How can I get around it?
> 
> Another question is how to use  or other struts tag to do this
> logic:
> 
> <%
> 
>if ("en".equals(request.getParameter("lang")) {
> 
>  ...
> 
>} else {
> 
>   ...
> 
>}
> 
> %>
> 
> Thanks a lot.
> 


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



How to do logic in struts tags?

2007-12-19 Thread [EMAIL PROTECTED]
I need to pass a request parameter value to a form action. If using a hidden
fild, I can do it like  as the tag
doesn't allow an experssion as its value. How can I get around it?

Another question is how to use  or other struts tag to do this
logic:

<%

   if ("en".equals(request.getParameter("lang")) {

 ...

   } else {

  ...

   }

%>

Thanks a lot.


Spring + Tiles not working

2007-12-19 Thread Todd Prickett
I'm trying to wire tiles (from Struts 1.3 jars) into Spring 2.0.7 and Spring 
Web Flow 1.0.5.In doing so, I'm receiving the error: No Tiles definition found 
for name '/WEB-INF/jsp/defs/loginForm.jsp'My tiles-defs.xml looks 
like:My servlet-config.xml 
looks like:/WEB-INF/defs/tiles-defs.xmlThe
 flow I'm executing is:WEB-INF/jsp/defs/loginForm.jsp
 looks like:Can anyone 
please help me? I'm at wit's end. (note: there are spaces showing in the code 
above that don't really exist in my source code. They are either CR/LF's or I 
had to add them to avoid having the edit convert them to smilies)TIA
_
Share life as it happens with the new Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007

Re: Printing a PDF file from JSP

2007-12-19 Thread Dave Newton
Isn't FOP for creating PDFs from XML? I think the question was how to
download a PDF that already exists on the filesystem.

d.

--- [EMAIL PROTECTED] wrote:

> The technology is called FOP
> (Formatting Object Processor)
> http://xmlgraphics.apache.org/fop/
> I've used it quite extensively from the back end ..
> implementing from JSP would work as well (but there are security concerns
> on
> where to store the PDF file...)
> 
> Martin--
> - Original Message -
> Wrom: YZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUW
> To: "Struts Users Mailing List" 
> Sent: Wednesday, December 19, 2007 2:46 PM
> Subject: Printing a PDF file from JSP
> 
> 
> 
> Hi,
> 
> Is it possible to print a PDF file from a JSP.The pdf resides in my
> application server.
> 
> Regards
> Srinivasa Prasad
> 
> -Original Message-
> Wrom: LSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIP
> Sent: Wednesday, December 19, 2007 2:30 PM
> To: Struts Users Mailing List
> Subject: RE: Struts 2 and SSL
> 
> Have a look at the implementation of the plugin's interceptor:
> 
> http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
> com/googlecode/sslplugin/interceptors/SSLInterceptor.java
> 
> Just change it so that it looks at something else instead of the
> annotation.
> 
> -Jake
> 
> 
> -Original Message-
> Wrom: BARHDMNNSKVFVWRKJVZCMHVIBGDADRZ
> Sent: Wednesday, December 19, 2007 2:10 PM
> To: Struts Users Mailing List
> Subject: Re: Struts 2 and SSL
> 
> Hello,
> 
> Good idea, but when it's about "annotations", is it about Java 5?
> How to handle/use this in Java (1.)4 ?
> 
> Thanks,
> Maxx
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> - - - - - -
> 
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended recipient
> of this message you are hereby notified that any review, dissemination,
> distribution or copying of this message is strictly prohibited.  This
> communication is for information purposes only and should not be regarded
> as
> an offer to sell or as a solicitation of an offer to buy any financial
> product, an official confirmation of any transaction, or as an official
> statement of Lehman Brothers.  Email transmission cannot be guaranteed to
> be
> secure or error-free.  Therefore, we do not represent that this information
> is complete or accurate and it should not be relied upon as such.  All
> information is subject to change without notice.
> 
> 
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within
> this communication (including any attachments) is not intended or written
> to
> be used and cannot be used for the purpose of (i) avoiding U.S. tax related
> penalties or (ii) promoting, marketing or recommending to another party any
> transaction or matter addressed herein.
> 
> 
> 
> -
> 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: Printing a PDF file from JSP

2007-12-19 Thread mgainty
The technology is called FOP
(Formatting Object Processor)
http://xmlgraphics.apache.org/fop/
I've used it quite extensively from the back end ..
implementing from JSP would work as well (but there are security concerns on
where to store the PDF file...)

Martin--
- Original Message -
Wrom: YZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUW
To: "Struts Users Mailing List" 
Sent: Wednesday, December 19, 2007 2:46 PM
Subject: Printing a PDF file from JSP



Hi,

Is it possible to print a PDF file from a JSP.The pdf resides in my
application server.

Regards
Srinivasa Prasad

-Original Message-
Wrom: LSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIP
Sent: Wednesday, December 19, 2007 2:30 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 and SSL

Have a look at the implementation of the plugin's interceptor:

http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
com/googlecode/sslplugin/interceptors/SSLInterceptor.java

Just change it so that it looks at something else instead of the
annotation.

-Jake


-Original Message-
Wrom: BARHDMNNSKVFVWRKJVZCMHVIBGDADRZ
Sent: Wednesday, December 19, 2007 2:10 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 and SSL

Hello,

Good idea, but when it's about "annotations", is it about Java 5?
How to handle/use this in Java (1.)4 ?

Thanks,
Maxx

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


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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - -

This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within
this communication (including any attachments) is not intended or written to
be used and cannot be used for the purpose of (i) avoiding U.S. tax related
penalties or (ii) promoting, marketing or recommending to another party any
transaction or matter addressed herein.



-
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: accessing url parameters in jsp.

2007-12-19 Thread Zarar Siddiqi

Well, you could just use the pageContext variable to get the query string
like so:

${pageContext.request.queryString}

Zarar



strutstwouser wrote:
> 
> Hi,
> 
> I need to access certain url parameters and pass them on as the query
> string
> to an iframe within the jsp
> 
> So, if the incoming url is :
> 
> http://localhost:9080/myapp/searchForm.action?mainObj.childObj=xyz&abc=123
> 
> i need to pass to iframe as :
> 
> 
> 
> I can access the abc param as  ,
> but the same doesn't work for 
> 
> Ideally, i would want the entire incoming query string be passed on to the
> iframe- but didn't find anything handy.
> 
> Note  : i can't use the s:action tag in this case, since the result is a
> jasperreport page, and it flushes the response within the result itself ;
> so
> had to go with iframe.
> 
> Any help is appreciated.
> 
> Thanks,
> Joseph
> 
> 

-- 
View this message in context: 
http://www.nabble.com/accessing-url-parameters-in-jsp.-tp14411652p14424668.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Printing a PDF file from JSP

2007-12-19 Thread Prasad, Srinivasa

Hi,
 
Is it possible to print a PDF file from a JSP.The pdf resides in my
application server.

Regards
Srinivasa Prasad

-Original Message-
From: Jake Robb [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 2:30 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 and SSL

Have a look at the implementation of the plugin's interceptor:

http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
com/googlecode/sslplugin/interceptors/SSLInterceptor.java

Just change it so that it looks at something else instead of the
annotation.

-Jake


-Original Message-
From: Maxx [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 19, 2007 2:10 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 and SSL

Hello,

Good idea, but when it's about "annotations", is it about Java 5?
How to handle/use this in Java (1.)4 ?

Thanks,
Maxx

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


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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.


IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this 
communication (including any attachments) is not intended or written to be used 
and cannot be used for the purpose of (i) avoiding U.S. tax related penalties 
or (ii) promoting, marketing or recommending to another party any transaction 
or matter addressed herein.



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



RE: Struts 2 and SSL

2007-12-19 Thread Jake Robb
Have a look at the implementation of the plugin's interceptor:

http://struts2-ssl-plugin.googlecode.com/svn/trunk/plugin/src/main/java/
com/googlecode/sslplugin/interceptors/SSLInterceptor.java

Just change it so that it looks at something else instead of the
annotation.

-Jake


-Original Message-
From: Maxx [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 2:10 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 and SSL

Hello,

Good idea, but when it's about "annotations", is it about Java 5?
How to handle/use this in Java (1.)4 ?

Thanks,
Maxx

-
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: Struts 2 and SSL

2007-12-19 Thread Maxx
Hello,

Good idea, but when it's about "annotations", is it about Java 5?
How to handle/use this in Java (1.)4 ?

Thanks,
Maxx

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



Re: accessing url parameters in jsp.

2007-12-19 Thread Maxx
On Dec 19, 2007 6:45 AM, j alex <[EMAIL PROTECTED]> wrote:
> Ideally, i would want the entire incoming query string be passed on to the
> iframe- but didn't find anything handy.
>
> Note  : i can't use the s:action tag in this case, since the result is a
> jasperreport page, and it flushes the response within the result itself ; so
> had to go with iframe.

Yes, you can't use the s:action tag, but instead you can use the s:url tag, like
  
and all your "GET" parameters will be copied in the new forged url.

Oh... and please read the doc!!! ;)
http://struts.apache.org/2.x/docs/url.html

Greets,
Maxx

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



Re: Question about validation mechanism

2007-12-19 Thread Ian Roughley
The validator interceptor doesn't do anything.  If you are using the s2 
tags, then the getter matching the name attribute will be called on the 
action or model.


/Ian

--
Ian Roughley

From Down & Around, Inc.

Consulting * Training / Mentoring * Agile Process * Open Source
web: http://www.fdar.com - email: [EMAIL PROTECTED]



Jeremy JGR. Grumbach wrote:

Hi,

 


I have a page "add.jsp" with a form and lots of fields. I have added a
validation in my struts configuration to validate the form.

During the form validation, if an error is detected, then an action
error is added to the request and struts redirects to the "input"
forward. In most of cases, it is the "add.jsp" page. And all the fields
that the user has entered are still there.

Does anybody know how the validator interceptor does to keep the values
that the user has entered?

 


Thanks in advance,

 


Jeremy

 

 



  


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



Question about validation mechanism

2007-12-19 Thread Jeremy JGR. Grumbach
Hi,

 

I have a page "add.jsp" with a form and lots of fields. I have added a
validation in my struts configuration to validate the form.

During the form validation, if an error is detected, then an action
error is added to the request and struts redirects to the "input"
forward. In most of cases, it is the "add.jsp" page. And all the fields
that the user has entered are still there.

Does anybody know how the validator interceptor does to keep the values
that the user has entered?

 

Thanks in advance,

 

Jeremy

 

 



Re: form + file problem

2007-12-19 Thread Pablo Vázquez Blázquez

I suppose so, as the rest of the form works OK when there is no file field.

The form loads part of its content via AJAX. When the loaded content 
includes a  takes place the problem.


Regards.


Dave Newton escribió:

Do you have the appropriate tag lib declarations in the included JSP file?

--- Pablo Vázquez Blázquez <[EMAIL PROTECTED]> wrote:

  

I have the following form:

http://www.w3.org/1999/xhtml";
xmlns:jsp="http://java.sun.com/JSP/Page";
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
xmlns:c="http://java.sun.com/jsp/jstl/core";
xmlns:s="/struts-tags"
version="2.0">


   






Why, if I have a  field inside JobVDPDetails.jspf I recieve a 
"s.match is not a function" in dojo.js and the server action is not 
fired, and if I don´t have this file field everything works OK?


Note JobVDPDetails.jspf has a s:tabbedpanel and, inside it, here is the 
s:file field.


Thank you.


-
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: form + file problem

2007-12-19 Thread Dave Newton
Do you have the appropriate tag lib declarations in the included JSP file?

--- Pablo Vázquez Blázquez <[EMAIL PROTECTED]> wrote:

> I have the following form:
> 
> http://www.w3.org/1999/xhtml";
> xmlns:jsp="http://java.sun.com/JSP/Page";
> xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
> xmlns:c="http://java.sun.com/jsp/jstl/core";
> xmlns:s="/struts-tags"
> version="2.0">
> 
>  action="AddJobVDP" enctype="multipart/form-data" method="post">
>
> 
> 
> 
> 
> 
> Why, if I have a  field inside JobVDPDetails.jspf I recieve a 
> "s.match is not a function" in dojo.js and the server action is not 
> fired, and if I don´t have this file field everything works OK?
> 
> Note JobVDPDetails.jspf has a s:tabbedpanel and, inside it, here is the 
> s:file field.
> 
> Thank you.
> 
> 
> -
> 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]



form + file problem

2007-12-19 Thread Pablo Vázquez Blázquez

I have the following form:

http://www.w3.org/1999/xhtml";
   xmlns:jsp="http://java.sun.com/JSP/Page";
   xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
   xmlns:c="http://java.sun.com/jsp/jstl/core";
   xmlns:s="/struts-tags"
   version="2.0">


  
   





Why, if I have a  field inside JobVDPDetails.jspf I recieve a 
"s.match is not a function" in dojo.js and the server action is not 
fired, and if I don´t have this file field everything works OK?


Note JobVDPDetails.jspf has a s:tabbedpanel and, inside it, here is the 
s:file field.


Thank you.


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



Error parsing web-inf/struts-nested.tld

2007-12-19 Thread rapsy


Hi All,

I am trying to deploy struts aplication on Oracle Application server 10g. I
am getting following list of error, any input will be greatly appreciated.
It is really urgent.

Below is the stack trace of errors I am getting in deployment log file:

Error parsing web-inf/struts-nested.tld
Error:org.apache.struts.taglib.nested.NestedWriteNestingTei
Parsing error resource path /WEB-INF/noits-config.xml
java.net.ConnectException: Connection timed out

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Error-parsing-web-inf-struts-nested.tld-tp14420335p14420335.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 2.0.9 server side validation problem

2007-12-19 Thread Brian Relph
If you are building with maven2, you might make sure that you are adding the
xml files in your source directory to your compiled output directory.  I
know this was something that fooled me at first ...


  


  src/main/java
  
**/*.properties
**/*.xml
  

  



On 12/19/07, TuomoS <[EMAIL PROTECTED]> wrote:
>
>
> How can I confirm that the XML validator file is read? It seems that the
> actionName-validation.xml is not read. I have checked many times that the
> action java class matches with the xml file name.
>
> actionName.java
> actionName-validation.xml (when using execute method in submit)
>
> I overrided the validate() method in my action for debugging. I can add a
> fielderror manually with hasFieldError() method and it is then shown in
> the
> jsp.
>
> Is it mandatory to define doctype in the validation xml file? And is it
> really enough just to have the file in classpath? (WEBINF/..)
>
> clip from the validation file:
>
> 
> 
> 
>
> 
> 
>
> .
> .
> .
> :clap:
>
> 
> --
> View this message in context:
> http://www.nabble.com/Struts-2.0.9-server-side-validation-problem-tp14419444p14419444.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: OpenSessionInView with Struts 2.x

2007-12-19 Thread Alberto A. Flores

Gary,

Thanks a lot for bringing this to my attention. You are correct, that's 
the setup I have in place. I checked my "readonly" configuration and it 
turned out that there was a hidden bug in my xml code (nasty to trace) 
where the "read-only" attribute was not part part of my "get*" keys. I 
changed it and the OSIV started to do the right thing (not persisting 
dirty objects when the view made changes).


Although this is no longer an issue, the problem of the "changed" state 
of the domain object is still reflected in the view (changed properties) 
where roll-backs do no apply on validation errors (the Action method is 
not part of the transaction). Since part of my UI requirements is to 
show the before and after (during the edit process), I really needed to 
have the current state of the object from db. I played with my 
struts.xml to obtain the needed result and was successful with the 
approach of using "transient" objects. A little overhead but it helps 
the purposes of our app (which is pretty extensive).


Thanks everyone for the help given

Alberto

Gary Affonso wrote:

This post is going to make a few assumptions:

1) You're using S2 and Spring
2) You're using Spring's OSIV filter (as opposed to Hibernate's)
3) You're using Spring's Hibernate DAO framework
4) You're using a Spring-configured transaction manager
5) You're declaring transaction boundaries and their configuration 
somehow (declaratively in the xml, for example).


That's a lot of assumptions but that's also the typical setup (in my 
experience, at least) when using S2, Spring, and Hibernate.  If you're 
*not* doing the above ignore the rest of the post.  And ask yourself why 
you're not. :-)


Assuming that's your setup, then I'm a little confused by this thread. 
To get the behavior you describe you actually have to work at it a 
little.  And the implication is that you're getting it by accident.


Here's a snippet from the docs for Spring's OSIV filter:

"NOTE: This filter will by default not flush the Hibernate Session, with 
the flush mode set to FlushMode.NEVER. It assumes to be used in 
combination with service layer transactions that care for the flushing: 
The active transaction manager will temporarily change the flush mode to 
FlushMode.AUTO during a read-write transaction, with the flush mode 
reset to FlushMode.NEVER at the end of each transaction. If you intend 
to use this filter without transactions, consider changing the default 
flush mode (through the "flushMode" property)."


It does this to avoid exactly the problem you're having (objects dirtied 
by the view getting automatically persisted).  Here's a thread about 
this from somebody who wanted to be able to write from within the OSIV 
session but was having trouble doing it:


  http://forum.springframework.org/archive/index.php/t-12414.html

Even though it's pretty much the opposite problem you're having, I think 
it will be educational to give that a read.


Now, you're saying you're getting non-default behavior (your dirty 
objects are being auto-flushed.).  That implies to me that your 
transaction manager is changing the flush-mode of the OSIV session, 
probably because you've used server/dao methods configured as read/write 
instead of read-only.


If that's the case, the recommended solution here would be to see if you 
can easily re-configure the transactions involved with this view.  If 
they're a bunch of hibernate-related calls that are all read-only, just 
be sure that spring's transaction config *knows* that they're read only. 
 That way the OSIV filter will "do the right thing".


Or did I miss something?

- Gary


Alberto A. Flores wrote:

Thank you everyone for all your input.

I'm currently opting for changing my code (luckily is not that much) 
to never maintained a "persistent" object within the ValueStack, but 
rather a "transient" object. Of course, this is an additional overhead 
(have to copy the object, query, etc, etc), but I think is our best 
approach since Hibernate Validator is not viable option right now (I 
would also argue that validation could/should be pushed back to the 
model, unfortunately we are working with a poorly design db where we 
use reverse engineering to build all hbm and src files and I'm not 
sure if I have enough resources to fix that part of our build, e.g. 
add Hibernate Validator, modify templates, etc).


If I may ask, how to "avoid the transaction commit when validation 
fails" (as you mentioned)?  Is there an interceptor to handle this 
scenario? I see that the workflow interceptor is part of the xwork 
package (not available with Struts2 distribution source code) and 
before I jump into repackaging one from xwork source (which I'm not 
even sure where can I find one), I would probably consider writing one 
myself to handle this case. I also notice that the validate() method 
is triggered before the prepare() method (which makes total sense), 
however I would like to guess that this scenario is be

Re: Struts 2.0.9 server side validation problem

2007-12-19 Thread Dave Newton
--- TuomoS <[EMAIL PROTECTED]> wrote:
> How can I confirm that the XML validator file is read?

Turning up the debug level on com.opensymphony.xwork2.validator is the
easiest.

> It seems that the actionName-validation.xml is not read. I

That's not very likely; this definitely works.

> have checked many times that the
> action java class matches with the xml file name.

Does it subclass ActionSupport (or implement ValidationAware and
Validateable?

> I overrided the validate() method in my action for debugging. I can add a
> fielderror manually with hasFieldError() method and it is then shown in the
> jsp. 

For completeness, I think you meant addFieldError there.

> Is it mandatory to define doctype in the validation xml file?

That I don't know, but I don't know why you wouldn't put it in there; it can
be pretty helpful.

> is it really enough just to have the file in classpath? (WEBINF/..)

WEB-INF is not the classpath; the validation file should be in the same
package as the action in question.

d.



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



Struts 2.0.9 server side validation problem

2007-12-19 Thread TuomoS

How can I confirm that the XML validator file is read? It seems that the
actionName-validation.xml is not read. I have checked many times that the
action java class matches with the xml file name.

actionName.java
actionName-validation.xml (when using execute method in submit)

I overrided the validate() method in my action for debugging. I can add a
fielderror manually with hasFieldError() method and it is then shown in the
jsp. 

Is it mandatory to define doctype in the validation xml file? And is it
really enough just to have the file in classpath? (WEBINF/..)

clip from the validation file:


  
 

 
  

.
.
.
:clap:


-- 
View this message in context: 
http://www.nabble.com/Struts-2.0.9-server-side-validation-problem-tp14419444p14419444.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 2 and SSL

2007-12-19 Thread Nuwan Chandrasoma

Hi,

take a look at this plugin and code. i hope it will help you

http://code.google.com/p/struts2-ssl-plugin/

Thanks,

Nuwan.


Filipe David Manana wrote:

Hi,

I am novice in Struts 2 and web development in general.

I want to know the following:

1) How can an action know what is the protocol (http or https) of the url
that was used to invoque the action (the url that is mapped to the action in
struts.xml) ?

2) How can an action redirect itself (or to another action) to its https
counterpart?

3) Is there any straight forward way for retrieving from the view the name
and namespace of the action that it corresponds to?

thank you

  



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



Struts 2 and SSL

2007-12-19 Thread Filipe David Manana
Hi,

I am novice in Struts 2 and web development in general.

I want to know the following:

1) How can an action know what is the protocol (http or https) of the url
that was used to invoque the action (the url that is mapped to the action in
struts.xml) ?

2) How can an action redirect itself (or to another action) to its https
counterpart?

3) Is there any straight forward way for retrieving from the view the name
and namespace of the action that it corresponds to?

thank you

-- 
Filipe David Manana,
[EMAIL PROTECTED]

Obvious facts are like secrets to those not trained to see them.


Re: [s2] How do I output unicode characters please help

2007-12-19 Thread Jonny Cavell

I am also having difficulty with using Struts2 and Freemarker.

I am setting default_encoding=UTF-8 in freemarker.properties, and leaving
the struts encoding in default.properties untouched (i.e.
struts.i18n.encoding=UTF-8). When I use a struts action to forward to a test
page with Spanish text, without specifying the type (thus defaulting to
jsp), it outputs fine. However, if the action forwards to the same page, but
specifying the type as freemarker, the output is garbled.

Even if I subclass FreemarkerManager, override the createConfiguration
method and explicitly call config.setDefaultEncoding("utf-8") here, and
specify this as the struts.freemarker.manager.classname in
struts.properties, it makes no difference - the output is garbled.

Does anybody know why this might be the case? 

Thanks

Jonny



Laurie Harper wrote:
> 
> Er, no; property files are required to be in ASCII format. Using a UTF-8 
> character encoding in a properties file will not work.
> 
> @Dave: ü is a valid encoding of the character \u00fc, it's 
> equivalent; in fact, I think it's equivalent regardless of character 
> encoding for the served HTML, which would make it the most portable 
> representation. Why do you want something else?
> 
> If you really can't work with the encoded output, you may be able to get 
> the raw character, for example with  escape="false"/>.
> 
> L.
> 
> Leonidas Papadakis wrote:
>> Just put the umlaut character u" directly to your property file and make 
>> sure that you save it as utf-8 not ansi e.t.c.
>> 
>> Regards,
>> 
>> Leon
>> 
>> David Harland wrote:
>>> Hi,
>>>
>>> Thanks I have added those properties but it is still outputting ü.
>>>
>>> Can someone please tell me what I might be doing wrong.
>>>
>>> Dave.
>>>
>>> - Original Message 
>>> From: Leonidas Papadakis <[EMAIL PROTECTED]>
>>> To: Struts Users Mailing List 
>>> Sent: Saturday, September 22, 2007 4:22:04 PM
>>> Subject: Re: [s2] How do I output unicode characters please help
>>>
>>> Hi there,
>>>
>>> in my Greek scenario i have set the below in struts.properties file :
>>> struts.i18n.encoding=UTF-8
>>> struts.locale = el_GR
>>>
>>> in my freemarker.properties :
>>> default_encoding=UTF-8
>>> locale=el_GR
>>>
>>> in my jsp file :
>>> <%@ page contentType="text/html; charset=utf-8" %>
>>>
>>> Also check the doctype of your resulting html.
>>>
>>> I hope this will help 
>>>
>>> Regards
>>>
>>> Leon
>>>
>>> David Harland wrote:
>>>  
 Hi,

 If I put the following \u00fc in a properties file and use it in a 
 jsp i get the german character u" output. If I have an action with 
 the variable test and I set it with \u00fc and I output it in a jsp I 
 get the encoding ü.

 How do I get the character instead of this encoding please?

 Thanks

 Dave.




   
 
  

 Don't let your dream ride pass you by. Make it a reality with Yahoo! 
 Autos.
 http://autos.yahoo.com/index.html
  



 -
 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]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 
>>>  
>>>
>>> Pinpoint customers who are looking for what you sell. 
>>> http://searchmarketing.yahoo.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-s2--How-do-I-output-unicode-characters-please-help-tp12837085p14414610.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Loading dojo.js in struts2.0.9 is very slow

2007-12-19 Thread Nuwan Chandrasoma

Hi,

i think this mail thread will help you.

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

Thanks,
Nuwan
(http://code.google.com/p/struts2-ssl-plugin/)

Yoge wrote:

My App is using ajax theme of struts2.0.9.
It takes more than 3 seconds to load /struts/ajax/dojoRequire.js
and /struts/dojo/dojo.js.

The JS files are served static and not served by struts filter.

Is there any way to improve the load time of dojo*.js ???

  



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



Re: Struts 2.1.x

2007-12-19 Thread Nuwan Chandrasoma

Hi,

I think the below link has a test build of struts 2.1

http://people.apache.org/builds/struts/2.1.0/

Thanks,
Nuwan
(http://code.google.com/p/struts2-ssl-plugin/)


Frans Thamura wrote:

i am seeking the S2 2.1.x binary

anyone can share your binary

so i can use and test the feature

F

  



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



RE: Exception Handling keeping user input

2007-12-19 Thread Jeremy JGR. Grumbach
Yes I think it's more what I had in mind. My three requests were:
1) Go back to the "add" page without losing user input
2) Display an error message above the "add" form
3) Do this in a generic way => the business layer returns functional
exceptions which appear automatically in the user screen

The points 1) and 2) are similar to the struts validation.

I'm already using Spring AOP to manage transaction, so I could add some
code to manage exceptions but first I will try with my own S2 Exception
Interceptor.

I will post the results of my investigation here (and I hope I will have
something to post :))

Thanks!

Jeremy

-Original Message-
From: Gary Affonso [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 12:06 AM
To: Struts Users Mailing List
Subject: Re: Exception Handling keeping user input

Jeremy JGR. Grumbach wrote:
> Thanks also for the answer,
> 
> I'm using Velocity so no problem with the null values. 
> And yes that's a way to manage exceptions, but I as said in my
previous
> post, I was looking for something more generic, without specific code
in
> all my actions.

If you want a generic exception handling solution I'd look at two
things:

1) AOP using Spring
2) The S2 Exception interceptor

Spring AOP can be configured to give advice to all your actions. 
Basically the advice just catches exceptions and then returns a result 
code.  That keeps any exception handling code out of your action.  The 
advice can be as complex as you want it to be.  This is a bit 
disadvantageous in that it's not S2 specific so you end up working 
harder to do things like add error messages to the Action's error maps.

The S2 Exception interceptor (and the exception configuration that goes 
along with it) give you an S2-specific way to implement a basically the 
same thing: a generic fault barrier at the action-layer.

It's documented here:

   http://struts.apache.org/2.0.11/docs/exception-configuration.html

If that specific interceptor doesn't do what you want, I suspect that a 
modestly customized version of its code will.

But none of that does what (I thought) you were originally asking which 
was to preserve the contents of the submitted form data "automatically" 
between a processing action and a view action.

Doing that in a generic fashion takes a little more work since the 
form-data that needs to be preserved is different depending on the 
view/process actions involved (sometimes the user is entering a NewCar, 
sometimes they're entering a NewCustomer).

I suppose you could come up with a generic interface (like 
"SubmittedFormData") that would give your customized exception 
interceptor something to work with.

For example:

In ProcessForm.action
-
1) your custom exception interceptor catches any exceptions thrown below

the action and that have propagated up to the action.  This is your 
fault barrier.

2) your custom exception interceptor looks for an object in the action 
that implements "SubmittedFormData".  If it finds it, it adds that 
object to the session.

3) your custom exception interceptor then does anything else appropriate

(like add errors to the Action).

4) your custom exception interceptor returns the result code of your 
choice (probably INPUT in your case)

In ViewForm.action
--
1) You custom interceptor retrieves any "SubmittedFormData" object from 
the session and pushes it onto the stack.

2) It then shows the view

And then in your view you can reference specific properties of the 
SubmittedFormData object, regardles of what kind of object it actually 
is (NewCar, NewCustomer, etc).

The only thing that has to know the *actual* object type is your view 
code that references real properties of the SubmittedFormData object. 
Everything else (the interceptor, the session storage/retrieval code, 
etc.) else just works with a "SubmittedFormData" object.



I still feel like I'm missing something here.  Is the above more of what

you had in mind?

- Gary

-
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 dojo 1.0?

2007-12-19 Thread Alvaro Sanchez-Mariscal
> Yeah, that right.  It would be convenient if tags existed for 1.0
> already but there's none.  It'll takes someone with a lot of familiarity
> with Dojo 1.0 to be able to build useful reusable tags like the current
> dojo plugin so I expect it'll take a while. However, if you use "raw
> Dojo" instead and find you start re-using a lot of similar JS code, then
> that code's an excellent starting point for a new sx:tag and you'll
> probably be the best person to contribue it to struts2!

Ok, I will give this way a try.

Thank you very much.

Alvaro.

-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect & Instructor
[EMAIL PROTECTED]

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



Re: html:submit & html:img comb

2007-12-19 Thread Paul Benedict
Your image is part of the servlet container. You need to need the context
root to your image path. There is also an  tag part of S1, I
believe.

Paul

On Dec 18, 2000 5:57 PM, Martin Gainty <[EMAIL PROTECTED]> wrote:

> change to
> <%@ taglib prefix="s" uri="/struts-tags" %>
> 
> http://struts.apache.org/2.0.11/docs/submit.html
>
> M--
> - Original Message -
> From: "john lee" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, December 18, 2007 6:29 PM
> Subject: html:submit & html:img combo
>
>
> > I try to use the following
> >
> > 
> >
> >   or
> >
> > 
> >
> >   but image can not be displayed, but why?
> >
> >   any expert give the tip?
> >
> >   tks
> >
> >   john
> >
> >
> > -
> > Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try
> it
> now.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>