Re: Unable to verify action class

2008-01-21 Thread Gunnar Boström

Hi,
I've just found a way to do precisely what you proposed, hanks,

Regards
Gunnar

Laurie Harper wrote:
> 
> Gunnar Boström wrote:
>> Hi,
>> 
>> How can I make the org.apache.struts2.dispatcher.FilterDispatcher NOT to
>> verify action classes when the Tomcat web server starts?
>> 
>> I use struts 2 together with spring and the actions classes communicate
>> with
>> the server application with rmi. 
>> The action classes are defined with lazy-init="true" because I would like
>> to
>> be able to start the web application without the rmi server started, but
>> it
>> looks like the filterDispatcher will try to instantiate the classes and
>> then
>> the connection to the server fails.
> 
> I don't know if there is any way to turn off that behaviour. Your best 
> bet is probably to make your actions smarter, so that they can be 
> instantiated even when the RMI server is unavailable. In other words, 
> make the RMI connection initiation on demand rather than on action 
> instantiation.
> 
> L.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unable-to-verify-action-class-tp14996495p15013677.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]



回复:best way for handling i18n

2008-01-21 Thread 张云勇
use the custome 标签


在2008-01-22,"akshi gupta" <[EMAIL PROTECTED]> 写道:
>Can anybody tell me the best way of handling i18n in struts2.
>
>The problem is everyone is using their own properties files for 
>internationalization due to which messages are conflicting with each 
>others properties file even i only have 4 properties files and my own 
>messages are conflicting .
>
>So can anyone please tell me the right way for handling 
>internationalization..
>
>if we'll keep only one properties file for internationalization then it 
>become really really huge .
>
>So what can be the alternate
>
>Please Please tell me the solution..
>
>Thanks.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

best way for handling i18n

2008-01-21 Thread akshi gupta

Can anybody tell me the best way of handling i18n in struts2.

The problem is everyone is using their own properties files for 
internationalization due to which messages are conflicting with each 
others properties file even i only have 4 properties files and my own 
messages are conflicting .


So can anyone please tell me the right way for handling 
internationalization..


if we'll keep only one properties file for internationalization then it 
become really really huge .


So what can be the alternate

Please Please tell me the solution..

Thanks.

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



Re: Scriplets not working in tags

2008-01-21 Thread The_Developer

Thanks Laurie,

I tried the solution you gave but to no avail. Here's what i did,

<%
int i=0;
%>


 
  

and the resulting output was,



I tried this before also and got the same output which is why I am confused.

The_Developer


The_Developer wrote:
> 
> Hi,
> 
> I've been trying to use scriptlets and/or  tags inside
>  and  tags. However it
> seems that in either case the expression is not evaluated at runtime. The
> end result is something like this
> 
> abc and
> 
> 
> when the I intended the output to be something like
> 
> abc and
> 
> 
> Does anyone know why this is happening or am I making a mistake?
> 
> Many Thanks
> 

-- 
View this message in context: 
http://www.nabble.com/Scriplets-not-working-in-%3Chtml%3Axyz%3E-tags-tp14993571p15012971.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: [Struts2] Ajax anchor tag problem

2008-01-21 Thread WongTseng
since the request is sent via ajax, so the browser side redirect can
not work. i suggest you don't redirect you user directly, instead you
send back a piece of js, let the js redirect the browser.

window.location='xxx';


2008/1/21, Raghuveer Rawat <[EMAIL PROTECTED]>:
> Thanks Robi, I think you are right but how to come out of this ajax call if
> something goes wrong.sometimes I am getting some technical error and
> error page is also opening under target div.
> Is there anyone who faced this issue early?
>
>
> On Jan 21, 2008 3:29 PM, Roberto Nunnari <[EMAIL PROTECTED]> wrote:
>
> > oopss.. sorry.. I read your post to fast and didn't notice you already
> > tried redirect-action..
> >
> > I believe the problem is that it's not the browser who is getting the
> > redirect message from the server, but the ajax async call system, and so
> > it puts the login form in the div, as it was instructed.. but as I'm
> > not an ajax guru, I could be wrong.
> >
> > Best regards.
> >
> > --
> > Robi
> >
> >
> > Roberto Nunnari wrote:
> > > try this:
> > >
> > > login
> > >
> > > Best regards.
> > >
> > > --
> > > Robi
> > >
> > >
> > > Raghuveer Rawat wrote:
> > >> Hi, I have a requirement where only logged in users are allowed to put
> > >> their
> > >> comment. I have implemented that form with struts2 ajax theme...anchor
> > >> has
> > >> theme="ajax"
> > >>
> > >> If logged in user  puts his comment then  everything  works fine
> > >> perfectly..I am able to see text message returned from action in target
> > >> div
> > >>
> > >> But when a user who is not logged in and try to put this comment..I
> > >> want to
> > >> redirect user to login page..*but there what is happening here is that
> > >> login
> > >> page is also streaming back and it is opening in target div..*
> > >>
> > >> Any idea how to redirect user to login page..
> > >>
> > >> Below is my action class method..
> > >>
> > >> public String addComment() {
> > >> try{
> > >> UserTO userTo = null;
> > >> Object user = this.getSession().get("user");
> > >> if(user == null){
> > >> return Action.LOGIN;
> > >> }else{
> > >> userTo = (UserTO) user;
> > >> }
> > >> this.getCommentTo().setUserId(userTo.getUserId());
> > >> this.getCommentTo().setArticleId(this.getArticleId());
> > >>
> > >> this.getCommentService().addComment(this.getCommentTo());
> > >> HttpServletResponse response =
> > >> ServletActionContext.getResponse
> > >> ();
> > >> //inputStream = new StringBufferInputStream("Comment Posted
> > >> Successfully.");
> > >> String successMsg = "Thanks for posting comment. Your
> > comment
> > >> has been added successfully.";
> > >> byte[] contents = successMsg.getBytes();
> > >> response.getOutputStream().write(contents);
> > >>
> > >> }catch(Exception ex){
> > >> LOG.error("Exception in myArticles():"+ ex);
> > >> return Action.ERROR;
> > >> }
> > >> return null;
> > >> }
> > >>
> > >>
> > >> This is my comment form...
> > >>
> > >>
> > >> 
> > >> 
> > >>
> > >>
> > >>  > >> cellpadding="2">
> > >> 
> > >>   Your
> > >> Comments
> > >>   
> > >>   
> > >>  > >> cols="40">
> > >> 
> > >> 
> > >> 
> > >>    
> > >>   
> > >>
> > >>   Add
> > >> Comment
> > >>   
> > >> 
> > >>   
> > >> 
> > >>
> > >> Below is struts.xml entry..I am using tiles and default results are
> > tile
> > >> definitionsI also tried using redirect-action and redirect but
> > >> that also
> > >> give same problem..
> > >>
> > >>  
> > >> login
> > >>
> > >> 
> > >>
> > >
> > >
> > > -
> > > 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]
> >
> >
>


-- 
Best Regards
Wong Tseng

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



Re: [Formatting data] - Format a number as currency

2008-01-21 Thread Alberto A. Flores
I'll recommend using using JSTL instead.


On Jan 21, 2008 8:11 PM, Pascal SEREMES-DAMAL <[EMAIL PROTECTED]>
wrote:

> Hi everyone!!!
>
> I'd like to know if it is possible to format a number into a currency with
> the struts taglib.
>
> Thanks.
>



-- 
Alberto
http://www.linkedin.com/in/aflores


[Formatting data] - Format a number as currency

2008-01-21 Thread Pascal SEREMES-DAMAL
Hi everyone!!!

I'd like to know if it is possible to format a number into a currency with
the struts taglib.

Thanks.


Re: [Struts2] Ajax anchor tag problem

2008-01-21 Thread Raghuveer Rawat
Thanks Robi, I think you are right but how to come out of this ajax call if
something goes wrong.sometimes I am getting some technical error and
error page is also opening under target div.
Is there anyone who faced this issue early?


On Jan 21, 2008 3:29 PM, Roberto Nunnari <[EMAIL PROTECTED]> wrote:

> oopss.. sorry.. I read your post to fast and didn't notice you already
> tried redirect-action..
>
> I believe the problem is that it's not the browser who is getting the
> redirect message from the server, but the ajax async call system, and so
> it puts the login form in the div, as it was instructed.. but as I'm
> not an ajax guru, I could be wrong.
>
> Best regards.
>
> --
> Robi
>
>
> Roberto Nunnari wrote:
> > try this:
> >
> > login
> >
> > Best regards.
> >
> > --
> > Robi
> >
> >
> > Raghuveer Rawat wrote:
> >> Hi, I have a requirement where only logged in users are allowed to put
> >> their
> >> comment. I have implemented that form with struts2 ajax theme...anchor
> >> has
> >> theme="ajax"
> >>
> >> If logged in user  puts his comment then  everything  works fine
> >> perfectly..I am able to see text message returned from action in target
> >> div
> >>
> >> But when a user who is not logged in and try to put this comment..I
> >> want to
> >> redirect user to login page..*but there what is happening here is that
> >> login
> >> page is also streaming back and it is opening in target div..*
> >>
> >> Any idea how to redirect user to login page..
> >>
> >> Below is my action class method..
> >>
> >> public String addComment() {
> >> try{
> >> UserTO userTo = null;
> >> Object user = this.getSession().get("user");
> >> if(user == null){
> >> return Action.LOGIN;
> >> }else{
> >> userTo = (UserTO) user;
> >> }
> >> this.getCommentTo().setUserId(userTo.getUserId());
> >> this.getCommentTo().setArticleId(this.getArticleId());
> >>
> >> this.getCommentService().addComment(this.getCommentTo());
> >> HttpServletResponse response =
> >> ServletActionContext.getResponse
> >> ();
> >> //inputStream = new StringBufferInputStream("Comment Posted
> >> Successfully.");
> >> String successMsg = "Thanks for posting comment. Your
> comment
> >> has been added successfully.";
> >> byte[] contents = successMsg.getBytes();
> >> response.getOutputStream().write(contents);
> >>
> >> }catch(Exception ex){
> >> LOG.error("Exception in myArticles():"+ ex);
> >> return Action.ERROR;
> >> }
> >> return null;
> >> }
> >>
> >>
> >> This is my comment form...
> >>
> >>
> >> 
> >> 
> >>
> >>
> >>  >> cellpadding="2">
> >> 
> >>   Your
> >> Comments
> >>   
> >>   
> >>  >> cols="40">
> >> 
> >> 
> >> 
> >>    
> >>   
> >>
> >>   Add
> >> Comment
> >>   
> >> 
> >>   
> >> 
> >>
> >> Below is struts.xml entry..I am using tiles and default results are
> tile
> >> definitionsI also tried using redirect-action and redirect but
> >> that also
> >> give same problem..
> >>
> >>  
> >> login
> >>
> >> 
> >>
> >
> >
> > -
> > 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 create a new Struts2 project with maven2?

2008-01-21 Thread Laurie Harper

Thai Dang Vu wrote:

Hi,

From http://cwiki.apache.org/confluence/display/WW/Struts+Maven+Archetypes, it 
says

mvn archetype:create -DgroupId=tutorial \
 -DartifactId=tutorial \
 -DarchetypeGroupId=org.apache.struts \
 -DarchetypeArtifactId=struts2-archetype-starter \
 -DarchetypeVersion=2.0.5-SNAPSHOT \
 
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository

but I don't want to use a snapshot version and I also don't want to use Struts2 
2.0.5 version either (Struts2 2.0.11 is available). How should I modify the 
above command?


I don't believe there has been a non-snapshot release of any of the 
Struts2 Maven archetypes. I would go ahead and use that version and just 
update the dependencies in the generated pom.xml to bring the Struts 
version up to what you want.


L.


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



Re: [Struts2] Ajax anchor tag problem

2008-01-21 Thread Roberto Nunnari

oopss.. sorry.. I read your post to fast and didn't notice you already
tried redirect-action..

I believe the problem is that it's not the browser who is getting the
redirect message from the server, but the ajax async call system, and so
it puts the login form in the div, as it was instructed.. but as I'm
not an ajax guru, I could be wrong.

Best regards.

--
Robi


Roberto Nunnari wrote:

try this:

login

Best regards.

--
Robi


Raghuveer Rawat wrote:
Hi, I have a requirement where only logged in users are allowed to put 
their
comment. I have implemented that form with struts2 ajax theme...anchor 
has

theme="ajax"

If logged in user  puts his comment then  everything  works fine
perfectly..I am able to see text message returned from action in target
div

But when a user who is not logged in and try to put this comment..I 
want to
redirect user to login page..*but there what is happening here is that 
login

page is also streaming back and it is opening in target div..*

Any idea how to redirect user to login page..

Below is my action class method..

public String addComment() {
try{
UserTO userTo = null;
Object user = this.getSession().get("user");
if(user == null){
return Action.LOGIN;
}else{
userTo = (UserTO) user;
}
this.getCommentTo().setUserId(userTo.getUserId());
this.getCommentTo().setArticleId(this.getArticleId());

this.getCommentService().addComment(this.getCommentTo());
HttpServletResponse response = 
ServletActionContext.getResponse

();
//inputStream = new StringBufferInputStream("Comment Posted
Successfully.");
String successMsg = "Thanks for posting comment. Your comment
has been added successfully.";
byte[] contents = successMsg.getBytes();
response.getOutputStream().write(contents);

}catch(Exception ex){
LOG.error("Exception in myArticles():"+ ex);
return Action.ERROR;
}
return null;
}


This is my comment form...

   




cellpadding="2">


  Your 
Comments

  
  




   
  

  Add
Comment
  

  


Below is struts.xml entry..I am using tiles and default results are tile
definitionsI also tried using redirect-action and redirect but 
that also

give same problem..

 
login






-
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: [Struts2] Ajax anchor tag problem

2008-01-21 Thread Roberto Nunnari

try this:

login

Best regards.

--
Robi


Raghuveer Rawat wrote:

Hi, I have a requirement where only logged in users are allowed to put their
comment. I have implemented that form with struts2 ajax theme...anchor has
theme="ajax"

If logged in user  puts his comment then  everything  works fine
perfectly..I am able to see text message returned from action in target
div

But when a user who is not logged in and try to put this comment..I want to
redirect user to login page..*but there what is happening here is that login
page is also streaming back and it is opening in target div..*

Any idea how to redirect user to login page..

Below is my action class method..

public String addComment() {
try{
UserTO userTo = null;
Object user = this.getSession().get("user");
if(user == null){
return Action.LOGIN;
}else{
userTo = (UserTO) user;
}
this.getCommentTo().setUserId(userTo.getUserId());
this.getCommentTo().setArticleId(this.getArticleId());

this.getCommentService().addComment(this.getCommentTo());
HttpServletResponse response = ServletActionContext.getResponse
();
//inputStream = new StringBufferInputStream("Comment Posted
Successfully.");
String successMsg = "Thanks for posting comment. Your comment
has been added successfully.";
byte[] contents = successMsg.getBytes();
response.getOutputStream().write(contents);

}catch(Exception ex){
LOG.error("Exception in myArticles():"+ ex);
return Action.ERROR;
}
return null;
}


This is my comment form...

   






  Your Comments
  
  




   
  

  Add
Comment
  

  


Below is struts.xml entry..I am using tiles and default results are tile
definitionsI also tried using redirect-action and redirect but that also
give same problem..

 
login






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



How to create a new Struts2 project with maven2?

2008-01-21 Thread Thai Dang Vu
Hi,

>From http://cwiki.apache.org/confluence/display/WW/Struts+Maven+Archetypes, it 
>says

mvn archetype:create -DgroupId=tutorial \
 -DartifactId=tutorial \
 -DarchetypeGroupId=org.apache.struts \
 -DarchetypeArtifactId=struts2-archetype-starter \
 -DarchetypeVersion=2.0.5-SNAPSHOT \
 
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository

but I don't want to use a snapshot version and I also don't want to use Struts2 
2.0.5 version either (Struts2 2.0.11 is available). How should I modify the 
above command?

Regards.





  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

[Struts2] Ajax anchor tag problem

2008-01-21 Thread Raghuveer Rawat
Hi, I have a requirement where only logged in users are allowed to put their
comment. I have implemented that form with struts2 ajax theme...anchor has
theme="ajax"

If logged in user  puts his comment then  everything  works fine
perfectly..I am able to see text message returned from action in target
div

But when a user who is not logged in and try to put this comment..I want to
redirect user to login page..*but there what is happening here is that login
page is also streaming back and it is opening in target div..*

Any idea how to redirect user to login page..

Below is my action class method..

public String addComment() {
try{
UserTO userTo = null;
Object user = this.getSession().get("user");
if(user == null){
return Action.LOGIN;
}else{
userTo = (UserTO) user;
}
this.getCommentTo().setUserId(userTo.getUserId());
this.getCommentTo().setArticleId(this.getArticleId());

this.getCommentService().addComment(this.getCommentTo());
HttpServletResponse response = ServletActionContext.getResponse
();
//inputStream = new StringBufferInputStream("Comment Posted
Successfully.");
String successMsg = "Thanks for posting comment. Your comment
has been added successfully.";
byte[] contents = successMsg.getBytes();
response.getOutputStream().write(contents);

}catch(Exception ex){
LOG.error("Exception in myArticles():"+ ex);
return Action.ERROR;
}
return null;
}


This is my comment form...

   






  Your Comments
  
  




   
  

  Add
Comment
  

  


Below is struts.xml entry..I am using tiles and default results are tile
definitionsI also tried using redirect-action and redirect but that also
give same problem..

 
login




Re: fly-out cross frame menu

2008-01-21 Thread Martin Gainty
since today is a federal holiday and most folks have the day off I'll offer
a suggestion

The first step is to d/l the flyout logic I would recommend this link as a
working example (which uses basic html/js)
http://www.msifc.com/flyout.htm

Struts wraps dojo controls.. since flyout is not available as a dojo control
or as an attribute then struts does not handle flyout
I *would* recommend contacting dojo staff at [EMAIL PROTECTED]
to inquire as to the timeable for incorporating flyout as a standalone
control or attribute of existing dojo controls..

Martin
- Original Message -
From: "Kavita Mehta" <[EMAIL PROTECTED]>
To: 
Sent: Monday, January 21, 2008 4:11 AM
Subject: fly-out cross frame menu


> Hi,
> I have to build a fly out cross frame menu . ...I have come across many
> paid products / trial versions but I want to know if struts supports such
> development ..and has any tag lib for this .
>
>
> Thanks in advance,
> Kavita
>
>
>
>
>
*DISCLAIMER*

>
> This message and/or attachment(s) contained here are confidential,
proprietary to HUGHES SYSTIQUE and its customers.
> Contents may be privileged or otherwise protected by law. The information
is solely intended for the entity it is
> addressed to. If you are not the intended recipient of this message, it is
strictly prohibited to read, forward,
> print, retain, copy or disseminate this message or any part of it. If you
have received this e-mail in error,
> please notify the sender immediately and delete the message.
>
>


>
>


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



Re: File upload using Dyna Action Form

2008-01-21 Thread nuwan chandrasoma
http://wiki.apache.org/struts/StrutsFileUpload

this link will help you. its just a matter of configuring the same from bean
in struts-config as a dyna action from

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

On Jan 21, 2008 9:55 AM, Vikash Manoranjan <[EMAIL PROTECTED]>
wrote:

> Dear Friends,
>
> I want to upload a file using Dyna Action Form. Any help will be
> appreciated. Thanks in advance.
>
> Vikash
>
>
>
>
>
>


Re: File Upload

2008-01-21 Thread Pablo Vázquez Blázquez

Hello again,

If I change:
load: function(type, data, evt){
 document.getElementById("mydiv").innerHTML =
data.firstChild.innerHTML;

for:

load: function(type, data, evt){
 document.getElementById("mydiv").innerHTML = 'HELLO';

it works. But I want to show the response content. Do you know why 
"data.firstChild.innerHTML" is "undefined"??


Thanks.


Pablo Vázquez Blázquez escribió:

Thanks for your reply.

I have looked the links below and I tried what it says:

The form:


 
 


The javascript:

function sendIt(){
  var bindArgs = {
  transport: "IframeTransport",
  formNode: document.getElementById("myform"),
  mimetype: "text/html",
  load: function(type, data, evt){
  document.getElementById("mydiv").innerHTML =
data.firstChild.innerHTML;
  }
  };
  var request = dojo.io.bind(bindArgs);
}

The div with id 'mydiv' will then get updated with the response from the
action.



Well, my form looks like this:

  action="AddPlugin" enctype="multipart/form-data" 
method="post">

  
   
   *:
   
   
   
   
   
   
   
   value="fieldErrors['uploadContentType'][0]" />

   
   
   
  
   
   
   onclick="sendMultiPartForm('addPluginForm', 'configAjaxContent'); 
return false;"

   cssClass="submit">
   
   
   
   
   
   
   
   
   targets="configAjaxContent"
showLoadingText="false" cssClass="reset" href="${CancelUrl}">

   
   
   
   
   
   
  

and my Javascript:

function sendMultiPartForm(formId, targetId) {
  dojo.require("dojo.io.IframeIO");
   var bindArgs = {
  transport: "IframeTransport",
  formNode: document.getElementById(formId),
  mimetype: "text/html",
  load: function(type, data, evt) {
  document.getElementById(targetId).innerHTML =
   data.firstChild.innerHTML;
  }
   };
 var request = dojo.io.bind(bindArgs);
}

Unfortunately, it is happening the same than before: the file is 
uploaded but my target div is not being updated with the action's 
response content. And, as before, if I want to upload another file, I 
must go first to another action and then, return to this one; if not, 
it doesn't work...



Am I missing sth? Doing sth wrong?






Jeromy Evans escribió:

hmm...that's interesting.

My approach would be to create a new blank struts application that 
just contains a file upload action. Get it to work without ajax as 
there still seems to be a configuration problem.


Then, when you're satisfied the configuration is correct... 
unfortunately you can't use s:form theme=ajax to perform a multi-part 
upload in Struts2.0.  To perform an asynchronous upload, you'll have 
to use Dojo's IFrameIO feature directly.  I haven't used it myself, 
but it's described in the following two posts:


http://www.mail-archive.com/user@struts.apache.org/msg60245.html
http://www.nabble.com/Image-Upload-and-Dojo-td14350527.html

I hope that helps!

Pablo Vázquez Blázquez wrote:
Error de lectura XML: contenido incorrecto tras un elemento XML del 
documento

Ubicación: http://localhost:8080/scheduler-admintool-1.0/AddPlugin.do
Número de línea 8, columna 1:name="addPluginForm" onsubmit="return true;" 
action="/scheduler-admintool-1.0/AddPlugin.do" method="post" 
enctype="multipart/form-data">

^

That´s the result if I try without the ajax theme on the form.

Yes, I would like to use the ajax theme.

Thanks.

Jeromy Evans escribió:
Are you deliberately trying to do an XHR file upload? Have you 
tried it without the ajax theme on the form?


Pablo Vázquez Blázquez wrote:
Yes yes, that debugging statement is executed. That´s why I know 
my plugin is created.


"Anadido plugin " + uploadFileName means "Added plugin " + 
uploadFileName.


And then, it goes to ShowPlugins and the debugging statement
log.debug("Obtenidos plugins"); (Getted all plugins) is also 
executed.




Cheng Wei Lee escribió:

Was this debugging statement executed?

   log.debug("Anadido plugin " + uploadFileName);


On Jan 18, 2008 12:13 AM, Pablo Vázquez Blázquez 
<[EMAIL PROTECTED]>

wrote:

 

Here I send you my JSP and Action code.

Yes, when I submit, the new plugin is added (I know it because 
of my

logs), but I don´t know why I don´t get the result page.

Thank you.

PD: I have now tried without struts.multipart.parser, but it 
doesn´t work.


** JSP **

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

   
   
 

Re: New Struts2 Book : Feedback Requested

2008-01-21 Thread bhaarat Sharma
please for sanity's sake do not have maven involved like this book did
http://www.apress.com/book/view/1590599039

This book was a disappointment for me.

Also, you should have a completely different chapter on struts2 html
tags.  Forums are filled with questions about s2 html tags and there
doesn't seem to be a book that documents them.  Heck, this above book
doesnt even have a chapter on it.

Also, showing how iBatis can be integrated with S2 would be good.
There are lot of books out there that show integration with hibernate
but none shows it with iBatis.

Good luck!

On Jan 21, 2008 5:21 AM, James Mitchell <[EMAIL PROTECTED]> wrote:
> Looks to be so .. "Struts2 Guide for Web Application Developers is a
> free Struts2 book made available through http://www.struts2.org. "
>
>
> On Jan 21, 2008 3:15 AM, Alvaro Sanchez-Mariscal
>
> <[EMAIL PROTECTED]> wrote:
> > > http://www.struts2.org/free-struts2-book/
> >
> > Will it be free?
> >
> > Alvaro.
> >
> >
> > --
> > Alvaro Sanchez-Mariscal Arnaiz
> > Java EE Architect & Instructor
> > [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> James Mitchell
>
>
> -
> 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: Unable to verify action class

2008-01-21 Thread Laurie Harper

Gunnar Boström wrote:

Hi,

How can I make the org.apache.struts2.dispatcher.FilterDispatcher NOT to
verify action classes when the Tomcat web server starts?

I use struts 2 together with spring and the actions classes communicate with
the server application with rmi. 
The action classes are defined with lazy-init="true" because I would like to

be able to start the web application without the rmi server started, but it
looks like the filterDispatcher will try to instantiate the classes and then
the connection to the server fails.


I don't know if there is any way to turn off that behaviour. Your best 
bet is probably to make your actions smarter, so that they can be 
instantiated even when the RMI server is unavailable. In other words, 
make the RMI connection initiation on demand rather than on action 
instantiation.


L.


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



Re: Struts2 and Quartz

2008-01-21 Thread Laurie Harper

Shantur Rathore wrote:

Hello Everyone,

I am new to Struts2. I am trying to work with Quartz and integrate it in my
Struts2 WebApp.
I found some info on Quartz and Struts2 at

http://struts.apache.org/2.x/docs/how-can-we-schedule-quartz-jobs.html

But i am still unclear what is the function of ActionJob? and how do i
schedule the jobs.

Any info would certainly be helpful


From a quick read-through, it looks like that document is attempting to 
illustrate how to get Quartz to execute a Struts2 action. If I were you, 
I wouldn't take that approach; rather, I would factor out the business 
logic that needs to be scheduled into a service layer class/method. You 
can then call it from either an action or a Quartz job. At that point, 
you would just use the regular Quartz API to schedule it.


L.


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



Re: Scriplets not working in tags

2008-01-21 Thread Laurie Harper

The_Developer wrote:

Hi,

I've been trying to use scriptlets and/or  tags inside
 and  tags. However it
seems that in either case the expression is not evaluated at runtime. The
end result is something like this

abc and


when the I intended the output to be something like

abc and


Does anyone know why this is happening or am I making a mistake?

Many Thanks


You're making a mistake: what you have is not valid JSP syntax. It is 
not legal to use a JSP custom action within an attribute of another 
custom action. Instead, use RT expressions or, preferably, JSTL EL:


  

Re: using YUI with struts 2

2008-01-21 Thread ravi_eze

thanks a ton jayson. i may require it later, shall check it then:)



Jayson Joseph Chacko wrote:
> 
> Hi Ravi,
> 
> Here is an example which uses YUI along with JSON to create a menu in
> Struts2. You might find it useful.
> http://www.struts2.org/creating-a-cascading-application-menu-using-struts2-and-yui
> 
> Regards,
> Jayson
> 
> On Jan 20, 2008 4:26 PM, ravi_eze <[EMAIL PROTECTED]> wrote:
> 
>>
>> hi Jeromy Evans,
>> Thanks for the quick reply. The YUI is working with the html tags also. I
>> dont know if this is documented anywhere; any how thanks for the help
>>
>>
>> :-)
>>
>> Jeromy Evans - Blue Sky Minds wrote:
>> >
>> > Hi Ravi,
>> >
>> > YUI doesn't require any specific tags.  AFAIK, they're all plain old
>> > valid html.  It can't get much better than that.
>> >
>> > ie. this is a TabView:
>> >
>> > 
>> > 
>> >  #tab1 Tab One Label 
>> >  #tab2 Tab Two Label 
>> >  #tab3 Tab Three Label 
>>  > 
>> > 
>> > Tab One Content
>> > Tab Two Content
>> > Tab Three Content
>> > 
>> > 
>> >
>> >
>> > It's instantiated with:
>> >
>> > var myTabs = new YAHOO.widget.TabView("demo");
>> >
>> > Which adds additional valid html markup to the DOM.
>> >
>> > You can create a TagLib or Struts2 tags for commonly used widgets if
>> you
>> > like, as provided by the YUI plugin, but this doesn't add much value.
>> > For instance, I've created a TabView tags like this:
>> >
>> > 
>> >   Tab One Content
>> >   Tab Two Content
>> >   Tab Three Content
>> > 
>> >
>> > That renders the original HTML above.  The value this adds over the
>> > original HTML is dubious considering the effort it took to write the
>> > custom-tag and the clarity of the original code.  Writing custom tags
>> > for the DataTable, TreeView, Charts etc are definitely not worth the
>> > effort because the tags can't replicate the functionality of the API.
>> >
>> > What exactly were  you hoping for?
>> >
>> > regards,
>> >  Jeromy Evans
>> >
>> > ravi_eze wrote:
>> >> hi,
>> >>
>> >> i want to use YUI library (http://developer.yahoo.com/yui/) with
>> struts2.
>> >> The problem is that YUI requires YUI specific tags while struts
>> generates
>> >> html tags. so, can we write themes(ftls etc similar to xhtml etc)
>> which
>> >> would generate YUI tags instead of HTML? would this bring in new
>> >> problems?
>> >> or did any one have tried this? YUI plugin is provided but its alpha
>> >> version
>> >> and doesnt provide all components that we require.
>> >>
>> >> any help?
>> >>
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/using-YUI-with-struts-2-tp14978453p14980470.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]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/using-YUI-with-struts-2-tp14978453p14999390.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: using YUI with struts 2

2008-01-21 Thread Ted Husted
Does this count as being documented

 * http://struts.apache.org/2.x/docs/ajax.html

or do we need something more specific?

-Ted.

On Jan 20, 2008 5:56 AM, ravi_eze <[EMAIL PROTECTED]> wrote:
>
> hi Jeromy Evans,
> Thanks for the quick reply. The YUI is working with the html tags also. I
> dont know if this is documented anywhere; any how thanks for the help
>
>
> :-)
>
> Jeromy Evans - Blue Sky Minds wrote:
> >
> > Hi Ravi,
> >
> > YUI doesn't require any specific tags.  AFAIK, they're all plain old
> > valid html.  It can't get much better than that.
> >
> > ie. this is a TabView:
> >
> > 
> > 
> >  #tab1 Tab One Label 
> >  #tab2 Tab Two Label 
> >  #tab3 Tab Three Label 
>
> > 
> > 
> > Tab One Content
> > Tab Two Content
> > Tab Three Content
> > 
> > 
> >
> >
> > It's instantiated with:
> >
> > var myTabs = new YAHOO.widget.TabView("demo");
> >
> > Which adds additional valid html markup to the DOM.
> >
> > You can create a TagLib or Struts2 tags for commonly used widgets if you
> > like, as provided by the YUI plugin, but this doesn't add much value.
> > For instance, I've created a TabView tags like this:
> >
> > 
> >   Tab One Content
> >   Tab Two Content
> >   Tab Three Content
> > 
> >
> > That renders the original HTML above.  The value this adds over the
> > original HTML is dubious considering the effort it took to write the
> > custom-tag and the clarity of the original code.  Writing custom tags
> > for the DataTable, TreeView, Charts etc are definitely not worth the
> > effort because the tags can't replicate the functionality of the API.
> >
> > What exactly were  you hoping for?
> >
> > regards,
> >  Jeromy Evans
> >
> > ravi_eze wrote:
> >> hi,
> >>
> >> i want to use YUI library (http://developer.yahoo.com/yui/) with struts2.
> >> The problem is that YUI requires YUI specific tags while struts generates
> >> html tags. so, can we write themes(ftls etc similar to xhtml etc) which
> >> would generate YUI tags instead of HTML? would this bring in new
> >> problems?
> >> or did any one have tried this? YUI plugin is provided but its alpha
> >> version
> >> and doesnt provide all components that we require.
> >>
> >> any help?

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



Re: Question on validation

2008-01-21 Thread Martin Braure de Calignon

Le lundi 21 janvier 2008 à 14:35 +0100, Martin Braure de Calignon a
écrit :
> Hello :-),
> 
> I have two questions, the first one is more important for me :
> I have a validation xml files, but I want to validate only if user click
> on 'OK' button, and not on 'Cancel'. How to do this ? Do I have to make
> all my fields as expression or fieldexpression and test the value of the
> submit button ?
Well, ok my problem was that my cancel button wasn't defined a action=
inside it, so it goes throw the validator.xml of 'Ok' button.

Sorry in fact the problem is to deal with conversion errors and cancel
button. For example, for a Date field, user input is 'd', which
throw a conversion exception. So 'input' result is throw... Can I ignore
all the value of field of my form on cancel button ? For the moment, I
add a onclick="this.form.reset()" to my submit button. And it works...
Any  other possibility ?

(Sorry for the noise)

-- 
Martin Braure de Calignon



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



Question on validation

2008-01-21 Thread Martin Braure de Calignon
Hello :-),

I have two questions, the first one is more important for me :
I have a validation xml files, but I want to validate only if user click
on 'OK' button, and not on 'Cancel'. How to do this ? Do I have to make
all my fields as expression or fieldexpression and test the value of the
submit button ?

The second question is more complicated. When there's a validation
error, I want to display back the page but with errors.
I'm using wildcard action, and per-method (per-alias) validation.
What I've done for the moment, but I think it's not a clear method, is
to have an interceptor (BackViewInterceptor), that intercept the result
'input', and change it to the previous result.
But this solution only works on simple cases. Is there's a better way of
handling such a behaviour ?


Thank you all,
-- 
Martin Braure de Calignon



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



Re: Pretty urls without .action

2008-01-21 Thread jignesh.patel

Hi,
This is my web.xml


Project Name


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



struts2
   
org.apache.struts2.dispatcher.FilterDispatcher


sitemesh
   
com.opensymphony.module.sitemesh.filter.PageFilter


struts-cleanup
/*


sitemesh
/*


struts2
/*


   
60



ISP_View/index.html




This is my sample struts.xml














  
/XXX_View/temp.jsp
/XXX_View/temp.jsp
/XXX_View/temp.jsp




struts.properties file

struts.devMode = true
struts.enable.SlashesInActionNames=true
struts.multipart.parser=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest


And url works fine with .action and .com not works only with /email or every
action name without .action ext. ):

And one more thing i am using sitemesh,but i think it not a big issue at
all.

Br,
jignesh





jignesh.patel wrote:
> 
> Hi,
> 
> Still not able to call without any domain name like .action,.com
> 
> URL:- http://host:8080/email(withour . extension)
> Error Page:-
> 
> type Status report
> message /email
> description The requested resource (/email) is not available.   
> 
> My struts.properties file
> 
> struts.devMode = true
> struts.enable.SlashesInActionNames=true
> struts.multipart.parser=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest
> struts.action.extension=action,,com
> 
> Have u check it with your struts application any time before..
> 
> Plz reply
> 
> 
> 
> Jeromy Evans - Blue Sky Minds wrote:
>> 
>> Yes, the constant "struts.action.extension" takes a comma separated list:
>> 
>> eg.
>> struts.action.extension=action,,
>> 
>> The double comma above means "blank" is a valid extension
>> 
>> You can add that to struts.properties, struts.xml or web.xml: 
>> http://struts.apache.org/2.x/docs/constant-configuration.html
>> You'll have to take care with your mod_jk mappings.
>> 
>> jignesh(india) wrote:
>>> Hi,
>>> I am having struts2 application ready with my tomcat server.Now i
>>> want
>>> to host it with apache server,but it should be looks like pretty one.
>>> I mean i want my urls without .action,.do or anything just like action
>>> name
>>> nothing more.Is this possible in struts2
>>> e.g 
>>> https://kily.myseaversite.com/category.action should be work like
>>> https://kily.myseaversite.com/category
>>>
>>> Can anybody help me..?
>>>
>>> Thanks in advanced
>>> Br,jignesh
>>>
>>>   
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Pretty-urls-without-.action-tp14947106p14997182.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]



Unable to verify action class

2008-01-21 Thread Gunnar Boström

Hi,

How can I make the org.apache.struts2.dispatcher.FilterDispatcher NOT to
verify action classes when the Tomcat web server starts?

I use struts 2 together with spring and the actions classes communicate with
the server application with rmi. 
The action classes are defined with lazy-init="true" because I would like to
be able to start the web application without the rmi server started, but it
looks like the filterDispatcher will try to instantiate the classes and then
the connection to the server fails.

regards
Gunnar


-- 
View this message in context: 
http://www.nabble.com/Unable-to-verify-action-class-tp14996495p14996495.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]



[Somewhat OT] RSS lib for Struts app?

2008-01-21 Thread Manos Batsis


Hello,

This is somewhat OT but can someone please suggest a java RSS lib for my 
struts1 app? What I want to do is fetch, cache (daily) and display the 
latest one or two news items from a set of different feeds in jsp 2.0 
pages so any taglibs along with the lib would be great.


A quick search gives Rome [1] and Informa [2] but it looks like they 
haven't been updated for a year or more. Thanks in advance.


[1] https://rome.dev.java.net/
[2] http://informa.sourceforge.net/

Cheers,

Manos

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



Re: Pretty urls without .action

2008-01-21 Thread Jeromy Evans

Hi,

Yes, I'm 100% certain this option allows struts to use a blank and/or 
alternative extensions. 
I just tried "action,,com" myself and it works loading my 
"/test/test.action, /test/test.com and "/test/test". 


Did /email.action work?  Did /email.com work?
Do you have the mentioned filter mapping in web.xml?  (/*)
Did the struts2 filter actually start?
Is struts.properties deployed in the correct location? (WEB-INF/classes/)
Have you tested from localhost?

It's unusual that you have "struts.enable.SlashesInActionNames=true" but 
I've confirmed that doesn't affect this URL either.  I'm using struts 
2.1 but I'm certain this is a 2.0 feature.


Hope that helps isolate the problem
regards,
Jeromy Evans

jignesh.patel wrote:

Hi,

Still not able to call without any domain name like .action,.com

URL:- http://host:8080/email(withour . extension)
Error Page:-

type Status report
message /email
description The requested resource (/email) is not available.   


My struts.properties file

struts.devMode = true
struts.enable.SlashesInActionNames=true
struts.multipart.parser=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest
struts.action.extension=action,,com

Have u check it with your struts application any time before..

Plz reply



Jeromy Evans - Blue Sky Minds wrote:
  

Yes, the constant "struts.action.extension" takes a comma separated list:

eg.
struts.action.extension=action,,

The double comma above means "blank" is a valid extension

You can add that to struts.properties, struts.xml or web.xml: 
http://struts.apache.org/2.x/docs/constant-configuration.html

You'll have to take care with your mod_jk mappings.

jignesh(india) wrote:


Hi,
I am having struts2 application ready with my tomcat server.Now i
want
to host it with apache server,but it should be looks like pretty one.
I mean i want my urls without .action,.do or anything just like action
name
nothing more.Is this possible in struts2
e.g 
https://kily.myseaversite.com/category.action should be work like

https://kily.myseaversite.com/category

Can anybody help me..?

Thanks in advanced
Br,jignesh

  
  

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



Struts2 and Quartz

2008-01-21 Thread Shantur Rathore
Hello Everyone,

I am new to Struts2. I am trying to work with Quartz and integrate it in my
Struts2 WebApp.
I found some info on Quartz and Struts2 at

http://struts.apache.org/2.x/docs/how-can-we-schedule-quartz-jobs.html

But i am still unclear what is the function of ActionJob? and how do i
schedule the jobs.

Any info would certainly be helpful

Thanks,
Shantur


Struts 2: hibernate optimistic locking - allows user to merge conflicting data

2008-01-21 Thread Cheng Wei Lee
Currently for client/server side validation, struts is able to maintain the
data and shows it to the user, with the error messages and preserved user
input. I'm using Hibernate for persistence. The StaleObjectStateException is
caught inside the filter that I use to set up the Hibernate session. How
would I then be able to get the object that Hibernate tries to persist?

If I take this exception handling into my action class, this would expose
the Hibernate API which I'm trying to avoid.

If I could get the object that causes the exception, how could I then
display to the user both sets of data? The new and conflicting ones? Does
Struts 2 support this type of displaying, or I've to add it in myself?

Thanks!


Re: New Struts2 Book : Feedback Requested

2008-01-21 Thread James Mitchell
Looks to be so .. "Struts2 Guide for Web Application Developers is a
free Struts2 book made available through http://www.struts2.org. "


On Jan 21, 2008 3:15 AM, Alvaro Sanchez-Mariscal
<[EMAIL PROTECTED]> wrote:
> > http://www.struts2.org/free-struts2-book/
>
> Will it be free?
>
> Alvaro.
>
>
> --
> Alvaro Sanchez-Mariscal Arnaiz
> Java EE Architect & Instructor
> [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
James Mitchell

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



Scriplets not working in tags

2008-01-21 Thread The_Developer

Hi,

I've been trying to use scriptlets and/or  tags inside
 and  tags. However it
seems that in either case the expression is not evaluated at runtime. The
end result is something like this

abc and


when the I intended the output to be something like

abc and


Does anyone know why this is happening or am I making a mistake?

Many Thanks
-- 
View this message in context: 
http://www.nabble.com/Scriplets-not-working-in-%3Chtml%3Axyz%3E-tags-tp14993571p14993571.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]



fly-out cross frame menu

2008-01-21 Thread Kavita Mehta
Hi,
I have to build a fly out cross frame menu . ...I have come across many 
paid products / trial versions but I want to know if struts supports such 
development ..and has any tag lib for this .


Thanks in advance,
Kavita




*DISCLAIMER*

This message and/or attachment(s) contained here are confidential, proprietary 
to HUGHES SYSTIQUE and its customers. 
Contents may be privileged or otherwise protected by law. The information is 
solely intended for the entity it is 
addressed to. If you are not the intended recipient of this message, it is 
strictly prohibited to read, forward, 
print, retain, copy or disseminate this message or any part of it. If you have 
received this e-mail in error, 
please notify the sender immediately and delete the message.





Re: New Struts2 Book : Feedback Requested

2008-01-21 Thread Al Sutton

Jayson,

Some comments;

1) Reduce the amount of side bars. At the moment the readability is impaired 
by having two right hand bars reducing the meat of your book to only 2/3rds 
of the width of the page.


2) Put up more than one chapter. If you want comments on your formatting 
then we need to see the whole book.


3) You need more background explanation. The section "Developing Your First 
Struts2 Application" doesn't explain what the files you've given actually 
do. It ends up being more of a "cut, paste, run, sit back and wonder why you 
still wouldn't know how to change it".


4) Improve your English.  The phrase "Following are the files we need in 
struts2demo project and the purpose of each of them is also given." sounds 
like it's come from a badly translated manual.


If you want a good example of a readable book with excellent explanations 
have a look at Ians' "Starting Struts 2" book, I've picked up a couple of 
things from it and have found it easy to read (which reminds me I must go 
and post a review on Amazon).


Al.


- Original Message - 
From: "Jayson Joseph Chacko" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Monday, January 21, 2008 7:19 AM
Subject: New Struts2 Book : Feedback Requested



Hi Guys,

I am working on a new Struts2 book titled - "Struts2 Guide for Web
Application Developers".
The target audience is Web application developers starting on Struts2
framework.
I have created some sample chapters and an overall book layout. You can 
see

it at ,

http://www.struts2.org/free-struts2-book/
I require feedback on the book content/layout and any suggestions for new
topics to be included.
I plan to complete the book after Struts 2.1 is released.

TIA,
Jayson




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



Re: File Upload

2008-01-21 Thread Pablo Vázquez Blázquez

Thanks for your reply.

I have looked the links below and I tried what it says:

The form:


 
 


The javascript:

function sendIt(){
  var bindArgs = {
  transport: "IframeTransport",
  formNode: document.getElementById("myform"),
  mimetype: "text/html",
  load: function(type, data, evt){
  document.getElementById("mydiv").innerHTML =
data.firstChild.innerHTML;
  }
  };
  var request = dojo.io.bind(bindArgs);
}

The div with id 'mydiv' will then get updated with the response from the
action.



Well, my form looks like this:

  action="AddPlugin" enctype="multipart/form-data" method="post">
   
   

   
   *:
   
   
   
   
   
   
   
   
   
   
   
   
   

   
   
  onclick="sendMultiPartForm('addPluginForm', 'configAjaxContent'); return false;"

   cssClass="submit">
   
   
   
   
   
   
   
   
  showLoadingText="false" cssClass="reset" href="${CancelUrl}">

   
   
   
   
   
   
   
   


and my Javascript:

function sendMultiPartForm(formId, targetId) {
   
   dojo.require("dojo.io.IframeIO");

   var bindArgs = {
  transport: "IframeTransport",
  formNode: document.getElementById(formId),
  mimetype: "text/html",
  load: function(type, data, evt) {
  document.getElementById(targetId).innerHTML =
   data.firstChild.innerHTML;
  }
   };
  
   var request = dojo.io.bind(bindArgs);

}

Unfortunately, it is happening the same than before: the file is uploaded but my target div is not being updated with the action's response content. 
And, as before, if I want to upload another file, I must go first to another action and then, return to this one; if not, it doesn't work...



Am I missing sth? Doing sth wrong?






Jeromy Evans escribió:

hmm...that's interesting.

My approach would be to create a new blank struts application that 
just contains a file upload action. Get it to work without ajax as 
there still seems to be a configuration problem.


Then, when you're satisfied the configuration is correct... 
unfortunately you can't use s:form theme=ajax to perform a multi-part 
upload in Struts2.0.  To perform an asynchronous upload, you'll have 
to use Dojo's IFrameIO feature directly.  I haven't used it myself, 
but it's described in the following two posts:


http://www.mail-archive.com/user@struts.apache.org/msg60245.html
http://www.nabble.com/Image-Upload-and-Dojo-td14350527.html

I hope that helps!

Pablo Vázquez Blázquez wrote:
Error de lectura XML: contenido incorrecto tras un elemento XML del 
documento

Ubicación: http://localhost:8080/scheduler-admintool-1.0/AddPlugin.do
Número de línea 8, columna 1:name="addPluginForm" onsubmit="return true;" 
action="/scheduler-admintool-1.0/AddPlugin.do" method="post" 
enctype="multipart/form-data">

^

That´s the result if I try without the ajax theme on the form.

Yes, I would like to use the ajax theme.

Thanks.

Jeromy Evans escribió:
Are you deliberately trying to do an XHR file upload? Have you tried 
it without the ajax theme on the form?


Pablo Vázquez Blázquez wrote:
Yes yes, that debugging statement is executed. That´s why I know my 
plugin is created.


"Anadido plugin " + uploadFileName means "Added plugin " + 
uploadFileName.


And then, it goes to ShowPlugins and the debugging statement
log.debug("Obtenidos plugins"); (Getted all plugins) is also executed.



Cheng Wei Lee escribió:

Was this debugging statement executed?

   log.debug("Anadido plugin " + uploadFileName);


On Jan 18, 2008 12:13 AM, Pablo Vázquez Blázquez 
<[EMAIL PROTECTED]>

wrote:

 

Here I send you my JSP and Action code.

Yes, when I submit, the new plugin is added (I know it because of my
logs), but I don´t know why I don´t get the result page.

Thank you.

PD: I have now tried without struts.multipart.parser, but it 
doesn´t work.


** JSP **

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

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  

Re: New Struts2 Book : Feedback Requested

2008-01-21 Thread Alvaro Sanchez-Mariscal
> http://www.struts2.org/free-struts2-book/

Will it be free?

Alvaro.


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

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