Transaction Token Problem

2007-08-27 Thread Thomas.Zygadlewicz
Hi, 
Im having some trouble implementing the Transaction Token into my
Application. 
Ive checked the Data that is being written - and it seems one of the
session-keys isnt being written.
 
HttpSession session1 = req.getSession(false);
String saved1 = (String)
session1.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
System.out.println(ReqIN==+ saved1);
String tokenBefore = req.getParameter(Globals.TOKEN_KEY);
 
System.out.println(ReqIN-RequestTokenBeforeSave:==
+ tokenBefore);
 saveToken(req);
String tokenAfter = req.getParameter(Globals.TOKEN_KEY);
 
System.out.println(ReqIN-RequestTokenAfterSave:==+
tokenAfter);
HttpSession session2 = req.getSession(false);
String saved2 = (String)
session2.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
System.out.println(ReqIN==+ saved2);
 
saveToken seems to save the Globals.TRANSACTION_TOKEN_KEY correctly -
but the Globals.TOKEN_KEY always stays empty...
how can this be? and how can I fix that?
 
thanks guys.
 
regards, Tom


Re: Actions with same name but different packages namespaces

2007-08-27 Thread Alvaro Sanchez-Mariscal
You're right. I assumed that default namespace was package name.

Thank you!.

On 8/25/07, Laurie Harper [EMAIL PROTECTED] wrote:
 Alvaro Sanchez-Mariscal wrote:
  Hi,
 
  Is it possible to have actions with the same name but different
  packages  namespaces?
 
  package name=dashboard extends=hidra3-default
 action name=main
result/WEB-INF/jsp/dashboard/main.jsp/result
 /action
  /package
 
  package name=search extends=hidra3-default
 action name=main
result/WEB-INF/jsp/search/main.jsp/result
 /action
  /package
 
  Always, the first JSP declared in the XML file is returned. If we
  change action name to be uniques, everything works.
 
  What's wrong?

 What's wrong is that you don't have different packages  namespaces; you
 only have different packages. A package is not the same thing as a
 namespace.

 http://struts.apache.org/2.x/docs/package-configuration.html
 http://struts.apache.org/2.x/docs/namespace-configuration.html

 L.


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




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

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



[S2] Refresh JSP in Tomcat 5.5

2007-08-27 Thread hezjing
Hi

I have a index.html that will redirect to WelcomeAction,

= index.html =
html
head
META HTTP-EQUIV=Refresh CONTENT=0;URL=welcome.action
/head
body
pLoading .../p
/body
/html


WelcomeAction does nothing but simply returns success from execute().

= WelcomeAction.java =
public class WelcomeAction extends ActionSupport {
public String execute() throws Exception {
return SUCCESS;
}
}


Struts will then forward the result to index.jsp,

= struts.xml =
struts
  constant name=struts.objectFactory value=spring /
  constant name=struts.devMode value=true /
  package name=example extends=struts-default
action name=welcome class=welcomeAction method=execute
  resultindex.jsp/result
/action
  /package
/struts

= index.jsp =
html
head
titleTITLE/title
/head
body
/body
/html


All of this is working fine, I entered
http://localhost:8080/myapp/index.html and the IE6 displayed the
index.jsp.

However, it will not display the latest JSP after I modified the
content (e.g. the title) of the index.jsp until I restart Tomcat
service.

Do you know how to reload the JSP without restarting the Tomcat?


Note: this seems to be not a Tomcat problem because it was able to
display the latest JSP when I took out all the Struts 2's action and
configuration.


-- 

Hez

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



Re: Tiles and struts tags

2007-08-27 Thread Antonio Petrelli
2007/8/11, Jim Reynolds [EMAIL PROTECTED]:

 Struts 1.29 app that uses tiles definitions. Question is: I am finding
 myself having to call the  taglib in the layout, and also in each
 tile. If I take the taglib out of any of the jsp pages that is a tile,
 then the page fails to display because it cannot find the taglib from
 the template layout.

 Is this the correct behavior, or is there any way to only include
 needed taglib (html, bean, tiles, etc) only once somewhere?



The behaviour is correct: it's a JSP specification.

Antonio


RE: [S2] Refresh JSP in Tomcat 5.5

2007-08-27 Thread Andrei Sauchanka
Hi, You can try to replace your index.jsp in tomcat directory where tom cat 
copies your apps. For example [tom cat dir]/webapps/[Your apps]/ It works 
without restarting tom cat server, just refresh your page in IE (Ctrl+F5).

Andrei Sauchanka,
Software Engineer
EPAM Systems
Gomel office, Belarus (GMT+2)
Office fax: +375 (23) 553-200
Mobile: +375 (29) 236-66-04, 124-42-68
E-mail: [EMAIL PROTECTED]
WWW: http://www.epam.com

CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or entity(ies) 
to which it is addressed and contains information that is legally privileged 
and confidential. If you are not the intended recipient, or the person 
responsible for delivering the message to the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. All unintended recipients are obliged to 
delete this message and destroy any printed copies.


-Original Message-
From: hezjing [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 27, 2007 11:19
To: struts-users
Subject: [S2] Refresh JSP in Tomcat 5.5

Hi

I have a index.html that will redirect to WelcomeAction,

= index.html =
html
head
META HTTP-EQUIV=Refresh CONTENT=0;URL=welcome.action
/head
body
pLoading .../p
/body
/html


WelcomeAction does nothing but simply returns success from execute().

= WelcomeAction.java =
public class WelcomeAction extends ActionSupport {
public String execute() throws Exception {
return SUCCESS;
}
}


Struts will then forward the result to index.jsp,

= struts.xml =
struts
  constant name=struts.objectFactory value=spring /
  constant name=struts.devMode value=true /
  package name=example extends=struts-default
action name=welcome class=welcomeAction method=execute
  resultindex.jsp/result
/action
  /package
/struts

= index.jsp =
html
head
titleTITLE/title
/head
body
/body
/html


All of this is working fine, I entered
http://localhost:8080/myapp/index.html and the IE6 displayed the
index.jsp.

However, it will not display the latest JSP after I modified the
content (e.g. the title) of the index.jsp until I restart Tomcat
service.

Do you know how to reload the JSP without restarting the Tomcat?


Note: this seems to be not a Tomcat problem because it was able to
display the latest JSP when I took out all the Struts 2's action and
configuration.


-- 

Hez

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



Re: [S2] Refresh JSP in Tomcat 5.5

2007-08-27 Thread Alvaro Sanchez-Mariscal
If you use Eclipse and WTP (ie, Servers view), a redeploy is not
required when changing JSP files.

Anothed option is to use jetty, if you use maven.

Alvaro.

On 8/27/07, hezjing [EMAIL PROTECTED] wrote:
 Hi

 I have a index.html that will redirect to WelcomeAction,

 = index.html =
 html
 head
 META HTTP-EQUIV=Refresh CONTENT=0;URL=welcome.action
 /head
 body
 pLoading .../p
 /body
 /html


 WelcomeAction does nothing but simply returns success from execute().

 = WelcomeAction.java =
 public class WelcomeAction extends ActionSupport {
 public String execute() throws Exception {
 return SUCCESS;
 }
 }


 Struts will then forward the result to index.jsp,

 = struts.xml =
 struts
   constant name=struts.objectFactory value=spring /
   constant name=struts.devMode value=true /
   package name=example extends=struts-default
 action name=welcome class=welcomeAction method=execute
   resultindex.jsp/result
 /action
   /package
 /struts

 = index.jsp =
 html
 head
 titleTITLE/title
 /head
 body
 /body
 /html


 All of this is working fine, I entered
 http://localhost:8080/myapp/index.html and the IE6 displayed the
 index.jsp.

 However, it will not display the latest JSP after I modified the
 content (e.g. the title) of the index.jsp until I restart Tomcat
 service.

 Do you know how to reload the JSP without restarting the Tomcat?


 Note: this seems to be not a Tomcat problem because it was able to
 display the latest JSP when I took out all the Struts 2's action and
 configuration.


 --

 Hez

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




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

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



Re: [S2] Refresh JSP in Tomcat 5.5

2007-08-27 Thread hezjing
I modified index.jsp directly in Tomcat 5.5\webapps\myapp directory.

1) Restart Tomcat 5.5.23
2) Accessed http://localhost:8080/myapp
3) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
4) Pressed Ctrl+F5 on IE6 (http://localhost:8080/myapp/welcome.action),
BUT it is still showing the old version of index.jsp

When checked, Tomcat
5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java is
still writting the old title (?)



On 8/27/07, Andrei Sauchanka [EMAIL PROTECTED] wrote:
 Hi, You can try to replace your index.jsp in tomcat directory where tom cat 
 copies your apps. For example [tom cat dir]/webapps/[Your apps]/ It works 
 without restarting tom cat server, just refresh your page in IE (Ctrl+F5).

 Andrei Sauchanka,
 Software Engineer
 EPAM Systems
 Gomel office, Belarus (GMT+2)
 Office fax: +375 (23) 553-200
 Mobile: +375 (29) 236-66-04, 124-42-68
 E-mail: [EMAIL PROTECTED]
 WWW: http://www.epam.com

 CONFIDENTIALITY CAUTION AND DISCLAIMER
 This message is intended only for the use of the individual(s) or entity(ies) 
 to which it is addressed and contains information that is legally privileged 
 and confidential. If you are not the intended recipient, or the person 
 responsible for delivering the message to the intended recipient, you are 
 hereby notified that any dissemination, distribution or copying of this 
 communication is strictly prohibited. All unintended recipients are obliged 
 to delete this message and destroy any printed copies.


 -Original Message-
 From: hezjing [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 27, 2007 11:19
 To: struts-users
 Subject: [S2] Refresh JSP in Tomcat 5.5

 Hi

 I have a index.html that will redirect to WelcomeAction,

 = index.html =
 html
 head
 META HTTP-EQUIV=Refresh CONTENT=0;URL=welcome.action
 /head
 body
 pLoading .../p
 /body
 /html


 WelcomeAction does nothing but simply returns success from execute().

 = WelcomeAction.java =
 public class WelcomeAction extends ActionSupport {
public String execute() throws Exception {
return SUCCESS;
}
 }


 Struts will then forward the result to index.jsp,

 = struts.xml =
 struts
  constant name=struts.objectFactory value=spring /
  constant name=struts.devMode value=true /
  package name=example extends=struts-default
action name=welcome class=welcomeAction method=execute
  resultindex.jsp/result
/action
  /package
 /struts

 = index.jsp =
 html
 head
 titleTITLE/title
 /head
 body
 /body
 /html


 All of this is working fine, I entered
 http://localhost:8080/myapp/index.html and the IE6 displayed the
 index.jsp.

 However, it will not display the latest JSP after I modified the
 content (e.g. the title) of the index.jsp until I restart Tomcat
 service.

 Do you know how to reload the JSP without restarting the Tomcat?


 Note: this seems to be not a Tomcat problem because it was able to
 display the latest JSP when I took out all the Struts 2's action and
 configuration.


 --

 Hez

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




-- 

Hez

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



How to set focus to a textbox?

2007-08-27 Thread Cenk
Hi,

i want to set focus to an input field on my index.jsp. But i could not 
manage...

Here is the code segment below:
...
body
form action=/Login method=post
  table border=0
 tr
tdLogin:/td
tdINPUT type=text name=userId //td
  /tr
  tr
...


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



Re: How to set focus to a textbox?

2007-08-27 Thread Alvaro Sanchez-Mariscal
body onload=document,getElementById('userId').focus()
...

INPUT type=text name=userId id=userId/


Alvaro.



On 8/27/07, Cenk [EMAIL PROTECTED] wrote:
 Hi,

 i want to set focus to an input field on my index.jsp. But i could not
 manage...

 Here is the code segment below:
 ...
 body
 form action=/Login method=post
   table border=0
  tr
 tdLogin:/td
 tdINPUT type=text name=userId //td
   /tr
   tr
 ...


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




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

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



Re: Broken Link

2007-08-27 Thread stanlick
This seems to be a vanilla JSP file with nothing to do with Struts!  Perhaps
you should look at the Struts custom tag library form tag.

Scott

On 8/27/07, Cenk [EMAIL PROTECTED] wrote:

 Hi,
 I m getting this warning, Broken link - /Login.How can i fix this?
 thanks


 %@ page language=java contentType=text/html; charset=ISO-8859-1
 pageEncoding=ISO-8859-1%
 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01
 Transitional//EN http://www.w3.org/TR/html4/loose.dtd;
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 TITLEWELCOME/TITLE
 /head
 body
 form action=/Login method=post * I GOT WARNING HERE
 ***
   table border=0
  tr
 tdLogin:/td
 tdINPUT type=text name=userId //td
   /tr
   tr
  tdPassword:/td
  tdINPUT type=text name=password //td
   /tr
   tr
   td colspan=2 align=centerINPUT type=submit
 value=Login//td
 /tr
/table
 /form

 /body
 /html


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




-- 
Scott
[EMAIL PROTECTED]


Re: Session problem

2007-08-27 Thread stanlick
How are you starting a new browser from this *same* machine?  If you are
pressing Ctrl-N New Window, this is your problem!  This will appear to be
two browsers, when actually it is two browser windows over the same
session!  You must start a second (3rd, 4th, ...) browser the way you
started the first if you truly want unique session ids.

Scott

On 8/26/07, Pavel Sapozhnikov [EMAIL PROTECTED] wrote:

 Hey what does that thing implementing ApplicationAware really do for you?

 On 8/26/07, Mark Rollins [EMAIL PROTECTED] wrote:
 
 
  You are correct - I decided to refactor as I was pasting!! Sorry.
 
 
  Rod Bollinger wrote:
  
   This may not be the only issue but I do see a typo in setSession()...
  
   It should be: this.session = session; instead of this.session = map;
  
   -Rod
  
  
   -Original Message-
   From: Mark Rollins [mailto:[EMAIL PROTECTED]
   Sent: Saturday, August 25, 2007 05:47
   To: user@struts.apache.org
   Subject: Re: Session problem
  
  
  
   This is my first Struts app, so it's quite simplistic. What I'm trying
  to
   achieve is to lock down certain processes so that only one user can
 run
   them
   at a time. I intended to do this by having an application variable
  holding
   the User object for the user currently running the process and
 examining
   this prior to starting the process and reporting who was running it if
  it
   was already running.
  
   All Actions extend BaseActionSupport (this is a cut down version)...
  
   //==
  
   public abstract class BaseActionSupport extends ActionSupport
 implements
   SessionAware, ApplicationAware {
  
   protected Map session;
   protected Map application;
  
   ...
   public void setSession(Map session) {
   this.session = map;
   }
  
   public void setApplication(Map application) {
   this.application = application;
   }
   ...
  
   public User getUser() {
   return (User) session.get(CURRENT_USER);
   }
  
   ...
  
   protected boolean setProcessLock(String lockName) throws
   ActionException
   {
  
   if(lockName.equals()) throw new ActionException(Lockname
 not
   specified in setProcessLock);
  
   User processLock=(User) application.get(lockName);
  
   if(processLock!=null)
   throw new ActionException(Process lock +lockName+
 already
   set. Use checkProcessLock() first.);
   else{
   application.put(lockName, this.getUser());
   return true;
   }
   }
   ...
   }
  
   //==
  
  
   In the LoginAction, where User bean is declared with prototype
  scope...
  
   ...
   ApplicationContext context = SpringUtils.getApplicationContext
  ();
   User usr = (User) context.getBean(User);
  
  
   ...
   if (usr.exists(userID)) {
   usr.getUser(userID);
   if (usr.validPassword(password)) {
   logger.info(User  + usr.getUserID() +  logged
 on.);
   session.put(CURRENT_USER, usr);
   return SUCCESS;
   }
   }
   ...
  
  
  
   //==
  
  
   In setProcessLock, the getUser() call returns the second user object
  when
   run by the first user (using the previous example). There may be no
  other
   actions between the login and the process commencing so the
 opportunity
   for
   overwriting is very limited, and I don't think this is the problem
  (well,
   not directly anyway).
  
  
  
   Laurie Harper wrote:
  
   You have some cross-talk somewhere in your code, by the sound of it.
   Take a look at any code that touches the session; you probably have
   something somewhere that's at the wrong scope (in application scope
  when
   it should be session/request, a Spring bean accidentally configured
 as
   singleton scope, ...).
  
   Without access to your source code, it's impossible to say much more
   than that but if you can narrow it down and post the code that's
  causing
   the problem, someone may be able to explain why it's not working as
 you
   expected.
  
   L.
  
   MARollins wrote:
   I am running everything from one machine, but access the app from
   different
   browsers in order to get different sessions (ie IE and Firefox). I
  have
   tried the second user from another machine and it didn't make any
   difference.
  
   The app also uses Spring, but I have configured this to give me a
 new
   user
   object as required rather than the default singleton, and I'm happy
  this
   is
   working.
  
   When logging in for the second user, I can see that the session map
 is
   empty
   for the new user's session, then session.put is called with the new
  user
   object, and this seems OK.
  
   If I then call an action using the first user and access the session
   map,
   hey presto, I've got the user object from the second user.
  
   Server is Tomcat 5.5 and 

How to set focus to html:text?

2007-08-27 Thread Cenk
Hi,

The previous posting was about HTML only, but this one is struts, and if 
anybody can help me, i would be so grateful.

thanks

...

body onload=document,getElementById('userId').focus()
html:errors/

 html:form action=/Login
table border=0
   tr
  tdLogin:/td
  tdhtml:text property=userId //td
  /tr


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



AW: How to set focus to html:text?

2007-08-27 Thread Altmeier, Christian
Omg ^^

document,getElementById('userId').focus()
|
v
document.getElementById('userId').focus();

html:text property=userId / + styleId=userId
- html:text property=userId styleId=userId /

Greetings


-Ursprüngliche Nachricht-
Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Cenk
Gesendet: Montag, 27. August 2007 13:52
An: user@struts.apache.org
Betreff: How to set focus to html:text?

Hi,

The previous posting was about HTML only, but this one is struts, and if 
anybody can help me, i would be so grateful.

thanks

...

body onload=document,getElementById('userId').focus()
html:errors/

 html:form action=/Login
table border=0
   tr
  tdLogin:/td
  tdhtml:text property=userId //td
  /tr


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

Autohaus Heisel GmbH - Handwerkstraße 2 - 3 Merzig 
Sitz Merzig - Amtsgericht Saarbrücken HRB 63899
Geschäftsführer: Gerd Heisel

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



Struts 2 - lost URL parameters with s:param tag (bug 1938)

2007-08-27 Thread Riccardo Mollame
Does anybody know about any fix or workaround to the
mentioned bug?

For the record, it's the bug emerging when the s:url
contains more than one s:param tag, in which case
strange things happen (e.g. only one parameter is
actually retrievable in the target action, the others
producing the infamous nullPointerException)

All my best to everyone.


  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

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



Struts 1.3.8 Globals.TOKEN_KEY always empty - therefor: isTokenValid() is always false

2007-08-27 Thread Thomas.Zygadlewicz
Hello,
 
I need to fill the Globals.TOKEN_KEY from the session to be able to
use saveToken() and isTokenValid() methods.
saveToken is only filling the Globals.TRANSACTION_TOKEN_KEY-Variable.
 
can someone help me out?
 
regards, Tom



 


[S2] extending struts.xml

2007-08-27 Thread Phillip Grenier
When I try to extend any package located in the struts.xml file from any
of my included xml files that contain other packages It kills the parser
and gives a 404 error. 
ex.
// struts.xml
?xml
!DOCTYPE
struts
constant name=struts.enable.DynamicMethodInvocation value=false
/
constant name=struts.devMode value=true /
 
package name=default extends=struts-default
action name=Index
result type=redirect-actiontest/Index/result
/action
 /package
 include file=test/test.s2.xml/
/struts
 
// test.s2.xml
?xml
!DOCTYPE
struts
package name=test extends=default namespace=/test
action name=Index
result type=redirect-actiontest/Index/result
/action
 /package
/struts
 
This works if I change extends to equal struts-default. Is there a
configuration file to fix this, I just switched the jars to the 2.0.9
 
Thanks, 
- Phillip


tabletags

2007-08-27 Thread Manuel Correa
I use table tags, but when I tried to export with excel or pdf, I get
this exception:

 

An exception was thrown: Exception: [.TableTag] Unable to reset response
before returning exported data. You are not using an export filter. Be
sure that no other jsp tags are used before display:table or refer to
the displaytag documentation on how to configure the export filter
(requires j2ee 1.3).

 

 

Someone know what happens?

 

 

 

Manuel Correa.

 



Re: tabltags

2007-08-27 Thread Toni Lyytikäinen
http://displaytag.sourceforge.net/11/export_filter.html

On 8/27/07, Manuel Correa [EMAIL PROTECTED] wrote:

 Sorry is display tags:



 http://displaytag.sourceforge.net/11/







 Manuel Correa.

 Application Analyst Specialist.

 ITOS, Carl Vinson Institute of Government.

 The University of Georgia.

 Tel. (706) - 542-2164






[OT] how to process emails automatically??

2007-08-27 Thread petchia

I'm having trouble finding a solution to a problem I need to solve and
thought I'd ask the always knowledgeable Struts list.

I need to setup a system that can process emails and their attachments
automatically. Basically, I need a piece of software that will run every
time an email is sent to [EMAIL PROTECTED] The software should store
the attachment somewhere on the server file system and possibly put some
data in a database.

I know there is software out there to do this, but I'm having a hard time
finding it on Google. Anyone else done this before or know of software that
does it?

Regards,

-Bill
-- 
View this message in context: 
http://www.nabble.com/-OT--how-to-process-emails-automatically---tf4335516.html#a12347705
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: [OT] how to process emails automatically??

2007-08-27 Thread Antonio Petrelli
2007/8/27, petchia [EMAIL PROTECTED]:


 I'm having trouble finding a solution to a problem I need to solve and
 thought I'd ask the always knowledgeable Struts list.

 I need to setup a system that can process emails and their attachments
 automatically. Basically, I need a piece of software that will run every
 time an email is sent to [EMAIL PROTECTED] The software should store
 the attachment somewhere on the server file system and possibly put some
 data in a database.

 I know there is software out there to do this, but I'm having a hard time
 finding it on Google. Anyone else done this before or know of software
 that
 does it?



Apache James with a Mailet, possibly:
http://james.apache.org/
http://james.apache.org/mailet/index.html

Antonio


Passing variables in url

2007-08-27 Thread Anna Simbirtsev
Hello
I am trying to pass a variable in the url, but I can't seem to get the value
to be passed.

html:link page=/myAction.do paramId=param1 paramName=value
html:img srcKey=add.button.image altKey=add.button.image.alt
width=80 height=20border=0//html:link

value is a bean in struts, that has get/set functions.

I tried using paramName=${value_} and pass a string, but it did not work.

Thank you


Re: Passing variables in url

2007-08-27 Thread Antonio Petrelli
2007/8/27, Anna Simbirtsev [EMAIL PROTECTED]:
 Hello
 I am trying to pass a variable in the url, but I can't seem to get the value
 to be passed.

 html:link page=/myAction.do paramId=param1 paramName=value
 html:img srcKey=add.button.image altKey=add.button.image.alt
 width=80 height=20border=0//html:link

 value is a bean in struts, that has get/set functions.

 I tried using paramName=${value_} and pass a string, but it did not work.

If value was a simple attribute (such as a string or a number) it
should work, but since you say it is a bean you need to add the
paramProperty attribute in the html:link tag.

Antonio

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



logging with Log4J

2007-08-27 Thread Ashish Kulkarni
Hi
Does anyone have an exmple of using log4j for logging struts messages,
I have an web application where i use log4j for logging, i have a
mapslog4j.xml file in WEB-INF folder and load this log file using
DOMConfigurator in a servlet.
This servlet is loaded before struts servlet,
but some how this is not
working, i do not get any logs from struts in my log file,


Ashish


Re: How can I tell Struts 2 to throw/log exceptions for invalid OGNL Expressions

2007-08-27 Thread mraible

Is it possible to use altSyntax to solve this problem? In other words,
require %{} around all expressions? Looking through the docs, it doesn't
seem like altSyntax is supported in Struts 2.

https://issues.apache.org/struts/browse/WW-1819

Thanks,

Matt


mraible wrote:
 
 
 mraible wrote:
 
 I have the following class:
 
 public class TestAction {
 
 public static String concat(String str1, String str2) {
 return str1 +  and  + str2;
 }
 }
 
 In a JSP, I can write the following and it works fine:
 
 s:property value=@[EMAIL PROTECTED]('1', '2')/
 
 However, if I change it to an invalid class name, it fails silently:
 
 s:property value=@[EMAIL PROTECTED]('1', '2')/
 
 I've tried turning up the logging for org.apache.struts2,
 com.opensymphony.xwork2 and ognl - but it still fails silently. Any ideas
 how to get better error messages about invalid OGNL expressions?
 
 
 I'll take that as a no, it is not possible to get better error messages.
 That's too bad since it seems I get better type-safety and errors from
 scriptlets instead of OGNL.
 
 %@ page
 import=org.foo.bar.baz.SettingsServlet,org.foo.bar.baz.enums.EnumCodec 
 %
 
 c:set
 var=q%=EnumCodec.URL.encode(SettingsServlet.ACTIONS.networkUpdates)%/c:set
 
 s:property value=url(@[EMAIL PROTECTED]).q('${q}')/
 
 VS:
 
 s:property
 value=url(@[EMAIL PROTECTED]).q(@[EMAIL PROTECTED](@[EMAIL PROTECTED]))/
 
 The framework I'm looking to migrate to Struts 2 has the ability for it's
 EL to read from imported Statics - a pretty cool feature IMO.
 
 ${url(pageBean.MAPPING.SETTINGS_SERVLET).q(EnumCodec.URL.encode(SettingsServlet.ACTIONS.networkUpdates))}
 
 Matt
 
 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-tell-Struts-2-to-throw-log-exceptions-for-invalid-OGNL-Expressions-tf4100102.html#a12351943
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: Passing variables in url

2007-08-27 Thread Oleg Mikheev

Anna Simbirtsev wrote:

html:link page=/myAction.do paramId=param1 paramName=value
html:img srcKey=add.button.image altKey=add.button.image.alt
width=80 height=20border=0//html:link

value is a bean in struts, that has get/set functions.



I think that value itself should be a String not a bean.

From struts documents:
paramName - The name of a JSP bean that is a String containing the
value for the request parameter named by paramId

They are calling it a JSP bean, which is not a JavaBean.

Although this is just my guess.

Oleg

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



Re: Passing variables in url

2007-08-27 Thread Anna Simbirtsev
I tried first assigning the value to a string and then sending it.
% String value_ = duf1.getValue(); %

html:link page=/myAction.do paramId=value_name paramName=value_
html:img srcKey=add.button.image altKey=add.button.image.alt
width=80 height=20border=0//html:link

Still does not work.

On 8/27/07, Oleg Mikheev [EMAIL PROTECTED] wrote:

 Anna Simbirtsev wrote:
  html:link page=/myAction.do paramId=param1 paramName=value
  html:img srcKey=add.button.image altKey=add.button.image.alt
 
  width=80 height=20border=0//html:link
 
  value is a bean in struts, that has get/set functions.


 I think that value itself should be a String not a bean.

 From struts documents:
 paramName - The name of a JSP bean that is a String containing the
 value for the request parameter named by paramId

 They are calling it a JSP bean, which is not a JavaBean.

 Although this is just my guess.

 Oleg

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




Re: Passing variables in url

2007-08-27 Thread Oleg Mikheev

Anna Simbirtsev wrote:

I tried first assigning the value to a string and then sending it.
% String value_ = duf1.getValue(); %

html:link page=/myAction.do paramId=value_name paramName=value_
html:img srcKey=add.button.image altKey=add.button.image.alt
width=80 height=20border=0//html:link

Still does not work.


You are assigning a value in a JSP class, but you should've assigned
one in request, or page, or session context:

% request.setAttribute(value_, duf1.getValue()); %

In JSTL syntax the same would look like:

c:set var='value_' value='${duf1.value}'/

Oleg

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



RE: [S2] extending struts.xml

2007-08-27 Thread Phillip Grenier
Was a xworks 2.0.1 issue. Replaced with xworks 2.0.4.jar 

-Original Message-
From: Phillip Grenier [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 27, 2007 9:10 AM
To: Struts Users Mailing List
Subject: [S2] extending struts.xml

When I try to extend any package located in the struts.xml file from any
of my included xml files that contain other packages It kills the parser
and gives a 404 error. 
ex.
// struts.xml
?xml
!DOCTYPE
struts
constant name=struts.enable.DynamicMethodInvocation value=false
/
constant name=struts.devMode value=true /
 
package name=default extends=struts-default
action name=Index
result type=redirect-actiontest/Index/result
/action
 /package
 include file=test/test.s2.xml/
/struts
 
// test.s2.xml
?xml
!DOCTYPE
struts
package name=test extends=default namespace=/test
action name=Index
result type=redirect-actiontest/Index/result
/action
 /package
/struts
 
This works if I change extends to equal struts-default. Is there a
configuration file to fix this, I just switched the jars to the 2.0.9
 
Thanks,
- Phillip

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



radiobutton validation

2007-08-27 Thread Danne1

Hi
I would like to validate a textfield next to a radiobutton. My problem is
that i have x numbers of radiobuttons and the same numbers of textfields.
Only one can and must be selected. 
If the radiobutton is selected the corresponding textfield must have a
value..
Is it possible without writing your own validator?
-- 
View this message in context: 
http://www.nabble.com/radiobutton-validation-tf4336916.html#a12353208
Sent from the Struts - User mailing list archive at Nabble.com.


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



[S2] Struts Tokens and ParametersInterceptor Question

2007-08-27 Thread Hoying, Ken
I am using the Sruts2 token tag with the token interceptor to restrict
double submits of a page.  It appears to be working.  However, I am
getting the following in my log.  Do I not have something configured
correctly?


[2007-08-27 11:27:49,565] [ERROR] [anjone  ]
[erceptor.ParametersInterceptor]: ParametersInterceptor -
[setParameters]: Unexpected Exception catched: Error setting expression
'struts.token' with value '[Ljava.lang.String;@1108a83'
[2007-08-27 11:27:49,612] [ERROR] [anjone  ]
[erceptor.ParametersInterceptor]: ParametersInterceptor -
[setParameters]: Unexpected Exception catched: Error setting expression
'struts.token.name' with value '[Ljava.lang.String;@f5d665'



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

Re: Session problem

2007-08-27 Thread Mark Rollins

I'm actually using two different browsers, IE and Firefox, as I thought this
would guarantee me two separate sessions. 


How are you starting a new browser from this *same* machine?  If you are
pressing Ctrl-N New Window, this is your problem!  This will appear to be
two browsers, when actually it is two browser windows over the same
session!  You must start a second (3rd, 4th, ...) browser the way you
started the first if you truly want unique session ids.

Scott


-- 
View this message in context: 
http://www.nabble.com/Session-problem-tf4324658.html#a12354179
Sent from the Struts - User mailing list archive at Nabble.com.


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



converting to s2 s:select

2007-08-27 Thread Pavel Sapozhnikov
Hi I have this code in my jsp in s1 application I want to get the equivalent
for s2. I think it has something to do with s:select and s:optgroup. Could
anyone help maybe?


html:select property=activeAgencyID

html:option value=- Select an Agency -/html:option

html:options collection=agency property=agency_id
labelProperty=agency_desc
/

/html:select


-- 
Pavel Sapozhnikov
xFact, Inc
[EMAIL PROTECTED]


Re: Session problem

2007-08-27 Thread Dave Newton
I would reduce your problem to a simple class that
does nothing but access only the HttpSession and see
if the problem still exists, then build up around that
until something blows up.

I would also consider using Spring's DI/IoC to inject
a user service object (generally not the same class as
a user itself) into the action rather than accessing
Spring's application context directly.

d.

--- Mark Rollins [EMAIL PROTECTED] wrote:

 
 I'm actually using two different browsers, IE and
 Firefox, as I thought this
 would guarantee me two separate sessions. 
 
 
 How are you starting a new browser from this *same*
 machine?  If you are
 pressing Ctrl-N New Window, this is your problem! 
 This will appear to be
 two browsers, when actually it is two browser
 windows over the same
 session!  You must start a second (3rd, 4th, ...)
 browser the way you
 started the first if you truly want unique session
 ids.
 
 Scott
 
 
 -- 
 View this message in context:

http://www.nabble.com/Session-problem-tf4324658.html#a12354179
 Sent from the Struts - User mailing list archive at
 Nabble.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]



[S2] s:param issues w/ url tags

2007-08-27 Thread paul . saumets
Hi all,

Been awhile since I've posted. Been running into an issue today and I know this 
is going to make me look like a fool  but better to seek quick advice here 
rather than bang my head for hours. J

When I hit a page my action returns a JSP. The JSP page renders fine but within 
the JSP page I have a declaration such as the following:

input type=button onclick=location.href='s:url 
action=WorkspaceActions:param name=ownerObj 
value=%{prevObj}//s:url' value=Back/

The purpose here is just to take you one step backwards and it simply has one 
parameter passed.

My problem is when I view the source of the page with the button now it reads 
as follows:

Onclick=location.href='/myapp/WorkspaceAction.do?ownerObj=1amp;prevObj=1' 
..etc

Why is it attaching the prevObj parameter at the end? This parameter was active 
when I came to the page and was used to render the page but as I've declared 
above, the parameter should not exist on this input button.

In fact I'm seeing this parameter get attached to all my input button urls on 
the page?

How can I avoid this please? Thanks in advance for making me feel like an 
idiot. Heh

Regards,
Paul

file save popup in javascript window

2007-08-27 Thread dekar

Hi, I dont know the source of this error but its really wierd error I think
the source is javascript/apacheconfig/struts. I am getting a save file popup
(TopicAction.do as the filename) when I click a button in a javascript
window.


I am trying to submit a form from a javascript window which invokes a
particular function from the corresponding action servlet (operation as the
parameter) (the content for window is populated using a jsp - topicpage.jsp)

something like when I click submit/save button the form on the window page
gets submitted. 

js files included in the jsp page
here is the structure of the jsp page:

String txtHTML = request.getAttribute(html)==null?HTML not
found:request.getAttribute(html).toString();

//external js in topicpage.jsp
script language=JavaScript
src=%=contextPath%/docs/js/JumpToScreen.js/script 
//script which invokes the window

script language=JavaScript
src=%=contextPath%/docs/js/DisplayTopic.js/script
script which contains the function markassubmit() - sets a string 
 script language=JavaScript
SRC=%=contextPath%/docs/js/showWaitMsg.js/script
script language=Javascript
function submitForm(page)
{
document.TopicForm.operation.value = page;
//document.TopicForm.submit();
return true;
}

function updateParent() {
opener.TopicHomeForm.operation.value = refresh;
opener.TopicHomeForm.submit(); 
} 
/script

/head
body BGcolor= onLoad=updateParent(); document_init(); 
onUnLoad=updateParent();self.close();  

html:form action=/TopicAction.do method=post

div
%=txtHTML% 
/div
 

/html:form
button: INPUT ALT=Submit the Topic onClick=return markAsSubmit();
submitForm('submit'); type=image
src=

function mark as submit inside displaytopic.js is as follows
var lastCmd = ;
function markAsSubmit() {
 document.TopicForm.operation.value=submit;
var _lastCmd = lastCmd;

lastCmd = submit;
var rtn = submitTopic(this.TopicForm);

if (rtn == false) {
lastCmd = _lastCmd;
}
else {
setupAction(Submitting Topic);
}
return rtn; 
} 

I am using Weblogic server on port 7001, apache services
here are details for the apache httpd.conf
LocationMatch /Encounter/(?!docs)
SetHandler weblogic-handler
WebLogicHost DLKBFT9M.ad.tiaa-cref.org //my mac
name
WebLogicPort 7001 
//port on which the encounter app is running
Idempotent ON
DebugConfigInfo ON
/LocationMatch

DocumentRoot C:/TiaaWebs/St01/Docs  //all the js files are located here 

now when I click the submit button on the topicpage window I get a popup to
save file with following details:
Do you want to save the following file?
Name: TopicAction.do
Unknown File types
From: DLKBFT9M.ad.tiaa-cref.org

This error only occurs when I dont use the port in the apln URL (in shich
case the js file are taken from the war file in the build)

If I use the completed build with the js as part of the war package it run
perfect. I need to know what is causing the error..


-- 
View this message in context: 
http://www.nabble.com/file-save-popup-in-javascript-window-tf4337827.html#a12356216
Sent from the Struts - User mailing list archive at Nabble.com.


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



Insane problems with s:select

2007-08-27 Thread Pavel Sapozhnikov
Hey guys I am having really crazy problems with s:select. Here's what
happens I have a jsp page with a s:form in it. Then I have a Collection
defined up top that gets from the session just like this
session.getAttribute...Also my page is actually a tile. I started doing this
from scratch but whenever I have this s:select tag in it puts like my tile
within the same tile so it looks a page within the same page. Um lets see if
I get rid of s:form it still does that. The only time its fine is when I
actually remove the s:select tag but then of course its not displaying my
list...well its not displaying my list even if I do have s:select. So if
anybody can provide some help that would be terrific. Thanks.

-- 
Pavel Sapozhnikov
xFact, Inc
[EMAIL PROTECTED]


Re: Insane problems with s:select

2007-08-27 Thread Session A Mwamufiya
That happened to me once, and it ended up that the s:select tag was improperly 
written.  Make sure that you are returning an appropriate mapstring, string 
from the function that is associated to the list attribute in s:select.  It 
expects a map that maps IDs to strings that get displayed.

Hope it helps,
Session


 Hey guys I am having really crazy problems with s:select. Here's what 
 happens I have a jsp page with a s:form in it. Then I have a Collection 
 defined up top that gets from the session just like this 
 session.getAttribute...Also my page is actually a tile. I started doing
 this from scratch but whenever I have this s:select tag in it puts like my
 tile within the same tile so it looks a page within the same page. Um lets
 see if I get rid of s:form it still does that. The only time its fine is
 when I actually remove the s:select tag but then of course its not
 displaying my list...well its not displaying my list even if I do have
 s:select. So if anybody can provide some help that would be terrific.
 Thanks.
 
 -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
 


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



Re: Insane problems with s:select

2007-08-27 Thread Musachy Barroso
I'm using the select tag and it seems to work fine, I'm using
Collections, Maps, multiple values, pretty much everything.

You are not forced to use a Map, you can use Collection or an
Enumeration, and then specify which field is the key, with listKey and
which field is the value with listValue.

@Pavel: can you post the section of the page that has the select tag?

musachy

On 8/27/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
 That happened to me once, and it ended up that the s:select tag was 
 improperly written.  Make sure that you are returning an appropriate 
 mapstring, string from the function that is associated to the list 
 attribute in s:select.  It expects a map that maps IDs to strings that get 
 displayed.

 Hope it helps,
 Session


  Hey guys I am having really crazy problems with s:select. Here's what
  happens I have a jsp page with a s:form in it. Then I have a Collection
  defined up top that gets from the session just like this
  session.getAttribute...Also my page is actually a tile. I started doing
  this from scratch but whenever I have this s:select tag in it puts like my
  tile within the same tile so it looks a page within the same page. Um lets
  see if I get rid of s:form it still does that. The only time its fine is
  when I actually remove the s:select tag but then of course its not
  displaying my list...well its not displaying my list even if I do have
  s:select. So if anybody can provide some help that would be terrific.
  Thanks.
 
  -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
 


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




-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



Specify a name for a validate function

2007-08-27 Thread Anna Simbirtsev
Hello

actionpath=/value_add
   type=com.struts.action.MyAction
   name=value_add_form
   scope=request
   validate=true
  /action

Does it call the validate function in the form class?
Can I specify the name of validate the function to call?

Thank you


struts 2 alternative to propertyset

2007-08-27 Thread Leonidas Papadakis

Hi there,

in the past i have used propertyset from opensymphony in order to have a 
key-value property file for configuration settings.


i.e. i had a file my-sets.xml
property key=defaultlanguage type=stringen/property

Is there a built in mechanism in struts 2 i.e. to have a file with values :
defaultlanguage=en

e.t.c. ?

Thank you for your replies.

Leonidas

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



Re: Insane problems with s:select

2007-08-27 Thread Pavel Sapozhnikov
Hey Musachy here's my page from start to end: agencyRef is defined in the
Action class in Java



%@ page contentType=text/html;charset=UTF-8 language=java %

%@ page import=java.util.*,com.xfact.struts2login.util.*,
com.xfact.struts2login.value.WebAppUserVO%

%@ taglib prefix=s uri=/struts-tags %

table cellpadding=2 border=0 cellspacing=0 width=100%

tr

td align=left valign=top width=100% bgcolor=#FF

span class=header

Multiple Agencies Detected

/span

hr noshade size=1 color=black

/td

/tr

tr

td class=topInstructionCell colspan=3 align=left valign=top width=
100%

span class=normal

Please select an agency.

/span

/td

/tr

tr

td colspan=3 align=left valign=top width=100%

span class=normal

nbsp;brnbsp;br

/span

/td

/tr



tr

td align=left valign=top width=100% bgcolor=#FF

div class=normal

!-- --

table width=95% align=center

tr

td width=45% valign=top

div class=normal

s:actionerror/

p

The system has detected that you belong to multiple agencies.

Please select the agency you would like to use to access this application.

/p



/div

/td

td width=5% valign=top

span class=normal

nbsp;

/span

/td

td width=45% valign=top

div class=normal

s:form action=submitRequestUserAgency method=post

table border=0 width=100%

tr

td height=25 width=30% align=right

span class=normalBold

span class=requiredFieldMarkers:text name=
requiredFieldMarker.displayname/s:text/spans:text name=
agencyID.displayname/s:text:nbsp;

/span

/td

td width=70% align=left

span class=normal

s:select list=agencyRef label=Select Agency name=agencyId
listKey=agencyId
listValue=agencyDesc

/s:select

/span

/td

/tr

tr

td colspan=2

span class=normal

nbsp;

/span

/td

/tr

tr

td colspan=2 align=center

span class=normal

input type=submit value=Submit Agency Selection

/span

/td

/tr

/table

/s:form

/td

/tr

/table

!-- --

/td

/tr

/table



On 8/27/07, Musachy Barroso [EMAIL PROTECTED] wrote:

 I'm using the select tag and it seems to work fine, I'm using
 Collections, Maps, multiple values, pretty much everything.

 You are not forced to use a Map, you can use Collection or an
 Enumeration, and then specify which field is the key, with listKey and
 which field is the value with listValue.

 @Pavel: can you post the section of the page that has the select tag?

 musachy

 On 8/27/07, Session A Mwamufiya [EMAIL PROTECTED] wrote:
  That happened to me once, and it ended up that the s:select tag was
 improperly written.  Make sure that you are returning an appropriate
 mapstring, string from the function that is associated to the list
 attribute in s:select.  It expects a map that maps IDs to strings that get
 displayed.
 
  Hope it helps,
  Session
 
 
   Hey guys I am having really crazy problems with s:select. Here's what
   happens I have a jsp page with a s:form in it. Then I have a
 Collection
   defined up top that gets from the session just like this
   session.getAttribute...Also my page is actually a tile. I started
 doing
   this from scratch but whenever I have this s:select tag in it puts
 like my
   tile within the same tile so it looks a page within the same page. Um
 lets
   see if I get rid of s:form it still does that. The only time its fine
 is
   when I actually remove the s:select tag but then of course its not
   displaying my list...well its not displaying my list even if I do have
   s:select. So if anybody can provide some help that would be terrific.
   Thanks.
  
   -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Hey you! Would you help me to carry the stone? Pink Floyd

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




-- 
Pavel Sapozhnikov
xFact, Inc
[EMAIL PROTECTED]


Re: [S2] s:param issues w/ url tags

2007-08-27 Thread Musachy Barroso
http://struts.apache.org/2.x/docs/why-are-request-parameters-appended-to-our-hyperlinks.html

musachy

On 8/27/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi all,

 Been awhile since I've posted. Been running into an issue today and I know 
 this is going to make me look like a fool  but better to seek quick advice 
 here rather than bang my head for hours. J

 When I hit a page my action returns a JSP. The JSP page renders fine but 
 within the JSP page I have a declaration such as the following:

 input type=button onclick=location.href='s:url 
 action=WorkspaceActions:param name=ownerObj 
 value=%{prevObj}//s:url' value=Back/

 The purpose here is just to take you one step backwards and it simply has one 
 parameter passed.

 My problem is when I view the source of the page with the button now it reads 
 as follows:

 Onclick=location.href='/myapp/WorkspaceAction.do?ownerObj=1amp;prevObj=1' 
 ..etc

 Why is it attaching the prevObj parameter at the end? This parameter was 
 active when I came to the page and was used to render the page but as I've 
 declared above, the parameter should not exist on this input button.

 In fact I'm seeing this parameter get attached to all my input button urls on 
 the page?

 How can I avoid this please? Thanks in advance for making me feel like an 
 idiot. Heh

 Regards,
 Paul


-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



RE: [S2] s:param issues w/ url tags

2007-08-27 Thread paul . saumets
Musachy,

Thanks, but I am using the param tags.

onclick=location.href='s:url action=WorkspaceActions:param 
name=ownerObj value=%{prevObj}//s:url'

Or should I declare my url actions and assign an id and then use something like:

Onclick=location.href='%{WorkActionUrl}' ? Would that make a difference?

Thanks,
Paul

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, August 27, 2007 4:17 PM
To: Struts Users Mailing List
Subject: Re: [S2] s:param issues w/ url tags

http://struts.apache.org/2.x/docs/why-are-request-parameters-appended-to-our-hyperlinks.html

musachy

On 8/27/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi all,

 Been awhile since I've posted. Been running into an issue today and I know 
 this is going to make me look like a fool  but better to seek quick advice 
 here rather than bang my head for hours. J

 When I hit a page my action returns a JSP. The JSP page renders fine but 
 within the JSP page I have a declaration such as the following:

 input type=button onclick=location.href='s:url 
 action=WorkspaceActions:param name=ownerObj 
 value=%{prevObj}//s:url' value=Back/

 The purpose here is just to take you one step backwards and it simply has one 
 parameter passed.

 My problem is when I view the source of the page with the button now it reads 
 as follows:

 Onclick=location.href='/myapp/WorkspaceAction.do?ownerObj=1amp;prevObj=1' 
 ..etc

 Why is it attaching the prevObj parameter at the end? This parameter was 
 active when I came to the page and was used to render the page but as I've 
 declared above, the parameter should not exist on this input button.

 In fact I'm seeing this parameter get attached to all my input button urls on 
 the page?

 How can I avoid this please? Thanks in advance for making me feel like an 
 idiot. Heh

 Regards,
 Paul


--
Hey you! Would you help me to carry the stone? Pink Floyd

-
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: [S2] s:param issues w/ url tags

2007-08-27 Thread Musachy Barroso
Even if you pass parameters, it will append the request
parameters(unless you change your default), try setting

includeParams = none

musachy

On 8/27/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Musachy,

 Thanks, but I am using the param tags.

 onclick=location.href='s:url action=WorkspaceActions:param 
 name=ownerObj value=%{prevObj}//s:url'

 Or should I declare my url actions and assign an id and then use something 
 like:

 Onclick=location.href='%{WorkActionUrl}' ? Would that make a difference?

 Thanks,
 Paul

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 27, 2007 4:17 PM
 To: Struts Users Mailing List
 Subject: Re: [S2] s:param issues w/ url tags

 http://struts.apache.org/2.x/docs/why-are-request-parameters-appended-to-our-hyperlinks.html

 musachy

 On 8/27/07, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
  Hi all,
 
  Been awhile since I've posted. Been running into an issue today and I know 
  this is going to make me look like a fool  but better to seek quick advice 
  here rather than bang my head for hours. J
 
  When I hit a page my action returns a JSP. The JSP page renders fine but 
  within the JSP page I have a declaration such as the following:
 
  input type=button onclick=location.href='s:url 
  action=WorkspaceActions:param name=ownerObj 
  value=%{prevObj}//s:url' value=Back/
 
  The purpose here is just to take you one step backwards and it simply has 
  one parameter passed.
 
  My problem is when I view the source of the page with the button now it 
  reads as follows:
 
  Onclick=location.href='/myapp/WorkspaceAction.do?ownerObj=1amp;prevObj=1'
   ..etc
 
  Why is it attaching the prevObj parameter at the end? This parameter was 
  active when I came to the page and was used to render the page but as I've 
  declared above, the parameter should not exist on this input button.
 
  In fact I'm seeing this parameter get attached to all my input button urls 
  on the page?
 
  How can I avoid this please? Thanks in advance for making me feel like an 
  idiot. Heh
 
  Regards,
  Paul


 --
 Hey you! Would you help me to carry the stone? Pink Floyd

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




-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



S2 / FTL : Getting application params in FTL

2007-08-27 Thread j alex
Hi,

How do i access params defined in web.xml in the FTL ? ; In my app, all the
images are located at a particular path which is defined as

context-param
param-nameGLOBAL_IMAGES_ROOT/param-name
param-valuewww/abc/def/images/param-value
/context-param

and i want to show an icon from this directory within the FTL . How would i
make GLOBAL_IMAGES_ROOT available to the FTL markup?

img src=${Application.LOCAL_JS_ROOT}/icon.gif does not work

Please help,
Joseph


Re: Specify a name for a validate function

2007-08-27 Thread j alex
Struts 1 ; if validate=true, it looks for a method called validate() in
ActionForm (ie value_add_form) , Action ( ie MyAction) or if you've
configured validation xml, validations are run using that

On 8/27/07, Anna Simbirtsev [EMAIL PROTECTED] wrote:

 Hello

 actionpath=/value_add
type=com.struts.action.MyAction
name=value_add_form
scope=request
validate=true
   /action

 Does it call the validate function in the form class?
 Can I specify the name of validate the function to call?

 Thank you



Re: Struts 1.3.8 Globals.TOKEN_KEY always empty - therefor: isTokenValid() is always false

2007-08-27 Thread Paul Benedict

Globals.TOKEN_KEY is the name of the parameter that should be submitted back to your 
form. This is automatically outputted by html:form if the triggering action 
called saveToken().

[EMAIL PROTECTED] wrote:

Hello,
 
I need to fill the Globals.TOKEN_KEY from the session to be able to

use saveToken() and isTokenValid() methods.
saveToken is only filling the Globals.TRANSACTION_TOKEN_KEY-Variable.
 
can someone help me out?
 
regards, Tom




 

  


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



Re: [S2] Refresh JSP in Tomcat 5.5

2007-08-27 Thread hezjing
Can you explain what these Struts properties mean (see also
http://struts.apache.org/2.0.9/docs/strutsproperties.html) ?

struts.serve.static=true
struts.serve.static.browserCache=true


What does a static content means? In my case, the index.jsp is a static content?

Anyway, setting struts.serve.static.browserCache = false does not
refresh the latest JSP either :-(



On 8/27/07, hezjing [EMAIL PROTECTED] wrote:
 I modified index.jsp directly in Tomcat 5.5\webapps\myapp directory.

 1) Restart Tomcat 5.5.23
 2) Accessed http://localhost:8080/myapp
 3) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
 4) Pressed Ctrl+F5 on IE6 (http://localhost:8080/myapp/welcome.action),
 BUT it is still showing the old version of index.jsp

 When checked, Tomcat
 5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java is
 still writting the old title (?)



 On 8/27/07, Andrei Sauchanka [EMAIL PROTECTED] wrote:
  Hi, You can try to replace your index.jsp in tomcat directory where tom cat 
  copies your apps. For example [tom cat dir]/webapps/[Your apps]/ It works 
  without restarting tom cat server, just refresh your page in IE (Ctrl+F5).
 
  Andrei Sauchanka,
  Software Engineer
  EPAM Systems
  Gomel office, Belarus (GMT+2)
  Office fax: +375 (23) 553-200
  Mobile: +375 (29) 236-66-04, 124-42-68
  E-mail: [EMAIL PROTECTED]
  WWW: http://www.epam.com
 
  CONFIDENTIALITY CAUTION AND DISCLAIMER
  This message is intended only for the use of the individual(s) or 
  entity(ies) to which it is addressed and contains information that is 
  legally privileged and confidential. If you are not the intended recipient, 
  or the person responsible for delivering the message to the intended 
  recipient, you are hereby notified that any dissemination, distribution or 
  copying of this communication is strictly prohibited. All unintended 
  recipients are obliged to delete this message and destroy any printed 
  copies.
 
 
  -Original Message-
  From: hezjing [mailto:[EMAIL PROTECTED]
  Sent: Monday, August 27, 2007 11:19
  To: struts-users
  Subject: [S2] Refresh JSP in Tomcat 5.5
 
  Hi
 
  I have a index.html that will redirect to WelcomeAction,
 
  = index.html =
  html
  head
  META HTTP-EQUIV=Refresh CONTENT=0;URL=welcome.action
  /head
  body
  pLoading .../p
  /body
  /html
 
 
  WelcomeAction does nothing but simply returns success from execute().
 
  = WelcomeAction.java =
  public class WelcomeAction extends ActionSupport {
 public String execute() throws Exception {
 return SUCCESS;
 }
  }
 
 
  Struts will then forward the result to index.jsp,
 
  = struts.xml =
  struts
   constant name=struts.objectFactory value=spring /
   constant name=struts.devMode value=true /
   package name=example extends=struts-default
 action name=welcome class=welcomeAction method=execute
   resultindex.jsp/result
 /action
   /package
  /struts
 
  = index.jsp =
  html
  head
  titleTITLE/title
  /head
  body
  /body
  /html
 
 
  All of this is working fine, I entered
  http://localhost:8080/myapp/index.html and the IE6 displayed the
  index.jsp.
 
  However, it will not display the latest JSP after I modified the
  content (e.g. the title) of the index.jsp until I restart Tomcat
  service.
 
  Do you know how to reload the JSP without restarting the Tomcat?
 
 
  Note: this seems to be not a Tomcat problem because it was able to
  display the latest JSP when I took out all the Struts 2's action and
  configuration.
 
 
  --
 
  Hez
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --

 Hez



-- 

Hez

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