NEVERMIND: Changing Request Parameters

2002-02-22 Thread Phase Communcations

A little more research and I find that it is not possible and that I need to
rebuild the and redirect. Cheezy.

-Original Message-
From: Phase Communcations [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 5:08 AM
To: Struts Users Mailing List
Subject: Changing Request Parameters


I am forwarding from one Action to Another. I need to tweak the request
parameters. Is there a way to do this?

I tried to set the reqest value by calling the FormBean and set it from the
action. But, it doesn't carry over to the next Action. I can't find a way to
change the request parameters. Please help.

I saw some discussion on the archive. But, is pretty aimless and not very
clear.

I am running Servlet 2.2 so don't tell me about getParameterMap().

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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



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




Changing Request Parameters

2002-02-22 Thread Phase Communcations

I am forwarding from one Action to Another. I need to tweak the request
parameters. Is there a way to do this?

I tried to set the reqest value by calling the FormBean and set it from the
action. But, it doesn't carry over to the next Action. I can't find a way to
change the request parameters. Please help.

I saw some discussion on the archive. But, is pretty aimless and not very
clear.

I am running Servlet 2.2 so don't tell me about getParameterMap().

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




RE: Struts vs Template Engine or Both

2002-02-21 Thread Phase Communcations

If find it interesting that the argument of placing scriptlets into a jsp
page is reason enough not to use them. Has anyone heard of custom tags. If
you want to avoid placing scriptlets in your page then develop a tag that
handles the data. I have been developing in jsp for a year and a half and
have NEVER put a scriptlet in a page. I have found struts/jsp to be a great
platform for separating view and control. The other thing is let's not get
religious about MVC. There may, rarely (if ever), be an instance where
someone needs to grab some data form a view (hisss). But I have seen SQL
tags and other such tag-libs that might do someone some good who is working
on a project and wants to get a portion of it done and working. Then we can
go back and put things the way they should be (MVC). I have worked in
production enivronments where you need to get it done yesterday and you have
to write sloppy code to get it done. That's life. It's nice to have options.
I see that JSP provides that. Struts allows for the flexibility. This is a
good thing.

I am not getting in to a holy war over struts/jsp versus struts/velocity. I
am just saying. Stop with the scriptlet argument its not that major of a
point and your designers don't have to see a stitch of it and they shouldn't
have to use it if you understand what you are developing with and how best
to use it.

Thanks for allowing the soundoff,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws

-Original Message-
From: Gabriel Sidler [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 6:13 AM
To: Struts Users Mailing List
Subject: Re: Struts vs Template Engine or Both


Dave,
a Struts user posted the following message yesterday. I think
it pretty nicely summarizes what makes Velocity templates attractive
to some developers.


> From: "Matt Ho" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Subject: RE: Velocity-Tools / Struts
> Date: Tue, 19 Feb 2002 18:57:02 -0800
>
> We've been using Struts/Velocity for some time now and we find it to be
> an extremely well matched combination.  One of the main advantages of
> Velocity is that the syntax is incredibly easy.  I can explain it to a
> designer who has never seen it before and expect them to be useful
> within an hour.
>
> One of the nicest things it enforces is the separation of presentation
> layer and business logic.  It removes the desire to "fix" problems by
> just putting a small change into the JSP via scriptlets.  It also makes
> the code a _lot_ more readable which also reduces the development time.


We are working on integrating Velocity tightly with Struts. A prototype
with several simple application examples is available here:

http://husted.com/struts/resources/velstruts.zip

This contains a *.war file. Put the *.war into the webapps directory of
a Tomcat installation and restart. Then point your browser at
http://server:port/velstruts/ to see and try the examples. We are
currently in the process of redesigning the API and putting together
documentation. I hope for a first release version in the comming weeks.
I will announce major changes on this list.

Regarding your questions:

- As you can see in the examples, JSPs and Velocity templates can be
used in the same application. No restrictions.

- Regarding the learning curve of Velocity. The language is
really simple. Less than 10 directives. Velocity templates don't
allow Java scriptlet. If you have been relying on that feature
a lot, existing applications might need some redesign to be able
to use Velocity. Velocity really enforces a clear separation between
view and control.

- Regarding performance: Many users have reported that they
obtain about the same performance with JSP and Velocity (it really
depends on the types of templates). So, performance it not an
argument for or against one of the two technologies. We plan to do
some more performance tests with a first release version.


Gabe


Crazy Dave wrote:
>
> Hi,
>
> I'm a new JSP developer (previously been working with
> SilverStream pages).
>
> I've been working with Tomcat 4 & Struts and find
> JSP's to be a little clumsy with the mixing of script
> code and html but I am persevering because developing
> my JSP skills is the best way to remain employable.
>
> I read a little about templete engines
> (velocity/turbine) but don't wish to change to them
> just yet as most potential employers are sold on JSP.
>
> I was wondering is it easy to use a combination of
> JSP/Struts with a template engine and if so are there
> benifits or should I really only pick one or the
> other.
>
> Is there any performance issues JSP vs Templates.
>
> Any constructive comments on these points or related
> would be appreciated.
>
> Cheers David Cruwys ([EMAIL PROTECTED])
>
> __
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.

Struts-config initialization

2002-02-14 Thread Phase Communcations

When the struts-config file is initialized, does it place the ActionMappings
into a bean or are the ActionMappings checked against the struts-config file
each time a */do/* url is accessed? My reason for asking is that I plan to
create a config file that will define the content available to a page based
on it's Action Mapping. I plan to write an extendable generic ActionClass
that can read the config file and determine what data it needs to provide to
the page based on the Action Mapping. The page tags will then determine the
placement of the data on the page. I am just wondering if I should place all
of the mappings into an app bean to be accessed by the GenericAction or
leave them in the config file and parse the config for mappings. The answer
seems to be the bean. But, I would like to do it in the same manner that
Struts does.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




BIG DUMMY: SQL in Logic Bean or Action class

2002-02-14 Thread Phase Communcations

SORRY I FORGOT TO TO CHANGE THE RECIPIENT.

-Original Message-
From: Phase Communcations [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 9:03 AM
To: Struts Users Mailing List
Subject: RE: SQL in Logic Bean or Action class


Hey sean,

The following is some dialog I had with a couple of guys on the message
board about sql placement. I thought you might find it interesting.
Ultimately, just read Ted Husted.

Also, I have some thoughts I would like to pass by you when you have a few
moments. I have to make some changes to my content management. I have run
into a minor snag.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:55 PM
To: Struts Users Mailing List
Subject: Re: SQL in Logic Bean or Action class


It sounds fine to me.

The important thing is to follow the layers pattern

[ view ] | [ controller ] | [ model ]

The view can talk to the controller, and the controller can talk to the
model, but when you le the view and model talk, it starts to spin out of
control.

I like to call a business method and get back a collection of beans, so
that the Action does not even have to bother with that.But since the
contoller and the model are on adjacent layers, the Action could also
walk through a result set, if that works for you. The only thing is to
get the connection back into the pool as soon as possible.

For transfering data between beans, the BeanUtils can also be helpful.


Phase Communcations wrote:
>
> A quick hypothetical scenario:
>
> I have an action class that needs to pass a list of addresses to the view
> for display.
> I have a logic bean that contains a sql call to a database and retrieves
> address info.
> The resulset returns the following fields in each record: NAME, ADDRESS,
> CITY, STATE, ZIP
> I have a "databean" that has the following methods: setName(),
setAddress(),
> setCity(), setState(), setZip()
> An ArrayList(Collection) is created.
> For each record in the resultset the fields are used to populate the
> databean (ie NAME -> setName()) by calling it's property setting methods.
> Each bean populated is added to the ArrayList.
> Upon the end of the resultset the ArrayList is passed into a scope
(request
> for example) by the Action class and named "addresslist".
> The list of addresses then become available to the view for iteration and
> display.
>
> Where am I crossing boundaries in this scenario?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 12:02 PM
> To: 'Struts Users Mailing List'
> Subject: RE: SQL in Logic Bean or Action class
>
> You are on the right track.  Keep the sql with the model.  The only thing
is
> don't let your collection of "databeans" make it to the jsp.  That would
> then tie your presentation to the model.  Very bad.  There should be
another
> set of beans that represents more of what the view is like.  Often times
in
> the view beans all the data types will be string to make the validation a
> lot easier.
>
> Jeff Krueger
>
> -Original Message-
> From: Phase Communcations [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 11:40 AM
> To: Struts Users Mailing List
> Subject: SQL in Logic Bean or Action class
>
> Just a simple design question. Having read through several posts and
reading
> the Struts documentation. I was wondering what is the best design pattern
> regarding SQL placement. My thoughts were that I need to keep SQL out of
the
> action class and pass all resultset data into Collections of beans. This
> helps keep from having tons of connections and resulsets sitting out there
> tieing up valuable database resources. The collection of "databeans" are
> then placed in a scope using the Controller(Action class)and made
available
> to other logic processes in the scope and/or passed on to the view for
data
> display. I am assuming this is because "business logic beans should be
> designed and implemented so that they do not know they are being executed
in
> a web application environment." Is my interpretation that SQL is part of
the
> Model and should be placed in Logic beans tweaked? Or is this a 6 and half
> dozen scenario? Or is there another pattern that I am missing altogether?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
> --
> To unsubscribe, e-mail:
> <mailto

RE: SQL in Logic Bean or Action class

2002-02-14 Thread Phase Communcations

Hey sean,

The following is some dialog I had with a couple of guys on the message
board about sql placement. I thought you might find it interesting.
Ultimately, just read Ted Husted.

Also, I have some thoughts I would like to pass by you when you have a few
moments. I have to make some changes to my content management. I have run
into a minor snag.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:55 PM
To: Struts Users Mailing List
Subject: Re: SQL in Logic Bean or Action class


It sounds fine to me.

The important thing is to follow the layers pattern

[ view ] | [ controller ] | [ model ]

The view can talk to the controller, and the controller can talk to the
model, but when you le the view and model talk, it starts to spin out of
control.

I like to call a business method and get back a collection of beans, so
that the Action does not even have to bother with that.But since the
contoller and the model are on adjacent layers, the Action could also
walk through a result set, if that works for you. The only thing is to
get the connection back into the pool as soon as possible.

For transfering data between beans, the BeanUtils can also be helpful.


Phase Communcations wrote:
>
> A quick hypothetical scenario:
>
> I have an action class that needs to pass a list of addresses to the view
> for display.
> I have a logic bean that contains a sql call to a database and retrieves
> address info.
> The resulset returns the following fields in each record: NAME, ADDRESS,
> CITY, STATE, ZIP
> I have a "databean" that has the following methods: setName(),
setAddress(),
> setCity(), setState(), setZip()
> An ArrayList(Collection) is created.
> For each record in the resultset the fields are used to populate the
> databean (ie NAME -> setName()) by calling it's property setting methods.
> Each bean populated is added to the ArrayList.
> Upon the end of the resultset the ArrayList is passed into a scope
(request
> for example) by the Action class and named "addresslist".
> The list of addresses then become available to the view for iteration and
> display.
>
> Where am I crossing boundaries in this scenario?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 12:02 PM
> To: 'Struts Users Mailing List'
> Subject: RE: SQL in Logic Bean or Action class
>
> You are on the right track.  Keep the sql with the model.  The only thing
is
> don't let your collection of "databeans" make it to the jsp.  That would
> then tie your presentation to the model.  Very bad.  There should be
another
> set of beans that represents more of what the view is like.  Often times
in
> the view beans all the data types will be string to make the validation a
> lot easier.
>
> Jeff Krueger
>
> -Original Message-
> From: Phase Communcations [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 11:40 AM
> To: Struts Users Mailing List
> Subject: SQL in Logic Bean or Action class
>
> Just a simple design question. Having read through several posts and
reading
> the Struts documentation. I was wondering what is the best design pattern
> regarding SQL placement. My thoughts were that I need to keep SQL out of
the
> action class and pass all resultset data into Collections of beans. This
> helps keep from having tons of connections and resulsets sitting out there
> tieing up valuable database resources. The collection of "databeans" are
> then placed in a scope using the Controller(Action class)and made
available
> to other logic processes in the scope and/or passed on to the view for
data
> display. I am assuming this is because "business logic beans should be
> designed and implemented so that they do not know they are being executed
in
> a web application environment." Is my interpretation that SQL is part of
the
> Model and should be placed in Logic beans tweaked? Or is this a 6 and half
> dozen scenario? Or is there another pattern that I am missing altogether?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL

RE: SQL in Logic Bean or Action class

2002-02-13 Thread Phase Communcations

A quick hypothetical scenario:

I have an action class that needs to pass a list of addresses to the view
for display.
I have a logic bean that contains a sql call to a database and retrieves
address info.
The resulset returns the following fields in each record: NAME, ADDRESS,
CITY, STATE, ZIP
I have a "databean" that has the following methods: setName(), setAddress(),
setCity(), setState(), setZip()
An ArrayList(Collection) is created.
For each record in the resultset the fields are used to populate the
databean (ie NAME -> setName()) by calling it's property setting methods.
Each bean populated is added to the ArrayList.
Upon the end of the resultset the ArrayList is passed into a scope (request
for example) by the Action class and named "addresslist".
The list of addresses then become available to the view for iteration and
display.

Where am I crossing boundaries in this scenario?

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 12:02 PM
To: 'Struts Users Mailing List'
Subject: RE: SQL in Logic Bean or Action class


You are on the right track.  Keep the sql with the model.  The only thing is
don't let your collection of "databeans" make it to the jsp.  That would
then tie your presentation to the model.  Very bad.  There should be another
set of beans that represents more of what the view is like.  Often times in
the view beans all the data types will be string to make the validation a
lot easier.

Jeff Krueger

-Original Message-
From: Phase Communcations [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 11:40 AM
To: Struts Users Mailing List
Subject: SQL in Logic Bean or Action class


Just a simple design question. Having read through several posts and reading
the Struts documentation. I was wondering what is the best design pattern
regarding SQL placement. My thoughts were that I need to keep SQL out of the
action class and pass all resultset data into Collections of beans. This
helps keep from having tons of connections and resulsets sitting out there
tieing up valuable database resources. The collection of "databeans" are
then placed in a scope using the Controller(Action class)and made available
to other logic processes in the scope and/or passed on to the view for data
display. I am assuming this is because "business logic beans should be
designed and implemented so that they do not know they are being executed in
a web application environment." Is my interpretation that SQL is part of the
Model and should be placed in Logic beans tweaked? Or is this a 6 and half
dozen scenario? Or is there another pattern that I am missing altogether?

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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



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




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




SQL in Logic Bean or Action class

2002-02-13 Thread Phase Communcations

Just a simple design question. Having read through several posts and reading
the Struts documentation. I was wondering what is the best design pattern
regarding SQL placement. My thoughts were that I need to keep SQL out of the
action class and pass all resultset data into Collections of beans. This
helps keep from having tons of connections and resulsets sitting out there
tieing up valuable database resources. The collection of "databeans" are
then placed in a scope using the Controller(Action class)and made available
to other logic processes in the scope and/or passed on to the view for data
display. I am assuming this is because "business logic beans should be
designed and implemented so that they do not know they are being executed in
a web application environment." Is my interpretation that SQL is part of the
Model and should be placed in Logic beans tweaked? Or is this a 6 and half
dozen scenario? Or is there another pattern that I am missing altogether?

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




PLEASE HELP - Digester SAXException null

2002-02-01 Thread Phase Communcations

Is this possible. I keep getting a SAXException null in my servlet.log
Tomcat 3.2.3 files:

I have an xml file similar to the following


avalue



Can I set up the following rules with the digester to process this file

// this code is contained in a servlet that is called on app startup

Vector v;

// code is in init method of servlet - start
Digester di = new Digester();
di.push(this); // push servlet on to stack
di.setValidating(false);

//create vector object when elementa/elementb parsed
di.addObjectCreate("elementa/elementb","java.util.Vector");

// call vector add method with elementb body as value
di.addCallMethod("elementa/elementb","add",0);

// pass the vector object to the servlet instance method setAValue
di.addSetNext("elementa/elementb","setAValue","java.util.Vector");

//open input to parse
InputStream input = getServletContext().getResourceAsStream(value);

//parse
di.parse(input);

//close stream
input.close();

// code is in init method of servlet - stop

public void setAValue(Vector v){
this.v = v;
}


Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




Digester SAXException null

2002-02-01 Thread Phase Communcations


Is this possible. I keep getting a SAXException null in my servlet.log
Tomcat 3.2.3 files:

I have an xml file similar to the following


avalue



Can I set up the following rules with the digester to process this file

// this code is contained in a servlet that is called on app startup

Vector v;

// code is in init method of servlet - start
Digester di = new Digester();
di.push(this); // push servlet on to stack
di.setValidating(false);

//create vector object when elementa/elementb parsed
di.addObjectCreate("elementa/elementb","java.util.Vector");

// call vector add method with elementb body as value
di.addCallMethod("elementa/elementb","add",0);

// pass the vector object to the servlet instance method setAValue
di.addSetNext("elementa/elementb","setAValue","java.util.Vector");

//open input to parse
InputStream input = getServletContext().getResourceAsStream(value);

//parse
di.parse(input);

//close stream
input.close();

// code is in init method of servlet - stop

public void setAValue(Vector v){
this.v = v;
}


Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




Capturing a /do url with querystring intact

2002-01-28 Thread Phase Communcations

Is it possible to capture a do/ style url with the QueryString intact.
Basically what I need to accomplish is to capture the full url so that when
the client enters an admin area it bookmarks where they were so that they
can return back to where they were before entering the admin area. It is a
content management app and it is possible that they will be managing content
that shows up under a url that has querystring data.

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




[I FIGURED IT OUT :-)] Digester Examples

2002-01-13 Thread Phase Communcations

Thanks for the info. I figured it out. I see the digester playing an
incredible role in what I am doing. What an incredible tool!

-Original Message-
From: Phase Communcations [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 12, 2002 10:25 PM
To: Struts Users Mailing List
Subject: Digester Examples


Does anyone know of some good concise digester examples and tutorials. I
have been reading the docs but am unsure of several aspects of it.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




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




Digester Examples

2002-01-12 Thread Phase Communcations

Does anyone know of some good concise digester examples and tutorials. I
have been reading the docs but am unsure of several aspects of it.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




Multipart Iterator Error

2002-01-09 Thread Phase Communcations

I have a view that contains a form (Form-A) that is a multipart/form-data
that is submitted to an action (Action-A). Form-A is empty when the "cancel"
button is pressed. The "cancel" button returns the user to a previous form.
This is accomplished within Action-A. Action-A looks to see if the "cancel"
button is pressed and when the "cancel" button is pressed it forwards to the
previous by forwarding to Action-B. Action-B should then populate it's
corresponding form (Form-B) and display it's view. But I get the following
error instead. Any answers?

Internal Servlet Error:

javax.servlet.ServletException: MultipartIterator: no multipart request data
sent
at
org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.ja
va:341)
at org.apache.struts.upload.MultipartIterator.(MultipartIterator.java:152)
at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:65)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
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: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.facade.RequestDispatcherImpl.doForward(RequestDispatcherIm
pl.java:222)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:162)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1758)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.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:81
2)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
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)

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws





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




Multipart Iterator Error

2002-01-08 Thread Phase Communcations

I have a view that contains a form (Form-A) that is a multipart/form-data
that is submitted to an action (Action-A). Form-A is empty when the "cancel"
button is pressed. The "cancel" button returns the user to a previous form.
This is accomplished within Action-A. Action-A looks to see if the "cancel"
button is pressed and when the "cancel" button is pressed it forwards to the
previous by forwarding to Action-B. Action-B should then populate it's
corresponding form (Form-B) and display it's view. But I get the following
error instead. Any answers?

Internal Servlet Error:

javax.servlet.ServletException: MultipartIterator: no multipart request data
sent
at
org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.ja
va:341)
at org.apache.struts.upload.MultipartIterator.(MultipartIterator.java:152)
at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:65)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
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: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.facade.RequestDispatcherImpl.doForward(RequestDispatcherIm
pl.java:222)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:162)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1758)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.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:81
2)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
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)

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




Action Forwarding with /do style url

2002-01-08 Thread Phase Communcations

I think this is a simple question. I have been developing an app using the
/do command line structure url. I have a form that is submitted to an
action. The action at the start checks to see if the "return" button is
pressed. If the "return" button is pressed the action class should forward
to another action that will initialize and populate a form in another view
and display that view. Something seems to be going wrong with my mappings or
it may be that it is not possible to forward to another action from within
an action class.

For example:

   -- return statement within an Action class called by a form submittal
   return mapping.findForward("return");

whereas the "return" forward is mapped to - "/admin/content/edit" within the
struts-config.xml.

Is this possible to do or can I only forward to a view from within an
action?

If this is not possible how can I forward back to an action that needs to be
initialized to populate a form after a submission check determines that a
forward is needed?

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws




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




RE: Where should I store image files?

2001-12-16 Thread Phase Communcations

I would suggest a directory. Databases can handle the binary info. But, it
is not good for performance. Both will work but I would place a file
path/url in the database to reference the images and store them in a
directory.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 16, 2001 9:24 PM
To: Struts Users Mailing List
Subject: Where should I store image files?


Hi Folks

I have a jsp/servlet web app and am not sure where I should keep the
image files.  The image files are constantly getting added to, ie people
can upload new images and they should be stored somewhere, either in a
database or in a directory somewhere.  I am not sure which is the best
way to go.  Can someone please tell me where they think I should store
the images.

Cheers

Tony


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: struts and jserv

2001-12-14 Thread Phase Communcations

JSERV!!! kinda outdated don't ya think : )

-Original Message-
From: nandkumar rayanker [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 7:27 PM
To: [EMAIL PROTECTED]
Subject: struts and jserv


Hi ,

I am in the process of developing prototype web app
and following is the environment:

1. APache web server
2. JServ

I would like to develop application based on struts
framework.

I would like to know whether I can develop struts app
and run under JSERV AND APACHE environment.

thanks
nandkumar
nandkumar

__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




NEVERMIND: Passing url parameters using command structure url

2001-12-14 Thread Phase Communcations

I am an idiot. The solution is too embarassing to mention.

-Original Message-
From: Phase Communcations [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 10:52 PM
To: Struts Users Mailing List
Subject: Passing url parameters using command structure url


I am using commmand structure urls to hide my jsp views. I need to pass a
query string to an action from the view. How do I accomplish this? I have
tried http://www.mysite.com/do/next?page=2 but the url brings up an error. I
have read Ted Husted's catalog and am not sure I see or understand how this
is done. Anyways, I am sure someone knows the answer to this.

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




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




Passing url parameters using command structure url

2001-12-13 Thread Phase Communcations

I am using commmand structure urls to hide my jsp views. I need to pass a
query string to an action from the view. How do I accomplish this? I have
tried http://www.mysite.com/do/next?page=2 but the url brings up an error. I
have read Ted Husted's catalog and am not sure I see or understand how this
is done. Anyways, I am sure someone knows the answer to this.

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




RE: multiple buttons on a form

2001-12-12 Thread Phase Communcations

visit the strutsx.org and look at the image button patch.

-Original Message-
From: Lachlan Holmes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 5:26 PM
To: Struts Users Mailing List
Subject: multiple buttons on a form


Is there a way to have multiple submit buttons on a form and be able to tell
which button was pressed in the following action?

Regards,
Lachlan


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




struts-user@jakarta.apache.org

2001-12-06 Thread Phase Communcations

Has anyone succefully swapped out the "?" and the "&" in a querystring with
another symbol , such as "/". A problem with various search engine spiders
(not all, but, several) is that they will not move past a ?. It would be
advantagous to allow for the use of a more compatible querystring (a way
around) especially when we  are talking about shopping carts and sites with
dynamic content that is accessed through links and not forms. I have seen
this done with other sites using php :( and it is very effective on the
search engines. I am endeavoring myself to figure a way around the "?" and
"&", using Struts (of course). Yet, if someone has attempted this succefully
I sure would appreciate some wisdom or code (code would be better, I think).
Otherwise, I will embark on my crusade alone.

Thanks ahead of time,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws




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




RE: action mapping as /do/* rather than *.do

2001-12-05 Thread Phase Communcations

I use this kind of mapping successfully and I prefer it way over *.do. Read
the Ted Husted website under catalog. I follow his suggestions and I have
had great success.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Scott A. Roehrig [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 6:03 PM
To: Struts Users Mailing List
Subject: Re: action mapping as /do/* rather than *.do


I think from another post, the problem lies in that the request is being
redirected rather than forwarded. Upon the redirect, the webserver chokes on
it. Perhaps the answer is to use the subclass of ActionForward that sets
forwarding to true by default.

Haven't had the time to check this. However, I get the same error with
mappings like this.

Scott
- Original Message -
From: "Barry L. Kline" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 05, 2001 7:22 PM
Subject: Re: action mapping as /do/* rather than *.do


> Did you ever figure out how to do this?  I have seen many messages
> about how great it is to use /do/ but haven't seen anyone mention how
> to.  I'm just starting with struts and have been modifying Ted's
> sample (this same thing) but I'm been unable to get anything back from
> the browser but a blank screen...
>
> Barry
>
>
> Matt Raible wrote:
> >
> > I am trying to convert the struts-example application to use:
> >
> >   
> > action
> > /do/*
> >   
> >
> > And in the index.jsp page, I've change the "tour" link from:
> >
> > 
> > 
> > 
> >
> > to:
> >
> > 
> > 
> > 
> >
> > And have changed nothing in struts-config.xml.  However, when I try to
execute
> > this link (http://localhost/NASApp/struts-example/do/tour), I get the
error:
> >
> > [18/Aug/2001 10:16:53:9] info: --
> > [18/Aug/2001 10:16:53:9] info: action: Processing a GET for /tour
> > [18/Aug/2001 10:16:53:9] info: --
> > [18/Aug/2001 10:16:53:9] info: --
> > [18/Aug/2001 10:16:53:9] info: action: Setting locale 'en_US'
> > [18/Aug/2001 10:16:53:9] info: --
> > [18/Aug/2001 10:16:53:9] info: --
> > [18/Aug/2001 10:16:53:9] info: action:  No mapping available for path
/tour
> > [18/Aug/2001 10:16:53:9] info: --
> >
> > But in my struts-config.xml, there is the entry:
> >
> >  > forward="/tour.htm">
> > 
> >
> > Anyone know how to fix this?
> >
> > Thanks,
> >
> > Matt
> >
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: Tomcat 3.2.3+mod_jk

2001-12-05 Thread Phase Communcations

Do you have ajp13 activeated/installed? Try using ajp12 to test it out.
Also, where are you placing your JkMount directive?

-Original Message-
From: Daiju Kato [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 9:56 AM
To: [EMAIL PROTECTED]
Subject: Tomcat 3.2.3+mod_jk


Hello all,

Would you give me some advice?
I try to use struts 1.0 under tomcat 3.2.3 + mod_jk.
I modified mod_jk.conf to add 'JkMount /*.do ajp13'.
But .do files are not found.
I tried Tomcat 3.3 but result was same.

Please let me know how to set up struts with mod_jk.

Regards.

Daiju Kato
e-mail:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




Alternate Query String Arrangement

2001-12-05 Thread Phase Communcations

Has anyone succefully swapped out the "?" and the "&" in a querystring with
another symbol , such as "/". A problem with various search engine spiders
(not all, but, several) is that they will not move past a ?. It would be
advantagous to allow for the use of a more compatible querystring (a way
around) especially when we  are talking about shopping carts and sites with
dynamic content that is accessed through links and not forms. I have seen
this done with other sites using php :( and it is very effective on the
search engines. I am endeavoring myself to figure a way around the "?" and
"&", using Struts (of course). Yet, if someone has attempted this succefully
I sure would appreciate some wisdom or code (code would be better, I think).
Otherwise, I will embark on my crusade alone.

Thanks ahead of time,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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