RE: Best practices - help

2003-06-24 Thread Chris Reeves
Something I do often is create a servlet that is loaded at app startup that
loads and populates a variety of objects that I need for general use in its
init method.

If I can't guarantee that users will always use a single point of entry
(never the case in a content-heavy site), I avoid depending on a single
action to do app-wide heavy lifting.

For whatever that's worth - probably a worst practice...

Chris

 -Original Message-
 From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 24, 2003 8:53 AM
 To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
 Subject: RE: Best practices - help


 This is something we do that works extremely well.  The path on the
 global-forward/ can point to a set up action where you can initialize /
 populate all of those things that you application needs.  The set
 up action
 would then forward to your first .JSP or tile definition.



 Jerry Jalenak
 Team Lead, Web Publishing
 LabOne, Inc.
 10101 Renner Blvd.
 Lenexa, KS  66219
 (913) 577-1496

 [EMAIL PROTECTED]


 -Original Message-
 From: Steve Raeburn [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 24, 2003 6:32 AM
 To: Struts Users Mailing List
 Subject: RE: Best practices - help


 have a welcome jsp page that redirects to your action:

 struts-config.xml:

   global-forwards
 forward name=welcome path=/myaction.do/
   /global-forwards

 index.jsp:

   %@ taglib uri=http://jakarta.apache.org/struts/tags-logic;
 prefix=logic %
   logic:redirect forward=welcome/

 (that's the whole jsp file, not just a snippet!)

 Steve


  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: June 24, 2003 4:11 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Best practices - help
 
 
  Hi Steve,
 
  The problem is that /MyLayer.jsp happens to be my welcome page.
 
  This page has to be displayed on start up.How  do I get struts
 process my
  Action servlet,myAction, in order to give /MyLayer.jsp the
  content it needs?
 
  Thanks
 



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


 This transmission (and any information attached to it) may be
 confidential and is intended solely for the use of the individual
 or entity to which it is addressed. If you are not the intended
 recipient or the person responsible for delivering the
 transmission to the intended recipient, be advised that you have
 received this transmission in error and that any use,
 dissemination, forwarding, printing, or copying of this
 information is strictly prohibited. If you have received this
 transmission in error, please immediately notify LabOne at the
 following email address: [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]



apache proxy/form action rewrite issue

2003-06-23 Thread Chris Reeves
I have a web app using struts that runs under tomcat, behind an apache
server using mod proxy.

My web app works exactly as expected when run directly against tomcat, but
fails when I attempt to use actions behind apache.

For instance, my app (let's call it thing1) has a form at
/contact/index.jsp.

The action in the form, after being rewritten by struts, becomes
/thing1/contact/contact.do.

Is there any way to get around this? I don't want to throw more rules at the
apache server, and I see no way (short of rewriting the from action with
javascript on the client) to get rid of the rewriting (at least, I've found
no way thus far).

Any ideas? I've been banging my head on this one for a while now... I have
some apps in struts 1.0 that just don't seem to suffer from this issue.

Thanks!

Chris




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



RE: apache proxy/form action rewrite issue

2003-06-23 Thread Chris Reeves
Are you referring to the action forward? I can put a redirect=true there,
but it has no effect on rendering the form action. Or am I missing
something?

Chris

 -Original Message-
 From: Dirck Hecking [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 24, 2003 12:44 AM
 To: Struts Users Mailing List
 Subject: RE: apache proxy/form action rewrite issue


 The magic ingredient here is to set redirect=true in the
 struts-config.xml for the individual form mappings. -Dirck

 -Original Message-
 From: Chris Reeves [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 23, 2003 9:36 PM
 To: Struts User Mailing List
 Subject: apache proxy/form action rewrite issue

 I have a web app using struts that runs under tomcat, behind an apache
 server using mod proxy.

 My web app works exactly as expected when run directly against tomcat,
 but
 fails when I attempt to use actions behind apache.

 For instance, my app (let's call it thing1) has a form at
 /contact/index.jsp.

 The action in the form, after being rewritten by struts, becomes
 /thing1/contact/contact.do.

 Is there any way to get around this? I don't want to throw more rules at
 the
 apache server, and I see no way (short of rewriting the from action with
 javascript on the client) to get rid of the rewriting (at least, I've
 found
 no way thus far).

 Any ideas? I've been banging my head on this one for a while now... I
 have
 some apps in struts 1.0 that just don't seem to suffer from this issue.

 Thanks!

 Chris




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