Re[2]: no struts classes (jar files) found by application

2004-06-22 Thread Dirk Markert
Hello Michael,

  

***

MK> Hello Dirk,

MK> thanks for your answer.

MK> That means that I end up with tons of redundant struts packages on my
MK> production machines and many redundantdantdant class loading processes
MK> on server startup. Oh well, hard to digest ...

MK> BTW, do you know by any chance whether this applies to the velocity
MK> packages and to the commons libraries too?

Bill in an earlier mail gives you the link to a document describing
the problem in more detail. I don't know whether velocity can be put
into the shared directory, but I doubt and wouldn't advise.

MK> It seems that struts also requires that all the libraries that it 
MK> depends on are located in the WEB-INF/lib diretory as well.

MK> Is that also right?


MK> Greetings

MK> Michael Kastner



MK> Dirk Markert schrieb:
>> Hello Michael,
>> 
>>   
>> 
>> ***
>> 
>> MK> Hello,
>> 
>> MK> maybe someone can help. I've tried to deploy two struts applications to
>> MK> two tomcat test servers (one running tomcat 5.0 and one running tomcat
>> MK> 4.1) but I can't get it to work on neither of them.
>> 
>> MK> For development purposes I had all required jar files in the 
>> MK> application's WEB-INF lib. Then I've removed them all and deployed my
>> MK> war files to the servers.
>> 
>> MK> I've put all the struts _war_ files from the jakarta-struts-1.1/webapps
>> MK> dir into my server's _webapps_ dir as described in the installation part
>> MK> of the struts documentation.
>> 
>> MK> After restarting the _servers_ all applications in my webapps folder
>> MK> were properly deployed but my own struts application (which is not
>> MK> located in the webapps dir) could neither find the struts classes nor
>> MK> any other classes required.
>> 
>> MK> Does anybody know why?
>> 
>> MK> How can I make Tomcat (4 and 5) find the struts jar files i.e. classes?
>> 
>> MK> The only way I can get my application running is to put all required
>> MK> jars into the application's WEB-INF/lib directory. Since this is not my
>> MK> only struts application I end up with multiple copies of theses jar
>> MK> files on the same server.
>> 
>> MK> It works that way, but that's not how it's supposed to work, or is there
>> MK> something I am missing?
>> 
>> That's exactly the way it is supposed to work. Don't try anything
>> else.
>> 
>> MK> Any help is appreciated.
>> 
>> 
>> MK> Greetings
>> 
>> MK> Michael Kastner
>> 
>> 
>> MK>
>> -
>> MK> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> MK> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
>> Regards,
>> Dirk
>> 
>> +--- Quality leads ---+
>> | Dirk Markert [EMAIL PROTECTED] |
>> | Dr. Markert Softwaretechnik AG  |
>> | Joseph-von-Fraunhofer-Str. 20   |
>> | 44227 Dortmund  |
>> +-->>> to success! <<-+ 
>> 
>> 



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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 


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



RE: How To Create a Form That Contains Two Drop-Down Menu?

2004-06-22 Thread Joe Hertz
I'm not getting your question.

You'd have 




 -- I assume an OptionsCollection or Options tag follows. I generally
don't do it that way...


 -- I assume an OptionsCollection or Options tag follows. I generally
don't do it that way...


...etc

It's doesn't look like your lists content is going to be variable,
right? Why not just use a properties file?

> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 22, 2004 11:06 PM
> To: [EMAIL PROTECTED]
> Subject: How To Create a Form That Contains Two Drop-Down Menu?
> 
> 
> I know how to create a drop-down menu; for example:
> 
>  ArrayList sort = new ArrayList();
>  sort.add(new LabelValueBean("Last Post 
>  Date", "thread_last_post_date"));  
> sort.add(new LabelValueBean("First Post 
>  Date", "thread_creation_date"));  
> sort.add(new LabelValueBean("Sender 
>  Name", "message_sender"));
>  sort.add(new LabelValueBean
> ("Replies",
> "thread_reply_count"));
>  sort.add(new LabelValueBean
> ("Views", "thread_view_count"));  
> saveResult(Tokens.MENU_SORT,sort,controls);
> 
>  ArrayList order = new ArrayList();
>  order.add(new LabelValueBean("Descending", "DESC"));  
> order.add(new LabelValueBean("Ascending", "ASC"));  
> saveResult(Tokens.MENU_ORDER,order,controls);
> 
>  ProcessResult results = new ProcessResultBase
>(controls);  
> results.setAggregate(true); 
>  return results;
> 
> 
> I also know how to display drop-down lists.
> 
> I have to put those two drop-down menus in a form
> (sortForm) so that I can have  action=..> with a submit button to perform an
> action with users' selections.
> 
> How do I create such a form?
> 
> 
>   
> __
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out! 
http://promotions.yahoo.com/new_mail

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



[OT] Issues while developing and deploying enterprise application

2004-06-22 Thread Navjot Singh
hi,
I have N ejb jars packaged into a single EAR file.
1. ProductEJB.jar ( with entities Product, Category etc..)
2. OrderEJB.jar (with entities OrderItem, Orders etc..)

Now, i have a unidirectional cmr based relation OrderItem-Product where 
each item refers to one of the products. But both entities are defined 
in separate ejb-jar.xml.

According to EJB specs, the entities for which are involved in the 
relation using cmr-field MUST be in same DD (ejb-jar.xml), which means i 
can't have separate DDs.

Q1.
If i generate somehow a common DD for all modules and place them in 1 
ejb module, rest of the modules will have empty META-INF directory.
Will it be recognized as valid EJB module by the EJB container?

Q2.
In a large enterprise application, we have many related modules which 
need to be developed independently by diff teams. This restriction 
completely thwarts the possibility of independent module development as 
still the DDs are to be generated a single large monolithic file.

Any suggestions how to develop in these scenarios.
Navjot Singh
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


New Validating system instructions?

2004-06-22 Thread David Erickson
Just wondering if there are any docs up on how the validator works in the
new nightly builds of struts... trying to transition everything to using
ActionMessages and storing the errors/messages under different keys within
that object, just wondering how to do that using the validator.xml plugin.
Thanks,
David


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



How To Create a Form That Contains Two Drop-Down Menu?

2004-06-22 Thread Caroline Jen
I know how to create a drop-down menu; for example:

 ArrayList sort = new ArrayList();
 sort.add(new LabelValueBean("Last Post 
 Date", "thread_last_post_date"));
 sort.add(new LabelValueBean("First Post 
 Date", "thread_creation_date"));
 sort.add(new LabelValueBean("Sender 
 Name", "message_sender"));
 sort.add(new LabelValueBean
("Replies",
"thread_reply_count"));
 sort.add(new LabelValueBean
("Views", "thread_view_count"));
 saveResult(Tokens.MENU_SORT,sort,controls);

 ArrayList order = new ArrayList();
 order.add(new LabelValueBean("Descending", "DESC"));
 order.add(new LabelValueBean("Ascending", "ASC"));
 saveResult(Tokens.MENU_ORDER,order,controls);

 ProcessResult results = new ProcessResultBase
   (controls);
 results.setAggregate(true); 
 return results;


I also know how to display drop-down lists.

I have to put those two drop-down menus in a form
(sortForm) so that I can have  with a submit button to perform an
action with users' selections.

How do I create such a form?



__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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



RE: Actions and Anchors

2004-06-22 Thread Frank Zammetti
I haven't tried this, but...
Instead of doing what is usually done in an action, that is, ending with...
return mapping.findForward("whatever");
...get a reference to the ActionForward returned like so...
ActionForward af = mapping.findForward("whatever");
...then, add your anchor portion like so...
af.setPath(af.getPath() + "#theAnchor");
...and finally
return af;
...and your done.  Again, I haven't tried this, but I suspect it would work.
Frank

From: Christopher Marsh-Bourdon <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Actions and Anchors
Date: Tue, 22 Jun 2004 22:19:40 +0100
Evening All
I have a sticky problem, and it goes something like this:
I have a JSP which will be returned by an Action.  On this JSP page there
are a fair few Anchors like: I¹m an Anchor.
Normally (well under Servlets) you can pass a parameter in the url like
this: http://www.pyplia.com/wibble.jsp#ImAnAnchor, and the browser will 
take
you to the point of the Anchor.  Has anyone managed to get this to work
under Struts Actions?

Cheers in advance
Christopher Marsh-Bourdon
Pyplia Limited
www.pyplia.com  WWW

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

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


Tiles and Module Paths

2004-06-22 Thread David Erickson
I'm using one of the newest daily builds of struts, and I am employing
modules within my app.  Each struts config file declares tiles as a plugin
and its associated tiles-XXX.xml mapping.  What is strange to me is that
while the struts actions are all relative to its module name, the tiles defs
are still relative to the context of the app, even tho they are being
declared on a per module basis.  Here's how I'm declaring it.. if anyone has
insight please help.

Example of the declaration within my struts-admin.xml module:
 
  
  
  
 

and yet within the definition i still have to specify /admin..
 
  
 

Any ideas?
thanks,
David Erickson


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



Tiles config dtd not found

2004-06-22 Thread Ashwin D
Hi,

Our application resides on a machine which does not
have a direct connection to the internet. So, I have
changed all the references to dtds to be on the local
machine.

The struts & the tiles config file reference their 
dtds in the same directory.



This works fine with Struts. However, Tiles throws an
exception at runtime about not being able to get the
DTD. Also, Tiles tries to look for the DTD in the
directory from which Tomcat was started. 

for e.g. if tomcat is started from /usr/app, Tiles
tries to look for the DTD in /usr/app

It looks like a bug with Tiles. I am wondering if
there is a known patch / fix to correct this problem.

I am using Struts 1.1 (official release) with Tomcat
5.0.19. 

Ashwin. 





__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



RE: Actions and Anchors

2004-06-22 Thread Wendy Smoak
From: Christopher Marsh-Bourdon [mailto:[EMAIL PROTECTED] 
> Normally (well under Servlets) you can pass a parameter in 
> the url like
> this: http://www.pyplia.com/wibble.jsp#ImAnAnchor, and the 
> browser will take
> you to the point of the Anchor.  Has anyone managed to get 
> this to work under Struts Actions?

Sure, I just clicked on a link and the resulting URL is:
https://www.example.com/mywebapp/viewProfile.do?section=10#10

I have a bunch of links that hide/show different sections of a "profile"
which contains information about a person in the system.  Users can
choose whether or not to display each section.  Works fine... There is
some JavaScript involved in mine, but I don't think it's required.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 


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



Re: RE : problem with returning a pdf

2004-06-22 Thread Niall Pemberton
A couple of comments - I'm streaming pdf files and using IE6 and my action
is only called once - are you sure its not a pre IE6 issue?

Secondly - what about implementing this behaviour in the request processor.
You could customise ActionMapping to add a contentType property - when
required you set this in the struts-config.xml for your Action - so in your
case set it to "application/pdf". The in your custom RequestProcessor if the
ActionMappings content type has been set and the "user-agent" is "contype"
then set the content type to the value specified and return. I've put sample
code for this below...


** Create your own custom ActionMapping and add a "contentType" property
with appropriate getters/setters.

** Create your own custom RequestProcessor and override the processMapping()
method - if the contentType property has been set for the ActionMapping,
then do your check

   protected ActionMapping processMapping(HttpServletRequest request,
   HttpServletResponse response,
   String path)

   ActionMapping  mapping = super.processMapping(request, response,
path);

   if (mapping == null || !(mapping instancof MyActionMapping))
   return mapping;

  // get content type set in struts-config.xml
  String contentType = ((MyActionMapping)mapping).getContentType();

  //the user-agent is set to contype only for the first request
  if (contentType != null &&
   request.getHeader("user-agent").equals("contype")) {
response.setContentType(contentType);
response.setStatus(HttpServletResponse.SC_OK);
return null;
 }

 return mapping;

  }

** Configure Struts to use your custom ActionMapping class and set the
contentType property on the appropriate mapping. In the struts-config.xml

   
   

   
   

** Configure Struts to use your custom RequestProcessor. In the
struts-config.xml

  

Niall


- Original Message - 
From: "tvvincam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 22, 2004 2:43 AM
Subject: Re: RE : problem with returning a pdf


Thanks for your help Frank, Davlid, Shayam,

Unfortunatly, non of the solutions worked.

I renamed my reset method in the form bean and am calling it manually
at the end of the action - this stops the booleans from being reset
when IE resubmits the request. Dodgy but it works.

Also, there was a bit of code on java.sun.com forum which helps to
stop the action from processing all the business logic 3 times, but
execute method is still called 3 times:

//work-around for IE streaming pdf bug
//http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293792
String accLang = request.getHeader("accept-language");
String theAgent = request.getHeader("user-agent");

//the user-agent is set to contype only for the first request
if (request.getHeader("user-agent").equals("contype")) {
   response.setContentType("application/pdf");
   response.setStatus(HttpServletResponse.SC_OK);
   return null;
}

// IE 5.5 and IE 6 only has an accept-language header on the first
request so if present
// ignore this request
if (theAgent.indexOf("MSIE") != -1) {
 if (accLang != null) {
   response.setContentType("application/pdf");
   response.setStatus
(HttpServletResponse.SC_OK);
   return null;
 }
}

Cheers,
N



--- In [EMAIL PROTECTED], "David Gagnon" <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  You can also look how FOP work around this problem:
>
> http://xml.apache.org/fop/faq.html#iex-servlet-multiple
>
> /David
>
> -Message d'origine-
> De : tvvincam [mailto:[EMAIL PROTECTED]
> Envoyé : June 20, 2004 22:22
> À : [EMAIL PROTECTED]
> Objet : problem with returning a pdf
>
> Hi,
>
> I'm using JasperReports to create a pdf based on user criteria
> submitted via a struts form.
>
> I've run into a problem with a feature in IE
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293792
>
> Basically, IE will resubmit the request 3 times. This is causing a
> problem because the reset method is called on my form bean and
wipes
> out all my boolean selection criteria.
>
> The iText web site http://www.lowagie.com/iText/faq.html#msie
> has the following work around:
> 
> 
>   http://myserver/pdfCreationServlet"; width="100%"
> height="100%" type=application/pdf fullscreen="yes">
> 
> 
>
> but I cannot figure out how to get the user input using this method.
>
> Is there a way around this problem? The only way I can think of
doing
> is to save the pdf byte[] in session and then get redirect the user
> to the above work around page. The above link will point to another
> action which will get the pdf byte[] from session and write it to
the
> response. I really don't like this solution and would appreciate
any
> help.
>
> Cheers,
> N
>
>
> 
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Re: Preventing user from validating a form twice

2004-06-22 Thread Colin Kilburn
Olivier,
Here's the article that Jacob is talking about (I think):
http://www.javaworld.com/javaworld/javatips/jw-javatip136.html
I'm using this approach and am very pleased.
Colin
Hookom, Jacob wrote:
Look up request tokens in the documentation/API.
There was also an article on www.javaworld.com a while back that you can
search for.
-Original Message-
From: Olivier Citeau [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 22, 2004 4:10 PM
To: [EMAIL PROTECTED]
Subject: Preventing user from validating a form twice

Hi,
i think it must be a FAQ, but i did not found anything on
this issue.
When my user submits a form, the action executes an SQL
Insert in the DBMS.
What happened is that when user click twice, the second
inserts fails with SQLException.
What is strange, is that i cannot reproduce it in WSAD, but
it happens on a full Websphere.
Is there a way i can know that a user already submitted a
form ?
=
Olivier Citeau
Paris, France




Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez
Yahoo! Messenger sur http://fr.messenger.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

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


RE: Preventing user from validating a form twice

2004-06-22 Thread Hookom, Jacob
Look up request tokens in the documentation/API.

There was also an article on www.javaworld.com a while back that you can
search for.

-Original Message-
From: Olivier Citeau [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 22, 2004 4:10 PM
To: [EMAIL PROTECTED]
Subject: Preventing user from validating a form twice

Hi,
i think it must be a FAQ, but i did not found anything on
this issue.
When my user submits a form, the action executes an SQL
Insert in the DBMS.
What happened is that when user click twice, the second
inserts fails with SQLException.
What is strange, is that i cannot reproduce it in WSAD, but
it happens on a full Websphere.

Is there a way i can know that a user already submitted a
form ?

=

Olivier Citeau

Paris, France







Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez
Yahoo! Messenger sur http://fr.messenger.yahoo.com

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

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



Actions and Anchors

2004-06-22 Thread Christopher Marsh-Bourdon
Evening All

I have a sticky problem, and it goes something like this:

I have a JSP which will be returned by an Action.  On this JSP page there
are a fair few Anchors like: I¹m an Anchor.
Normally (well under Servlets) you can pass a parameter in the url like
this: http://www.pyplia.com/wibble.jsp#ImAnAnchor, and the browser will take
you to the point of the Anchor.  Has anyone managed to get this to work
under Struts Actions?

Cheers in advance

Christopher Marsh-Bourdon
Pyplia Limited 
www.pyplia.com  WWW




RE: Calling a static method using bean write tag

2004-06-22 Thread [EMAIL PROTECTED]
I would look at perhaps encapsulating this functionality with a Custom Tag.  This way 
you can define the functioanlity you want and how you want to return it to the 
JSP/HTML/...

They are very easy to knock up and really allow you to extend the functionality you 
can embed.

Cheers

Christopher Marsh-Bourdon
Pyplia Limited

 Original Message 
To: Struts Users Mailing List <[EMAIL PROTECTED]>
From: Suresh S <[EMAIL PROTECTED]>
Date: 22 Jun 2004 16:18:27 +0530
Subject: Calling a static method using bean write tag

Hi all,

Is it possible to call directly a static method using  tag
.Actually i need to write something in the jsp with help of some utility
class and the utility class is static.But it seems  tag
requires  so is there any other way to do this?

Thanx in Advance for u r suggestions :)



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



Preventing user from validating a form twice

2004-06-22 Thread Olivier Citeau
Hi,
i think it must be a FAQ, but i did not found anything on
this issue.
When my user submits a form, the action executes an SQL
Insert in the DBMS.
What happened is that when user click twice, the second
inserts fails with SQLException.
What is strange, is that i cannot reproduce it in WSAD, but
it happens on a full Websphere.

Is there a way i can know that a user already submitted a
form ?

=

Olivier Citeau

Paris, France







Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! 
Messenger sur http://fr.messenger.yahoo.com

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



Re: RE : problem with returning a pdf

2004-06-22 Thread tvvincam
Thanks for your help Frank, Davlid, Shayam,

Unfortunatly, non of the solutions worked.

I renamed my reset method in the form bean and am calling it manually
at the end of the action - this stops the booleans from being reset
when IE resubmits the request. Dodgy but it works.

Also, there was a bit of code on java.sun.com forum which helps to
stop the action from processing all the business logic 3 times, but
execute method is still called 3 times:

//work-around for IE streaming pdf bug
//http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293792
String accLang = request.getHeader("accept-language");
String theAgent = request.getHeader("user-agent");

//the user-agent is set to contype only for the first request
if (request.getHeader("user-agent").equals("contype")) {
   response.setContentType("application/pdf");
   response.setStatus(HttpServletResponse.SC_OK);
   return null;
}

// IE 5.5 and IE 6 only has an accept-language header on the first
request so if present
// ignore this request
if (theAgent.indexOf("MSIE") != -1) {
 if (accLang != null) {
   response.setContentType("application/pdf");
   response.setStatus
(HttpServletResponse.SC_OK);
   return null;
 }
}

Cheers,
N



--- In [EMAIL PROTECTED], "David Gagnon" <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  You can also look how FOP work around this problem:
>
> http://xml.apache.org/fop/faq.html#iex-servlet-multiple
>
> /David
>
> -Message d'origine-
> De : tvvincam [mailto:[EMAIL PROTECTED]
> Envoyé : June 20, 2004 22:22
> À : [EMAIL PROTECTED]
> Objet : problem with returning a pdf
>
> Hi,
>
> I'm using JasperReports to create a pdf based on user criteria
> submitted via a struts form.
>
> I've run into a problem with a feature in IE
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293792
>
> Basically, IE will resubmit the request 3 times. This is causing a
> problem because the reset method is called on my form bean and
wipes
> out all my boolean selection criteria.
>
> The iText web site http://www.lowagie.com/iText/faq.html#msie
> has the following work around:
> 
> 
>   http://myserver/pdfCreationServlet"; width="100%"
> height="100%" type=application/pdf fullscreen="yes">
> 
> 
>
> but I cannot figure out how to get the user input using this method.
>
> Is there a way around this problem? The only way I can think of
doing
> is to save the pdf byte[] in session and then get redirect the user
> to the above work around page. The above link will point to another
> action which will get the pdf byte[] from session and write it to
the
> response. I really don't like this solution and would appreciate
any
> help.
>
> Cheers,
> N
>
>
> 
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> 
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: Different form tags on same jsp

2004-06-22 Thread Geeta Ramani
Chris, i think what David is trying to say is that such a test of authorization does 
not belong in a tag (because of the nesting problem). An easy and (non-javascript!) 
way of dealing with this is to in the Action *before* the jsp is shown, determine what 
the authority of the user is and then display the correct jsp. Since I think the 
original problem was to not have two different jsps, an appropraite include can be 
used instead (decide at run-time which include to use) and thus reuse the form. 
(Though in my experience, (vast though it is *not*!), reusing jsps is just a headache. 
Writing and maintaining two or more jsps is not that much extra work especially if you 
keep them dumb (like you are supposed to).. just my opinion though..)

Regards,
Geeta

> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 3:11 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Different form tags on same jsp
> 
> 
> Can someone illustrate an example of this?
> 
> -Original Message-
> From: Hibbs, David [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 22, 2004 2:51 PM
> To: Struts Users Mailing List
> Subject: RE: Different form tags on same jsp
> 
> 
> You've got a tag nesting error, to be sure.  This is like doing 
>   
> 
>   
> 
> ...or at least to a JSP compiler it is.
> 
> The solution to your problem is that the form action 
> attribute (and onsubmit
> attribute) can be a runtime expression.
> 
> David Hibbs, ACS
> Staff Programmer / Analyst
> American National Insurance Company
> 
> > -Original Message-
> > From: Pavlikus [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, June 22, 2004 12:53 PM
> > To: Struts Users Mailing List
> > Subject: Different form tags on same jsp
> > 
> > 
> > Hi all.
> > I want to reuse the jsp page with form where user can 
> Register or Edit 
> > Profile.
> > 
> > I do like:
> > 
> > 
> >   
> >> onsubmit="return validateRegistrationForm(this);">
> > 
> > 
> > 
> >   
> >> onsubmit="return validateEditProfileForm(this);">
> > 
> > 
> > I expect what it render form tag for registrationForm if user have 
> > GUEST_ROLE role, and tag for editProfileForm is user have prepotent 
> > roles.
> > 
> > But when jsp compiles - it show following error:
> > -- The end tag " > 
> > What happen? Is it possible to render different form tags with this 
> > method at all?
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Fwd: Re[4]: Different form tags on same jsp

2004-06-22 Thread Pavlikus
GR> Pavlikus, the error message you posted was:

>> >> But when jsp compiles - it show following error:
>> >> -- The end tag " So are you saying this is not the error you got (or are getting now?)
GR> In any case, post the error you got and then maybe someone can take it from there.

Ok.
The code:

  
  


Error message:
[ServletException in:/WEB-INF/tiles/profile/ProfileFormTile.jsp]
/WEB-INF/tiles/profile/ProfileFormTile.jsp(16,0)
The end tag " I think you are writing your own tag lib, yes? In which case
GR> I am not sure what the problem may be since we don't have the
GR> code..:)
I want to share the sources of this taglib. But my poor English...
Sourceforge reject my request, because description I wrote is unclear
to understand. May be some of you might help me with quality
English... I will be thankfulness :)





-- 
Best regards,
 Pavlikusmailto:[EMAIL PROTECTED]
===8<===End of original message text===



-- 
Best regards,
 Pavlikusmailto:[EMAIL PROTECTED]


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



RE: Different form tags on same jsp

2004-06-22 Thread CRANFORD, CHRIS
Can someone illustrate an example of this?

-Original Message-
From: Hibbs, David [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 22, 2004 2:51 PM
To: Struts Users Mailing List
Subject: RE: Different form tags on same jsp


You've got a tag nesting error, to be sure.  This is like doing 




...or at least to a JSP compiler it is.

The solution to your problem is that the form action attribute (and onsubmit
attribute) can be a runtime expression.

David Hibbs, ACS
Staff Programmer / Analyst
American National Insurance Company

> -Original Message-
> From: Pavlikus [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 12:53 PM
> To: Struts Users Mailing List
> Subject: Different form tags on same jsp
> 
> 
> Hi all.
> I want to reuse the jsp page with form where user can Register or Edit 
> Profile.
> 
> I do like:
> 
> 
>   
>onsubmit="return validateRegistrationForm(this);">
> 
> 
> 
>   
>onsubmit="return validateEditProfileForm(this);">
> 
> 
> I expect what it render form tag for registrationForm if user have 
> GUEST_ROLE role, and tag for editProfileForm is user have prepotent 
> roles.
> 
> But when jsp compiles - it show following error:
> -- The end tag " 
> What happen? Is it possible to render different form tags with this 
> method at all?
> 
> 

-
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: Re[2]: Different form tags on same jsp

2004-06-22 Thread Geeta Ramani
Pavlikus, the error message you posted was:

> >> But when jsp compiles - it show following error:
> >> -- The end tag " -Original Message-
> From: Pavlikus [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 2:22 PM
> To: Struts Users Mailing List
> Subject: Re[2]: Different form tags on same jsp
> 
> 
> I'm sorry, this is just misprint when I typing letter. I decide to
> simplify example and make an error.
>  

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



RE: Different form tags on same jsp

2004-06-22 Thread Hibbs, David
You've got a tag nesting error, to be sure.  This is like doing





...or at least to a JSP compiler it is.

The solution to your problem is that the form action attribute (and onsubmit
attribute) can be a runtime expression.

David Hibbs, ACS
Staff Programmer / Analyst
American National Insurance Company

> -Original Message-
> From: Pavlikus [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 12:53 PM
> To: Struts Users Mailing List
> Subject: Different form tags on same jsp
> 
> 
> Hi all.
> I want to reuse the jsp page with form where user can Register or Edit
> Profile.
> 
> I do like:
> 
> 
>   
>onsubmit="return validateRegistrationForm(this);">
> 
> 
> 
>   
>onsubmit="return validateEditProfileForm(this);">
> 
> 
> I expect what it render form tag for registrationForm if user have
> GUEST_ROLE role, and tag for editProfileForm is user have prepotent
> roles.
> 
> But when jsp compiles - it show following error:
> -- The end tag " 
> What happen? Is it possible to render different form tags with this
> method at all?
> 
> 

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



RE: Re[2]: Different form tags on same jsp

2004-06-22 Thread Pingili, Madhupal

Looking at this :

  
  


 is missing closing tag
.

Just give another try with closing .

Reddy Pingili

> -Original Message-
> From: Pavlikus [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 2:22 PM
> To:   Struts Users Mailing List
> Subject:  Re[2]: Different form tags on same jsp
> 
> Hello Geeta,
> 
> Tuesday, June 22, 2004, 8:47:08 PM, you wrote:
> 
> GR> Hi Pavlikus :
> 
> GR> I think you may just have a typo:
> 
> GR>  <-- don't end tag here..
> 
> I'm sorry, this is just misprint when I typing letter. I decide to
> simplify example and make an error.
> 
> Original tags:
> 
> 
>   
>   
> 
> 
> 
>
>
> 
> 
> May be something wrong with my taglib? How can I determine it?
> 
> 
> GR> Regards,
> GR> Geeta
> 
> 
> >> -Original Message-
> >> From: Pavlikus [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, June 22, 2004 1:53 PM
> >> To: Struts Users Mailing List
> >> Subject: Different form tags on same jsp
> >> 
> >> 
> >> Hi all.
> >> I want to reuse the jsp page with form where user can Register or Edit
> >> Profile.
> >> 
> >> I do like:
> >> 
> >> 
> >>   
> >>>> onsubmit="return validateRegistrationForm(this);">
> >> 
> >> 
> >> 
> >>   
> >>>> onsubmit="return validateEditProfileForm(this);">
> >> 
> >> 
> >> I expect what it render form tag for registrationForm if user have
> >> GUEST_ROLE role, and tag for editProfileForm is user have prepotent
> >> roles.
> >> 
> >> But when jsp compiles - it show following error:
> >> -- The end tag " >> 
> >> What happen? Is it possible to render different form tags with this
> >> method at all?
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



RE: Struts 1.1 / WebSphere 5.1 logging - [SOLVED]

2004-06-22 Thread Pingili, Madhupal
Hello All,
Thanks to all who have responded to the same post on commons-user list.
Here are the settings that solved the problem:
After deploying J2EE app (.ear) on WAS 5.1, make sure you have 
Classloader mode as PARENT_LAST  and WAR Classloader Policy as
Application.

Now it's logging all messages it is supposed to log, just like the app 
on WAS 4.0.4.


Reddy Pingili 


> -Original Message-
> From: Pingili, Madhupal 
> Sent: Friday, June 18, 2004 10:50 AM
> To:   'Struts Users Mailing List'
> Subject:  Struts 1.1 / WebSphere 5.1 logging
> 
> 
> I have a web application developed with Struts 1.1 running on WebSphere
> 4.0.4 successfully.
> Now, if I deploy the same app on WebSphere 5.1, there is no log file
> created.
> I am using commons-logging.properties:
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> 
> and log4j.properties with 2 rolling file appenders to create 2 log files.
> 
> Has anyone come across the logging issues when porting the web app to
> WebSphere 5.1?
> 
> Any help or links to resources is appreciated.
> 
> 
> Reddy Pingili
> 
> 
> 
> -
> 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[2]: Different form tags on same jsp

2004-06-22 Thread Pavlikus
Hello Geeta,

Tuesday, June 22, 2004, 8:47:08 PM, you wrote:

GR> Hi Pavlikus :

GR> I think you may just have a typo:

GR>  <-- don't end tag here..

I'm sorry, this is just misprint when I typing letter. I decide to
simplify example and make an error.

Original tags:


  
  



   
   


May be something wrong with my taglib? How can I determine it?


GR> Regards,
GR> Geeta


>> -Original Message-
>> From: Pavlikus [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, June 22, 2004 1:53 PM
>> To: Struts Users Mailing List
>> Subject: Different form tags on same jsp
>> 
>> 
>> Hi all.
>> I want to reuse the jsp page with form where user can Register or Edit
>> Profile.
>> 
>> I do like:
>> 
>> 
>>   
>>   > onsubmit="return validateRegistrationForm(this);">
>> 
>> 
>> 
>>   
>>   > onsubmit="return validateEditProfileForm(this);">
>> 
>> 
>> I expect what it render form tag for registrationForm if user have
>> GUEST_ROLE role, and tag for editProfileForm is user have prepotent
>> roles.
>> 
>> But when jsp compiles - it show following error:
>> -- The end tag "> 
>> What happen? Is it possible to render different form tags with this
>> method at all?



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



RE: Pulling Punches

2004-06-22 Thread mike
In my humble opinion, which is humble for good reason, learning the ins and 
outs and use of reflection is one of the most important things a Java 
developer can do to enhance his or her career.

Mike
At 10:49 AM 6/22/2004, Frank Zammetti wrote:
This is similar to some things we've done or thought about.
Well, at least that makes me think I'm on the right track :)
Personally, I'm a pretty big fan of using reflection to find methods (a 
la DispatchAction) although I do think that some folks find it less appealing.
I've always been a bit concerned about the overhead and performance 
implications of reflection.  Certainly Struts itself shows that it's 
perhaps not as bad as I fear, and I would agree that you tend to get more 
elegant results using it.  Certainly, simplifying the configuration files 
is a nice benefit that I'm certainly in favor of.  Ok, you've convinced me :)

Of course, if you want to introspect to invoke a method, you have to have 
a well-defined parameter list.  Here's where I think adding a 
"StrutsContext" object which encapsulates form, mapping, request, and 
response might help.
Interestingly, I just converted an application to Struts from a home-grown 
framework, and that's one of the concepts I actually had to do away with!
Well, didn't HAVE to, I could have written my own context class to take 
the place of what was there, but it seemed more "proper"  in light of how 
Struts currently is implemented to get rid of it.  Just a little anecdotal 
thing though, I have no real point :)

More importantly, though, wouldn't you want to hang the "PrepView" 
configuration off of the forward config instead of the ActionMapping?
Well, now your kind of extending what I was thinking, which is good!  I 
was thinking in terms of a failed validation returning to an input page 
that maybe has some drop-downs that need to be populated.  I think that 
should be hung off the  tags.  But, your right, what about 
forwarding to a page that needs prep work too?  In that case, yes, the 
 is clearly, to me anyway, the right place to put it.  So, maybe 
that attribute should exist for both tags, in my view of things anyway.

How to implement the actual configuration is the major outstanding 
question in my mind before I'd be ready to try implementing it.  I'd love 
to hear some opinions...
Maybe just to be a little more generic, you have a "PrepClass" attribute 
for both  and  tags, both optional.  If present, the 
request processor (whcih you'd have to modify obviously) would call on 
that class (some standard method probably?) to do the prep work.  I guess 
you'd probably need a form bean specification for the forwards, and then 
instantiate to pass to the prep class but never do any validation on it.
That part could be a little tricky, just to work out all the possible 
flows and being sure the correct form(s) are present when they need to be, etc.

Frank
Joe
--
Joe Germuska[EMAIL PROTECTED]  http://blog.germuska.com"In 
fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll 
know I'm in the wrong place."
   - Carlos Santana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
From 'will you?' to 'I do,' MSN Life Events is your resource for Getting 
Married. http://lifeevents.msn.com/category.aspx?cid=married

-
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: Different form tags on same jsp

2004-06-22 Thread Geeta Ramani
Hi Pavlikus :

I think you may just have a typo:

 <-- don't end tag here..

Regards,
Geeta


> -Original Message-
> From: Pavlikus [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 1:53 PM
> To: Struts Users Mailing List
> Subject: Different form tags on same jsp
> 
> 
> Hi all.
> I want to reuse the jsp page with form where user can Register or Edit
> Profile.
> 
> I do like:
> 
> 
>   
>onsubmit="return validateRegistrationForm(this);">
> 
> 
> 
>   
>onsubmit="return validateEditProfileForm(this);">
> 
> 
> I expect what it render form tag for registrationForm if user have
> GUEST_ROLE role, and tag for editProfileForm is user have prepotent
> roles.
> 
> But when jsp compiles - it show following error:
> -- The end tag " 
> What happen? Is it possible to render different form tags with this
> method at all?
> 
> 
> -
> 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: Different form tags on same jsp

2004-06-22 Thread DGraham

You've closed this tag -.
/>
  
  








Pavlikus <[EMAIL PROTECTED]>

06/22/2004 01:52 PM



Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"Struts Users Mailing
List" <[EMAIL PROTECTED]>


cc



Subject
Different form tags on same
jsp








Hi all.
I want to reuse the jsp page with form where user can Register or Edit
Profile.

I do like:


  
  



  
  


I expect what it render form tag for registrationForm if user have
GUEST_ROLE role, and tag for editProfileForm is user have prepotent
roles.

But when jsp compiles - it show following error:
-- The end tag "

What happen? Is it possible to render different form tags with this
method at all?


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


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

Re: How to use dynamically generated CSS style with Struts tags

2004-06-22 Thread Frank Zammetti
I had to do something almost identical... My solution was to make my CSS 
file a JSP, and when I referenced that stylesheet in all the other JSP's, I 
did:


where styles.act is actually an ActionMapping.  I then had my StylesAction 
class, just like any other Action, that got some info out of the database 
and passed it along to the JSP, then I just used all the normal JSP/taglib 
functionality to dynamically build the CSS content.

Frank
From: Bill Siggelkow <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: How to use dynamically generated  CSS style with Struts tags
Date: Tue, 22 Jun 2004 13:28:47 -0400
Sounds like a custom JSP tag would work pretty well here ...
Voinea, Marina wrote:
Hi everybody,
Can you please help with the following question:
  What are the possible ways (and best) to modify the style sheet at run 
time using Struts framework?
 Our application is  using Struts tags which refer to a static style 
sheet elements as presented below:

 
 We need at run time to extract user settings from DB (fonts, colors) and 
generate a style sheet accordingly .
  We could generate the style sheet text file for the user and store it 
somewhere on the disk and then refer to it, but then we may have too many 
files (for all active users). There must be a more dynamic and elegant 
soultion...
  Can we use the Struts html:link and pass a String to the "style" 
attribute of the html:link of the tag ? (It would be good for this string 
to be extracted from a bean prepared by an action).

  Any example of XSL taglib and Struts tag integration ?   This is a very 
important element for trully dynamic pages ... Any good experience that we 
can learn from?

  Thank you very much,
  Marina

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN Movies - Trailers, showtimes, DVD's, and the latest news from Hollywood! 
http://movies.msn.click-url.com/go/onm00200509ave/direct/01/

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


Different form tags on same jsp

2004-06-22 Thread Pavlikus
Hi all.
I want to reuse the jsp page with form where user can Register or Edit
Profile.

I do like:


  
  



  
  


I expect what it render form tag for registrationForm if user have
GUEST_ROLE role, and tag for editProfileForm is user have prepotent
roles.

But when jsp compiles - it show following error:
-- The end tag "

RE: Pulling Punches

2004-06-22 Thread Frank Zammetti
This is similar to some things we've done or thought about.
Well, at least that makes me think I'm on the right track :)
Personally, I'm a pretty big fan of using reflection to find methods (a la 
DispatchAction) although I do think that some folks find it less appealing.
I've always been a bit concerned about the overhead and performance 
implications of reflection.  Certainly Struts itself shows that it's perhaps 
not as bad as I fear, and I would agree that you tend to get more elegant 
results using it.  Certainly, simplifying the configuration files is a nice 
benefit that I'm certainly in favor of.  Ok, you've convinced me :)

Of course, if you want to introspect to invoke a method, you have to have a 
well-defined parameter list.  Here's where I think adding a "StrutsContext" 
object which encapsulates form, mapping, request, and response might help.
Interestingly, I just converted an application to Struts from a home-grown 
framework, and that's one of the concepts I actually had to do away with!  
Well, didn't HAVE to, I could have written my own context class to take the 
place of what was there, but it seemed more "proper"  in light of how Struts 
currently is implemented to get rid of it.  Just a little anecdotal thing 
though, I have no real point :)

More importantly, though, wouldn't you want to hang the "PrepView" 
configuration off of the forward config instead of the ActionMapping?
Well, now your kind of extending what I was thinking, which is good!  I was 
thinking in terms of a failed validation returning to an input page that 
maybe has some drop-downs that need to be populated.  I think that should be 
hung off the  tags.  But, your right, what about forwarding to a 
page that needs prep work too?  In that case, yes, the  is clearly, 
to me anyway, the right place to put it.  So, maybe that attribute should 
exist for both tags, in my view of things anyway.

How to implement the actual configuration is the major outstanding question 
in my mind before I'd be ready to try implementing it.  I'd love to hear 
some opinions...
Maybe just to be a little more generic, you have a "PrepClass" attribute for 
both  and  tags, both optional.  If present, the request 
processor (whcih you'd have to modify obviously) would call on that class 
(some standard method probably?) to do the prep work.  I guess you'd 
probably need a form bean specification for the forwards, and then 
instantiate to pass to the prep class but never do any validation on it.  
That part could be a little tricky, just to work out all the possible flows 
and being sure the correct form(s) are present when they need to be, etc.

Frank
Joe
--
Joe Germuska[EMAIL PROTECTED]  http://blog.germuska.com"In 
fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll 
know I'm in the wrong place."
   - Carlos Santana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
From ‘will you?’ to ‘I do,’ MSN Life Events is your resource for Getting 
Married. http://lifeevents.msn.com/category.aspx?cid=married
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to use dynamically generated CSS style with Struts tags

2004-06-22 Thread Bill Siggelkow
Sounds like a custom JSP tag would work pretty well here ...
Voinea, Marina wrote:
Hi everybody,
Can you please help with the following question:
 
 What are the possible ways (and best) to modify the style sheet at run time using Struts framework?
 Our application is  using Struts tags which refer to a static style sheet elements as presented below:

 

 We need at run time to extract user settings from DB (fonts, colors) and generate a style sheet accordingly .
 
 We could generate the style sheet text file for the user and store it somewhere on the disk and then refer to it, but then we may have too many files (for all active users). There must be a more dynamic and elegant soultion...
  Can we use the Struts html:link and pass a String to the "style" attribute of the html:link of the tag ? (It would be good for this string to be extracted from a bean prepared by an action).

  Any example of XSL taglib and Struts tag integration ? 
  This is a very important element for trully dynamic pages ... Any good experience that we can learn from?

  Thank you very much,
  Marina

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


Re: no struts classes (jar files) found by application

2004-06-22 Thread Ricardo Andres Quintero
Hello:

all of the web app when using Sevlets or Jsps, must conform
the Servlet 2.1 especification. I mean it must have a WEB-INF
directory and a lib and classes directories into it, in addition to
a web.xml file, called the web deployment descriptor.

The webclassloader follows certain steps when loading classes
like jars. u could cut the struts jars from the lib directory of
your web app and u could put them into the lib directory of tomcat, i mean 
common/lib, so that they wolud be available for all the web apps.

u could also put them in the ext directory from ur java machine,
but that's your decision, and the system manager's decision too.

I think there is no problem about having several copies of the
struts jar, because each application is independent.


On Tue, 22 Jun 2004 16:43:23 +0200, Dirk Markert wrote
> Hello Michael,
> 
>   
> 
> ***
> 
> MK> Hello,
> 
> MK> maybe someone can help. I've tried to deploy two struts 
> applications to MK> two tomcat test servers (one running tomcat 5.0 
> and one running tomcat MK> 4.1) but I can't get it to work on 
> neither of them.
> 
> MK> For development purposes I had all required jar files in the 
> MK> application's WEB-INF lib. Then I've removed them all and 
> deployed my MK> war files to the servers.
> 
> MK> I've put all the struts _war_ files from the jakarta-struts-1.1/webapps
> MK> dir into my server's _webapps_ dir as described in the 
> installation part MK> of the struts documentation.
> 
> MK> After restarting the _servers_ all applications in my webapps folder
> MK> were properly deployed but my own struts application (which is 
> not MK> located in the webapps dir) could neither find the struts 
> classes nor MK> any other classes required.
> 
> MK> Does anybody know why?
> 
> MK> How can I make Tomcat (4 and 5) find the struts jar files i.e. classes?
> 
> MK> The only way I can get my application running is to put all required
> MK> jars into the application's WEB-INF/lib directory. Since this is 
> not my MK> only struts application I end up with multiple copies of 
> theses jar MK> files on the same server.
> 
> MK> It works that way, but that's not how it's supposed to work, or 
> is there MK> something I am missing?
> 
> That's exactly the way it is supposed to work. Don't try anything
> else.
> 
> MK> Any help is appreciated.
> 
> MK> Greetings
> 
> MK> Michael Kastner
> 
> MK> -
>  MK> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> MK> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> Regards,
> Dirk
> 
> +--- Quality leads ---+
> | Dirk Markert [EMAIL PROTECTED] |
> | Dr. Markert Softwaretechnik AG  |
> | Joseph-von-Fraunhofer-Str. 20   |
> | 44227 Dortmund  |
> +-->>> to success! <<-+ 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


--
Ricardo Andrés Quintero R.
Ubiquando Ltda.


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



RE: Pulling Punches

2004-06-22 Thread Joe Germuska
One way I could see doing it would be do add a PrepView attribute to 
the action mapping that would be in the form "class.method". 
Basically, any time validation fails and your going to return to the 
input page, call that method, who's job it is to prep the page for 
viewing.  There's of course details in there to be dealt with, but 
the basic idea might be good.  That way, the choice would be the 
developers whether they want to have a new class to do this work, or 
just make it a method of an existing Action (I could see either 
being appropriate in some situations).
This is similar to some things we've done or thought about. 
Personally, I'm a pretty big fan of using reflection to find methods 
(a la DispatchAction) although I do think that some folks find it 
less appealing.  Of course, if you want to introspect to invoke a 
method, you have to have a well-defined parameter list.  Here's where 
I think adding a "StrutsContext" object which encapsulates form, 
mapping, request, and response might help.

More importantly, though, wouldn't you want to hang the "PrepView" 
configuration off of the forward config instead of the ActionMapping? 
How to implement the actual configuration is the major outstanding 
question in my mind before I'd be ready to try implementing it.  I'd 
love to hear some opinions...

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
   - Carlos Santana

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


Re: Pulling Punches

2004-06-22 Thread Joe Germuska
I notice that as soon as someone is talking about forwarding to 
another Action all these flags go up and "Chain of Responsibility" 
gets said.
The flags go up just because Struts was not designed to make two 
passes through the RequestProcessor with a single HttpServletRequest, 
and action chaining causes it to do that.  Clearly, this works anyway 
in some cases, but sometimes the issues which weren't accounted for 
in the design come up, and so we warn people.

This is an excellent point where what we are talking about is not 
that we are interested in doing CoR. There's a razors edge it 
appears. On one hand its recommended that to apply MVC properly, all 
requests should go through the Action and be forwarded to a JSP, but 
if said Action "initializes" important values which the JSP needs to 
generate the presentation. Then forwarding has to be to the Action, 
and thus chaining occurs. But is the Goal really CoR? No, the goal 
is that I want to intialize values in my view from my model.
Obviously, CoR is not the cure-all for everything.  Also note that 
one could implement this "page prep" step in the request processing 
cycle without using struts-chain.  One would simply extend 
RequestProcessor and modify the implementation of 
processForwardConfig(...) to add in some handling before actually 
dispatching to the view path.  Of course, then, you'd probably have 
to look at the TilesRequestProcessor and figure out how its 
overriding implementation of that method would have to change to 
co-operate with this new approach.  It's certainly possible.

One possible solution that fits within the strategy would be to 
implement a more restrictive DispatchAction with a method 
specifically for "initialization" and a method specifically for 
"execution", create to different Actions, one for intialization and 
one for execution. forwarding to "IntializationActions" from 
"ExecutionActions" is allowed, but forwarding to "ExecutionActions" 
from "InitializationActions" or other "ExecutionActions" is not.
I'm not sure I totally understand, but that shouldn't stop you!   How 
would you configure this?  With a specific subclass of ActionMapping? 
Where would responsibility for enforcing these rules go -- in the 
more restrictive DispatchAction?  Or are you saying that the 
RequestProcessor should break down processActionPerform() into a 
two-phase approach?  If that's the case, why is it better to do that 
without using CoR?

Joe
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
   - Carlos Santana

Re: Tiles and paths

2004-06-22 Thread Bob Thomas
Mike, 
 
Thanks so much. This solution works if my classes are in a directory (like 
WEB-INF/classes), but not if my classes are in a JAR file (like WEB-INF/lib/myJar.jar).
 
Here's the Exception:(i shortened it with "..."s).
 
java.io.FileNotFoundException: 
file:/.../jakarta-tomcat-5.0.18/webapps/myApp/WEB-INF/lib/myJar.jar!/com/mycompany/resource/gif/logo.gif
 (No such file or directory)
 
The file is actually there, but it can't find it. Any ideas?
 
Thanks in advance,
Bob

mike <[EMAIL PROTECTED]> wrote:
For my part, this is a big bugaboo that continually causes problems in all 
sorts of ways for programs that access resources with relative and absolute 
URLs. I just decided, except for Applets, to deliver all resources via my 
own action classes and to use a "protocol" to do it. I now have none of 
these problems. If you want a general solution so that you never have to 
worry about these things again, as people have to almost every day on this 
list, then go to:

http://wiki.apache.org/struts/StrutsCatalogEschewUrlForProtocol

Mike

At 07:18 AM 6/21/2004, Bob Thomas wrote:
>I have JSPs that work fine using images, stylesheets, etc. from other 
>directories. However, when I put those same JSPs into tiles, the JSPs can 
>no longer find the images, stylesheets, etc. unless I change the paths to 
>those images, etc. These JSPs are in child directories beneath the parent 
>directory which contains the layout JSP. It's acting as if the JSPs are in 
>the parent directory with the layout JSP, instead of the child directories 
>where they actually are. Does anyone know what's happening?
>
>Thanks in advance,
>Bob
>
>
>
>-
>Do you Yahoo!?
>Yahoo! Mail is new and improved - Check it out!



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



-
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!

RE: Pulling Punches

2004-06-22 Thread Frank Zammetti
I was thinking very simplistically... from within execute() of ActionA:
ActionB a = new ActionB();
ActionForward af = a.execute(mapping, inForm, request, response);
I've done this in some limited circumstances.  Then you can either use the 
ActionFoward returned, or just ignore it (which is almost certainly what you 
want to do anyway).

In some cases I'll set an attribute in request before calling on ActionB, 
and this attribute tells it to skip certain pieces of work.  Although I've 
done this, I don't think I advocate it though because anything that directly 
ties two Actions together, even if losely, I don't think is a good idea in 
general.

One way I could see doing it would be do add a PrepView attribute to the 
action mapping that would be in the form "class.method".  Basically, any 
time validation fails and your going to return to the input page, call that 
method, who's job it is to prep the page for viewing.  There's of course 
details in there to be dealt with, but the basic idea might be good.  That 
way, the choice would be the developers whether they want to have a new 
class to do this work, or just make it a method of an existing Action (I 
could see either being appropriate in some situations).

Frank

From: Joe Germuska <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: Pulling Punches
Date: Tue, 22 Jun 2004 09:43:00 -0500
At 9:28 AM -0400 6/22/04, Frank Zammetti wrote:
Interesting... I wonder if the answer would be different if you make the 
distinction between forwarding to another Action and just calling 
execute() of another Action.  I think both have problems certainly, but 
just calling execute() seems a little less offensive to me because there 
is a greater degree of control over what is being done (i.e., no 
auto-population to worry about for instance).
Just calling execute() is pretty innocuous, but at that point, the question 
becomes "what's the correct way to get a handle on that action instance."  
In fact, one of Ted's ideas for a ViewController was simply to use the 
Action interface rather than making something new.  I don't love that, 
because I think the semantics of what the ActionMapping and ActionForm 
would be aren't too clear.

The real objection is to invoking RequestProcessor.process(), which is 
ultimately what happens if you call RequestDispatcher.forward() or 
RequestDispatcher.include() (which, in turn, is ultimately what happens if 
you return an ActionForward which maps to a Struts Action or use a Struts 
action as the input forward for a form).

Joe
--
Joe Germuska[EMAIL PROTECTED]  http://blog.germuska.com"In 
fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll 
know I'm in the wrong place."
   - Carlos Santana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Make the most of your family vacation with tips from the MSN Family Travel 
Guide! http://dollar.msn.com

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


How to use dynamically generated CSS style with Struts tags

2004-06-22 Thread Voinea, Marina


Hi everybody,
Can you please help with the following question:

 
 What are the possible ways (and best) to modify the style sheet at run time using 
Struts framework?
 Our application is  using Struts tags which refer to a static style sheet elements as 
presented below:

 

Re: Illegal target of jump or branch

2004-06-22 Thread Bill Siggelkow
This might be caused by bumping into a 64K bytecode limit -- here's a 
link that discusses it:

http://www.scioworks.net/devnews/strutsDistilled/updates/update-030401/jspSize.html
P.S. Google is your friend ;)
Le Goff, Yoann wrote:
 Hi,
does this message talk to somebody ?
 
Illegal target of jump or branch

I've get it by spelling a jsp through struts ...
Tomcat 4.0 / JB-X / Struts 1.1
when i'm using jb-8 it works ...
 

Y.


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


Re: no struts classes (jar files) found by application

2004-06-22 Thread Bill Siggelkow
Actually -- that is how its supposed to work :)
Sharing of the Struts jars across applications is not supported. For 
more details see:
http://jakarta.apache.org/struts/userGuide/configuration.html#config_add

Bill Siggelkow
Michael Kastner wrote:
Hello,
maybe someone can help. I've tried to deploy two struts applications to 
two tomcat test servers (one running tomcat 5.0 and one running tomcat 
4.1) but I can't get it to work on neither of them.

For development purposes I had all required jar files in the 
application's WEB-INF lib. Then I've removed them all and deployed my 
war files to the servers.

I've put all the struts _war_ files from the jakarta-struts-1.1/webapps 
dir into my server's _webapps_ dir as described in the installation part 
of the struts documentation.

After restarting the _servers_ all applications in my webapps folder 
were properly deployed but my own struts application (which is not 
located in the webapps dir) could neither find the struts classes nor 
any other classes required.

Does anybody know why?
How can I make Tomcat (4 and 5) find the struts jar files i.e. classes?
The only way I can get my application running is to put all required 
jars into the application's WEB-INF/lib directory. Since this is not my 
only struts application I end up with multiple copies of theses jar 
files on the same server.

It works that way, but that's not how it's supposed to work, or is there 
something I am missing?

Any help is appreciated.
Greetings
Michael Kastner

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


Re: how do i get members of DynaActionForm inside Action Class

2004-06-22 Thread Bill Siggelkow
In your execute() method:
DynaActionForm myForm = (DynaActionForm) form;
String foo = (String) myForm.get("foo");
String bar = (String) myForm.get("bar");
Asim Ghosh wrote:
hi guys,
 
  if somebody can give me the solution to this problem.
 
i am using DynaActionForm and now i want to retrieve the value of a particular field.
 
in execute method i have the reference of ActionForm. 
 
 
asim

		
-
 ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself 

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


Re: Pulling Punches

2004-06-22 Thread Mark R. Diggory
Joe Germuska wrote:
At 10:48 PM -0400 6/21/04, Joe Hertz wrote:
Okay, whew. Knew I had seen something else about it.
http://www.jguru.com/faq/view.jsp?EID=1057613
"...There are times when one Action should forward to another, but only
to display the final result. Using a second action to complete a
business transaction is where we start sliding toward the dark side.".
So, I figured getting the data to display was safe. Caring about the
request data however seems to be where one draws the line, which this
question clearly did.
Am I wrong (again)?

Well, I would say that if you understand why request chaining is 
"dangerous" and can make a knowledgeable judgment in a specific case 
that the dangers don't apply, then go ahead and do it.

Longer term, I would like to see a specific pre-view step in the 
request processing cycle which does preparation for the destination 
forward.  We've had discussions on the dev list about this (including 
subject lines with the term "PageController" or "ViewController") and 
people seem generally interested.  I've made this pattern work at my 
day job and find it clean and flexible -- but the way we do it at work 
is tangled up with other details of our implementation that are more 
specific to how we do things and probably not the kind of thing we 
want to foist on all Struts users.

Joe

I notice that as soon as someone is talking about forwarding to another 
Action all these flags go up and "Chain of Responsibility" gets said. 
This is an excellent point where what we are talking about is not that 
we are interested in doing CoR. There's a razors edge it appears. On one 
hand its recommended that to apply MVC properly, all requests should go 
through the Action and be forwarded to a JSP, but if said Action 
"initializes" important values which the JSP needs to generate the 
presentation. Then forwarding has to be to the Action, and thus chaining 
occurs. But is the Goal really CoR? No, the goal is that I want to 
intialize values in my view from my model.

One possible solution that fits within the strategy would be to 
implement a more restrictive DispatchAction with a method specifically 
for "initialization" and a method specifically for "execution", create 
to different Actions, one for intialization and one for execution. 
forwarding to "IntializationActions" from "ExecutionActions" is allowed, 
but forwarding to "ExecutionActions" from "InitializationActions" or 
other "ExecutionActions" is not.

what do you think?
Mark
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: no struts classes (jar files) found by application

2004-06-22 Thread Michael Kastner
Hello Dirk,
thanks for your answer.
That means that I end up with tons of redundant struts packages on my 
production machines and many redundantdantdant class loading processes 
on server startup. Oh well, hard to digest ...

BTW, do you know by any chance whether this applies to the velocity 
packages and to the commons libraries too?

It seems that struts also requires that all the libraries that it 
depends on are located in the WEB-INF/lib diretory as well.

Is that also right?
Greetings
Michael Kastner

Dirk Markert schrieb:
Hello Michael,
  

***
MK> Hello,
MK> maybe someone can help. I've tried to deploy two struts applications to
MK> two tomcat test servers (one running tomcat 5.0 and one running tomcat
MK> 4.1) but I can't get it to work on neither of them.
MK> For development purposes I had all required jar files in the 
MK> application's WEB-INF lib. Then I've removed them all and deployed my
MK> war files to the servers.

MK> I've put all the struts _war_ files from the jakarta-struts-1.1/webapps
MK> dir into my server's _webapps_ dir as described in the installation part
MK> of the struts documentation.
MK> After restarting the _servers_ all applications in my webapps folder
MK> were properly deployed but my own struts application (which is not
MK> located in the webapps dir) could neither find the struts classes nor
MK> any other classes required.
MK> Does anybody know why?
MK> How can I make Tomcat (4 and 5) find the struts jar files i.e. classes?
MK> The only way I can get my application running is to put all required
MK> jars into the application's WEB-INF/lib directory. Since this is not my
MK> only struts application I end up with multiple copies of theses jar
MK> files on the same server.
MK> It works that way, but that's not how it's supposed to work, or is there
MK> something I am missing?
That's exactly the way it is supposed to work. Don't try anything
else.
MK> Any help is appreciated.
MK> Greetings
MK> Michael Kastner
MK> -
MK> To unsubscribe, e-mail: [EMAIL PROTECTED]
MK> For additional commands, e-mail: [EMAIL PROTECTED]

Regards,
Dirk
+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 



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


RE: how do i get members of DynaActionForm inside Action Class

2004-06-22 Thread Robert Taylor
DynaActionForm theForm = (DynaActionForm) form;
String myValue = (String) theForm.get("myValueName");

robert

> -Original Message-
> From: Asim Ghosh [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 5:30 AM
> To: [EMAIL PROTECTED]
> Subject: how do i get members of DynaActionForm inside Action Class
> 
> 
> hi guys,
>  
>   if somebody can give me the solution to this problem.
>  
> i am using DynaActionForm and now i want to retrieve the value of a particular field.
>  
> in execute method i have the reference of ActionForm. 
>  
>  
> asim
> 
>   
> -
>  ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself 

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



Re: no struts classes (jar files) found by application

2004-06-22 Thread Dirk Markert
Hello Michael,

  

***

MK> Hello,

MK> maybe someone can help. I've tried to deploy two struts applications to
MK> two tomcat test servers (one running tomcat 5.0 and one running tomcat
MK> 4.1) but I can't get it to work on neither of them.

MK> For development purposes I had all required jar files in the 
MK> application's WEB-INF lib. Then I've removed them all and deployed my
MK> war files to the servers.

MK> I've put all the struts _war_ files from the jakarta-struts-1.1/webapps
MK> dir into my server's _webapps_ dir as described in the installation part
MK> of the struts documentation.

MK> After restarting the _servers_ all applications in my webapps folder
MK> were properly deployed but my own struts application (which is not
MK> located in the webapps dir) could neither find the struts classes nor
MK> any other classes required.

MK> Does anybody know why?

MK> How can I make Tomcat (4 and 5) find the struts jar files i.e. classes?

MK> The only way I can get my application running is to put all required
MK> jars into the application's WEB-INF/lib directory. Since this is not my
MK> only struts application I end up with multiple copies of theses jar
MK> files on the same server.

MK> It works that way, but that's not how it's supposed to work, or is there
MK> something I am missing?

That's exactly the way it is supposed to work. Don't try anything
else.

MK> Any help is appreciated.


MK> Greetings

MK> Michael Kastner


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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 


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



RE: Pulling Punches

2004-06-22 Thread Joe Germuska
At 9:28 AM -0400 6/22/04, Frank Zammetti wrote:
Interesting... I wonder if the answer would be different if you make 
the distinction between forwarding to another Action and just 
calling execute() of another Action.  I think both have problems 
certainly, but just calling execute() seems a little less offensive 
to me because there is a greater degree of control over what is 
being done (i.e., no auto-population to worry about for instance).
Just calling execute() is pretty innocuous, but at that point, the 
question becomes "what's the correct way to get a handle on that 
action instance."  In fact, one of Ted's ideas for a ViewController 
was simply to use the Action interface rather than making something 
new.  I don't love that, because I think the semantics of what the 
ActionMapping and ActionForm would be aren't too clear.

The real objection is to invoking RequestProcessor.process(), which 
is ultimately what happens if you call RequestDispatcher.forward() or 
RequestDispatcher.include() (which, in turn, is ultimately what 
happens if you return an ActionForward which maps to a Struts Action 
or use a Struts action as the input forward for a form).

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
   - Carlos Santana

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


Re: no struts classes (jar files) found by application

2004-06-22 Thread DGraham

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html

For classes and resources that must
be shared across all web applications, place unpacked classes and resources
under $CATALINA_BASE/shared/classes, or place JAR files containing those
classes and resources under $CATALINA_BASE/shared/lib. 

Dennis






Michael Kastner <[EMAIL PROTECTED]>

06/22/2004 09:38 AM



Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
[EMAIL PROTECTED]


cc



Subject
no struts classes (jar files)
found by application








Hello,

maybe someone can help. I've tried to deploy two struts applications to

two tomcat test servers (one running tomcat 5.0 and one running tomcat

4.1) but I can't get it to work on neither of them.

For development purposes I had all required jar files in the 
application's WEB-INF lib. Then I've removed them all and deployed my 
war files to the servers.

I've put all the struts _war_ files from the jakarta-struts-1.1/webapps

dir into my server's _webapps_ dir as described in the installation part

of the struts documentation.

After restarting the _servers_ all applications in my webapps folder 
were properly deployed but my own struts application (which is not 
located in the webapps dir) could neither find the struts classes nor 
any other classes required.

Does anybody know why?

How can I make Tomcat (4 and 5) find the struts jar files i.e. classes?

The only way I can get my application running is to put all required 
jars into the application's WEB-INF/lib directory. Since this is not my

only struts application I end up with multiple copies of theses jar 
files on the same server.

It works that way, but that's not how it's supposed to work, or is there

something I am missing?


Any help is appreciated.


Greetings

Michael Kastner


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


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

RE: how do i get members of DynaActionForm inside Action Class

2004-06-22 Thread Matthias Wessendorf
execute(...){
DynaActionForm myForm = (DynaActionForm) form;

myForm.get("property");



Cheers,

> -Original Message-
> From: Asim Ghosh [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 22, 2004 11:30 AM
> To: [EMAIL PROTECTED]
> Subject: how do i get members of DynaActionForm inside Action Class
> 
> 
> hi guys,
>  
>   if somebody can give me the solution to this problem.
>  
> i am using DynaActionForm and now i want to retrieve the 
> value of a particular field.
>  
> in execute method i have the reference of ActionForm. 
>  
>  
> asim
> 
>   
> -
>  ALL-NEW Yahoo! Messenger - so many all-new ways to 
> express yourself 
> 


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



RE: [ANNOUNCEMENT] 6/27 Struts User Gathering at JavaOne

2004-06-22 Thread Pilgrim, Peter
> -Original Message-
> From: Van Riper, Mike [mailto:[EMAIL PROTECTED]
====
> 
> Since there were no strong preferences stated in the initial 
> responses, I
> made an executive decision and went with Sunday evening after 
> the conference
> opening reception. We'll be gathering around 8:30pm at the 
> Thirsty Bear less
> than a block from Moscone Center. The full announcement 
> including directions
> can be found here:
> 
>   http://tinyurl.com/2mpsq

Hello Mike

I recently organised a Struts Networking event in London.
I will be there in San Francisco for J1. See you there.

> 
> RSVP requested to [EMAIL PROTECTED] with the subject 
> "Struts User
> Gathering." Please RSVP by 5:00pm on Saturday, June 26th.
> 

====

Thanks

http://www.jroller.com/page/peter_pilgrim

--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
10 South Colonnade, London E14 4QJ, United Kingdom
Tel: +44 (0)207 883 4447



==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==


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



RE: Detecting browser close

2004-06-22 Thread Guillermo Meyer
We are detecting when the user closes the browser window with this
javascript (only in IE with JS enabled):


function logoff() {
if (document.all) {
// IExplorer
if (window.screenTop > 9000) {
// window closed
top.location="<%=request.getContextPath()%>/logoff.do";
//get the logoff action
} else {
// window refreshed
}  
}
}





Hope this help.
Cheers.
Guillermo.

-Original Message-
From: Frank Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 21 de Junio de 2004 01:03 p.m.
To: [EMAIL PROTECTED]
Subject: RE: Detecting browser close


It was my understanding that only signed scripts could open popups 
off-screen, or of too small a size (I think 100px in either direction).

I use the approach you outline as well, although it's not critical that
the 
user logs out of my app anyway but they do feel good about having an 
explicit logout button.  I however pop up a small "now logging out"
message 
for them in the new window, partly because I think that's perhaps nicer
to 
show that what they asked to happen actually did, but also because an 
off-screen popup wasn't allowed.

Just curious how you got the off-screen popup to work without a signed 
script (assuming you didn't have one?).


>From: "Joe Hertz" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Detecting browser close
>Date: Mon, 21 Jun 2004 11:56:56 -0400
>
>This is fine if you want to provide a popup window to the user. This 
>still isn't an authoritative way of determining if the user has "logged

>out".
>
>Your app should never depend on the client's PC having electricity.
>
> > -Original Message-
> > From: Simone - Dev [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, June 20, 2004 6:48 AM
> > To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> > Subject: R: Detecting browser close
> >
> >
> > What I'm proposing to you it's a solution that works only on JS 
> > enabled browsers, but since this is almost the 99,99% of the browser

> > on the market shouldn't be a problem :-)
> >
> > On the onClose event of the window object (javascript object) opens 
> > a new window of 10px that is displayed off the screen (8000px left):

> > this windows will contain a page that close all session specific 
> > resources as soon as the user exit, without having to wait the 
> > session timeout to expire
> >
> > I used it many times, also to provide a "u forgot to save what you 
> > did, are you sure you want to exit the page?" alert (but this need a

> > onBeforeClose event that is available only on IE).
> >
> > Simone
> >
> > -
> > Simone Chiaretta
> > www.piyosailing.com/S
> > Any sufficiently advanced technology is indistinguishable from magic

> > "Life is short, play hard"
> >
> >
> > > -Messaggio originale-
> > > Da: ksitron [mailto:[EMAIL PROTECTED]
> > > Inviato: sabato 19 giugno 2004 23.32
> > > A: Struts Users Mailing List
> > > Oggetto: Detecting browser close
> > >
> > >
> > >
> > > Is there a way to detect when the user closes the browser.
> > What I want
> > > to do is do clean-up and destroy the session.
> > >
> > >
> > > Thanks in advance.
> > >
> > > --
> > >
> > >
> > >
> > >
> > >
> > >
> > 
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
MSN 9 Dial-up Internet Access fights spam and pop-ups - now 3 months
FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/


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

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirl

RE: ActionForm returning blank jsp

2004-06-22 Thread Guillermo Meyer
I have a blank page appearing when a null forward is returned.
How is your input page attribute in the validator form set?
May be Struts is trying to forward to a null forward so blank page
appears.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 21 de Junio de 2004 11:20 a.m.
To: [EMAIL PROTECTED]
Subject: ActionForm returning blank jsp


I am having a problem with my ActionForm validate() method returning a
blank jsp page. It is a very simple logon.jsp with only two required
fields "username" and "Password" The ActionForm validates that the user
has in fact entered something in both fields. If the user has left a
field blank, the ActionForm should return an error, "please enter a
username", etc. All validation after that is performed in the
logonAction execute() such as "user not found in system", "invalid
username, password" etc. The LogonAction execute() returns errors to the
logon.jsp as it should. My logonForm however, does not, just a blank
(empty) jsp page. Any suggestions would be greatly appreciated.

Here is my JSP

<%@ page contentType="text/html;charset=iso-8859-1" language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib
uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib
uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

  
  

 
 
  
  
username:
 
 
  
  
password:
 
 
  
  
 

 
  


 

My STRUTS-CONFIG





  
  


My ActionForm

/**
 * Form bean for the user signon page.
 */
public class LogonForm extends ActionForm {

  private String password;
  private String username;
  
  public LogonForm(){
password = "";
username = "";
  }
  
//getters and setters are here

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
{
 ActionErrors errors = new ActionErrors();

  if ((username == null) || (username.length() < 1))
  errors.add("username", new ActionError("error.noUsername"));
  
  if ((password == null) || (password.length() < 1))
  errors.add("password", new ActionError("error.noPassword"));
 

  return errors;
}
 

Thanks in advance!  
-Lynne

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

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



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



RE: I Wondor Why Validation Doesn't Validate

2004-06-22 Thread Mailing List


Dear Friends

Thank you very much for your attention; I checked both 'validate="true" '
and also 'empty spaces', they didn't solve the problem. Actually the part of
'if (!errors.isEmpty())' returns false all the time(see below, section 4).
My previous project is already working properly with 'validate="false"', but
this one :( 

Again any help would be appreciated

Thank you
Nafise

-Original Message-
From: Mailing List [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 21, 2004 3:25 PM
To: '[EMAIL PROTECTED]'
Subject: I Wondor Why Validation Doesn't Validate


Dear All,

I did the follow steps for setting validation, but there is no error on an
empty field checking 'chequeNumber' (see below plz).


1. Placing the validation.xml & validator-rules.xml in WEB-INF folder
2. In struts-config.xml : 
   a.   



b. 
  
 




 

c. 

3. In validation.xml : 

  




4. In Action: 

ActionErrors errors = dynaForm.validate(mapping, request);
  if (!errors.isEmpty()) {//this if is never true :(
saveErrors(request, errors);
return mapping.findForward("aForward");
}

5. In jsp:




I appreciate any help or idea.

Regards,
Nafise

-
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: Re[2]: I Wondor Why Validation Doesn't Validate

2004-06-22 Thread Mailing List

I've converted the property type to String, there's no difference.

Regards,
Nafise

-Original Message-
From: Pavlikus [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 22, 2004 5:36 PM
To: Struts Users Mailing List
Subject: Re[2]: I Wondor Why Validation Doesn't Validate


ML> Dear Friends

ML> Thank you very much for your attention; I checked both 'validate="true"
'
ML> and also 'empty spaces', they didn't solve the problem.
ML> Actually the part of 'if (!errors.isEmpty())' returns false all the
time(see
ML> below, section 4).
ML> My previous project is already working properly with 'validate="false"',
but
ML> this one :( 

ML> Again any help would be appreciated

ML> Thank you
ML> Nafise

Hi. I not very familiar with DynaForms... But in case of regular
Action Forms any resources I've read  suggest to define all form
fields as a Strings.

But you do:
form-property name="studentId" type="java.lang.Integer" />

May be this help you.
Also, correct me please if I be mistaken.


ML> -Original Message-
ML> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
ML> Sent: Monday, June 21, 2004 5:51 PM
ML> To: Struts Users Mailing List
ML> Subject: Re: I Wondor Why Validation Doesn't Validate

ML> Nafise said:

>> I did the follow steps for setting validation, but there is no error on
an
>> empty field checking 'chequeNumber' (see below plz).
>>
>>
>> 1. Placing the validation.xml & validator-rules.xml in WEB-INF folder
>> 2. In struts-config.xml :
>>a.> className="org.apache.struts.validator.ValidatorPlugIn">
>>  >  property="pathnames"
>>  value="/WEB-INF/struts/validator-rules.xml,
>>   /WEB-INF/struts/validation.xml" />
>>  
>>
>> b. > type="org.apache.struts.validator.DynaValidatorForm">
>>
>> 
>>  
>>  
>>
>>
>>   
>>
>> c. > type="com.pdpsoft.lms.struts.action.CreditStudentAction"
>>name="CreditStudentForm" validate="false"
scope="session"/>

ML> I am aware that it is not what you want, but what happens if you set
ML> validate="true"?

>> 3. In validation.xml :
>>
>>   
>> > property=" chequeNumber "
>> depends="required">
>> 
>>  

ML> Could the spaces in  and > 4. In Action:
>>
>>  ActionErrors errors = dynaForm.validate(mapping, request);
>>   if (!errors.isEmpty()) {//this if is never true :(
>> saveErrors(request, errors);
>> return mapping.findForward("aForward");
>> }
>> 5. In jsp:
>>
>>  



-
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: Validator Error Messages different way to show them ?

2004-06-22 Thread Rouven Gehm
 do work.
But i also show all my other messages, which aren't errors this way :







And additional I only want to show the errors from the validator framework, but it 
doesn't work
as for my own messages.

- Original Message -
From: "Joe Hertz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, June 21, 2004 6:35 PM
Subject: RE: Validator Error Messages different way to show them ?


> By messages (plural) I assume you want them all.
>
> Did  not work?
>
> > -Original Message-
> > From: Rouven Gehm [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 21, 2004 11:43 AM
> > To: Struts Users Mailing List
> > Subject: Validator Error Messages different way to show them ?
> >
> >
> > Hi,
> >
> > i'm trying to display the errors messages from the validator.
> > But i don't know which property i have to use, i've tried
> > this, which does not work, so does anyone have a solution ?
> >
> > 
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Illegal target of jump or branch

2004-06-22 Thread Le Goff, Yoann
 Hi,
does this message talk to somebody ?
 
Illegal target of jump or branch


I've get it by spelling a jsp through struts ...

Tomcat 4.0 / JB-X / Struts 1.1

when i'm using jb-8 it works ...

 

Y.



RE: Pulling Punches

2004-06-22 Thread Joe Germuska
At 10:48 PM -0400 6/21/04, Joe Hertz wrote:
Okay, whew. Knew I had seen something else about it.
http://www.jguru.com/faq/view.jsp?EID=1057613
"...There are times when one Action should forward to another, but only
to display the final result. Using a second action to complete a
business transaction is where we start sliding toward the dark side.".
So, I figured getting the data to display was safe. Caring about the
request data however seems to be where one draws the line, which this
question clearly did.
Am I wrong (again)?
Well, I would say that if you understand why request chaining is 
"dangerous" and can make a knowledgeable judgment in a specific case 
that the dangers don't apply, then go ahead and do it.

Longer term, I would like to see a specific pre-view step in the 
request processing cycle which does preparation for the destination 
forward.  We've had discussions on the dev list about this (including 
subject lines with the term "PageController" or "ViewController") and 
people seem generally interested.  I've made this pattern work at my 
day job and find it clean and flexible -- but the way we do it at 
work is tangled up with other details of our implementation that are 
more specific to how we do things and probably not the kind of thing 
we want to foist on all Struts users.

Joe

-Joe
 -Original Message-
 From: Frank Zammetti [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 21, 2004 10:21 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Pulling Punches
 I don't know if it's the recommended solution (I would expect
 not), but one
 option is to instantiate your own instance of Action A and
 call execute() on
 it before returning your ActionErrors.  The caveat there is
 that you won't
 have the form or the response object available to pass to it, and the
 ActionMapping will not be the right one, so obviously if the
 Action makes
 use of any of those things, this won't work.  However, I find
 that people
 generally tend to forget that Actions are just classes with a
 method you can
 call yourself at any time, and in some cases this is quite sufficient.
 Frank
 >From: "Joe Hertz" <[EMAIL PROTECTED]>
 >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
 >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
 >Subject: RE: Pulling Punches
 >Date: Mon, 21 Jun 2004 20:49:18 -0400
 >
 > > This is not a great solution, for all the reasons that action
 > > chaining is considered dangerous.  After the validation fails,
 > > Struts would begin an entire re-execution of the RequestProcessor
 > > chain, and the archives have plenty of discussion on why that's
 > > unpredictable and worth avoiding.
 >
 >Joe-
 >
 >Not to change the subject *too* much, but what is the
 recommended way
 >of handling following case:
 >
 >User clicks a button causing Action A to fire. Brings him to a page
 >with data it needs (say for a dropdown box).
 >
 >User submits form on this page, causing Action B to fire with
 >validation. Validation fails, bringing him back to page with
 dropdown
 >box. Since Action A did NOT fire, dropdown box isn't populated.
 >
 >Short of sticking that data into a session, what is the way
 one should
 >handle this?
 >
 >An "action chain" like I described is what Andrew Hill
 suggested to me
 >on this list, and nobody screamed :-)
 >
 >
 >
 >-
 >To unsubscribe, e-mail: [EMAIL PROTECTED]
 >For additional commands, e-mail: [EMAIL PROTECTED]
 >
 _
 FREE pop-up blocking with the new MSN Toolbar - get it now!
 http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
 -
 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]

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
   - Carlos Santana

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


RE: [OT] JavaOne Struts User Gathering

2004-06-22 Thread Pilgrim, Peter

> -Original Message-
> From: Van Riper, Mike [mailto:[EMAIL PROTECTED]
> Sent: 19 June 2004 22:11
> To: 'Struts Users Mailing List'
> Cc: '[EMAIL PROTECTED]'
> Subject: [OT] JavaOne Struts User Gathering
> 
> 
> Hi Everyone,
> 
> Depending upon the interest level, I'm willing to organize a social
> gathering at a bar or restaurant in San Francisco during the upcoming
> JavaOne conference. It would either be around 8:30pm on 
> Sunday, June 27th,
> after the Welcome Reception ends. Or it would be around 
> 8:00PM on Thursday,
> July 1st, at the very end of the conference.
> 
Yes count me in

I'd rather prefer Sunday. Most people I bet, will be packing 
their stuff, preparing to go home on the Thursday.

--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
10 South Colonnade, London E14 4QJ, United Kingdom
Tel: +44 (0)207 883 4447
====

==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==


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



no struts classes (jar files) found by application

2004-06-22 Thread Michael Kastner
Hello,
maybe someone can help. I've tried to deploy two struts applications to 
two tomcat test servers (one running tomcat 5.0 and one running tomcat 
4.1) but I can't get it to work on neither of them.

For development purposes I had all required jar files in the 
application's WEB-INF lib. Then I've removed them all and deployed my 
war files to the servers.

I've put all the struts _war_ files from the jakarta-struts-1.1/webapps 
dir into my server's _webapps_ dir as described in the installation part 
of the struts documentation.

After restarting the _servers_ all applications in my webapps folder 
were properly deployed but my own struts application (which is not 
located in the webapps dir) could neither find the struts classes nor 
any other classes required.

Does anybody know why?
How can I make Tomcat (4 and 5) find the struts jar files i.e. classes?
The only way I can get my application running is to put all required 
jars into the application's WEB-INF/lib directory. Since this is not my 
only struts application I end up with multiple copies of theses jar 
files on the same server.

It works that way, but that's not how it's supposed to work, or is there 
something I am missing?

Any help is appreciated.
Greetings
Michael Kastner
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Pulling Punches

2004-06-22 Thread Frank Zammetti
Interesting... I wonder if the answer would be different if you make the 
distinction between forwarding to another Action and just calling execute() 
of another Action.  I think both have problems certainly, but just calling 
execute() seems a little less offensive to me because there is a greater 
degree of control over what is being done (i.e., no auto-population to worry 
about for instance).

Frank

From: "Joe Hertz" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Pulling Punches
Date: Mon, 21 Jun 2004 22:48:00 -0400
Okay, whew. Knew I had seen something else about it.
http://www.jguru.com/faq/view.jsp?EID=1057613
"...There are times when one Action should forward to another, but only
to display the final result. Using a second action to complete a
business transaction is where we start sliding toward the dark side.".
So, I figured getting the data to display was safe. Caring about the
request data however seems to be where one draws the line, which this
question clearly did.
Am I wrong (again)?
-Joe
> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 21, 2004 10:21 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Pulling Punches
>
>
> I don't know if it's the recommended solution (I would expect
> not), but one
> option is to instantiate your own instance of Action A and
> call execute() on
> it before returning your ActionErrors.  The caveat there is
> that you won't
> have the form or the response object available to pass to it, and the
> ActionMapping will not be the right one, so obviously if the
> Action makes
> use of any of those things, this won't work.  However, I find
> that people
> generally tend to forget that Actions are just classes with a
> method you can
> call yourself at any time, and in some cases this is quite sufficient.
>
> Frank
>
>
> >From: "Joe Hertz" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >Subject: RE: Pulling Punches
> >Date: Mon, 21 Jun 2004 20:49:18 -0400
> >
> > > This is not a great solution, for all the reasons that action
> > > chaining is considered dangerous.  After the validation fails,
> > > Struts would begin an entire re-execution of the RequestProcessor
> > > chain, and the archives have plenty of discussion on why that's
> > > unpredictable and worth avoiding.
> >
> >Joe-
> >
> >Not to change the subject *too* much, but what is the
> recommended way
> >of handling following case:
> >
> >User clicks a button causing Action A to fire. Brings him to a page
> >with data it needs (say for a dropdown box).
> >
> >User submits form on this page, causing Action B to fire with
> >validation. Validation fails, bringing him back to page with
> dropdown
> >box. Since Action A did NOT fire, dropdown box isn't populated.
> >
> >Short of sticking that data into a session, what is the way
> one should
> >handle this?
> >
> >An "action chain" like I described is what Andrew Hill
> suggested to me
> >on this list, and nobody screamed :-)
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> FREE pop-up blocking with the new MSN Toolbar - get it now!
> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>
> -
> 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]
_
Watch the online reality show Mixed Messages with a friend and enter to win 
a trip to NY 
http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/

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


how do i get members of DynaActionForm inside Action Class

2004-06-22 Thread Asim Ghosh
hi guys,
 
  if somebody can give me the solution to this problem.
 
i am using DynaActionForm and now i want to retrieve the value of a particular field.
 
in execute method i have the reference of ActionForm. 
 
 
asim


-
 ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself 

RE: Pulling Punches

2004-06-22 Thread Hibbs, David

Turn validation off in your struts config and manually in your action.
Otherwise, when form validation fails, it will go to your input location.
If manual validation invokation doesn't work for you, then you probably want
to use the "us an action as input parameter" suggestion.

David Hibbs, ACS
Staff Programmer / Analyst
American National Insurance Company

> -Original Message-
> From: Mark R. Diggory [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 21, 2004 6:33 PM
> To: Struts Users Mailing List
> Subject: Pulling Punches
> 
> 
> Here's an interesting one for ya.
> 
> I have a struts action in which I use the "input" parameter 
> to forward 
> back to the jsp when validation errors occur (pretty basic). 
> There is an 
> instance where an object could be stale once the browser gets into my 
> Actions execute method, when this is encountered the action 
> forwards to 
> an error page that provides a message. This way if anyone 
> bookmarks the 
> action, I can show something better than a stack trace when 
> they return 
> to the page.
> 
> My problem is that I get forwarded back to the input form without 
> execute occuring and teh stale object being encountered! When 
> returning 
> via a bookmark, I get dumped into the JSP designated in the input 
> attribute. Is there any way I can execute some code to verify 
> the object 
> is not stale BEFORE validation occurs?
> 
> What it really boils down to is this. Is there a way I can cause an 
> ActionForward before ActionForm.validate occurs?
> 
> -Mark
> 

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



Re[2]: I Wondor Why Validation Doesn't Validate

2004-06-22 Thread Pavlikus

ML> Dear Friends

ML> Thank you very much for your attention; I checked both 'validate="true" '
ML> and also 'empty spaces', they didn't solve the problem.
ML> Actually the part of 'if (!errors.isEmpty())' returns false all the time(see
ML> below, section 4).
ML> My previous project is already working properly with 'validate="false"', but
ML> this one :( 

ML> Again any help would be appreciated

ML> Thank you
ML> Nafise

Hi. I not very familiar with DynaForms... But in case of regular
Action Forms any resources I've read  suggest to define all form
fields as a Strings.

But you do:
form-property name="studentId" type="java.lang.Integer" />

May be this help you.
Also, correct me please if I be mistaken.


ML> -Original Message-
ML> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
ML> Sent: Monday, June 21, 2004 5:51 PM
ML> To: Struts Users Mailing List
ML> Subject: Re: I Wondor Why Validation Doesn't Validate

ML> Nafise said:

>> I did the follow steps for setting validation, but there is no error on an
>> empty field checking 'chequeNumber' (see below plz).
>>
>>
>> 1. Placing the validation.xml & validator-rules.xml in WEB-INF folder
>> 2. In struts-config.xml :
>>a.> className="org.apache.struts.validator.ValidatorPlugIn">
>>  >  property="pathnames"
>>  value="/WEB-INF/struts/validator-rules.xml,
>>   /WEB-INF/struts/validation.xml" />
>>  
>>
>> b. > type="org.apache.struts.validator.DynaValidatorForm">
>>
>> 
>>  
>>  
>>
>>
>>   
>>
>> c. > type="com.pdpsoft.lms.struts.action.CreditStudentAction"
>>name="CreditStudentForm" validate="false" scope="session"/>

ML> I am aware that it is not what you want, but what happens if you set
ML> validate="true"?

>> 3. In validation.xml :
>>
>>   
>> > property=" chequeNumber "
>> depends="required">
>> 
>>  

ML> Could the spaces in  and > 4. In Action:
>>
>>  ActionErrors errors = dynaForm.validate(mapping, request);
>>   if (!errors.isEmpty()) {//this if is never true :(
>> saveErrors(request, errors);
>> return mapping.findForward("aForward");
>> }
>> 5. In jsp:
>>
>>  



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



Calling a static method using bean write tag

2004-06-22 Thread Suresh S




Hi all,

Is it possible to call directly a static method using  tag .Actually i need to write something in the jsp with help of some utility class and the utility class is static.But it seems  tag requires  so is there any other way to do this?

Thanx in Advance for u r suggestions 




RE: I Wondor Why Validation Doesn't Validate

2004-06-22 Thread Mailing List


-Original Message-
From: Mailing List 
Sent: Tuesday, June 22, 2004 1:47 PM
To: 'Struts Users Mailing List'
Subject: RE: I Wondor Why Validation Doesn't Validate

Dear Friends

Thank you very much for your attention; I checked both 'validate="true" '
and also 'empty spaces', they didn't solve the problem.
Actually the part of 'if (!errors.isEmpty())' returns false all the time(see
below, section 4).
My previous project is already working properly with 'validate="false"', but
this one :( 

Again any help would be appreciated

Thank you
Nafise


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 21, 2004 5:51 PM
To: Struts Users Mailing List
Subject: Re: I Wondor Why Validation Doesn't Validate

Nafise said:

> I did the follow steps for setting validation, but there is no error on an
> empty field checking 'chequeNumber' (see below plz).
>
>
> 1. Placing the validation.xml & validator-rules.xml in WEB-INF folder
> 2. In struts-config.xml :
>a. 
>  property="pathnames"
>   value="/WEB-INF/struts/validator-rules.xml,
>/WEB-INF/struts/validation.xml" />
>   
>
> b.   type="org.apache.struts.validator.DynaValidatorForm">
>
> 
>   
>   
>
>
>
>
> c.  type="com.pdpsoft.lms.struts.action.CreditStudentAction"
>name="CreditStudentForm" validate="false" scope="session"/>

I am aware that it is not what you want, but what happens if you set
validate="true"?

> 3. In validation.xml :
>
>   
>  property=" chequeNumber "
> depends="required">
> 
>   

Could the spaces in  and  4. In Action:
>
>   ActionErrors errors = dynaForm.validate(mapping, request);
>   if (!errors.isEmpty()) {//this if is never true :(
> saveErrors(request, errors);
> return mapping.findForward("aForward");
> }
> 5. In jsp:
>
>   

Best regards
Claus Nielsen

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



ActionForm returning blank jsp

2004-06-22 Thread Guillermo Meyer
I have a blank page appearing when a null forward is returned. How is
your input page attribute in the validator form set? May be Struts is
trying to forward to a null forward so blank page appears.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 21 de Junio de 2004 11:20 a.m.
To: [EMAIL PROTECTED]
Subject: ActionForm returning blank jsp


I am having a problem with my ActionForm validate() method returning a
blank jsp page. It is a very simple logon.jsp with only two required
fields "username" and "Password" The ActionForm validates that the user
has in fact entered something in both fields. If the user has left a
field blank, the ActionForm should return an error, "please enter a
username", etc. All validation after that is performed in the
logonAction execute() such as "user not found in system", "invalid
username, password" etc. The LogonAction execute() returns errors to the
logon.jsp as it should. My logonForm however, does not, just a blank
(empty) jsp page. Any suggestions would be greatly appreciated.

Here is my JSP

<%@ page contentType="text/html;charset=iso-8859-1" language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib
uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib
uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

  
  

 
 
  
  
username:
 
 
  
  
password:
 
 
  
  
 

 
  


 

My STRUTS-CONFIG





  
  


My ActionForm

/**
 * Form bean for the user signon page.
 */
public class LogonForm extends ActionForm {

  private String password;
  private String username;
  
  public LogonForm(){
password = "";
username = "";
  }
  
//getters and setters are here

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
{
 ActionErrors errors = new ActionErrors();

  if ((username == null) || (username.length() < 1))
  errors.add("username", new ActionError("error.noUsername"));
  
  if ((password == null) || (password.length() < 1))
  errors.add("password", new ActionError("error.noPassword"));
 

  return errors;
}
 

Thanks in advance!  
-Lynne

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

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



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



Detecting browser close

2004-06-22 Thread Guillermo Meyer

We are detecting when the user closes the browser window with this
javascript (only in IE with JS enabled):


function logoff() {
if (document.all) {
// IExplorer
if (window.screenTop > 9000) {
// window closed
top.location="<%=request.getContextPath()%>/logoff.do";
//get the logoff action
} else {
// window refreshed
}  
}
}





Hope this help.
Cheers.
Guillermo.

-Original Message-
From: Frank Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 21 de Junio de 2004 01:03 p.m.
To: [EMAIL PROTECTED]
Subject: RE: Detecting browser close


It was my understanding that only signed scripts could open popups 
off-screen, or of too small a size (I think 100px in either direction).

I use the approach you outline as well, although it's not critical that
the 
user logs out of my app anyway but they do feel good about having an 
explicit logout button.  I however pop up a small "now logging out"
message 
for them in the new window, partly because I think that's perhaps nicer
to 
show that what they asked to happen actually did, but also because an 
off-screen popup wasn't allowed.

Just curious how you got the off-screen popup to work without a signed 
script (assuming you didn't have one?).


>From: "Joe Hertz" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Detecting browser close
>Date: Mon, 21 Jun 2004 11:56:56 -0400
>
>This is fine if you want to provide a popup window to the user. This
>still isn't an authoritative way of determining if the user has "logged

>out".
>
>Your app should never depend on the client's PC having electricity.
>
> > -Original Message-
> > From: Simone - Dev [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, June 20, 2004 6:48 AM
> > To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> > Subject: R: Detecting browser close
> >
> >
> > What I'm proposing to you it's a solution that works only on JS
> > enabled browsers, but since this is almost the 99,99% of the browser

> > on the market shouldn't be a problem :-)
> >
> > On the onClose event of the window object (javascript object) opens
> > a new window of 10px that is displayed off the screen (8000px left):

> > this windows will contain a page that close all session specific 
> > resources as soon as the user exit, without having to wait the 
> > session timeout to expire
> >
> > I used it many times, also to provide a "u forgot to save what you
> > did, are you sure you want to exit the page?" alert (but this need a

> > onBeforeClose event that is available only on IE).
> >
> > Simone
> >
> > -
> > Simone Chiaretta
> > www.piyosailing.com/S
> > Any sufficiently advanced technology is indistinguishable from magic
> > "Life is short, play hard"
> >
> >
> > > -Messaggio originale-
> > > Da: ksitron [mailto:[EMAIL PROTECTED]
> > > Inviato: sabato 19 giugno 2004 23.32
> > > A: Struts Users Mailing List
> > > Oggetto: Detecting browser close
> > >
> > >
> > >
> > > Is there a way to detect when the user closes the browser.
> > What I want
> > > to do is do clean-up and destroy the session.
> > >
> > >
> > > Thanks in advance.
> > >
> > > --
> > >
> > >
> > >
> > >
> > >
> > >
> > 
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
MSN 9 Dial-up Internet Access fights spam and pop-ups - now 3 months
FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/


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

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
i