Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread Nils-Helge Garli Hegvik
I'm having a hard time understanding why refactoring your utility
class would have a serious impact on the migration time. If it's just
that you don't want to change the signature of your utility method
because it's used many other places, then create a new utility method
with the required parameters and extract the common bits. That way you
have kept your old method, created a new one and shared the common
code between them:

Before:

public static void doSomething(HttpServletRequest request) {
   // Do something with the request
}

After:

public static void doSomething(HttpServletRequest request) {
   // Extract params from request
   doSomething(param1, param2, param3);
}

public static void doSomething(Object param1, Object param2, Object param3) {
  // Do whatever you need with the params
}

Nils-H

On Wed, Nov 26, 2008 at 7:57 AM, nikunj [EMAIL PROTECTED] wrote:
 Thanks Nils-H

 Actually I am migrating my existing application, need to reduce migration
 time.

 Is there any way to make request object as common for all available thread,
 So that we no need to extract the information of request object.

 Regards,
 Nikunj


 -Original Message-
 From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2008 12:16 PM
 To: Struts Users Mailing List
 Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

 As you say, the request object can be recycled by the container after
 the thread has executed [1]. You can't fix this as it's up to the
 container to handle this. You have to refactor your code so it's not
 passing the request object around to different threads. Typically you
 would extract the information you need from the request and pass the
 data you nedd to the new thread instead.

 Nils-H

 [1] - Servlet 2.4 specification, section SRV.4.10

 On Wed, Nov 26, 2008 at 6:29 AM, nikunj [EMAIL PROTECTED] wrote:
 Dear All,



 Servlet container is written to be single-threaded.



 That means that the request object isn't designed to be used after the

 thread that handled the request has finished executing. What is

 happening is this:



 1) Thread1 handles request

 2) Thread1 gives request to Tomcat

 3) Tomcat starts Thread2 and executes your action

 4) Thread1 finishes and cleans up request

 5) Your action (on Thread2) tries to use the request



 Step #5 causes an exception in the container. Null pointer exeception



 How to fix this issue?



 Can any body help me?



 Thanks in advance







 Regards,



 Nikunj Mulani

 Applied Software Pvt. Ltd.

 Ahmedabad

 91-98249 88262



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


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com



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



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



RE: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread nikunj
Ha ha


You are right.

But I'm having method like

Boolean isValidUser(HttpServletRequest request)
{
}


As u said, I am going to make another

Boolean isValidUser(MapString,Object requestMap)
{
__
}


Now tell me what I should write in above blank line to call my actual
function.


Regards,
Nikunj

-Original Message-
From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2008 1:32 PM
To: Struts Users Mailing List
Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

I'm having a hard time understanding why refactoring your utility
class would have a serious impact on the migration time. If it's just
that you don't want to change the signature of your utility method
because it's used many other places, then create a new utility method
with the required parameters and extract the common bits. That way you
have kept your old method, created a new one and shared the common
code between them:

Before:

public static void doSomething(HttpServletRequest request) {
   // Do something with the request
}

After:

public static void doSomething(HttpServletRequest request) {
   // Extract params from request
   doSomething(param1, param2, param3);
}

public static void doSomething(Object param1, Object param2, Object param3)
{
  // Do whatever you need with the params
}

Nils-H

On Wed, Nov 26, 2008 at 7:57 AM, nikunj [EMAIL PROTECTED] wrote:
 Thanks Nils-H

 Actually I am migrating my existing application, need to reduce migration
 time.

 Is there any way to make request object as common for all available
thread,
 So that we no need to extract the information of request object.

 Regards,
 Nikunj


 -Original Message-
 From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2008 12:16 PM
 To: Struts Users Mailing List
 Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

 As you say, the request object can be recycled by the container after
 the thread has executed [1]. You can't fix this as it's up to the
 container to handle this. You have to refactor your code so it's not
 passing the request object around to different threads. Typically you
 would extract the information you need from the request and pass the
 data you nedd to the new thread instead.

 Nils-H

 [1] - Servlet 2.4 specification, section SRV.4.10

 On Wed, Nov 26, 2008 at 6:29 AM, nikunj [EMAIL PROTECTED]
wrote:
 Dear All,



 Servlet container is written to be single-threaded.



 That means that the request object isn't designed to be used after the

 thread that handled the request has finished executing. What is

 happening is this:



 1) Thread1 handles request

 2) Thread1 gives request to Tomcat

 3) Tomcat starts Thread2 and executes your action

 4) Thread1 finishes and cleans up request

 5) Your action (on Thread2) tries to use the request



 Step #5 causes an exception in the container. Null pointer exeception



 How to fix this issue?



 Can any body help me?



 Thanks in advance







 Regards,



 Nikunj Mulani

 Applied Software Pvt. Ltd.

 Ahmedabad

 91-98249 88262



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


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


__ NOD32 3641 (20081126) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



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



Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread Nils-Helge Garli Hegvik
The other way around, something like this:

Boolean isValidUser(HttpServletRequest request) {
  Map data = extractDataFromRequest(request);
  isValidUser(data);
}

Boolean isValidUser(Map data) {
}

Note that you can't use the Struts 2 RequestMap either since it's
backed by the actual request object. So either you have to copy the
values in the map, or even better, extract the actual
objects/parameters the method need to do it's logic and pass them as
parameters instead.

Nils-H

On Wed, Nov 26, 2008 at 9:34 AM, nikunj [EMAIL PROTECTED] wrote:
 Ha ha


 You are right.

 But I'm having method like

 Boolean isValidUser(HttpServletRequest request)
 {
 }


 As u said, I am going to make another

 Boolean isValidUser(MapString,Object requestMap)
 {
__
 }


 Now tell me what I should write in above blank line to call my actual
 function.


 Regards,
 Nikunj

 -Original Message-
 From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2008 1:32 PM
 To: Struts Users Mailing List
 Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

 I'm having a hard time understanding why refactoring your utility
 class would have a serious impact on the migration time. If it's just
 that you don't want to change the signature of your utility method
 because it's used many other places, then create a new utility method
 with the required parameters and extract the common bits. That way you
 have kept your old method, created a new one and shared the common
 code between them:

 Before:

 public static void doSomething(HttpServletRequest request) {
   // Do something with the request
 }

 After:

 public static void doSomething(HttpServletRequest request) {
   // Extract params from request
   doSomething(param1, param2, param3);
 }

 public static void doSomething(Object param1, Object param2, Object param3)
 {
  // Do whatever you need with the params
 }

 Nils-H

 On Wed, Nov 26, 2008 at 7:57 AM, nikunj [EMAIL PROTECTED] wrote:
 Thanks Nils-H

 Actually I am migrating my existing application, need to reduce migration
 time.

 Is there any way to make request object as common for all available
 thread,
 So that we no need to extract the information of request object.

 Regards,
 Nikunj


 -Original Message-
 From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2008 12:16 PM
 To: Struts Users Mailing List
 Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

 As you say, the request object can be recycled by the container after
 the thread has executed [1]. You can't fix this as it's up to the
 container to handle this. You have to refactor your code so it's not
 passing the request object around to different threads. Typically you
 would extract the information you need from the request and pass the
 data you nedd to the new thread instead.

 Nils-H

 [1] - Servlet 2.4 specification, section SRV.4.10

 On Wed, Nov 26, 2008 at 6:29 AM, nikunj [EMAIL PROTECTED]
 wrote:
 Dear All,



 Servlet container is written to be single-threaded.



 That means that the request object isn't designed to be used after the

 thread that handled the request has finished executing. What is

 happening is this:



 1) Thread1 handles request

 2) Thread1 gives request to Tomcat

 3) Tomcat starts Thread2 and executes your action

 4) Thread1 finishes and cleans up request

 5) Your action (on Thread2) tries to use the request



 Step #5 causes an exception in the container. Null pointer exeception



 How to fix this issue?



 Can any body help me?



 Thanks in advance







 Regards,



 Nikunj Mulani

 Applied Software Pvt. Ltd.

 Ahmedabad

 91-98249 88262



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


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]



FW: Migratring to struts 1.2.7 from struts1.0b

2008-11-26 Thread Rajil
 pl.java:420)


org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
 va:249)


org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
 :163)

 org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
org.apache.jasper.compiler.Parser.parse(Parser.java:127)


org.apache.jasper.compiler.ParserController.doParse(ParserController.java:21
 2)


org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)


org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
 64)


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
 02)

 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

 org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:188)





 Is there any change in TagLibrary also?  Do I have to replace my tag
 libraries and their reference in web.xml file ?  Do I need to change the
JSP
 files also?



 Please suggest..



 regards,

 Rajil Davda





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


__ NOD32 3641 (20081126) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



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



Dummy example Struts 2.0 - My Sql

2008-11-26 Thread Carlos Iglesias
Hello,
I'm beginning wity Struts and I found the samples very useful, expecially
the app struts2-showcase-2.0.11.2.war.

But I'd need other sample to begin my own to make my owns aplications.

¿Is there any sample of struts2 with mysql?
¿Can anyone send my an url?

Thanks in advance.
Carlos Iglesias
MADRID SPAIN


RE: Dummy example Struts 2.0 - My Sql

2008-11-26 Thread Rajil
Hi.

Use struts-blank.war

Create your action classes and required beans.

You can create your ConnectionManager class that returns connection when
requested.

Code Action to interact with database, take connection from your
connectionManager class.

This is as simple as you write in simple servlet.  The difference is only
that you are using specialized version of servlet i.e. Action.

http://javaboutique.internet.com/Web_App_Struts/

You can use above link to have brief idea.


-Original Message-
From: Carlos Iglesias [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2008 3:16 PM
To: user@struts.apache.org
Subject: Dummy example Struts 2.0 - My Sql

Hello,
I'm beginning wity Struts and I found the samples very useful, expecially
the app struts2-showcase-2.0.11.2.war.

But I'd need other sample to begin my own to make my owns aplications.

¿Is there any sample of struts2 with mysql?
¿Can anyone send my an url?

Thanks in advance.
Carlos Iglesias
MADRID SPAIN



__ NOD32 3641 (20081126) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com


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



Tiles and Validate

2008-11-26 Thread mthalis

It is possible to use tiles and validation(validation forms data)  in same
project. if it is possible please give me reference or sample project.
please help me..

Thank you
-- 
View this message in context: 
http://www.nabble.com/Tiles-and-Validate-tp20699267p20699267.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: Validation and Tiles

2008-11-26 Thread mthalis

I find the answer below show how to solve it.

action path=/login ...
validate=true
input=login.page
forward name=success path=login.success/
/action

(where login.page and login.success are both tiles defs)

-- 
View this message in context: 
http://www.nabble.com/Validation-and-Tiles-tp20694339p20699602.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: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread nikunj
Nils,

Try to understand my problem.
I don't wana change my method signature.
I have no problem to make another overloaded method.
But I don't want to change my original method.
You replied me with changing my original method.

Boolean isValidUser(HttpServletRequest request)
{
// don't want to change content of function
}


 Boolean isValidUser(MapString,Object requestMap)
{
__
Need to change over here but what?
Please describe clearly. Not like extractDataFromRequest function
}


Regards,
Nikunj


-Original Message-
From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2008 2:26 PM
To: Struts Users Mailing List
Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

The other way around, something like this:

Boolean isValidUser(HttpServletRequest request) {
  Map data = extractDataFromRequest(request);
  isValidUser(data);
}

Boolean isValidUser(Map data) {
}

Note that you can't use the Struts 2 RequestMap either since it's
backed by the actual request object. So either you have to copy the
values in the map, or even better, extract the actual
objects/parameters the method need to do it's logic and pass them as
parameters instead.

Nils-H

On Wed, Nov 26, 2008 at 9:34 AM, nikunj [EMAIL PROTECTED] wrote:
 Ha ha


 You are right.

 But I'm having method like

 Boolean isValidUser(HttpServletRequest request)
 {
 }


 As u said, I am going to make another

 Boolean isValidUser(MapString,Object requestMap)
 {
__
 }


 Now tell me what I should write in above blank line to call my actual
 function.


 Regards,
 Nikunj

 -Original Message-
 From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2008 1:32 PM
 To: Struts Users Mailing List
 Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

 I'm having a hard time understanding why refactoring your utility
 class would have a serious impact on the migration time. If it's just
 that you don't want to change the signature of your utility method
 because it's used many other places, then create a new utility method
 with the required parameters and extract the common bits. That way you
 have kept your old method, created a new one and shared the common
 code between them:

 Before:

 public static void doSomething(HttpServletRequest request) {
   // Do something with the request
 }

 After:

 public static void doSomething(HttpServletRequest request) {
   // Extract params from request
   doSomething(param1, param2, param3);
 }

 public static void doSomething(Object param1, Object param2, Object
param3)
 {
  // Do whatever you need with the params
 }

 Nils-H

 On Wed, Nov 26, 2008 at 7:57 AM, nikunj [EMAIL PROTECTED]
wrote:
 Thanks Nils-H

 Actually I am migrating my existing application, need to reduce migration
 time.

 Is there any way to make request object as common for all available
 thread,
 So that we no need to extract the information of request object.

 Regards,
 Nikunj


 -Original Message-
 From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2008 12:16 PM
 To: Struts Users Mailing List
 Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

 As you say, the request object can be recycled by the container after
 the thread has executed [1]. You can't fix this as it's up to the
 container to handle this. You have to refactor your code so it's not
 passing the request object around to different threads. Typically you
 would extract the information you need from the request and pass the
 data you nedd to the new thread instead.

 Nils-H

 [1] - Servlet 2.4 specification, section SRV.4.10

 On Wed, Nov 26, 2008 at 6:29 AM, nikunj [EMAIL PROTECTED]
 wrote:
 Dear All,



 Servlet container is written to be single-threaded.



 That means that the request object isn't designed to be used after the

 thread that handled the request has finished executing. What is

 happening is this:



 1) Thread1 handles request

 2) Thread1 gives request to Tomcat

 3) Tomcat starts Thread2 and executes your action

 4) Thread1 finishes and cleans up request

 5) Your action (on Thread2) tries to use the request



 Step #5 causes an exception in the container. Null pointer exeception



 How to fix this issue?



 Can any body help me?



 Thanks in advance







 Regards,



 Nikunj Mulani

 Applied Software Pvt. Ltd.

 Ahmedabad

 91-98249 88262



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


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com



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

Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread Lukasz Lenart
2008/11/26 nikunj [EMAIL PROTECTED]:
 Try to understand my problem.
 I don't wana change my method signature.
 I have no problem to make another overloaded method.
 But I don't want to change my original method.
 You replied me with changing my original method.

Then you will be not able to migrate.


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



RE: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread ravindra



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


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


__ NOD32 3641 (20081126) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



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





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



Re: Struts2 2.0.11 problem with url and parameters

2008-11-26 Thread Andras Balogh

Hi,
Can you set the log level to DEBUG to see what the interceptors say?
Something like:
log4j.category.com.opensymphony=DEBUG

BR, Andras


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



RE: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread nikunj
Thanks!!

-Original Message-
From: Lukasz Lenart [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2008 7:00 PM
To: Struts Users Mailing List
Subject: Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008/11/26 nikunj [EMAIL PROTECTED]:
 Try to understand my problem.
 I don't wana change my method signature.
 I have no problem to make another overloaded method.
 But I don't want to change my original method.
 You replied me with changing my original method.

Then you will be not able to migrate.


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


__ NOD32 3642 (20081126) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



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



RE: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread nikunj
 that the request object isn't designed to be used after the

 thread that handled the request has finished executing. What is

 happening is this:



 1) Thread1 handles request

 2) Thread1 gives request to Tomcat

 3) Tomcat starts Thread2 and executes your action

 4) Thread1 finishes and cleans up request

 5) Your action (on Thread2) tries to use the request



 Step #5 causes an exception in the container. Null pointer exeception



 How to fix this issue?



 Can any body help me?



 Thanks in advance







 Regards,



 Nikunj Mulani

 Applied Software Pvt. Ltd.

 Ahmedabad

 91-98249 88262



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


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


__ NOD32 3641 (20081126) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.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]


__ NOD32 3642 (20081126) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



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



Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread Nils-Helge Garli Hegvik
 PROTECTED]


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com



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



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



Re: ExecuteAndWaitInterceptor Issue - ThreadLocal object

2008-11-26 Thread Nils-Helge Garli Hegvik
 the
 data you nedd to the new thread instead.

 Nils-H

 [1] - Servlet 2.4 specification, section SRV.4.10

 On Wed, Nov 26, 2008 at 6:29 AM, nikunj [EMAIL PROTECTED]
 wrote:
 Dear All,



 Servlet container is written to be single-threaded.



 That means that the request object isn't designed to be used after the

 thread that handled the request has finished executing. What is

 happening is this:



 1) Thread1 handles request

 2) Thread1 gives request to Tomcat

 3) Tomcat starts Thread2 and executes your action

 4) Thread1 finishes and cleans up request

 5) Your action (on Thread2) tries to use the request



 Step #5 causes an exception in the container. Null pointer exeception



 How to fix this issue?



 Can any body help me?



 Thanks in advance







 Regards,



 Nikunj Mulani

 Applied Software Pvt. Ltd.

 Ahmedabad

 91-98249 88262



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


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 __ NOD32 3642 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com



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



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



Re: Struts2 2.0.11 problem with url and parameters

2008-11-26 Thread Tomi21

I've create a sample application with only one jsp, one action and no
user-defined interceptors. Even in this case the parameter is not being set.

These are the application main file. Please help!!I don't know what more I
can try.

struts.xml
-
!DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts
Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd;
struts
package name=default extends=struts-default   
  action name=Test class=testpackage.Test 
resultindex.jsp/result  
  /action   
   /package
/struts

index.jsp
-
%@ taglib prefix=str uri=/struts-tags %
%@ 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
titleInsert title here/title
/head
body
str:url id=url action=Test.action
str:param name=testsomething/str:param
/str:url
str:a href=%{url}CLICK ON/str:a
/body
/html

Test.java
-
package testpackage;

import com.opensymphony.xwork2.ActionSupport;

public class Test extends ActionSupport {

/**
 * 
 */
private static final long serialVersionUID = 1L;
private String test;

public String execute(){
System.out.println(TEST:  + test);
return ActionSupport.SUCCESS;

}

public void setTest(String test) {
this.test = test;
}

public String getTest() {
return test;
}



}

Web.xml

?xml version=1.0 encoding=UTF-8?
web-app id=web-app_1 xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4
 display-nameTestWeb/display-name
  filter
filter-namestruts2/filter-name
   
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
  /filter
  filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
  /filter-mapping   
  welcome-file-list
welcome-fileindex.jsp/welcome-file
  /welcome-file-list
/web-app

Trace
- 
08/11/26 10:44:55 TEST: null
26-nov-2008 10:44:55 com.opensymphony.xwork2.util.profiling.UtilTimerStack
printTimes
INFO: [63ms] - FilterDispatcher_doFilter: 
  [47ms] - Handling request from Dispatcher
[0ms] - create DefaultActionProxy: 
  [0ms] - create DefaultActionInvocation: 
[0ms] - actionCreate: Test
[47ms] - invoke: 
  [47ms] - interceptor: exception
[47ms] - invoke: 
  [47ms] - interceptor: alias
[47ms] - invoke: 
  [47ms] - interceptor: servletConfig
[47ms] - invoke: 
  [47ms] - interceptor: prepare
[47ms] - invoke: 
  [47ms] - interceptor: i18n
[47ms] - invoke: 
  [47ms] - interceptor: chain
[47ms] - invoke: 
  [47ms] - interceptor: debugging
[47ms] - invoke: 
  [47ms] - interceptor: profiling
[47ms] - invoke: 
  [47ms] - interceptor:
scopedModelDriven
[47ms] - invoke: 
  [47ms] - interceptor: modelDriven
[47ms] - invoke: 
  [47ms] - interceptor:
fileUpload
[47ms] - invoke: 
  [47ms] - interceptor:
checkbox
[47ms] - invoke: 
  [47ms] - interceptor:
staticParams
[47ms] - invoke: 
  [47ms] -
interceptor: params
[47ms] - invoke: 
  [47ms] -
interceptor: conversionError
[47ms] -
invoke: 
  [47ms] -
interceptor: validation
[47ms] -
invoke: 
  [47ms]
- interceptor: workflow
   
[47ms] - invoke: 
 

Struts - indexed property problem with jdk1.5 - overloaded get/set method with same name - for Struts Team

2008-11-26 Thread Rajil
Hello everyone;

 

I am using jdk1.4, struts1.0 and tomcat4.1 for my application.  And I wanted
to upgrade my application to jdk1.5.

 

Struts1.0 had some problem with jdk1.5.  I was not able to interpret two
property with the same name, one is indexed and other is not.

 

E.g.   I have one ActionForm namely BrokerList.java.

 

.

String brokerName;

ArrayList brokers;  // list of Broker Beans

.

 

And following get/set methods.

 

Public String getBrokerName()

.

 

Public void setBrokerName(String brokerName)

.

 

Public String getBrokerName(int index)

{

Return ( (broker)Brokers.get(i) ).getBrokerName();

}

 

Public String setBrokerName(int index, String brokerName)

{

 ( (Broker)brokers.get(i) ).setBrokerName(brokerName);

}

 

You can imagine the code for JSP also.  User is able to enter multiple
brokers from single JSP.

 

Now, this code was running fine under jdk1.4.  But this code doesn't run
under jdk1.5.

 

This gets confused when it find 2 get/set methods with the same name.  But
they are actually different considering parameter index.  It's overloaded
method.

 

I solved this issue by writing my own
org.apache.struts.util.PropertyUtils.java  class to handle this situation.
(from struts.jar)

 

Can anybody tell me.. from what version of struts this issue is resolved???

 

Actually, I am on the way to upgrade my application to better version of
struts where I don't have to change in-built classes.

 

This issue can be better understood by Struts Team.  If you don't understand
my question let me know to explain more.  Your help is appreciated.

 

 

regards,

Rajil Davda



Re: Tiles and Validate

2008-11-26 Thread Antonio
2008/11/26 mthalis [EMAIL PROTECTED]:

 It is possible to use tiles and validation(validation forms data)  in same
 project. if it is possible please give me reference or sample project.
 please help me..

I don't see why not validator and Tiles can be used together, they are
used in two different aspects of the application.

Antonio

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



Re: Dummy example Struts 2.0 - My Sql

2008-11-26 Thread Carlos Iglesias
Thanks for answering so quickly...

I'll try


2008/11/26 Rajil [EMAIL PROTECTED]

 Hi.

 Use struts-blank.war

 Create your action classes and required beans.

 You can create your ConnectionManager class that returns connection when
 requested.

 Code Action to interact with database, take connection from your
 connectionManager class.

 This is as simple as you write in simple servlet.  The difference is only
 that you are using specialized version of servlet i.e. Action.

 http://javaboutique.internet.com/Web_App_Struts/

 You can use above link to have brief idea.


 -Original Message-
 From: Carlos Iglesias [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2008 3:16 PM
 To: user@struts.apache.org
 Subject: Dummy example Struts 2.0 - My Sql

 Hello,
 I'm beginning wity Struts and I found the samples very useful, expecially
 the app struts2-showcase-2.0.11.2.war.

 But I'd need other sample to begin my own to make my owns aplications.

 ¿Is there any sample of struts2 with mysql?
 ¿Can anyone send my an url?

 Thanks in advance.
 Carlos Iglesias
 MADRID SPAIN



 __ NOD32 3641 (20081126) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com


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




Re: Re: Dummy example Struts 2.0 - My Sql

2008-11-26 Thread stewart
I will be out of the office, and mostly without email access, until Dec 1.

Please contact the One World office, 605-845-7172, with any general needs, and 
Danny Nickels, [EMAIL PROTECTED], at the same number, for any technical or 
integration issues.

If this is an emergency, please feel free to call my cell at 605-848-2841.

Thanks,

-Stewart



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



Re: Struts2 2.0.11 problem with url and parameters

2008-11-26 Thread Tomi21

Hi,

I've try that but interceptors dont say anything.
What I've done next is changing 'struts.xml' so there are no interceptors
configured.
The packagedoes not extend struts-default anymore.
The action is still being executed but the parameter is not being set
anyway.:(

Any ideas from this point?

This the struts.xml as is now:

!DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts
Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd;
struts

package name=default
result-types
result-type name=chain
class=com.opensymphony.xwork2.ActionChainResult/
result-type name=dispatcher
class=org.apache.struts2.dispatcher.ServletDispatcherResult
default=true/
result-type name=freemarker
class=org.apache.struts2.views.freemarker.FreemarkerResult/
result-type name=httpheader
class=org.apache.struts2.dispatcher.HttpHeaderResult/
result-type name=redirect
class=org.apache.struts2.dispatcher.ServletRedirectResult/
result-type name=redirectAction
class=org.apache.struts2.dispatcher.ServletActionRedirectResult/
result-type name=stream
class=org.apache.struts2.dispatcher.StreamResult/
result-type name=velocity
class=org.apache.struts2.dispatcher.VelocityResult/
result-type name=xslt
class=org.apache.struts2.views.xslt.XSLTResult/
result-type name=plainText
class=org.apache.struts2.dispatcher.PlainTextResult /
!-- Deprecated name form scheduled for removal in Struts 2.1.0.
The camelCase versions are preferred. See ww-1707 --
result-type name=redirect-action
class=org.apache.struts2.dispatcher.ServletActionRedirectResult/
result-type name=plaintext
class=org.apache.struts2.dispatcher.PlainTextResult /
/result-types


action name=Test class=testpackage.Test   
resultindex.jsp/result
/action 
   /package
/struts

Thank you!!




Andras Balogh wrote:
 
 Hi,
 Can you set the log level to DEBUG to see what the interceptors say?
 Something like:
 log4j.category.com.opensymphony=DEBUG
 
 BR, Andras
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Struts2-2.0.11-problem-with-url-and-parameters-tp20577582p20703831.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]



Struts 1.3.8 : Cancel Button (and custom submit one)

2008-11-26 Thread zm

Hi,

I'm having a trouble setting this up:

Let's imagine I have Search.do form, and clicking a link, it goes to
Result.do. Then I but an html:cancel element on the jsp pages (all of
them), and set something like:

action path=/Welcome forward=/pages/welcome.jsp /
action
path=/Search
type=com.something.SearchAction
name=SearchForm
scope=request
validate=true
input=/pages/search.jsp
cancellable=true
forward name=back path=/Welcome.do /
/action
action
path=/Result
type=com.something.ResultAction
name=ResultForm
scope=request
validate=true
input=/pages/result.jsp
cancellable=true
forward name=back path=/Search.do /
/action

I want that when a user clicks the cancel, the result will send to
search, but the search will sent to the welcome page (site's home
page).

It all works well, too well indeed ... so I now have a problem: since the
html:cancel will generate:

input type=submit name=org.apache.struts.taglib.html.CANCEL
value=Exit onclick=bCancel=true; /

The struts framework (under RequestProcessor.processPopulate) will get this
request property and set an attribute.

Everything goes alright, but then my ResultAction catches the click,
forwards to SearchAction but it also catches the cancel and re-forwards it
to the Welcome page.

Is there a way that I can remove the cancel data right before forwarding in
ResultAction? So that it just make one back-forward?


Thanks
-- 
View this message in context: 
http://www.nabble.com/Struts-1.3.8-%3A-Cancel-Button-%28and-custom-submit-one%29-tp20703999p20703999.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 2.0.11 problem with url and parameters

2008-11-26 Thread Dave Newton
--- On Wed, 11/26/08, Tomi21 [EMAIL PROTECTED] wrote:
 What I've done next is changing 'struts.xml' so
 there are no interceptors configured.
 The packagedoes not extend struts-default anymore.
 The action is still being executed but the parameter is not
 being set anyway.:(

Well that's hardly surprising, it's an interceptor that sets parameters.

On your previous example the test println isn't even being executed, so there's 
something else wrong, no? What if you use the url tag's action attribute w/o 
the .action extension? Is the link rendering properly?

In general we don't use the s:a... tag for non-Ajax URLs, too--what if you 
use a plain HTML a... tag with the generated URL?

Dave


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



need to create servlet

2008-11-26 Thread Fernandes, Filipe
We're working on a struts 2 application in Websphere and the plan is to
serve static content via the IBM Http Server while all other requests
are forwarded to the application server.

 

We're having trouble forwarding action requests to the app server, but
there's an FAQ that describes what needs to be done.

 

http://www-01.ibm.com/support/docview.wss?rs=177context=SSEQTJdc=DB560
dc=DB520uid=swg21315589loc=en_UScs=UTF-8lang=enrss=ct177websphere

 

 

The question is, how do we create a separate server context root for
*.action in order to get rid of the filter mappings in the web.xml?  Any
hints would be appreciated...

 

thanks,

filipe



RE: need to create servlet

2008-11-26 Thread Fernandes, Filipe
Filipe Fernandes wrote:
 The question is, how do we create a separate server context root for
 *.action in order to get rid of the filter mappings in the web.xml?
Any
 hints would be appreciated...

I forgot to mention that a LaunchServlet example is available in the
following webpage, but the example is far from complete.

http://struts.apache.org/2.x/docs/websphere.html

thanks,
filipe


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



Re: need to create servlet

2008-11-26 Thread Steven Yang
I am guessing its suggesting you have one context root for static content
and another root for your actions and stuff.
for example you might have something like

for actions
http://localhost/actions/login.action

and for static contents

http://localhost/static/login.png

and in your login.action jsp you will have to refer to login.png as

img src='/static/login.png'/

and in the HTTP server you set it to only intercept /static

I am just guessing
see if this helps