Moving from Struts 1.0b1 to Struts 1.0b3

2001-06-04 Thread Graeme Miller

Currently having a problem with migrating code from using Struts 1.0b1 to
Struts 1.0b3

Everything seems to work fine apart from the fact that the validate methods
on our form beans (ie subclasses of org.apache.struts.action.ActionForm) no
longer get called successfully.  I have had a look through the release notes
and cannot find any reasons why these methods would no longer work.  

Any ideas people?  The following error is what gets thrown in the tomcat
log.

java.lang.ClassCastException
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java, Compiled Code)
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java,
Compiled Code)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java, Compiled
Code)
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.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java, Com
piled Code)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)

Thanks in advance.
Graeme.



Re: Managing resource life cycle during request

2001-06-04 Thread Ted Husted

I doubt that overriding ActionServlet.process() would work. The
controller sends back the response, and it's done. It's then up to HTTP
to deliver the view, usually a JSP. 

Any clean-up routine would have to be the responsibility of the view,
which puts you into the scriplet zone.

Jeff Trent wrote:
> 
> Well, it looks to me that short of overriding ActionServlet.process(), there
> is no way one can clean-up resources after the page has been rendered...



Re: Managing resource life cycle during request

2001-06-04 Thread Jeff Trent

Well, it looks to me that short of overriding ActionServlet.process(), there
is no way one can clean-up resources after the page has been rendered...

- Original Message -
From: "Jeff Trent" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 04, 2001 10:54 PM
Subject: Re: Managing resource life cycle during request


> That's sounds okay for simple forms, but I'd rather not serialize objects
> from a multi-row recordset to a collection every time.  Too much overhead!
> Let me put the question another way, in Struts, what method on the form or
> action class gets called following the rendering of the input page?  I'll
> check source code now for this answer...
>
> - jeff
>
> - Original Message -
> From: "Ted Husted" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, June 04, 2001 9:25 PM
> Subject: Re: Managing resource life cycle during request
>
>
> > The types of objects I use for presentation should be disposed and
> > garbage collected. Here we would be talking about standard collections
> > of mainly Strings and maybe a few primitive types. Anything kinky would
> > be handled in the action. The view gets everything handed to it on a
> > silver platter.
> >
> > Jeff Trent wrote:
> > >
> > > Ted,
> > >
> > > Just because the objects are held in the bean doesn't necessary mean
> they
> > > will automatically be cleaned-up.  Am I missing something here?  I
also
> > > agree, I don't want to be writing queries within the JSP.
> > >
> > > Thanks,
> > > - jeff
> >
>
>




Re: Managing resource life cycle during request

2001-06-04 Thread Ted Husted

Following the rendering? By Struts? None.

It's a straight JSP (or other view technology, like a Velocity
template).

Generally, things go into the request, and are disposed when the request
is disposed.

There's an enhancement to the iterate tag in the works that uses a
RowSet directly. 

<
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg07910.html
>

Jeff Trent wrote:
> 
> That's sounds okay for simple forms, but I'd rather not serialize objects
> from a multi-row recordset to a collection every time.  Too much overhead!
> Let me put the question another way, in Struts, what method on the form or
> action class gets called following the rendering of the input page?  I'll
> check source code now for this answer...
> 
> - jeff



Re: Managing resource life cycle during request

2001-06-04 Thread Jeff Trent

That's sounds okay for simple forms, but I'd rather not serialize objects
from a multi-row recordset to a collection every time.  Too much overhead!
Let me put the question another way, in Struts, what method on the form or
action class gets called following the rendering of the input page?  I'll
check source code now for this answer...

- jeff

- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 04, 2001 9:25 PM
Subject: Re: Managing resource life cycle during request


> The types of objects I use for presentation should be disposed and
> garbage collected. Here we would be talking about standard collections
> of mainly Strings and maybe a few primitive types. Anything kinky would
> be handled in the action. The view gets everything handed to it on a
> silver platter.
>
> Jeff Trent wrote:
> >
> > Ted,
> >
> > Just because the objects are held in the bean doesn't necessary mean
they
> > will automatically be cleaned-up.  Am I missing something here?  I also
> > agree, I don't want to be writing queries within the JSP.
> >
> > Thanks,
> > - jeff
>




Re: Managing resource life cycle during request

2001-06-04 Thread Ted Husted

The types of objects I use for presentation should be disposed and
garbage collected. Here we would be talking about standard collections
of mainly Strings and maybe a few primitive types. Anything kinky would
be handled in the action. The view gets everything handed to it on a
silver platter.

Jeff Trent wrote:
> 
> Ted,
> 
> Just because the objects are held in the bean doesn't necessary mean they
> will automatically be cleaned-up.  Am I missing something here?  I also
> agree, I don't want to be writing queries within the JSP.
> 
> Thanks,
> - jeff



RE: Any Hashmap examples used in jsp page?

2001-06-04 Thread Steve A Drake

On Mon, 4 Jun 2001, Deadman, Hal wrote:

> I don't think what you are trying to do should be done in the JSP by a
> struts/custom tag.

 Maybe it's a dumb idea, but that's never stopped me before. =:]

> Why not copy the value objects in the HashMap to an array based on the order
> of the keys in your String array? Then pass the array to the JSP instead of
> the HashMap. If you need the keys and they aren't attributes of the value
> objects then you can pass the String array of keys to the JSP too.

 I used an ArrayList of String[]s and that worked fine. Thanks.




Re: Managing resource life cycle during request

2001-06-04 Thread Jeff Trent

Ted,

Just because the objects are held in the bean doesn't necessary mean they
will automatically be cleaned-up.  Am I missing something here?  I also
agree, I don't want to be writing queries within the JSP.

Thanks,
- jeff

- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 04, 2001 6:13 PM
Subject: Re: Managing resource life cycle during request


> In general, you should put everything you need for the presentation into
> a JavaBean, release any other resources, and return just the bean in the
> request. This way you also do things like immediately return the
> connection to the pool (before anything bad happens).
>
> As and for an alternative, the Jakarta JDBC tags work great with Struts
> too, if you like doing things on the page.
>
> Personally, I use mostly RowSets, which can be disconnected from the
> data source as soon as the command completes. The Struts tags don't
> support RowSets directly (yet) so I end up pounding the RowSet into a
> value object bean and/or an ArrayList for iterate (though a fix for that
> is in the works too).
>
> For more, see Part 2 of Strut by Strut under "Coming Soon" at <
> http://www.husted.com/about/struts/ >
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
>
>
> > Jeff Trent wrote:
> >
> > I was wondering how other people deal with physical resource objects
> > (eg. db result sets, etc.) during a request.  Before struts, I use to
> > allocate the resource, call request.setAttribute() with the resource
> > object, call request dispatcher (to do jsp presentation), then clean
> > up the resource back in the servlet upon return.  In struts, this has
> > all been abstracted out.  Is there an alternative way to manage
> > request-scoped resources like this under struts?
> >
> > thanks,
> > jeff
> >
>




Re: Multipage forms and validation

2001-06-04 Thread Ted Husted

When the time comes, David's Validation servlet would get my vote.
Unfortunately, we need to get 1.0 out the door before voting on anything
like this. Beta 3 is counting down now, so we only talking a couple of
weeks now.

In any event, what features Struts, or any Jakarta product, will offer
in any timeframe, will always depend on what people contribute. No one
here can say "hey you, go implement this feature". What gets implemented
depends on what people choose to contribute, and David has stepped
forward with a very fine contribution. 

One of things that make it a fine contribution is that the Validator
servlet snaps right into the framework, without altering anything else.
So you're free to use it, or not to use it, or to use something else.
Which is as "Struts-esque" as you can get ;-) So I'd say use it .. I do!

Niall Pemberton wrote:
> 
> David,
> 
> I see your on the 1.1 ToDo list as a volunteer for "Standard Validations"
> and "Client Side Validations" - is it likely your validation framework is
> going to be adopted for Struts - and if so how close is what you're offering
> now to what Struts will have in 1.1?
> 
> I'm just wondering whether to plough on with what we've got or wait for what
> might be coming in Struts.
> 
> Niall



Re: Null PointerException when run with Apache/SSL/Tomcat

2001-06-04 Thread Brett G. Palmer

Thanks for everyone's suggestions.  Updating to Struts beta-3 fixed the
problem.  I also tried configuring SSL according the Bugzilla record #992,
but it didn't fix the problem.

Brett



- Original Message -
From: "Bryan Field-Elliot" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 04, 2001 12:24 PM
Subject: Re: Null PointerException when run with Apache/SSL/Tomcat


> I had an extremely similar (though not quite exact) problem last week. I
> posted as you did, but no one responded. This morning, I upgraded from
> Struts beta-1 to beta-3, and so far it appears to have magically fixed
> the SSL problem. Hopefully a similar path will fix yours too.
>
> Good luck,
>
> Bryan
>
> Brett G. Palmer wrote:
>
> >We are getting a NullPionterException which seems to originate from the
the
> >struts-html tag libraries.  The error only occurs when we run Struts with
> >Tomcat/Apache and SSL.  If we bypass SSL and just go through Apache (port
> >80) we do not see the error.  Has anyone else seen this problem when
running
> >Struts through SSL?  Any suggestions would be appreciated.  The error
> >message is shown below.
> >
> >Thanks in advance for your help.
> >
> >Brett
> >
> >/ ERROR Message **/
> >
> >Error: 500
> >Location: /mvelopes05/index.jsp
> >Internal Servlet Error:
> >
> >javax.servlet.ServletException
> > at
>
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
p
> >l.java:459)
> > at
>
>_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1
.
> >java:553)
> > 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$JspCountedServlet.service(JspServlet.j
a
> >va:130)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
>
>org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
a
> >va:282)
> > at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> > at org.apache.tomcat.core.Handler.service(Handler.java:287)
> > at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > at
>
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:7
9
> >7)
> > at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> > at
>
>org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnectio
n
> >(Ajp13ConnectionHandler.java:160)
> > at
> >org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> > at
>
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> > at java.lang.Thread.run(Thread.java:484)
> >
> >Root cause:
> >java.lang.NullPointerException
> > at org.apache.struts.taglib.html.LinkTag.hyperlink(LinkTag.java:492)
> > at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:317)
> > at
>
>_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1
.
> >java:145)
> > 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$JspCountedServlet.service(JspServlet.j
a
> >va:130)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
>
>org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
a
> >va:282)
> > at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> > at org.apache.tomcat.core.Handler.service(Handler.java:287)
> > at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > at
>
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:7
9
> >7)
> > at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> > at
>
>org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnectio
n
> >(Ajp13ConnectionHandler.java:160)
> > at
> >org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> > at
>
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> > at java.lang.Thread.run(Thread.java:484)
> >
> >
> >
>
>
>




Re: Newbie to struts - jdbc/dbtags

2001-06-04 Thread Ted Husted

You can configure Postgresql in the struts-config.xml, and then use the
same datasource with the Jakarta Taglibs JDBC. Works like a charm. 

Struts uses "org.apache.struts.action.DATA_SOURCE" as the datasource
identifier (see Action.java).

"kuma.cra" wrote:
> 
> Hi,  im a newbie to struts basically applying the examples and reading
> the documentation (mvc). I am about to connect a psql datasource
> (Postgresql, luinx OS) database to a struts mvc utilizing a database URL
> .
> 
> Thus is there a ActionForm example and what level if i have to create a
> ActionForm class i.e /WEB-INF/classes/custom/ActionForm or can i create
> a package above WEB-INF as at the moment i am creating/modifying
> examples from the taglib's and packaging them under mt Struts-bbnpa (my
> re-named struts app's.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



RE: Problems with struts and resin

2001-06-04 Thread Matthew Heaton (Software Engineer)

Humm, it does just to be my applications that are doing it but I can't see
where they are configured any differently.

-Matt

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 3:10 PM
To: [EMAIL PROTECTED]
Subject: Re: Problems with struts and resin


I haven't had this problem myself. I've kept busy Struts applications in
play for several weeks without any unscheduled downtime under Resin. 

"Matthew Heaton (Software Engineer)" wrote:
> 
> I'm trying to deploy a couple of struts apps on resin which I've deployed
> successfully on Weblogic and on Tomcat.  It appears the server tries to
call
> the init method in the ActionServlet over and over eventially causing the
> server to run out of memory and crash.  I've seen also seen this behavior
> also using some of the sample struts apps though not to the point of
> crashing the server.  I haven't gotten much help on the Resin side of
> things, so does anybody on the struts list know a work around.



RE: How do I Internationalize ActionError parameter values?

2001-06-04 Thread Kyle Robinson

Yes, sorry.  I wasn't aware the request is passed into the validate.  Thanks
Hal

-Original Message-
From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 15:09
To: [EMAIL PROTECTED]
Subject: RE: How do I Internationalize ActionError parameter values?


The request is passed into the validate() function as an argument by the
ActionServlet. You said you wanted the locale in the validate() method,
right?

> -Original Message-
> From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 6:11 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: How do I Internationalize ActionError parameter values?
>
>
> So are you suggesting that I pass the request object to my ActionForm
> constructor when I create it in my action?
>
> -Original Message-
> From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 13:56
> To: [EMAIL PROTECTED]
> Subject: RE: How do I Internationalize ActionError parameter values?
>
>
> Use the request argument to get the session and then get the
> locale out of
> the session using getAttribute(Action.LOCALE_KEY). If you
> have a shared base
> class for all of your forms (that extends ActionForm) it
> might make sense to
> put a getLocale(request) method in there.
>
> Hal
>
> > -Original Message-
> > From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 04, 2001 4:53 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: How do I Internationalize ActionError parameter values?
> >
> >
> > Thanks Hal.  However, I need to get the locale in the
> > validate() method of
> > my ActionForm object.  Any thoughts?
> >
> > -Original Message-
> > From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 04, 2001 13:24
> > To: [EMAIL PROTECTED]
> > Subject: RE: How do I Internationalize ActionError parameter values?
> >
> >
> > Getting the locale object is easy. If you are in an Action
> > perform method,
> > just call:
> >
> > getLocale(request);
> >
> > If you are not in the Action class, you can do what that
> method does,
> >
> > Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
> > if (locale == null)
> >  locale = Locale.getDefault();
> >
> > -Original Message-
> > From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 04, 2001 3:48 PM
> > To: Struts (E-mail)
> > Subject: How do I Internationalize ActionError parameter values?
> >
> >
> > Hey,
> >
> > Looking through the archive I found a couple of notes about
> > internationalizing the ActionError parameters.  I'm talking
> about the
> > following:
> >
> > public ActionError(java.lang.String key,
> >java.lang.Object value0,
> >java.lang.Object value1)
> > Construct an action error with the specified replacement values.
> > Parameters:
> > key - Message key for this error message
> > value0 - First replacement value
> > value1 - Second replacement value
> >
> > What I want to do is pass in keys from the properties file
> > into the second
> > and third parameter.  Specifically I want to pass in the
> > prompt keys to
> > display to the user the fields that are in error.
> >
> > One possible solution proposed was by Craig as follows:
> >
> > The java.text.MessageFormat class (which is how Struts is doing the
> > substitution) does not support internationalizing the replacement
> > parameters directly.  But how about doing this in two steps?
> >
> > * Look up the internationalized replacement value from
> >   a MessageResources bundle
> >
> > * Use the returned String as the replacement value in the
> >   ultimate message.
> >
> > However, I need to get the locale somehow.  It seems alot
> > easier to just
> > override ActionError to accept keys as parameters.  Has
> > anyone overridden
> > the ActionError class to accept "java.lang.String key"
> > parameters instead of
> > "java.lang.Object value0"?
> > Kyle Robinson
> > Systems Consultant
> > Pangaea Systems Inc.
> > (250) 360-0111
> > "Work joyfully and peacefully, knowing that right thoughts
> > and right efforts
> > inevitably bring about right results." - James Allen
> >
>



RE: Logic-Iterate

2001-06-04 Thread Shamdasani Nimmi-ANS004

Shane 

This is how you do it:










In the above case in yourBeanObject class you will have the method getBeanList() which 
will return a list of your beans. And in the bean class eachBean) you will have a 
method getName() which will return the name variable.

Hope this helps.

-Nimmi
-Original Message-
From: Shane Warne [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 5:03 PM
To: [EMAIL PROTECTED]
Subject: Logic-Iterate


Hi,
I was trying to us the logic-iterate tag and i'm stuck
at a point. Please go thru the snippet below,


  
<%
String myName = instance.getName(mybean.getName());
System.out.println(myName);
%>


Now, how do i get one of the properties of a bean when
i'm iterating through a collection of a bean objects.
Bottom line is i would like to pass the property
getName() into a variable. Can anyone help me in
sorting this out ??

Thanks,
Shane..


=


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



RE: How do I Internationalize ActionError parameter values?

2001-06-04 Thread Deadman, Hal

The request is passed into the validate() function as an argument by the
ActionServlet. You said you wanted the locale in the validate() method,
right?

> -Original Message-
> From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 6:11 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: How do I Internationalize ActionError parameter values?
>
>
> So are you suggesting that I pass the request object to my ActionForm
> constructor when I create it in my action?
>
> -Original Message-
> From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 13:56
> To: [EMAIL PROTECTED]
> Subject: RE: How do I Internationalize ActionError parameter values?
>
>
> Use the request argument to get the session and then get the
> locale out of
> the session using getAttribute(Action.LOCALE_KEY). If you
> have a shared base
> class for all of your forms (that extends ActionForm) it
> might make sense to
> put a getLocale(request) method in there.
>
> Hal
>
> > -Original Message-
> > From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 04, 2001 4:53 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: How do I Internationalize ActionError parameter values?
> >
> >
> > Thanks Hal.  However, I need to get the locale in the
> > validate() method of
> > my ActionForm object.  Any thoughts?
> >
> > -Original Message-
> > From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 04, 2001 13:24
> > To: [EMAIL PROTECTED]
> > Subject: RE: How do I Internationalize ActionError parameter values?
> >
> >
> > Getting the locale object is easy. If you are in an Action
> > perform method,
> > just call:
> >
> > getLocale(request);
> >
> > If you are not in the Action class, you can do what that
> method does,
> >
> > Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
> > if (locale == null)
> >  locale = Locale.getDefault();
> >
> > -Original Message-
> > From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 04, 2001 3:48 PM
> > To: Struts (E-mail)
> > Subject: How do I Internationalize ActionError parameter values?
> >
> >
> > Hey,
> >
> > Looking through the archive I found a couple of notes about
> > internationalizing the ActionError parameters.  I'm talking
> about the
> > following:
> >
> > public ActionError(java.lang.String key,
> >java.lang.Object value0,
> >java.lang.Object value1)
> > Construct an action error with the specified replacement values.
> > Parameters:
> > key - Message key for this error message
> > value0 - First replacement value
> > value1 - Second replacement value
> >
> > What I want to do is pass in keys from the properties file
> > into the second
> > and third parameter.  Specifically I want to pass in the
> > prompt keys to
> > display to the user the fields that are in error.
> >
> > One possible solution proposed was by Craig as follows:
> >
> > The java.text.MessageFormat class (which is how Struts is doing the
> > substitution) does not support internationalizing the replacement
> > parameters directly.  But how about doing this in two steps?
> >
> > * Look up the internationalized replacement value from
> >   a MessageResources bundle
> >
> > * Use the returned String as the replacement value in the
> >   ultimate message.
> >
> > However, I need to get the locale somehow.  It seems alot
> > easier to just
> > override ActionError to accept keys as parameters.  Has
> > anyone overridden
> > the ActionError class to accept "java.lang.String key"
> > parameters instead of
> > "java.lang.Object value0"?
> > Kyle Robinson
> > Systems Consultant
> > Pangaea Systems Inc.
> > (250) 360-0111
> > "Work joyfully and peacefully, knowing that right thoughts
> > and right efforts
> > inevitably bring about right results." - James Allen
> >
>



Re: Newbie to struts - jdbc/dbtags

2001-06-04 Thread kuma.cra



Hi,  im a newbie to struts basically applying the examples and reading
the documentation (mvc). I am about to connect a psql datasource
(Postgresql, luinx OS) database to a struts mvc utilizing a database URL
.

Thus is there a ActionForm example and what level if i have to create a
ActionForm class i.e /WEB-INF/classes/custom/ActionForm or can i create
a package above WEB-INF as at the moment i am creating/modifying
examples from the taglib's and packaging them under mt Struts-bbnpa (my
re-named struts app's.



Re: Managing resource life cycle during request

2001-06-04 Thread Ted Husted

In general, you should put everything you need for the presentation into
a JavaBean, release any other resources, and return just the bean in the
request. This way you also do things like immediately return the
connection to the pool (before anything bad happens). 

As and for an alternative, the Jakarta JDBC tags work great with Struts
too, if you like doing things on the page.

Personally, I use mostly RowSets, which can be disconnected from the
data source as soon as the command completes. The Struts tags don't
support RowSets directly (yet) so I end up pounding the RowSet into a
value object bean and/or an ArrayList for iterate (though a fix for that
is in the works too). 

For more, see Part 2 of Strut by Strut under "Coming Soon" at <
http://www.husted.com/about/struts/ >

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


> Jeff Trent wrote:
> 
> I was wondering how other people deal with physical resource objects
> (eg. db result sets, etc.) during a request.  Before struts, I use to
> allocate the resource, call request.setAttribute() with the resource
> object, call request dispatcher (to do jsp presentation), then clean
> up the resource back in the servlet upon return.  In struts, this has
> all been abstracted out.  Is there an alternative way to manage
> request-scoped resources like this under struts?
> 
> thanks,
> jeff
>



RE: Is struts-documentation really *required*?

2001-06-04 Thread Ritter, Steve

Thanks Ted, I will take it from here.  Once I get my project-specific sample put 
together I'll look into it some more if its still a problem.

--Steve

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 2:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Is struts-documentation really *required*?
> 
> 
> There's one other thread in the archive that references Servletmill. 
> 
> <
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg
> 05794.html
> >
> 
> <
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg
> 05796.html
> >
> 
> You might see if the original author is also having similar 
> problems, or
> found a fix.
> 
> Usually, you can just pick any old WAR and deploy it. No 
> worries, mate.
> 
> There's no good reason why one WebApp should affect another (and every
> reason why it should not).
> 
> Some vendors have started to use Struts as a compatibility 
> test, so you
> should be sure to check with PowerTier too.
> 
> "Ritter, Steve" wrote:
> > 
> > Here are the results of trying to install the struts sample 
> webapps without first deploying struts-documentation.war for 
> Servletmill.
> > 
> > Webapp  Works w/o doc
> > =
> > struts-blank.warNO
> > struts-example.war  NO
> > struts-template.war YES
> > struts-exercise-taglib.war  NO
> > struts-upload.war   NO
> > 
> > --Steve
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
> 



Re: Problems with struts and resin

2001-06-04 Thread Ted Husted

I haven't had this problem myself. I've kept busy Struts applications in
play for several weeks without any unscheduled downtime under Resin. 

"Matthew Heaton (Software Engineer)" wrote:
> 
> I'm trying to deploy a couple of struts apps on resin which I've deployed
> successfully on Weblogic and on Tomcat.  It appears the server tries to call
> the init method in the ActionServlet over and over eventially causing the
> server to run out of memory and crash.  I've seen also seen this behavior
> also using some of the sample struts apps though not to the point of
> crashing the server.  I haven't gotten much help on the Resin side of
> things, so does anybody on the struts list know a work around.



Problems with struts and resin

2001-06-04 Thread Matthew Heaton (Software Engineer)

I'm trying to deploy a couple of struts apps on resin which I've deployed
successfully on Weblogic and on Tomcat.  It appears the server tries to call
the init method in the ActionServlet over and over eventially causing the
server to run out of memory and crash.  I've seen also seen this behavior
also using some of the sample struts apps though not to the point of
crashing the server.  I haven't gotten much help on the Resin side of
things, so does anybody on the struts list know a work around.

Thanks, Matt



Logic-Iterate

2001-06-04 Thread Shane Warne

Hi,
I was trying to us the logic-iterate tag and i'm stuck
at a point. Please go thru the snippet below,


  
<%
String myName = instance.getName(mybean.getName());
System.out.println(myName);
%>


Now, how do i get one of the properties of a bean when
i'm iterating through a collection of a bean objects.
Bottom line is i would like to pass the property
getName() into a variable. Can anyone help me in
sorting this out ??

Thanks,
Shane..


=


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Error compiling 'cannot resolve symbol'

2001-06-04 Thread Sylvie Djihanian



Hi,
 
I am trying to compile the sample application 
"business.zip" I found in the Struts, an open-source MVC implementation article http://www-106.ibm.com/developerworks/library/j-struts/?n-j-2151.  
I get the following error:
 
[javac] 
E:\jakarta-struts-1.0-b3\samples\business\src\test\test\business\AllJUnitTests.java:6: 
cannot resolve symbol    [javac] symbol  : class 
Test    [javac] location: package 
framework    [javac] import 
junit.framework.Test;    
[javac]    
^
 
I downloaded junit.jar and copied it into my 
E:\jakarta-struts-1.0-b3\samples\business\lib directory.  (I thought JUnit 
should have come with the Ant binaries).
 
I'm somewhat new to the struts and java world... 
Do you know how I can get the builder to find the junit package?
 
Sylvie


RE: How do I Internationalize ActionError parameter values?

2001-06-04 Thread Kyle Robinson

So are you suggesting that I pass the request object to my ActionForm
constructor when I create it in my action?

-Original Message-
From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 13:56
To: [EMAIL PROTECTED]
Subject: RE: How do I Internationalize ActionError parameter values?


Use the request argument to get the session and then get the locale out of
the session using getAttribute(Action.LOCALE_KEY). If you have a shared base
class for all of your forms (that extends ActionForm) it might make sense to
put a getLocale(request) method in there.

Hal

> -Original Message-
> From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 4:53 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: How do I Internationalize ActionError parameter values?
>
>
> Thanks Hal.  However, I need to get the locale in the
> validate() method of
> my ActionForm object.  Any thoughts?
>
> -Original Message-
> From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 13:24
> To: [EMAIL PROTECTED]
> Subject: RE: How do I Internationalize ActionError parameter values?
>
>
> Getting the locale object is easy. If you are in an Action
> perform method,
> just call:
>
> getLocale(request);
>
> If you are not in the Action class, you can do what that method does,
>
> Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
> if (locale == null)
>  locale = Locale.getDefault();
>
> -Original Message-
> From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 3:48 PM
> To: Struts (E-mail)
> Subject: How do I Internationalize ActionError parameter values?
>
>
> Hey,
>
> Looking through the archive I found a couple of notes about
> internationalizing the ActionError parameters.  I'm talking about the
> following:
>
> public ActionError(java.lang.String key,
>java.lang.Object value0,
>java.lang.Object value1)
> Construct an action error with the specified replacement values.
> Parameters:
> key - Message key for this error message
> value0 - First replacement value
> value1 - Second replacement value
>
> What I want to do is pass in keys from the properties file
> into the second
> and third parameter.  Specifically I want to pass in the
> prompt keys to
> display to the user the fields that are in error.
>
> One possible solution proposed was by Craig as follows:
>
> The java.text.MessageFormat class (which is how Struts is doing the
> substitution) does not support internationalizing the replacement
> parameters directly.  But how about doing this in two steps?
>
> * Look up the internationalized replacement value from
>   a MessageResources bundle
>
> * Use the returned String as the replacement value in the
>   ultimate message.
>
> However, I need to get the locale somehow.  It seems alot
> easier to just
> override ActionError to accept keys as parameters.  Has
> anyone overridden
> the ActionError class to accept "java.lang.String key"
> parameters instead of
> "java.lang.Object value0"?
> Kyle Robinson
> Systems Consultant
> Pangaea Systems Inc.
> (250) 360-0111
> "Work joyfully and peacefully, knowing that right thoughts
> and right efforts
> inevitably bring about right results." - James Allen
>



RE: Any Hashmap examples used in jsp page?

2001-06-04 Thread Deadman, Hal

I don't think what you are trying to do should be done in the JSP by a
struts/custom tag.

Why not copy the value objects in the HashMap to an array based on the order
of the keys in your String array? Then pass the array to the JSP instead of
the HashMap. If you need the keys and they aren't attributes of the value
objects then you can pass the String array of keys to the JSP too.

> -Original Message-
> From: Steve A Drake [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 5:41 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Any Hashmap examples used in jsp page?
>
>
> On Mon, 4 Jun 2001, Shamdasani Nimmi-ANS004 wrote:
>
> > Steve,
> >
> > This is how I used a HashMap in a jsp:
> >
> > 
> >
> > 
> > 
> > 
> > 
> >
> > 
> >
> > getUserList() method in my user_list bean returns a HashMap.
> >
> > Hope this helps.
> >
> > -Nimmi
>
>  Hi Nimmi. Your example would work fine if I didn't care
> about the order
> in which the key/value pairs are displayed. Unfortunately, I need to
> display them in a particular order (given by a String[] of keys).
>



"multiple" selectlists

2001-06-04 Thread Dante le Poole

Hi all,

Can Struts deal with selectlists which allow multiple selections? If so, how should I 
create the accessors methods for the formbean,
i.e. how does Struts get/set the multiple selections from the formbean?

Thanx!

Dante




Managing resource life cycle during request

2001-06-04 Thread Jeff Trent



I was wondering how other people deal with physical 
resource objects (eg. db result sets, etc.) during a request.  Before 
struts, I use to allocate the resource, call request.setAttribute() with the 
resource object, call request dispatcher (to do jsp presentation), then clean up 
the resource back in the servlet upon return.  In struts, this has all been 
abstracted out.  Is there an alternative way to manage request-scoped 
resources like this under struts?
 
thanks,
jeff
 


Re: Is struts-documentation really *required*?

2001-06-04 Thread Ted Husted

There's one other thread in the archive that references Servletmill. 

<
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg05794.html
>

<
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg05796.html
>

You might see if the original author is also having similar problems, or
found a fix.

Usually, you can just pick any old WAR and deploy it. No worries, mate.

There's no good reason why one WebApp should affect another (and every
reason why it should not).

Some vendors have started to use Struts as a compatibility test, so you
should be sure to check with PowerTier too.

"Ritter, Steve" wrote:
> 
> Here are the results of trying to install the struts sample webapps without first 
>deploying struts-documentation.war for Servletmill.
> 
> Webapp  Works w/o doc
> =
> struts-blank.warNO
> struts-example.war  NO
> struts-template.war YES
> struts-exercise-taglib.war  NO
> struts-upload.war   NO
> 
> --Steve

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



RE: Any Hashmap examples used in jsp page?

2001-06-04 Thread Steve A Drake

On Mon, 4 Jun 2001, Shamdasani Nimmi-ANS004 wrote:

> Steve,
>
> This is how I used a HashMap in a jsp:
>
> 
>
> 
> 
> 
> 
>
> 
>
> getUserList() method in my user_list bean returns a HashMap.
>
> Hope this helps.
>
> -Nimmi

 Hi Nimmi. Your example would work fine if I didn't care about the order
in which the key/value pairs are displayed. Unfortunately, I need to
display them in a particular order (given by a String[] of keys).




RE: Is struts-documentation really *required*?

2001-06-04 Thread Ritter, Steve

Here are the results of trying to install the struts sample webapps without first 
deploying struts-documentation.war for Servletmill.


Webapp  Works w/o doc
=
struts-blank.warNO
struts-example.war  NO
struts-template.war YES
struts-exercise-taglib.war  NO
struts-upload.war   NO

--Steve


> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Is struts-documentation really *required*?
> 
> 
> Are you able to deploy the other Struts WARs. 
> 
> There have been issues in getting the example to run with some
> containers that are not 100% compliant with the specification.
> 
> < http://jakarta.apache.org/struts/installation.html >
> 
> 
> "Ritter, Steve" wrote:
> > 
> > Ok, good.  The error I am getting is as follows:
> > 
> > 
> > 
> > Exception in thread "main_worker" 
> java.lang.IllegalAccessError: try to access class 
> org/apache/struts/action/AddDataSourceRule from class 
> org/apache/struts/action/ActionServlet
> > at 
> com.tenbasej.jmill.JMillServletManager.load_init(JMillServletManager.
> > java, Compiled Code)
> > at 
> com.tenbasej.jmill.JMillServletManager._myLoadServlet(JMillServletMan
> > ager.java, Compiled Code)
> > at 
> com.tenbasej.jmill.JMillServletManager.loadServlet(JMillServletManage
> > r.java, Compiled Code)
> > at 
> com.tenbasej.jmill.JMillServletManager.loadStartupServlets(JMillServl
> > etManager.java, Compiled Code)
> > at 
> com.tenbasej.jmill.JMillServletManager.init(JMillServletManager.java,
> >  Compiled Code)
> > at com.tenbasej.jmill.JMill.start(JMill.java, Compiled Code)
> > at com.tenbasej.jmill.JMill.main(JMill.java, Compiled Code)
> > 
> > 
> > 
> > Again, I am getting this when I try to start my servlet 
> container and the above exception causes the container to terminate.
> > 
> > I just verified the same behaviour with beta3.
> 



Re: Is struts-documentation really *required*?

2001-06-04 Thread Ted Husted

Are you able to deploy the other Struts WARs. 

There have been issues in getting the example to run with some
containers that are not 100% compliant with the specification.

< http://jakarta.apache.org/struts/installation.html >


"Ritter, Steve" wrote:
> 
> Ok, good.  The error I am getting is as follows:
> 
> 
> 
> Exception in thread "main_worker" java.lang.IllegalAccessError: try to access class 
>org/apache/struts/action/AddDataSourceRule from class 
>org/apache/struts/action/ActionServlet
> at com.tenbasej.jmill.JMillServletManager.load_init(JMillServletManager.
> java, Compiled Code)
> at com.tenbasej.jmill.JMillServletManager._myLoadServlet(JMillServletMan
> ager.java, Compiled Code)
> at com.tenbasej.jmill.JMillServletManager.loadServlet(JMillServletManage
> r.java, Compiled Code)
> at com.tenbasej.jmill.JMillServletManager.loadStartupServlets(JMillServl
> etManager.java, Compiled Code)
> at com.tenbasej.jmill.JMillServletManager.init(JMillServletManager.java,
>  Compiled Code)
> at com.tenbasej.jmill.JMill.start(JMill.java, Compiled Code)
> at com.tenbasej.jmill.JMill.main(JMill.java, Compiled Code)
> 
> 
> 
> Again, I am getting this when I try to start my servlet container and the above 
>exception causes the container to terminate.
> 
> I just verified the same behaviour with beta3.



RE: Form input using image tag

2001-06-04 Thread Shamdasani Nimmi-ANS004
Title: Form input using image tag



Kat,
 
I 
have
 

 
and it 
creates this:
 

 
I 
don't know if it should make a difference but try removing the space before 
/> and see if it works
 
-Nimmi

  -Original Message-From: Luna, Kat 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, June 04, 2001 1:47 
  PMTo: [EMAIL PROTECTED]Subject: Form input 
  using image tag
  Hi, 
  I'm trying to use the html:image tag to submit a form, but the 
  graphic is not rendering correctly.  html:img 
  works fine for display, but this is the resulting source code of 
   tag: 
         
          
   
  Does anyone know why there is a blank property for "name" 
  showing up and how to get rid of this? 
  Thanks 
  Kat Luna [EMAIL PROTECTED] 
  


RE: How do I Internationalize ActionError parameter values?

2001-06-04 Thread Deadman, Hal

Use the request argument to get the session and then get the locale out of
the session using getAttribute(Action.LOCALE_KEY). If you have a shared base
class for all of your forms (that extends ActionForm) it might make sense to
put a getLocale(request) method in there.

Hal

> -Original Message-
> From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 4:53 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: How do I Internationalize ActionError parameter values?
>
>
> Thanks Hal.  However, I need to get the locale in the
> validate() method of
> my ActionForm object.  Any thoughts?
>
> -Original Message-
> From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 13:24
> To: [EMAIL PROTECTED]
> Subject: RE: How do I Internationalize ActionError parameter values?
>
>
> Getting the locale object is easy. If you are in an Action
> perform method,
> just call:
>
> getLocale(request);
>
> If you are not in the Action class, you can do what that method does,
>
> Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
> if (locale == null)
>  locale = Locale.getDefault();
>
> -Original Message-
> From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 3:48 PM
> To: Struts (E-mail)
> Subject: How do I Internationalize ActionError parameter values?
>
>
> Hey,
>
> Looking through the archive I found a couple of notes about
> internationalizing the ActionError parameters.  I'm talking about the
> following:
>
> public ActionError(java.lang.String key,
>java.lang.Object value0,
>java.lang.Object value1)
> Construct an action error with the specified replacement values.
> Parameters:
> key - Message key for this error message
> value0 - First replacement value
> value1 - Second replacement value
>
> What I want to do is pass in keys from the properties file
> into the second
> and third parameter.  Specifically I want to pass in the
> prompt keys to
> display to the user the fields that are in error.
>
> One possible solution proposed was by Craig as follows:
>
> The java.text.MessageFormat class (which is how Struts is doing the
> substitution) does not support internationalizing the replacement
> parameters directly.  But how about doing this in two steps?
>
> * Look up the internationalized replacement value from
>   a MessageResources bundle
>
> * Use the returned String as the replacement value in the
>   ultimate message.
>
> However, I need to get the locale somehow.  It seems alot
> easier to just
> override ActionError to accept keys as parameters.  Has
> anyone overridden
> the ActionError class to accept "java.lang.String key"
> parameters instead of
> "java.lang.Object value0"?
> Kyle Robinson
> Systems Consultant
> Pangaea Systems Inc.
> (250) 360-0111
> "Work joyfully and peacefully, knowing that right thoughts
> and right efforts
> inevitably bring about right results." - James Allen
>



RE: How do I Internationalize ActionError parameter values?

2001-06-04 Thread Kyle Robinson

Thanks Hal.  However, I need to get the locale in the validate() method of
my ActionForm object.  Any thoughts?

-Original Message-
From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 13:24
To: [EMAIL PROTECTED]
Subject: RE: How do I Internationalize ActionError parameter values?


Getting the locale object is easy. If you are in an Action perform method,
just call:

getLocale(request);

If you are not in the Action class, you can do what that method does,

Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
if (locale == null)
 locale = Locale.getDefault();

-Original Message-
From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 3:48 PM
To: Struts (E-mail)
Subject: How do I Internationalize ActionError parameter values?


Hey,

Looking through the archive I found a couple of notes about
internationalizing the ActionError parameters.  I'm talking about the
following:

public ActionError(java.lang.String key,
   java.lang.Object value0,
   java.lang.Object value1)
Construct an action error with the specified replacement values.
Parameters:
key - Message key for this error message
value0 - First replacement value
value1 - Second replacement value

What I want to do is pass in keys from the properties file into the second
and third parameter.  Specifically I want to pass in the prompt keys to
display to the user the fields that are in error.

One possible solution proposed was by Craig as follows:

The java.text.MessageFormat class (which is how Struts is doing the
substitution) does not support internationalizing the replacement
parameters directly.  But how about doing this in two steps?

* Look up the internationalized replacement value from
  a MessageResources bundle

* Use the returned String as the replacement value in the
  ultimate message.

However, I need to get the locale somehow.  It seems alot easier to just
override ActionError to accept keys as parameters.  Has anyone overridden
the ActionError class to accept "java.lang.String key" parameters instead of
"java.lang.Object value0"?
Kyle Robinson
Systems Consultant
Pangaea Systems Inc.
(250) 360-0111
"Work joyfully and peacefully, knowing that right thoughts and right efforts
inevitably bring about right results." - James Allen



RE: How do I Internationalize ActionError parameter values?

2001-06-04 Thread Deadman, Hal

Getting the locale object is easy. If you are in an Action perform method,
just call:

getLocale(request);

If you are not in the Action class, you can do what that method does,

Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
if (locale == null)
 locale = Locale.getDefault();

-Original Message-
From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 3:48 PM
To: Struts (E-mail)
Subject: How do I Internationalize ActionError parameter values?


Hey,

Looking through the archive I found a couple of notes about
internationalizing the ActionError parameters.  I'm talking about the
following:

public ActionError(java.lang.String key,
   java.lang.Object value0,
   java.lang.Object value1)
Construct an action error with the specified replacement values.
Parameters:
key - Message key for this error message
value0 - First replacement value
value1 - Second replacement value

What I want to do is pass in keys from the properties file into the second
and third parameter.  Specifically I want to pass in the prompt keys to
display to the user the fields that are in error.

One possible solution proposed was by Craig as follows:

The java.text.MessageFormat class (which is how Struts is doing the
substitution) does not support internationalizing the replacement
parameters directly.  But how about doing this in two steps?

* Look up the internationalized replacement value from
  a MessageResources bundle

* Use the returned String as the replacement value in the
  ultimate message.

However, I need to get the locale somehow.  It seems alot easier to just
override ActionError to accept keys as parameters.  Has anyone overridden
the ActionError class to accept "java.lang.String key" parameters instead of
"java.lang.Object value0"?
Kyle Robinson
Systems Consultant
Pangaea Systems Inc.
(250) 360-0111
"Work joyfully and peacefully, knowing that right thoughts and right efforts
inevitably bring about right results." - James Allen



RE: Null PointerException when run with Apache/SSL/Tomcat

2001-06-04 Thread Deadman, Hal

This could also be caused by a link URL including the port number which
sometimes caused a new session to be used. A NPE could result when code that
normally expected something in the session didn't find it because the
session was new. As indicated by the other post, this may be fixed in b3.

> -Original Message-
> From: Dan Miser [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Null PointerException when run with Apache/SSL/Tomcat
>
>
> Your SSL isn't configured properly. Take a look at bug 992 in
> Bugzilla for
> the solution 
> --
> Dan Miser
> http://www.distribucon.com
>
>
> >From: "Brett G. Palmer" <[EMAIL PROTECTED]>
> >
> >We are getting a NullPionterException which seems to
> originate from the the
> >struts-html tag libraries.  The error only occurs when we
> run Struts with
> >Tomcat/Apache and SSL.  If we bypass SSL and just go through
> Apache (port
> >80) we do not see the error.
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>



RE: Is struts-documentation really *required*?

2001-06-04 Thread Ritter, Steve

Ok, good.  The error I am getting is as follows:



Exception in thread "main_worker" java.lang.IllegalAccessError: try to access class 
org/apache/struts/action/AddDataSourceRule from class 
org/apache/struts/action/ActionServlet
at com.tenbasej.jmill.JMillServletManager.load_init(JMillServletManager.
java, Compiled Code)
at com.tenbasej.jmill.JMillServletManager._myLoadServlet(JMillServletMan
ager.java, Compiled Code)
at com.tenbasej.jmill.JMillServletManager.loadServlet(JMillServletManage
r.java, Compiled Code)
at com.tenbasej.jmill.JMillServletManager.loadStartupServlets(JMillServl
etManager.java, Compiled Code)
at com.tenbasej.jmill.JMillServletManager.init(JMillServletManager.java,
 Compiled Code)
at com.tenbasej.jmill.JMill.start(JMill.java, Compiled Code)
at com.tenbasej.jmill.JMill.main(JMill.java, Compiled Code)



Again, I am getting this when I try to start my servlet container and the above 
exception causes the container to terminate.

I just verified the same behaviour with beta3.

--Steve

> -Original Message-
> From: Dan Miser [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 1:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Is struts-documentation really *required*?
> 
> 
> No, it's not required at all. What kind of error are you getting?
> --
> Dan Miser
> http://www.distribucon.com
> 
> 
> >From: "Ritter, Steve" <[EMAIL PROTECTED]>
> >
> >I found that I could not successfully deploy 
> struts-example.war without 
> >first deploying struts-documentation.war.  Does this sound 
> right or is it 
> >maybe something specific to my servlet container (Servletmill from 
> >PowerTier)?
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 



Re: Null PointerException when run with Apache/SSL/Tomcat

2001-06-04 Thread Dan Miser

Your SSL isn't configured properly. Take a look at bug 992 in Bugzilla for 
the solution 
--
Dan Miser
http://www.distribucon.com


>From: "Brett G. Palmer" <[EMAIL PROTECTED]>
>
>We are getting a NullPionterException which seems to originate from the the
>struts-html tag libraries.  The error only occurs when we run Struts with
>Tomcat/Apache and SSL.  If we bypass SSL and just go through Apache (port
>80) we do not see the error.

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: Is struts-documentation really *required*?

2001-06-04 Thread Dan Miser

No, it's not required at all. What kind of error are you getting?
--
Dan Miser
http://www.distribucon.com


>From: "Ritter, Steve" <[EMAIL PROTECTED]>
>
>I found that I could not successfully deploy struts-example.war without 
>first deploying struts-documentation.war.  Does this sound right or is it 
>maybe something specific to my servlet container (Servletmill from 
>PowerTier)?

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




How do I Internationalize ActionError parameter values?

2001-06-04 Thread Kyle Robinson



Hey,
 
Looking through the 
archive I found a couple of notes about internationalizing the ActionError 
parameters.  I'm talking about the following:
 public ActionError(java.lang.String key,
   java.lang.Object value0,
   java.lang.Object value1)

  Construct an action error with the 
  specified replacement values. 
  
  
Parameters: 
key - Message key for 
this error message 
value0 - First 
replacement value 
value1 - Second 
replacement value
 
What I want to do is pass in 
keys from the properties file into the second and third parameter.  
Specifically I want to pass in the prompt keys to display to the user the fields 
that are in error.
 
One possible solution proposed 
was by Craig as follows:
 
The 
java.text.MessageFormat class (which is how Struts is doing thesubstitution) 
does not support internationalizing the replacementparameters 
directly.  But how about doing this in two steps?* Look up the 
internationalized replacement value from  a MessageResources 
bundle* Use the returned String as the replacement value in 
the  ultimate message.

However, I need to get the 
locale somehow.  It seems alot easier to just override ActionError to 
accept keys as parameters.  Has anyone overridden the ActionError class to 
accept "java.lang.String key" parameters instead of 
"java.lang.Object value0"?
Kyle Robinson Systems Consultant Pangaea Systems 
Inc. (250) 360-0111
"Work joyfully and peacefully, knowing that right 
thoughts and right efforts inevitably bring about right results." - 
James Allen 
 


Re: visual changes based on state

2001-06-04 Thread Ted Husted

You can either 

1. Route users to different pages based on their state, or

2. Deliver the current state to the presentation layer in the form of
JavaBeans that the Struts logic tags can test.  ...

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/

> Jonathan wrote:
> Just wondering how you all were implementing visual changes based on
> state.  Ex. when a menu button says "logon" before the person loggs
> on, and then says "logoff" after the person has logged on.  How are
> you doing this switching based on state?  In the action?  in the
> template? Or are you all usingSCRIPTLETS (Ay!!!)



Form input using image tag

2001-06-04 Thread Luna, Kat
Title: Form input using image tag





Hi,


I'm trying to use the html:image tag to submit a form, but the graphic is not rendering correctly.  
html:img works fine for display, but this is the resulting source code of  tag:



   
    
    
  


Does anyone know why there is a blank property for "name" showing up and how to get rid of this?


Thanks


Kat Luna
[EMAIL PROTECTED] 





visual changes based on state

2001-06-04 Thread Jonathan



Just wondering how you all were implementing visual 
changes based on state.  Ex. when a menu button says "logon" before the 
person loggs on, and then says "logoff" after the person has logged on.  
How are you doing this switching based on state?  In the action?  in 
the template? Or are you all usingSCRIPTLETS 
(Ay!!!)


Re: Null PointerException when run with Apache/SSL/Tomcat

2001-06-04 Thread Bryan Field-Elliot

I had an extremely similar (though not quite exact) problem last week. I 
posted as you did, but no one responded. This morning, I upgraded from 
Struts beta-1 to beta-3, and so far it appears to have magically fixed 
the SSL problem. Hopefully a similar path will fix yours too.

Good luck,

Bryan

Brett G. Palmer wrote:

>We are getting a NullPionterException which seems to originate from the the
>struts-html tag libraries.  The error only occurs when we run Struts with
>Tomcat/Apache and SSL.  If we bypass SSL and just go through Apache (port
>80) we do not see the error.  Has anyone else seen this problem when running
>Struts through SSL?  Any suggestions would be appreciated.  The error
>message is shown below.
>
>Thanks in advance for your help.
>
>Brett
>
>/ ERROR Message **/
>
>Error: 500
>Location: /mvelopes05/index.jsp
>Internal Servlet Error:
>
>javax.servlet.ServletException
>   at
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
>l.java:459)
>   at
>_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.
>java:553)
>   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$JspCountedServlet.service(JspServlet.ja
>va:130)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
>va:282)
>   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
>7)
>   at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>   at
>org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
>(Ajp13ConnectionHandler.java:160)
>   at
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>   at java.lang.Thread.run(Thread.java:484)
>
>Root cause:
>java.lang.NullPointerException
>   at org.apache.struts.taglib.html.LinkTag.hyperlink(LinkTag.java:492)
>   at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:317)
>   at
>_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.
>java:145)
>   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$JspCountedServlet.service(JspServlet.ja
>va:130)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
>va:282)
>   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
>7)
>   at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>   at
>org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
>(Ajp13ConnectionHandler.java:160)
>   at
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>   at java.lang.Thread.run(Thread.java:484)
>
>
>





RE: Any Hashmap examples used in jsp page? - THANX!!!

2001-06-04 Thread Dudley [EMAIL PROTECTED]

Hi all, 

I just want to thank everyone for their great responses, I really appreciate
all the help.GREAT THANX

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 6:02 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Any Hashmap examples used in jsp page?


Steve,

This is how I used a HashMap in a jsp:










getUserList() method in my user_list bean returns a HashMap.

Hope this helps.

-Nimmi


-Original Message-
From: Steve A Drake [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 5:58 PM
To: [EMAIL PROTECTED]
Subject: RE: Any Hashmap examples used in jsp page?


 Hi Jon. I'm having a similar problem as Dudley with a HashMap. I tried
playing around with your example but couldn't get it to work within the
context of what I'm doing. Perhaps another example would help. For
example, I have a scriptlet that looks something like:

 fee.fie.fo.sql.ResultSetBean rsb =
(fee.fie.fo.sql.ResultSetBean) request.getAttribute("resultBean");
 java.util.HashMap hm = rsb.getProperties();
 String foobar = (String) hm.get("foobar");
 out.println("foobar = " + foobar);


So, the ResultSetBean contains a HashMap as a property. I get a reference
to the HashMap and then can extract a value with a key as input. Any ideas
on the syntax of doing this with "bean" tags? TIA.



On Fri, 1 Jun 2001, Jon.Ridgway wrote:

> Hi Dudley,
>
> See code sample below. The type in the iterate tag must be as shown, you
> will then need to use a bean define to put your 'value' into the page
> context and cast it to whatever type you have placed in your HashMap
value.
>
> Hope this helps,
>
> Jon.
>
>  type="java.util.Map.Entry">
>
>  type="net.itwa.model.artifact.IArtifact"/>
>
> 
>
> 
>
>
> -Original Message-
> From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]]
> Sent: 01 June 2001 10:34
> To: [EMAIL PROTECTED]
> Subject: Any Hashmap examples used in jsp page?
>
> Hi all,
>
> Could anyone please point me to where i can find some examples using
> hashmaps in a jsp with struts...
> Instead of using a whole bunch of logic equal tags all the time, i need a
> way to evaluate a collection, looking for a specific key value, then show
or
> hide the relevant input boxes on my jsp..
> any help...please!!!???
>

---
Steve Drake[EMAIL PROTECTED]
UCAR / COMET   (303) 497 - 8496
PO Box 3000
Boulder, CO  80307-3000



RE: Format on the JSP pages

2001-06-04 Thread Joyce Tang
Title: RE: Format on the JSP pages





 Michael,


Thank you very much for the response.


However, I have heard about reservation on using taglib from Jakarta just for the purpose of datetime formatting.  It is too expensive to convert your datetime to long, wrap it in context and then use tablig.  Also there will be nested tablib usage problem.

Are there any simpler ways to do it?


I notice there on the to-do list for struts is a task to support PropertyEditor.  Is there any work around when the PropertyEditor support is not there yet.

Thank you very much for the help.


JT


-Original Message-
From: Michael Mok
To: [EMAIL PROTECTED]
Sent: 6/2/01 7:57 AM
Subject: Re: Format on the JSP pages


In addition to Craig's comment, if you decide to use the Jakarta Taglibs
project  , you can this on your JSP
page.


<%@ taglib uri="http://jakarta.apache.org/taglibs/datetime-1.0"
prefix="dt"
%>


  
property="startDateTime"/>


In the above example my bean contain the following method


public long getStartDateTime() {
  //
  //  return the Calender.getTime() component;
};



Cheers


Michael Mok
www.webappcabaret.com/teatimej


- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Joyce Tang" <[EMAIL PROTECTED]>
Sent: Saturday, June 02, 2001 12:29 PM
Subject: RE: Format on the JSP pages



>
>
> On Mon, 21 May 2001, Joyce Tang wrote:
>
> >  Sorry if I didn't make it clear.  What I am asking is how to format
a
> > embedded attibute?
> >
>
> There isn't any particular support for formatting within the Struts
tags
> at the moment.  However, there is a formatting library in the Jakarta
> Taglibs project  that might help.
>
> Craig
>
>
> > -Original Message-
> > From: Joyce Tang
> > To: '[EMAIL PROTECTED]'
> > Sent: 5/21/01 2:13 PM
> > Subject: Format on the JSP pages
> >
> > One property of my form is a customer object.
> >
> > So in the JSP page, I am displaying them as:
> >
> > 
> > scope="request" filter="true"/>
> >
> > How should I format it?
> >
> > Thanks
> >
> >
>
>





RE: Hidding .jsp files

2001-06-04 Thread Mikkel Bruun

 Hi Craig,

A blast from the past...I believe this post is a month old...

Anyways...I see your point, but consider this...

If I only refered to the functionaly (pages, actions whatever), I would have
the following problem...

myForm.do forwards to myAction which is validated to myForm...

So if I linked to myForm.do, my GET would be validated and myForm would
return errormessages...

So I need an URL that doesn't trigger any logic, but just shows the form to
the user...(or have a hidden init field in the form)...

Mikkel



-Original Message-
From: Craig R. McClanahan
To: '[EMAIL PROTECTED] '
Sent: 02-06-2001 05:14
Subject: Re: Hidding .jsp files



On Tue, 15 May 2001, Mikkel Bruun wrote:

> Hi Guys,
> 
> Is it possible to make some sort of virtual path, enabling one to hide
the
> actual .jsp pages???
> 
> Example,
> 
> i want to avoid a link like /logon/logonform.jsp
> replacing it with perhaps /logon (which in turn will point to
> /logon/logonform.jsp)
> 
> I tried looking at the globalforwards, but i find the documentation
quite
> lacking (there's an error in the code, btw)...but is this how its
done???
> 
> Another solution would be to make "empty" action classes that just
returns
> the succes mapping, but that would be going over the top imho...
> 
> 
> Can anybody give an answer???
> 
> thanks
> Mikkel Bruun
> 
> 
> 

One thing to keep in mind is that, in a typical Struts application, the
names of the JSP pages are obscured anyway -- because the form submits
go
to the controller servlet.  For example, walk your way through the
Struts
example application, and note how many of the locations actually shown
have "*.do" extensions on them ...

As a more radical way to hide things (but more for the purpose of
discouraging users from setting bookmarks in the middle of an
application), I've also resorted on occasion to more radical approaches:

* Open the application in a window that doesn't have a location bar

* Create a frameset with only one frame in it (so the location bar
  never changes at all).

Craig McClanahan




Resetting an Action Form (urgent)

2001-06-04 Thread Mikkel Bruun

Hi Guys, 

Please help me out on this one...

I ran in to a small problem...

1. In the system im developing the user has to go through several pages,
entering information that needs to be processed...
2. When ever the user enters invalid data, he'si returned to the form and is
presented to error messages...
3. The user should be able to press the bacl button, or user other means to
navigating backwards in the process. When navigating backwards the forms
should be populated with whatever data he has entered...

(of course all the above is straight forwrd implemented in struts, but check
this)

4. After the user has completed the entire proces, he is able to do it one
more time. 
This time the forms should not "remember" what the user previuosly entered,
and should therefor be blank...

To give a more substantial example...it could be an insurance broker who
would do several calculations on an house insurance for each customer...
Each calculation should be isolated from each other...

Is there a simple way to do this???

At the moment there no coupling between my ActionForms and my Logic Beans
(ie no association or anything)...

Could I use the transaction token??? and if so, is there any documentation
for the transaction token!!

thanks in advance

Mikkel





Is struts-documentation really *required*?

2001-06-04 Thread Ritter, Steve

I found that I could not successfully deploy struts-example.war without first 
deploying struts-documentation.war.  Does this sound right or is it maybe something 
specific to my servlet container (Servletmill from PowerTier)?

--Steve



RE: How do I contribute?

2001-06-04 Thread Ritter, Steve

Thanks Ted, I will simply collect the information and email it to you.  It will be of 
the nature "install hints for PowerTier..." that's it. Pretty simpl stuff but it can 
really help new users.

Love what you guys are doing, thanks for all the effort.

--Steve


> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 9:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How do I contribute?
> 
> 
> If you have a link, you can post it to the User list. 
> 
> Or if you want to send it to me, I can put it on my Struts page. 
> 
> Depending on the nature of the material, we could then 
> consider whether
> to add it to the Users Guide. 
> 
> "Ritter, Steve" wrote:
> > 
> > Hello, I would like to contribute some information on using 
> Struts with Persistence PowerTier (Apache/Servletmill).  
> What's the best way to do this?
> > 
> > --Steve
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
> 



Re: How do I contribute?

2001-06-04 Thread Ted Husted

If you have a link, you can post it to the User list. 

Or if you want to send it to me, I can put it on my Struts page. 

Depending on the nature of the material, we could then consider whether
to add it to the Users Guide. 

"Ritter, Steve" wrote:
> 
> Hello, I would like to contribute some information on using Struts with Persistence 
>PowerTier (Apache/Servletmill).  What's the best way to do this?
> 
> --Steve

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Null PointerException when run with Apache/SSL/Tomcat

2001-06-04 Thread Brett G. Palmer

We are getting a NullPionterException which seems to originate from the the
struts-html tag libraries.  The error only occurs when we run Struts with
Tomcat/Apache and SSL.  If we bypass SSL and just go through Apache (port
80) we do not see the error.  Has anyone else seen this problem when running
Struts through SSL?  Any suggestions would be appreciated.  The error
message is shown below.

Thanks in advance for your help.

Brett

/ ERROR Message **/

Error: 500
Location: /mvelopes05/index.jsp
Internal Servlet Error:

javax.servlet.ServletException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.
java:553)
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$JspCountedServlet.service(JspServlet.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.NullPointerException
at org.apache.struts.taglib.html.LinkTag.hyperlink(LinkTag.java:492)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:317)
at
_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.
java:145)
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$JspCountedServlet.service(JspServlet.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)





How do I contribute?

2001-06-04 Thread Ritter, Steve

Hello, I would like to contribute some information on using Struts with Persistence 
PowerTier (Apache/Servletmill).  What's the best way to do this?

--Steve



RE: Any Hashmap examples used in jsp page?

2001-06-04 Thread Shamdasani Nimmi-ANS004

Steve,

This is how I used a HashMap in a jsp:










getUserList() method in my user_list bean returns a HashMap.

Hope this helps.

-Nimmi


-Original Message-
From: Steve A Drake [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 5:58 PM
To: [EMAIL PROTECTED]
Subject: RE: Any Hashmap examples used in jsp page?


 Hi Jon. I'm having a similar problem as Dudley with a HashMap. I tried
playing around with your example but couldn't get it to work within the
context of what I'm doing. Perhaps another example would help. For
example, I have a scriptlet that looks something like:

 fee.fie.fo.sql.ResultSetBean rsb =
(fee.fie.fo.sql.ResultSetBean) request.getAttribute("resultBean");
 java.util.HashMap hm = rsb.getProperties();
 String foobar = (String) hm.get("foobar");
 out.println("foobar = " + foobar);


So, the ResultSetBean contains a HashMap as a property. I get a reference
to the HashMap and then can extract a value with a key as input. Any ideas
on the syntax of doing this with "bean" tags? TIA.



On Fri, 1 Jun 2001, Jon.Ridgway wrote:

> Hi Dudley,
>
> See code sample below. The type in the iterate tag must be as shown, you
> will then need to use a bean define to put your 'value' into the page
> context and cast it to whatever type you have placed in your HashMap value.
>
> Hope this helps,
>
> Jon.
>
>  type="java.util.Map.Entry">
>
>  type="net.itwa.model.artifact.IArtifact"/>
>
> 
>
> 
>
>
> -Original Message-
> From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]]
> Sent: 01 June 2001 10:34
> To: [EMAIL PROTECTED]
> Subject: Any Hashmap examples used in jsp page?
>
> Hi all,
>
> Could anyone please point me to where i can find some examples using
> hashmaps in a jsp with struts...
> Instead of using a whole bunch of logic equal tags all the time, i need a
> way to evaluate a collection, looking for a specific key value, then show or
> hide the relevant input boxes on my jsp..
> any help...please!!!???
>

---
Steve Drake[EMAIL PROTECTED]
UCAR / COMET   (303) 497 - 8496
PO Box 3000
Boulder, CO  80307-3000




RE: org.apache.struts.example.ApplicationMapping

2001-06-04 Thread Firmin David

Having struts.jar in your classpath is actually a bad thing. Search the
archive for the thread entitled "Baffled No More" - it provides a good
technical explanation as to why this is. It could be that the presence of
struts.jar in your classpath is causing your problem. Try moving it to
/web-inf/lib.
The archive is at http:[EMAIL PROTECTED]
HTH
Dave


-Original Message-
From: Hampton, Paul [mailto:[EMAIL PROTECTED]]
Sent: 04 June 2001 16:43
To: '[EMAIL PROTECTED]'
Subject: RE: org.apache.struts.example.ApplicationMapping




> ActionServlet depends on ApplicationMapping.  It's one of the classes
> defined in struts.jar, check your struts.jar is in your classpath.
> 
struts.jar is in my classpath, this exception is thrown at runtime & there
is no org.apache.struts.example package in my struts.jar, hence my
assumption that this was an example mapping specified in a config file...

Paul

> -Original Message-
> From: Hampton, Paul [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 11:33 AM
> To: [EMAIL PROTECTED]
> Subject: org.apache.struts.example.ApplicationMapping
> 
> 
> Hi all - I have a problem with initalising the main struts controller
> servlet - doing so produces the exception given below. I'm confused as to
> why struts will be trying to access
> org.apache.struts.example.ApplicationMapping  - I do not have this mapping
> in my struts-config.xml file. Any ideas as to where the problem might lie?
> 
> Any help greatly appreciated,
> 
> Paul
> 
> java.lang.ClassNotFoundException:
> org.apache.struts.example.ApplicationMapping
>   at com.evermind.naming.j4.findClass(JAX)
>   at java.lang.ClassLoader.loadClass(Unknown Source)
>   at java.lang.ClassLoader.loadClass(Unknown Source)
>   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Unknown Source)
>   at
> org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:15
> 2)
>   at
> org.apache.struts.digester.Digester.startElement(Digester.java:528)
>   at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
>   at com.sun.xml.parser.Parser.content(Parser.java:1499)
>   at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
>   at com.sun.xml.parser.Parser.content(Parser.java:1499)
>   at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
>   at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
>   at com.sun.xml.parser.Parser.parse(Parser.java:284)
>   at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
>   at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
>   at org.apache.struts.digester.Digester.parse(Digester.java:755)
>   at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331
> )
>   at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
>   at javax.servlet.GenericServlet.init(GenericServlet.java:232)
>   at com.evermind.server.http.HttpApplication.w1(JAX)
>   at com.evermind.server.http.HttpApplication.wj(JAX)
>   at com.evermind.server.http.HttpApplication.wu(JAX)
>   at com.evermind.server.http.HttpApplication.v4(JAX)
>   at com.evermind.server.http.HttpApplication.(JAX)
>   at com.evermind.server.Application.ur(JAX)
>   at com.evermind.server.http.el.ur(JAX)
>   at com.evermind.server.http.ek.nm(JAX)
>   at com.evermind.server.http.ef.s1(JAX)
>   at com.evermind.server.http.ef.do(JAX)
>   at com.evermind.util.f.run(JAX)
> 
> 
> This private and confidential e-mail has been sent to you by Egg.
> The Egg group of companies comprises Prudential Banking plc
> (registered no. 2999842), Egg Financial Products Ltd (registered
> no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
> carries out investment business on behalf of Egg and is regulated
> by the Personal Investment Authority.  All members of the Egg group
> are registered in England and Wales. Registered offices: 142
> Holborn Bars, London EC1N 2NH
> 
> If you are not the intended recipient of this e-mail and have
> received it in error, please notify the sender by replying with
> 'received in error' as the subject and then delete it from your
> mailbox.


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




RE: Wizard form approach

2001-06-04 Thread Lacerda, Wellington (AFIS)

Never did, but it seems the struts-example gives you some tips on that.

You can define a parameter action or phase that will hold the current phase
on the wizard. Since an Action can have multiple forwards, you can select
the next step based on what is the current one, if the user pressed cancel
or back.

On each interaction you will save a new transaction token on the session.

The form bean can be the same. Or it can be one for each step and then you
make the bookeeping of the user choices.

I think it is quite like that.

Wellington Silva
UN/FAO

-Original Message-
From: Todd Story [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 4:29 PM
To: Struts-User (E-mail)
Subject: Wizard form approach


Is anyone currently using multiple pages (same ActionForm) in a wizard-esque
manner?  If so, how are you doing validation without knowing the details of
which elements are displayed on which page?  In other words I'd like some
fields to be required without having the user to go back 3 pages.  Thanks. 



RE: org.apache.struts.example.ApplicationMapping

2001-06-04 Thread Hampton, Paul



> ActionServlet depends on ApplicationMapping.  It's one of the classes
> defined in struts.jar, check your struts.jar is in your classpath.
> 
struts.jar is in my classpath, this exception is thrown at runtime & there
is no org.apache.struts.example package in my struts.jar, hence my
assumption that this was an example mapping specified in a config file...

Paul

> -Original Message-
> From: Hampton, Paul [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 11:33 AM
> To: [EMAIL PROTECTED]
> Subject: org.apache.struts.example.ApplicationMapping
> 
> 
> Hi all - I have a problem with initalising the main struts controller
> servlet - doing so produces the exception given below. I'm confused as to
> why struts will be trying to access
> org.apache.struts.example.ApplicationMapping  - I do not have this mapping
> in my struts-config.xml file. Any ideas as to where the problem might lie?
> 
> Any help greatly appreciated,
> 
> Paul
> 
> java.lang.ClassNotFoundException:
> org.apache.struts.example.ApplicationMapping
>   at com.evermind.naming.j4.findClass(JAX)
>   at java.lang.ClassLoader.loadClass(Unknown Source)
>   at java.lang.ClassLoader.loadClass(Unknown Source)
>   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Unknown Source)
>   at
> org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:15
> 2)
>   at
> org.apache.struts.digester.Digester.startElement(Digester.java:528)
>   at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
>   at com.sun.xml.parser.Parser.content(Parser.java:1499)
>   at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
>   at com.sun.xml.parser.Parser.content(Parser.java:1499)
>   at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
>   at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
>   at com.sun.xml.parser.Parser.parse(Parser.java:284)
>   at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
>   at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
>   at org.apache.struts.digester.Digester.parse(Digester.java:755)
>   at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331
> )
>   at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
>   at javax.servlet.GenericServlet.init(GenericServlet.java:232)
>   at com.evermind.server.http.HttpApplication.w1(JAX)
>   at com.evermind.server.http.HttpApplication.wj(JAX)
>   at com.evermind.server.http.HttpApplication.wu(JAX)
>   at com.evermind.server.http.HttpApplication.v4(JAX)
>   at com.evermind.server.http.HttpApplication.(JAX)
>   at com.evermind.server.Application.ur(JAX)
>   at com.evermind.server.http.el.ur(JAX)
>   at com.evermind.server.http.ek.nm(JAX)
>   at com.evermind.server.http.ef.s1(JAX)
>   at com.evermind.server.http.ef.do(JAX)
>   at com.evermind.util.f.run(JAX)
> 
> 
> This private and confidential e-mail has been sent to you by Egg.
> The Egg group of companies comprises Prudential Banking plc
> (registered no. 2999842), Egg Financial Products Ltd (registered
> no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
> carries out investment business on behalf of Egg and is regulated
> by the Personal Investment Authority.  All members of the Egg group
> are registered in England and Wales. Registered offices: 142
> Holborn Bars, London EC1N 2NH
> 
> If you are not the intended recipient of this e-mail and have
> received it in error, please notify the sender by replying with
> 'received in error' as the subject and then delete it from your
> mailbox.



RE: org.apache.struts.example.ApplicationMapping

2001-06-04 Thread Kerstetter, Shawn

ActionServlet depends on ApplicationMapping.  It's one of the classes
defined in struts.jar, check your struts.jar is in your classpath.

-Original Message-
From: Hampton, Paul [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 11:33 AM
To: [EMAIL PROTECTED]
Subject: org.apache.struts.example.ApplicationMapping


Hi all - I have a problem with initalising the main struts controller
servlet - doing so produces the exception given below. I'm confused as to
why struts will be trying to access
org.apache.struts.example.ApplicationMapping  - I do not have this mapping
in my struts-config.xml file. Any ideas as to where the problem might lie?

Any help greatly appreciated,

Paul

java.lang.ClassNotFoundException:
org.apache.struts.example.ApplicationMapping
at com.evermind.naming.j4.findClass(JAX)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
at
org.apache.struts.digester.Digester.startElement(Digester.java:528)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:755)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
at javax.servlet.GenericServlet.init(GenericServlet.java:232)
at com.evermind.server.http.HttpApplication.w1(JAX)
at com.evermind.server.http.HttpApplication.wj(JAX)
at com.evermind.server.http.HttpApplication.wu(JAX)
at com.evermind.server.http.HttpApplication.v4(JAX)
at com.evermind.server.http.HttpApplication.(JAX)
at com.evermind.server.Application.ur(JAX)
at com.evermind.server.http.el.ur(JAX)
at com.evermind.server.http.ek.nm(JAX)
at com.evermind.server.http.ef.s1(JAX)
at com.evermind.server.http.ef.do(JAX)
at com.evermind.util.f.run(JAX)


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies comprises Prudential Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Personal Investment Authority.  All members of the Egg group
are registered in England and Wales. Registered offices: 142
Holborn Bars, London EC1N 2NH

If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.



org.apache.struts.example.ApplicationMapping

2001-06-04 Thread Hampton, Paul

Hi all - I have a problem with initalising the main struts controller
servlet - doing so produces the exception given below. I'm confused as to
why struts will be trying to access
org.apache.struts.example.ApplicationMapping  - I do not have this mapping
in my struts-config.xml file. Any ideas as to where the problem might lie?

Any help greatly appreciated,

Paul

java.lang.ClassNotFoundException:
org.apache.struts.example.ApplicationMapping
at com.evermind.naming.j4.findClass(JAX)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
at
org.apache.struts.digester.Digester.startElement(Digester.java:528)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:755)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
at javax.servlet.GenericServlet.init(GenericServlet.java:232)
at com.evermind.server.http.HttpApplication.w1(JAX)
at com.evermind.server.http.HttpApplication.wj(JAX)
at com.evermind.server.http.HttpApplication.wu(JAX)
at com.evermind.server.http.HttpApplication.v4(JAX)
at com.evermind.server.http.HttpApplication.(JAX)
at com.evermind.server.Application.ur(JAX)
at com.evermind.server.http.el.ur(JAX)
at com.evermind.server.http.ek.nm(JAX)
at com.evermind.server.http.ef.s1(JAX)
at com.evermind.server.http.ef.do(JAX)
at com.evermind.util.f.run(JAX)


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies comprises Prudential Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Personal Investment Authority.  All members of the Egg group
are registered in England and Wales. Registered offices: 142
Holborn Bars, London EC1N 2NH

If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.



Generating Dynamic Input Tables.`

2001-06-04 Thread Thomas Hsieh

I hope this isn't a repeat, but I need a bit of help here.

I have a collection of simple value beans that I'd like to
allow the user to edit.  I don't know how large the
collection is, but the simple bean merely contains a Label
and Value.

I'm trying to do something like the jsp code below. If
there is a simpler way to deal with this I'm open to it as
well.

Thanks in advance!!

Thomas



collBean = The bean containing the collection.
collProp = The property name of the collection in collBean.




  


  

  

  

  

  



__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Re: Wizard form approach

2001-06-04 Thread Jeff Trent

Look at the mail archives.  Basically, you carry two extra fields on your
form, 'CurrentPage' and 'NextPage'.  When validate is called, do validation
against fields on the CurrentPage.

- jeff

- Original Message -
From: "Todd Story" <[EMAIL PROTECTED]>
To: "Struts-User (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, June 04, 2001 10:28 AM
Subject: Wizard form approach


> Is anyone currently using multiple pages (same ActionForm) in a
wizard-esque
> manner?  If so, how are you doing validation without knowing the details
of
> which elements are displayed on which page?  In other words I'd like some
> fields to be required without having the user to go back 3 pages.  Thanks.
>




Re: *TED* Re: I am finding that templates are SLOW

2001-06-04 Thread Jonathan

Yes Hal, it is WL6.  It was a problem with the paths.
We should post this somewhere so others can know.

- Original Message - 
From: "Deadman, Hal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 04, 2001 9:46 AM
Subject: RE: *TED* Re: I am finding that templates are SLOW


> Weblogic sometimes has trouble parsing relative paths. Are you using
> Weblogic 6.0? It might be fixed in SP2. I do this <%@ include
> file="/include/toppage.inc" %> and it works. Try /inc/imports.jsp.
> 
> > -Original Message-
> > From: Jonathan Asbell [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 01, 2001 8:31 PM
> > To: [EMAIL PROTECTED]
> > Subject: *TED* Re: I am finding that templates are SLOW
> >
> >
> > the Exception
> >
> > javax.servlet.jsp.JspException: JSP compilation of /inc/template2.jsp
> > failed: weblogic.utils.ParsingException: nested TokenStreamException:
> > antlr.TokenStreamExc
> > eption: Could not include inc/imports.jsp
> > at
> > org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag
> > .java:149)
> > at jsp_servlet._logon._jspService(_logon.java:160)
> > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> > at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> > tStubImpl.java
> > :213)
> > at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> > tStubImpl.java
> > :246)
> > at
> > weblogic.servlet.internal.WebAppServletContext.invokeServlet(W
> > ebAppServletCo
> > ntext.java:1265)
> > at
> > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe
> > questImpl.java
> > :1622)
> > at
> > weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> >
> >
> > the page "logon.jsp"
> >
> > <%@ include file="inc/imports.jsp" %>
> > 
> >   > direct='true'/>
> >  
> > 
> >
> >
> >
> > the template "my_template.jsp"
> >
> > <%@ include file="inc/imports.jsp" %>
> > 
> > 
> > 
> > .
> > 
> > 
> >
> >
> >
> > Common include "imports.jsp"
> >
> > <%@ page language="java" %>
> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> > <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
> > - Original Message -
> > From: "Ted Husted" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 01, 2001 5:10 PM
> > Subject: Re: I am finding that templates are SLOW
> >
> >
> > > Template pages can take longer to compile, since there is
> > more to do,
> > > but should run fine after that.
> > >
> > > I've used complex templates extensively with other
> > containers and have
> > > no runtime performance problems.
> > >
> > > -- Ted Husted, Husted dot Com, Fairport NY USA.
> > > -- Custom Software ~ Technical Services.
> > > -- Tel 716 737-3463.
> > > -- http://www.husted.com/about/struts/
> > >
> > > > Jonathan wrote:
> > > >
> > > > I am using weblogic 6 on w2k.  I clicked on a templated page and
> > > > MAN.I wait atleast 1 minute for the results.  Is this known?
> > >
> >
> 




Wizard form approach

2001-06-04 Thread Todd Story

Is anyone currently using multiple pages (same ActionForm) in a wizard-esque
manner?  If so, how are you doing validation without knowing the details of
which elements are displayed on which page?  In other words I'd like some
fields to be required without having the user to go back 3 pages.  Thanks. 



RE: *TED* Re: I am finding that templates are SLOW

2001-06-04 Thread Deadman, Hal

Weblogic sometimes has trouble parsing relative paths. Are you using
Weblogic 6.0? It might be fixed in SP2. I do this <%@ include
file="/include/toppage.inc" %> and it works. Try /inc/imports.jsp.

> -Original Message-
> From: Jonathan Asbell [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 01, 2001 8:31 PM
> To: [EMAIL PROTECTED]
> Subject: *TED* Re: I am finding that templates are SLOW
>
>
> the Exception
>
> javax.servlet.jsp.JspException: JSP compilation of /inc/template2.jsp
> failed: weblogic.utils.ParsingException: nested TokenStreamException:
> antlr.TokenStreamExc
> eption: Could not include inc/imports.jsp
> at
> org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag
> .java:149)
> at jsp_servlet._logon._jspService(_logon.java:160)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java
> :213)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java
> :246)
> at
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(W
> ebAppServletCo
> ntext.java:1265)
> at
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe
> questImpl.java
> :1622)
> at
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
> the page "logon.jsp"
>
> <%@ include file="inc/imports.jsp" %>
> 
>   direct='true'/>
>  
> 
>
>
>
> the template "my_template.jsp"
>
> <%@ include file="inc/imports.jsp" %>
> 
> 
> 
> .
> 
> 
>
>
>
> Common include "imports.jsp"
>
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
> - Original Message -
> From: "Ted Husted" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 01, 2001 5:10 PM
> Subject: Re: I am finding that templates are SLOW
>
>
> > Template pages can take longer to compile, since there is
> more to do,
> > but should run fine after that.
> >
> > I've used complex templates extensively with other
> containers and have
> > no runtime performance problems.
> >
> > -- Ted Husted, Husted dot Com, Fairport NY USA.
> > -- Custom Software ~ Technical Services.
> > -- Tel 716 737-3463.
> > -- http://www.husted.com/about/struts/
> >
> > > Jonathan wrote:
> > >
> > > I am using weblogic 6 on w2k.  I clicked on a templated page and
> > > MAN.I wait atleast 1 minute for the results.  Is this known?
> >
>



No context loader error

2001-06-04 Thread Jan Fredrik Øveraasen

Hi
When I try to deploy my struts-application to a SilverStream app. server I
get the following error message:

No context class loader: java.util.collection

Thanks in advace

Jan Fredrik

___ Jan Fredrik Øveraasen | Senior Systems Developer 
___ Cell Network ASA | Pb. 5313, Sørkedalsv. 10A, N-0304 Oslo,
Norway
___ Tel: +47 23196600/35 | Fax: +47 23196601 | Mob: +47 93 49 99 88
   ___ http://www.cellnetwork.com/ |
mailto:[EMAIL PROTECTED]

 




Re: how do i forward entity bean reference from Action class to forwarded jsp.

2001-06-04 Thread Konstantin Priblouda


--- ameer <[EMAIL PROTECTED]> wrote:
> Im stuck up with an issue here.  i am refering to an
> entity in action class. based on  input data .. if a
> record for the input exists i need to forward the
> entity remote reference that i have got to a page
> called display.jsp or if no record exists , i would
> create a record in the database for those input
> values and forward it to success.jsp... how do i go
> about it ..pls help.

In your action class you have to do lookup/create
for your entity bean usual way. 

After you got your reference ( remote interface )
nothing prevents you to put it into session
context ( or whatever ) of your servlet container. 

Then your jsp can fetch it and do what it like.

hope this helped.

regards,

=
Konstantin Priblouda ( ko5tik )Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



how do i forward entity bean reference from Action class to forwarded jsp.

2001-06-04 Thread ameer



Im stuck up with an issue here.  i am refering to an entity in action 
class. based on  input data .. if a record for the input exists i need to 
forward the entity remote reference that i have got to a page called display.jsp 
or if no record exists , i would create a record in the database for those input 
values and forward it to success.jsp... how do i go about it ..pls help.
Ameer Hussain SSs/w engineerYashaa Infotech Pvt.Ltd.#14 , 10th 
Main, HAL 3rd StageBangalore 560075phone: 5294430/53 http://www.yashaa.com


Re: Auto Form/Action Class Code Generator?

2001-06-04 Thread Ajit Joglekar

Any ideas about how to do this? Tom, JD are you already working on this?

I thought about using JTidy to generate xhtml from the original html and
then to use JDom to access / update the form elements and attributes.

Regards,
Ajit Joglekar.


- Original Message -
From: "Tom Janofsky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 12:39 AM
Subject: Re: Auto Form/Action Class Code Generator?


>
> If not, I'd be happy to work with someone on one.  This would fit well
> with how we generally do screens anyay.
>
> Let me know.
>
> --tom
>
> "du Clos, John" wrote:
> >
> > Before we contemplate doing this, I wanted to ask the list if this has
> > already been done.
> >
> > Is there a code generator (nothing fancy) that can read an existing
.html or
> > .jsp file and generate the corresponding Form and Action classes.  The
> > generator would identify the variables from the presentation forms
> > (html/jsp) and automatically generate corresponding skeleton classes for
> > Form and Action.
> >
> > The benefits of this is that it allows your graphical designers to
design
> > the forms first, then the code generator can give the developers a jump
> > start by creating the skeleton classes; thus developers can jump start
> > coding actual business logic.
> >
> > Thanks,
> > JD




RE: Confused about Uploading

2001-06-04 Thread Jon.Ridgway

Hi Peter,

When you start the upload process with web container will store the file in
a temp location. This will vary depending on your setup. The important thing
is that you can access as shown below and then write to a location of your
choosing. This code snippet is an edited version of that found in the upload
example app.

Note file is the DiskFile object..
-

ByteArrayOutputStream baos = new ByteArrayOutputStream();
FileOutputStream fs = new FileOutputStream ();
InputStream stream = file.getInputStream();

byte[] buffer = new byte[file.getFileSize()];
stream.read(buffer);

fs.write(buffer);
fs.close();
baos.write(buffer);


Hope this helps,

Jon 

-Original Message-
From: Peter Giannopoulos [mailto:[EMAIL PROTECTED]] 
Sent: 04 June 2001 02:35
To: [EMAIL PROTECTED]
Subject: Confused about Uploading

Hi all,
I am using the struts-upload.war example to upload
files. Everything sorta seems fine except I can't find
the files that I uploaded
Where are they? How can I specify where I want the
permanently saved? 
Better yet, are there any examples of how to store
them in a Db ? 

Thanks a million,
Peter.


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/