Re: Need Urgent help

2002-06-14 Thread Roy Truelove

>Why don't you change the bean so it doesn't return a null result?

You can also wrap the whole thing in a logic:notEmpty tag, so that the equal
tag will not be evaulated if your property is null.

>
> Regards,
>
> Richard
>
> At 08:10 PM 6/25/2002 +0530, you wrote:
> >Hi,
> >I have a problem in using logic:equal tag given below
> >
> >  DO SOME.
> >
> >This code is working fine when it is not null. But when ever it {
> >beaninstance.getMethod() }
> >is becoming null, page is getting exception as below...
> >
> >javax.servlet.jsp.JspException: Cannot compare null variable to value A
> > at
> > org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:193)
> > at
> > org.apache.jsp.HNCTemplate$jsp._jspService(HNCTemplate$jsp.java:317)
> > at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
>
>org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
a
> >va:202)
> > at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
> >
> >Can any one help me out in this, I tried to break this in logic:equal
source
> >file..
> >
> >TIA
> >rayaku
> >
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 1.1 Deployment Bug?- Iplanet Web Server

2002-06-11 Thread Roy Truelove

Hi Raj,

I don't use IPlanet.. but given the stackTrace that you posted earlier, the
error is occuring at _menu_jsp.java:102.  I asking what's happening at that
line; it might give you more insight as to what is causing the error.

-Roy

- Original Message -
From: "Rajesh Kalluri" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 11:14 AM
Subject: RE: 1.1 Deployment Bug?- Iplanet Web Server


> Roy,
>
> When you say "does IPlanet give you access to the generated JSP source?".
Do
> you mean where to find the .java and .class file s generated by a
container
> for a given jsp.
>
> if so you can find them in
> ..$IWS_HOME\https-web.manduca\ClassCache\tiles\_jsps\_layouts for iplanet
> substituing your setup parameters.
>
> Regards
> Raj
>
> -Original Message-
> From: Roy Truelove [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 10:27 AM
> To: Struts Users Mailing List
> Subject: Re: 1.1 Deployment Bug?- Iplanet Web Server
>
>
> what's happening here : _menu_jsp.java:102 ? does IPlanet give you access
to
> the generated JSP source?
>
> -Roy
>
> - Original Message -
> From: "Rajesh Kalluri" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, June 11, 2002 9:12 AM
> Subject: RE: 1.1 Deployment Bug?- Iplanet Web Server
>
>
> > Struts 1.0.x works fine on my Iplanet Web server (Which is more like
> tomcat
> > 3.2+). But i cannot get the example from Struts 1.1 to work on Iplanet
> (IWS
> > 6.0 SP2 ). Here is the stack trace.
> >
> >  Internal error: Unexpected error condition thrown (unknown exception,no
> > description), stack: java.lang.ExceptionInInitializerError   at
> > _jsps._layouts._menu_jsp._jspService(_menu_jsp.java:102)   at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)   at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at
> >
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> > va:247)   at
> >
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.j
> > ava:237)   at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:520)
> > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:589)
at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at
> >
>
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServl
> > etRunner.java:897)   at
> >
>
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1
> > 065)   at
> >
>
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunne
> > r.java:959)   at
> > com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native
> > Method)   at
> >
>
com.iplanet.server.http.servlet.NSRequestDispatcher.include(NSRequestDispatc
> > her.java:93)   at
> >
>
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:408)
> > at
> >
>
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
> > va:757)   at
> > org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:369).
> >
> > The people at iplanet support would not care as they claim its not their
> > problem (to support external frameworks).
> >
> > Of course they need to wake up.
> >
> > Any one seen this issue?
> >
> >
> > Regards
> > Raj.
> >
> > -Original Message-
> > From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 10, 2002 7:28 PM
> > To: Struts (E-mail)
> > Subject: 1.1 Deployment Bug?
> >
> >
> > Is there a known issue with deploying 1.1 apps in any servlet/Web
> container?
> > 1.02 deploys just find in the WEB-INF/lib directory, but 1.1 is causing
> the
> > class loader to throw ClassNotFoundException.  We have found this to be
> true
> > in Tomcat 4.01, JRun 3.1 and WebLogic 6.1SP2.  If a work-around exists,
> > where is the documentation?
> >
> > Mark
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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




Re: 1.1 Deployment Bug?- Iplanet Web Server

2002-06-11 Thread Roy Truelove

what's happening here : _menu_jsp.java:102 ? does IPlanet give you access to
the generated JSP source?

-Roy

- Original Message -
From: "Rajesh Kalluri" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 9:12 AM
Subject: RE: 1.1 Deployment Bug?- Iplanet Web Server


> Struts 1.0.x works fine on my Iplanet Web server (Which is more like
tomcat
> 3.2+). But i cannot get the example from Struts 1.1 to work on Iplanet
(IWS
> 6.0 SP2 ). Here is the stack trace.
>
>  Internal error: Unexpected error condition thrown (unknown exception,no
> description), stack: java.lang.ExceptionInInitializerError   at
> _jsps._layouts._menu_jsp._jspService(_menu_jsp.java:102)   at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)   at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:247)   at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.j
> ava:237)   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:520)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:589)   at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at
>
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServl
> etRunner.java:897)   at
>
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1
> 065)   at
>
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunne
> r.java:959)   at
> com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native
> Method)   at
>
com.iplanet.server.http.servlet.NSRequestDispatcher.include(NSRequestDispatc
> her.java:93)   at
>
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:408)
> at
>
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
> va:757)   at
> org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:369).
>
> The people at iplanet support would not care as they claim its not their
> problem (to support external frameworks).
>
> Of course they need to wake up.
>
> Any one seen this issue?
>
>
> Regards
> Raj.
>
> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 10, 2002 7:28 PM
> To: Struts (E-mail)
> Subject: 1.1 Deployment Bug?
>
>
> Is there a known issue with deploying 1.1 apps in any servlet/Web
container?
> 1.02 deploys just find in the WEB-INF/lib directory, but 1.1 is causing
the
> class loader to throw ClassNotFoundException.  We have found this to be
true
> in Tomcat 4.01, JRun 3.1 and WebLogic 6.1SP2.  If a work-around exists,
> where is the documentation?
>
> Mark
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Argument for redirects (was Adding query string to redirect w/in an action)

2002-06-11 Thread Roy Truelove

From: "Alexis HAUMONT" <[EMAIL PROTECTED]>


> Hi all,

> I finally code a quick and dirty method in my 'Mother of all' Action to
> allow forward redirects :

... Thanks Alexis.. I had done something similar to that, but I think your
way is prettier.

> PS :
> I think this kind of fonctionality should be Struts-native, no ?
> Or maybe we're the only one doing redirects here ?

I agree.. this comment is also in response to Arik's suggestion to use a
forward.  I'm using a redirect in this case for design reasons.  Here's an
example : let's say I have a main menu..

mainMenuAction --fwd-> mainMenu.jsp

>From there a user clicks "Edit Entry" to edit a specific entry in the
database.

editEntryAction --fwd-> editEntry.jsp

Then the user clicks SAVE..

editEntry.jsp --(new request)--> saveEntryAction

The entry is saved.  So now, return to the main menu.

saveEntryAction -??-> mainMenuAction

But now what?  I want the user to return to the Main Menu.  I don't want to
forward a few reasons.  1) that save is still in the URL, but the user would
be at the main menu.  If s/he bookmarks or hits refresh, the save will occur
again.  I'd like the URL to reflect what page the user is on.  2) It's less
elegant.  The original idea behind fowards was to transfer control from a
Controller to a View.  In the case of saveEntryAction, the Controller has no
view, so I want to redirect to one that does (MainMenu). 3) When the save is
complete, the workflow is complete.  By using a redirect, the request scope
is cleared, and a new workflow can begin at the main menu.

I'm guessing that because redirects aren't so popular in struts that the
commiters have a different approach toward design (?)  I'd like to know how
most people handle situations like the one above.

If you've gotten here, thanks for reading all of this  :)
-Roy


>
> > -Message d'origine-
> > De : Arik Levin ( Tikal ) [mailto:[EMAIL PROTECTED]]
> > Envoyé : mardi 11 juin 2002 08:52
> > À : 'Struts Users Mailing List'
> > Objet : RE: Adding query string to redirect w/in an action
> >
> >
> > If you are redirecting from one action to another it's true,
> > I had this problem, you can always use forward ;-)
> >
> > -Original Message-
> > From: Roy Truelove [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 11, 2002 4:01 AM
> > To: Struts Users Mailing List
> > Subject: Adding query string to redirect w/in an action
> >
> > Hello all,
> >
> > Question about redirects.. I want to redirect from one action
> > to another, but I want to append a query string to the URL.
> > I know how to do this the "dirty" way, by creating a
> > context-relative ActionForward and slapping the queryString
> > onto the end.  What I'm looking for (in theory) is the
> > equivalent to this :
> >
> > myForward = mapping.findForward("toSomeAction");
> > myForward.setRedirect(true);
> > myForward.setQueryString(someJavaUtilMap);
> > return myForward;
> >
> > Is there a clean way to add a query string to a redirect when
> > the redirect goes to an action?
> >
> > Thanks,
> > Roy
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-user-> [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: <mailto:[EMAIL PROTECTED]>
> >
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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




Re: Help: java.lang.IllegalStateException

2002-06-11 Thread Roy Truelove

Hi Allen,

   Does this error occur when you hit save? or when this particular JSP is
loading?  (I'm guessing the first one.)  I'm also confused about your
mappings.. this JSP forwards to mainMenu.do, which is a global forward,
forwarding to schedule.jsp?  Maybe this double forward is messing things up?

I'm kinda fishing here...
-Roy

- Original Message -
From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 8:10 AM
Subject: Re: Help: java.lang.IllegalStateException


> Subject: Re: Help: java.lang.IllegalStateException
> From: "C. Allen Sher" <[EMAIL PROTECTED]>
>  ===
> Here are the section of struts-config.xml and the form in the JSP:
>
> struts-config.xml
>
> ...
>  
>  
>   
>   
>   
>   
>   
>   
>   
>   
>  
>  
>  
>   
>   
>   
>   
>   
>   
>  
>  
>  
> ...
>input = "/saveSubmit.jsp" name = "submitForm" scope = "request" validate =
> "false">
>  
>   
> ...
>  
>
>
> saveSubmit.jsp
>
> ...
>
>name="submitForm" type="com.highwin.jcs.SubmitForm">
> 
>   
> ...
>   
> Schedule it!
>   
> ...
> 
>   
> ...
>
> I've tried to comment out the forward element inside the saveSubmit action
> as well as replacing mainMenu.do with schedule.jsp.
> Both produced the same result.
>
> Thanks.
>
>
>
> "Roy Truelove" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Hey..
> >
> > We'd probably need to see the jsp / action that's giving you this error.
> > Seems like you're trying to forward after Tomcat has already finished
> > sending all the data to the client.
> >
> > -Roy
> >
> > - Original Message -
> > From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, June 10, 2002 5:10 PM
> > Subject: Help: java.lang.IllegalStateException
> >
> >
> > > Subject: Help: java.lang.IllegalStateException
> > > From: "C. Allen Sher" <[EMAIL PROTECTED]>
> > >  ===
> > > I just encountered a java.lang.IllegalStateException in my Struts app.
> > > It seems more like a Java or Security Manager or Tomcat problem, but
I'm
> > not
> > > sure.
> > > Any pointer is greatly appreciated.
> > >
> > > Setup:Java 1.3.0 + Tomcat 4.0.1 + Struts 1.0.1
> > >
> > > Stack Trace:
> > >
> > > java.lang.IllegalStateException: Cannot forward after response has
been
> > > committed
> > >  at
> > >
> >
>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
> > > er.java:367)
> > >  at
> > >
> >
>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
> > > .java:355)
> > >  at
> > >
> >
>
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
> > > va:1758)
> > >  at
> > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
> > >  at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >  at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > > FilterChain.java:247)
> > >  at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > > ain.java:193)
> > >  at
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > > va:243)
> > >  at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > 66)
> > >  at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > > va:201)
> > >  at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > 66)
> &g

Re: 1.1 Deployment Bug?

2002-06-10 Thread Roy Truelove

Hey Mark,

can you provide a StackTrace for the ClassNotFoundException?  I deploy with
Tomcat 4.03 all the time.

-Roy
- Original Message -
From: "Galbreath, Mark" <[EMAIL PROTECTED]>
To: "Struts (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, June 10, 2002 7:27 PM
Subject: 1.1 Deployment Bug?


> Is there a known issue with deploying 1.1 apps in any servlet/Web
container?
> 1.02 deploys just find in the WEB-INF/lib directory, but 1.1 is causing
the
> class loader to throw ClassNotFoundException.  We have found this to be
true
> in Tomcat 4.01, JRun 3.1 and WebLogic 6.1SP2.  If a work-around exists,
> where is the documentation?
>
> Mark
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Help: java.lang.IllegalStateException

2002-06-10 Thread Roy Truelove

Hey..

We'd probably need to see the jsp / action that's giving you this error.
Seems like you're trying to forward after Tomcat has already finished
sending all the data to the client.

-Roy

- Original Message -
From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 10, 2002 5:10 PM
Subject: Help: java.lang.IllegalStateException


> Subject: Help: java.lang.IllegalStateException
> From: "C. Allen Sher" <[EMAIL PROTECTED]>
>  ===
> I just encountered a java.lang.IllegalStateException in my Struts app.
> It seems more like a Java or Security Manager or Tomcat problem, but I'm
not
> sure.
> Any pointer is greatly appreciated.
>
> Setup:Java 1.3.0 + Tomcat 4.0.1 + Struts 1.0.1
>
> Stack Trace:
>
> java.lang.IllegalStateException: Cannot forward after response has been
> committed
>  at
>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
> er.java:367)
>  at
>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
> .java:355)
>  at
>
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
> va:1758)
>  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
>  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
>  at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
>  at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:243)
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
>  at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:201)
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
>  at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
>  at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> )
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
>  at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
>  at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> )
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
>  at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
>  at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :163)
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
>  at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> 1011)
>  at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
> )
>  at java.lang.Thread.run(Thread.java:484)
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Adding query string to redirect w/in an action

2002-06-10 Thread Roy Truelove

Hello all,

Question about redirects.. I want to redirect from one action to another,
but I want to append a query string to the URL.  I know how to do this the
"dirty" way, by creating a context-relative ActionForward and slapping the
queryString onto the end.  What I'm looking for (in theory) is the
equivalent to this :

myForward = mapping.findForward("toSomeAction");
myForward.setRedirect(true);
myForward.setQueryString(someJavaUtilMap);
return myForward;

Is there a clean way to add a query string to a redirect when the redirect
goes to an action?

Thanks,
Roy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: forawrd parameters

2002-06-07 Thread Roy Truelove

Try setting the scope in your XML to "session" instead of "request".  That
way it will still be available when the person goes back to your form page.

Take it easy,
Roy

- Original Message -
From: "Philip DiFalco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 07, 2002 10:55 AM
Subject: forawrd parameters


>
> In a form I have, if a user enters incorrect info,
> an error is displayed to the form - BUT, all info
> that had been entered is "cleared", and the user
> has to re-enter this information again.
>
> Is there some way to declare my "action path" so
> that the entered information is retained?
>
> Below is my entry to the "struts-config.xml" file
>
>
>type="com.dept.servlets.action.CreateNewCompAction"
>  name="createCompForm"
>  scope="request"
>  input="/engines/compSetup.jsp">
>  Creates new Comp Result
>  
>  
>  
>
> Thanks in advance.
>
> - Phil
>   [EMAIL PROTECTED]
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Back button skip a page?

2002-06-06 Thread Roy Truelove

Maybe in your "show results" action, a session variable can be set that the
person saw the results.  Then if they go to the "Request is being processed"
page, the page can check to see the the results were seen, and if yes,
automatically redirect to the results page.  You'll probably have to make
sure that the "Request is being processed" page is not cached.. set the
cache-control header to "no-cache".

Hope this helps,
Roy

- Original Message -
From: "Jerome Jacobsen" <[EMAIL PROTECTED]>
To: "Struts User" <[EMAIL PROTECTED]>
Sent: Thursday, June 06, 2002 4:56 PM
Subject: Back button skip a page?


> This may not be possible, but I hope it is.  I have a "Your request is
being
> processed, please wait.." page.  Once the user gets to the results page
and
> hit their browser's Back button I want to skip that "Wait" page.
>
> Here is the page flow:
> Form Page -> Wait Page -> Results Page
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Console created by James Holmes

2002-06-06 Thread Roy Truelove

http://www.jamesholmes.com/struts/console/

Looks like it's just able to "visually edit Struts configuration files and
... convert Pages (*.htm, *.html, *.jsp) to use the Struts HTML tag library
for form handling."  I know I shouldn't say *just* able to, because what it
*can* do is very helpful.

-Roy


- Original Message -
From: "Radhika Nadkarni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 06, 2002 5:22 AM
Subject: Console created by James Holmes


> hi,
> can we create Action forms, Action classes, web.xml using Console created
by
> James Holmes ???
>
>
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Design Advice - Relational Databases & Java Objects

2002-06-06 Thread Roy Truelove

Have you looking into Torque at all?
(http://jakarta.apache.org/turbine/torque/index.html) It's been recently
decoupled from Turbine and offers excellent object-> relational mapping.  I
have about 30 tables in my project and haven't written any SQL yet!

Good luck,
Roy

- Original Message -
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 05, 2002 4:19 PM
Subject: Re: Design Advice - Relational Databases & Java Objects


> ... (still being dim) ... but how do the DAOs see the Transaction object?
>
> Robert Taylor wrote:
>
> >The DAOs have a method called getConnection(). Inside getConnection()
they
> >call
> >Transaction.getTransactionContext(). TransactionContext contains the
> >Connection and
> >other information about the Transaction. Although, TransactionContext is
> >held within
> >the static ThreadLocal variable, it is garanteed to be unique for each
> >thread, thus
> >providing the same Connection for all DAOs in the same thread that join
the
> >transaction.
> >
> >HTH,
> >
> >robert
> >
> >
> >
> >>-Original Message-
> >>From: Adam Hardy [mailto:[EMAIL PROTECTED]]
> >>Sent: Wednesday, June 05, 2002 2:33 AM
> >>To: Struts Users Mailing List
> >>Subject: Re: Design Advice - Relational Databases & Java Objects
> >>
> >>
> >>Aha, ThreadLocal. Sounds good, but I still have problems working out how
> >>the DAOs get there. OK, I'm possibly being a bit dim here - how does the
> >>DAO access the ThreadLocal holding your connection?
> >>
> >>Robert Taylor wrote:
> >>
> >>
> >>
> >>>Transaction makes the same Connection available to all
> >>>DAOs in the same thread by storing it in a ThreadLocal
> >>>variable, so I don't have to pass the transaction around.
> >>>
> >>>robert
> >>>
> >>>
> >>>
> >>>
> >>>
> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 4:46 PM
> To: Struts Users Mailing List
> Subject: Re: Design Advice - Relational Databases & Java Objects
> 
> 
> Hi Robert,
> that is more or less what I am aiming to do. I see you don't pass
> connections around - at least not across your business to DAO
interface.
> So from your code snippet, I guess your transaction object gets the
> connection and puts it somewhere that the DAOs can find it? Or do you
> pass your transaction object into your DAOs via their constructors?
> 
> I am going with the struts connection pool so I'm thinking how I can
> wrap them up without having to repeat lots of error handling in the
> business objects.
> 
> Regards
> Adam
> 
> Robert Taylor wrote:
> 
> 
> 
> 
> 
> >Adam, when I first started using DAO in my application,
> >I had course grained DAO's that encapsulated transactions.
> >They were responsible for managing the transaction boundries
> >(getting the connection, committing or rolling back, and then
> >releasing the connection). I then found that they were not
> >as reusable and they contained a lot of business logic. I started
> >thinking, this doesn't make sense. To me, it was more intuitive
> >that the DAO should only be responsible for data access and
> >the business logic and transaction management should be a layer
> >above the DAO. So now, my business objects are responsible for
> >managing the transaction (actually they delegate it to another
> >module) and DAOs "join" the transaction in progress. The DAO
> >become more reusable and are decoupled from the mechanism that
> >manages the transaction. So now I have something like the
> >following:
> >
> >ITransaction trans = // get a transaction object
> >
> >try {
> >
> >  trans.begin();
> >
> >  dao1.insert(dto);
> >  dto2.setForeignKeyId(dto.getIdentity());
> >  dto3.setForeignKeyId(dao1.getIdentity());
> >
> >  dao2.insert();
> >  dao3.insert();
> >
> >
> >} catch (DatastoreException de) {
> >
> > trans.setRollbackOnly();
> > throw new BusinessException(de);
> >
> >} finally {
> >
> >trans.end();
> >
> >}
> >
> >
> >Each DAO joins the transaction (accesses the Connection in the
> >
> >
> >
> >
> same thread)
> 
> 
> 
> 
> >and uses it to perform the necessary data access operation. A nice
side
> >effect
> >is that all the tediousness and complexity involved in managing the
> >transaction is
> >wrapped up in a simple API and not over multiple DAOs.
> >
> >Right now, I use straight JDBC but if I decided to use JDO or another
> >mechanism for transactions, my business client doesn't change.
> >
> >
> >>Just like
> >>
> >>
> >if I change my business logic, my web client (Struts
> >
> >
> >>Action classes)
> >>
> >>
> >don't have to change. I find this provides 

Re: Best Practice for Holding Data Across Requests

2002-06-05 Thread Roy Truelove

> (A) pass a Map in as the parameter from the link on the first JSP
containing
> the id and name

I vote for A.  There are 100 different philosophies on how to handle this,
but mine is to put as much as you can in the URL query string.  This way you
won't have problems with people bookmarking it, or maybe having serveral
copies of the page going at once.

-Roy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Confused about exception handling design, 1.1 beta

2002-06-05 Thread Roy Truelove

> Have you read my exception handling chapter on
> theserverside.com? If that doesn't answer this question,
> than I've failed and I need to rewrite that chapter.

Thanks Chuck.. excellent stuff!  I extended ExceptionHandler, and this did
the trick.  One small concern is that the DTD for struts-config.xml says
that the "exception" element requires that the "key" attribute be specified.
My ExceptionHandler doesn't use application.resources or ActionErrors at
all, so the key is not required.  Everything worked fine, but given this
requirement, and given that storeException also requires ActionErrors,
people might be under the assuption that the can't use Struts error handling
without using ActionErrors.

Thanks again,
Roy

> >
> > I'm having a problem with exception handling with 1.1b.  This
problem
> > has been brought up before
> >
(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg29572.html)
> > but never fully discussed.  I can't see any way for my Action that deals
> > with global-exceptions to get a handle to the Exception that was thrown,
> > without creating my own ExceptionHandler class.
> >
> > Shouldn't all exceptions that are minor enough to use ActionErrors be
caught
> > within an Action and not thrown to a global-exception?  imho, global
> > exceptions should be for reporting major, unexpected exceptions.  The
Action
> > that handles that exception should have a handle to an Exception object,
not
> > to an ActionError object.  This way the proper reporting can be done
> > (emailing of stack traces, etc.), and the user should recieve a generic
> > error page.
> >
> > Any other thoughts on this?
> >
> > -Roy
> >
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

> >
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Confused about exception handling design, 1.1 beta

2002-06-05 Thread Roy Truelove

Hi folks,

I'm having a problem with exception handling with 1.1b.  This problem
has been brought up before
(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg29572.html)
but never fully discussed.  I can't see any way for my Action that deals
with global-exceptions to get a handle to the Exception that was thrown,
without creating my own ExceptionHandler class.

Shouldn't all exceptions that are minor enough to use ActionErrors be caught
within an Action and not thrown to a global-exception?  imho, global
exceptions should be for reporting major, unexpected exceptions.  The Action
that handles that exception should have a handle to an Exception object, not
to an ActionError object.  This way the proper reporting can be done
(emailing of stack traces, etc.), and the user should recieve a generic
error page.

Any other thoughts on this?

-Roy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Cannot acces javax.sql.DataSource

2001-05-16 Thread Roy Truelove

Hey Geoff,

You have to download the JDBC service pack from the sun site; it's not
including in the standard 1.3 lib.

Take it easy,
Roy

- Original Message -
From: "Geoffrey Van Nuffelen" <[EMAIL PROTECTED]>
To: "Struts-User (E-Mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 11:28 AM
Subject: Cannot acces javax.sql.DataSource


> Hi,
>
> I have a problem, I can't access the package javax.sql.
> Is it include into the lats JDK (1.3.0.2) ??? Or somewhere else ???
>
> Thanks
> Geoffrey...1
>
>




Web design forum / listserv

2001-05-14 Thread Roy Truelove

Hey guys,

I'd like to know if anyone knows of a listserv / forum / newsgroup that
deals solely with web application design philosophies, and not necessarily
with their implementations.  I read several lists (this one, Turbine, JSP,
barracuda,) and most of the traffic is geared toward problems *using* the
framework.  A place where people could go and discuss things like MVCm2,
push/pull etc. I believe would be very beneficial.  If someone knows of a
forum like this, please let me know.

Thanks!
-Roy




2 newbie questions..

2001-05-12 Thread Roy Truelove

Hey guys,

Quick questions from a newbie.. When the mapping is local to a
particular action, the Action class should call findForward on the mapping
that's passed in.  But if the mapping is a global one, it should call
findForward on the instance of ActionServlet (called servlet) that is passed
down from the parent Action class.  Is this correct?  Or does the
ActionMapping that's passed in to the perform() method already contain the
global mappings?  The reason I ask if because I really don't like the idea
of having access (and having to use) member variables of a parent class.  It
makes my OO alarms go off.  The example Struts application uses the
"servlet" object, instead of the ActionMapping instance.

Second question has to do with subclassing an ActionMapping class.  As I
understand it right now, the default ActionMapping class that is passed into
the perform() method is created using the configuration XML file.  It
contains the local mappings that are defined in the  tag for this
path (as well as the global mappings?)  This seems to make sense, but in the
example application, there is a subclass of ActionMapping calling
ApplicationMapping, with some get / set methods. I can't find where this
class is used in the application, nor an explaination of it in the
walk-through or the user-guide.

Thanks in advance for your help.  I'm trying to fully understand the example
app before trying struts on my own, and these are a few of my hangups.

Take it easy,
Roy