Re: Struts 2 - problem updating page

2011-01-06 Thread Alex Rodriguez Lopez

Not completely sure, but doesn't this one:

http://struts.apache.org/2.x/docs/token-session-interceptor.html

handle this situation?

developer researcher, 06-01-2011 01:55:

  Hello,

  I have the following problem: after submit a form, if it refresh (F5)
the page the form is submitted again. How I can fix this? How I can
configure Struts2 to avoid this behavior?

Thanks in advance,



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: unicode breaks s:select?

2010-12-16 Thread Alex Rodriguez Lopez

Have you got this on top of JSPs?

<%@ page contentType="text/html; charset=UTF-8" %>

Patrick Cosmo, 15-12-2010 17:40:

Hi!

When using "s:select", if the list of data returned by my java class contains strings 
that have unicode characters in them, "s:select" fails to generate the entire tag, it 
dies at the unicode character.

For example, this tag:



When "userTypeList" has as its first item the string "Actualización_GZ" the 
resulting page source is:


 mailto:pco...@incognito.com>
www.incognito.com






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: AJAX file upload

2010-12-02 Thread Alex Rodriguez Lopez
Still off-topic, but recently I've been using this neat feature in GMail 
where one simply grabs an actual file from, say, your desktop, and drop 
it into a designated zone in the page when composing mail. The file 
starts uploading when droped, so I guess you could call this "ajax 
upload". I wonder how they do it, but this shouldn't be too difficult to 
find out. It works with chorme and firefox, windows and os x.


Alex

Frank W. Zammetti, 01-12-2010 15:20:

On 12/1/2010 9:00 AM, Robert Graf-Waczenski wrote:

Am 30.11.2010 21:59, schrieb Harsh C:

How can I setup a AJAX-ified file upload page using Struts 2? If
there is
some integration with Dojo, it would be even better i.e. not use the OS
specific file upload button etc.



There are various resources floating around in the net regarding "AJAX
file upload". Strictly speaking, there is no such thing as an "ajax
file upload" to begin with. If your web app needs to upload a file,
there are two choices: Either you use  in all its
ugliness (or beauty, if you put effort into styling the control
properly), or you implement a (signed) Java applet to grab the file
from your client's disk and upload it to the server.

That being said, i would still suggest to google for "AJAX file
upload" because some of the resources that you can find are actually
quite useful and describe a solution to the problem that your web app
may have here and there, namely that you have an html form on your
page already and that you now need an extra form (on a popup dialog,
layer, whatever) that can be submitted while the original form is
*not* (or not yet) submitted. For this, ajax comes into the picture:
It allows you to handle a separate HTTP submit roundtrip to accept the
uploaded file, do some validation with it and show the appropriate
errors on your popup dialog when the rest of the other form has not
yet been submitted.

And, finally: All this has nothing to do with Struts specifically.

Robert



FYI, DWR v3 has a super-sweet implementation of an "AJAX upload".
Doesn't solve the look-and-feel "issue" WRT the button, but if you want
to really be fooled into thinking you're actually using AJAX to do an
upload (because Robert is 100% right that there isn't actually such a
thing) than DWR v3 will make you smile as you write the 2-3 lines of
code you need :)



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-29 Thread Alex Rodriguez Lopez
I don't know if this aplies to the issue here, but I once used this 
interceptor:



AUTOMATIC


So the errors / messages will be passed through actions and redirections 
if not retrieved / showed. As far as I recall it worked to me pretty well.



Alfredo Manuel Osorio Martinez, 28-10-2010 23:35:

I am using defaultStack but I was reading the issue you just told me:

https://issues.apache.org/jira/browse/WW-2869

And talks about invoking an action with the action tag an
ChainingInterceptor but I don't know if the actionErrors from the source
action will be copied.

And by the way I am using the lastest version 2.2.1


-Mensaje original-
De: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
Enviado el: Thursday, October 28, 2010 5:25 PM
Para: Struts Users Mailing List
Asunto: Re: Struts 2 s:action tag doesn't render action errors if any
are present


Which interceptor do you mean? ChainingInterceptor?


I meant implementing a new Interceptor from scratch. Although this
issue are related to the chainInterceptor.
What interceptor stack are you using? Does your request fire
chainInterceptor?

2010/10/29 Alfredo Manuel Osorio Martinez:

--
Maurizio Cucchiara

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: export to excel - displaytag

2010-10-26 Thread Alex Rodriguez Lopez

Hi,

I had the same problem, but it was time ago.

I asume from your code that you followed this:

http://displaytag.sourceforge.net/1.2/export_filter.html

and using Struts 1.

If using this with Struts2 you should have to change the url-pattern to 
*.action or whatever extension you are using.


Also check that you have displaytag-export-poi-1.1.jar in your 
dependencies / classpath like detailed in 
http://displaytag.sourceforge.net/11/install.html


I hope this helps I remember having hell of a days with this one...

Struts User, 25-10-2010 21:41:

Hi all,

I am trying to export data to excel using diplaytag. I am able to save the
excel file but the file is empty. Any help is greatly appreciated.
I am setting the export filter and display-tag properties as below.

*web.xml:*


 ResponseOverrideFilter

org.displaytag.filter.ResponseOverrideFilter
 

 
 ResponseOverrideFilter
 *.do
 
 
 ResponseOverrideFilter
 *.jsp
 

*displaytag.properties*

#sort.behavior=list
#sort.amount=list
basic.empty.showtable=true
basic.msg.empty_list=Query returned no results.
basic.msg.empty_list_row= Query returned no
results.
#paging.banner.placement=top
#paging.banner.onepage=
export.types=csv excel xml pdf rtf
export.excel=true
export.csv=true
export.xml=true
export.pdf=true
export.rtf=true
export.excel.class=org.displaytag.export.excel.DefaultHssfExportView
export.pdf.class=org.displaytag.export.DefaultPdfExportView
export.rtf.class=org.displaytag.export.DefaultRtfExportView
# if set, file is downloaded instead of opened in the browser window
export.excel.filename=logging_report.xls
export.excel.include_header=true

*Table.jsp*


 
 
  
 

 
 
 
 
 
 

 

Thanks.



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: After upgrading from Struts 2.0.x to 2.2.x, static content no longer served...

2010-10-19 Thread Alex Rodriguez Lopez
I'm using a combination of empty extension and exclusions for static 
content which works well now. Got pretty confused too at beginnning when 
I changed to an empty extension though:


http://struts.apache.org/2.2.1/docs/static-content.html

in web.xml:


struts2

  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

  

  
struts2
/*

  

and in struts.xml:


  


Eric Nielsen, 19-10-2010 05:21:

Li Ying wrote:

Are your setting:

?


Yes, I was intentionally setting the extension to the empty string.
This used to work under the SmartUrls plugin in 2.0.x days.  I've dug
though and found the comments in his source about how the author made
that work.

First switched to using "action" as the extension and all the filter
mappings to "*.action" -- things worked again, but had urls of a form
I don't prefer.

Started to port the SmartURL changes into a custom subclass of
FilterDispatcher -- and noticed that its deprecated and I should have
used the StrutsExecuteFilter and StrutsPrepareFilter instead.
Abandoned the port and switched to the correct filters and the empty
extension.  Static content worked again.

Changed some jsps, restarted server -- static content stopped working,
very confused.
Switched to the "," value you suggested in the followup email and that
seems to have fixed the static content again, but something broke the
taglibs.

Started getting the "According to TLD or attribute directive in tag
file, attribute href does not accept any expressions" error but I'm
using the correct tag lib:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core";prefix="c" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
and this was working fine before.

Dug deeper trying to see if I had missed other filter/servlet changes
over the past couple of years, and yes I had.

Tried following the directions on:
http://struts.apache.org/2.x/docs/sitemesh-plugin.html
but can't seem to figure out how to combine that with spring -- If I
don't use the Struts Listener Freemarker won't start; if I don't use
the Spring listener none of my beans get injected.  Can't seem to use
both.

I'm currently Googling trying to find example/tutorials using Struts
2.2.x, Spring, Sitemesh, and Freemarker, but so far all are either pre
2.1.6 (the new style fitlers) or leave off either spring or sitemesh.

If anyone can point out a good, modern tutorial/guide that deals with
Struts 2.2, Spring, Sitemesh, Freemarker, (and Hibernate) that would
be wonderful.  I feel like I'm currently fixing one thing, while
breaking another...

Thanks.



Try delete it, use the default setting instead.

I take a quick look of the struts source code.

In [org.apache.struts2.dispatcher.mapper.DefaultActionMapper],

it use the extension of request url to detect if this request should
be mapped to an Action.

If you set this constant to "", then DefaultActionMapper will map all
the request to Action.

You can read the source of method
[getMapping]/[dropExtension]/[dropExtension] for more information.

On Mon, Oct 18, 2010 at 4:25 PM, Eric Nielsen  wrote:

I recently upgraded from Struts 2.0.x + SmartURLs to Struts 2.2.1 +
Convention plugin.  However after upgrading all my static content is
no longer being served.  I read all the release notes along the way
that I could find and nothing suggests that my old approach should
have stopped working.  Can anyone point out what else I need to
change/tweak to get static content behaving again?  I'm guessing
its related to my have a "" action extension?

I'm using Maven as the build system.
static content is at
src/main/webapp/css
/javascript
/template
/WEB-INF


Here are my filters from web.xml


  struts-cleanup
  
org.apache.struts2.dispatcher.ActionContextCleanUp


  sitemesh
  
org.apache.struts2.sitemesh.FreemarkerPageFilter


  Spring OpenEntityManagerInViewFilter
  
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter


  struts
  
org.apache.struts2.dispatcher.FilterDispatcher



  struts-cleanup
  /*


  sitemesh
  /*


  Spring OpenEntityManagerInViewFilter
  /*


  struts
  /*


Here's the root node and contents of the struts.xml:

  
  
  
  

  

  
class="com.ballroomregistrar.compinabox.online.web.interceptors.WebSessionReattachmentInterceptor"

/>
  
  
  




  



  /account/login
  /accessDenied.

   





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional c

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Alex Rodriguez Lopez

try it without the first /

like 
changed javascript paths as follows:



Domain Security Administrator: Pas gebruiker aan