Re: Relative URL problem in action taglib processing

2001-08-20 Thread Robert Parker


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 3:49 PM
Subject: Relative URL problem in action taglib processing


>
> Preliminary testing would indicate that this hack does seem to work, but
> I can't help but wonder: are we missing something?  Is there an easier,
> more elegant way to achieve relative paths in action parameter
> references?
>

I have been deploying my apps as webapps using a war file, that way, the
paths are relative to the root directory of the deployed webapp.

regards

Rob




Re: Generating Dynamic Urls with

2001-08-20 Thread martin . cooper

Something like this should work:



blah blah..


--
Martin Cooper


- Original Message -
From: "jigerjava" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 2:39 AM
Subject: Generating Dynamic Urls with 


> Hi all,
> This my first mail to the list. I am just learning Struts. I got
stuck at a problem hope I will get some help reg. this.
> Problem:
>   I am displaying a list of orders with links at the end like "Modify
Order", "View Order" etc. Ok now these links point to specific directories
in the context depending on a key passed from the Server.
> Currently in non-struts based model I do it like this
> blah blah..
>
> Now how can I achieve the same dynamic url generation using struts.
>
> Any help.
>
> Thanks in Advance,
> Jiger
>
>
> Get Your Private, Free E-mail from Indiatimes at
http://email.indiatimes.com
>
>  Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from
http://www.planetm.co.in
>
>





iterate - help

2001-08-20 Thread Rodrigo Zerlotti

Sorry if it is too basic, but i am new on struts...

I have an interate:


   do something


multiCity is a vector...

Suppose I want to display on a table only 2 at the time, I make offset="0"
and lenght="2".

How do I repeat the loop without repeating the logic iterate for [2,2} and
[4,2], or in other words, how can I set the offset/length on the fly?

It is the same question for all struts tags, I can never use <%'s to modify
values of the tags... - of course I may be missing something


-
Regards,

Rod~




Relative URL problem in action taglib processing

2001-08-20 Thread [EMAIL PROTECTED]

We have encountered a minor problem using Struts with our back end
architecture at Fidelity Investments.

Using Struts version 1.0, all action references always end up translated
to absolute paths when the JSP is translated to HTML.  For example, an
action="foo.do" in a JSP is later converted into action="/foo.do" in the
resulting HTML file, even if it actually needs to remain a relative
reference "foo.do" in order to work in our back end architecture.  This
is no real surprise I suppose, as the use of the absolute slash is
mentioned in the Struts specification.

As a result, we are considering hacking the Struts code in a couple of
places to strip the absolute slash off of the front of the action
reference path name before writing the HTML, and then re-adding it back
again on the action mapping.  After some investigation, it appears that
this hack can be isolated to two spots:

1.  org.apache.struts.util.ResponseUtils.write :
 Code to strip the prefixed slash from the beginning of the
action="" string just before it is written out to the response.

2.  org.apache.struts.action.ActionMappings.findMapping :
 Code to prefix  the slash back onto the front of the action=""
string (assuming the mapping can't be found without it).

This seems to be the least painful solution because it seems to be
isolated to two spots in the code and it does not involve hacking any
taglibs which we don't want to touch since we would forever be hacking
new taglibs for the rest of time.

Preliminary testing would indicate that this hack does seem to work, but
I can't help but wonder: are we missing something?  Is there an easier,
more elegant way to achieve relative paths in action parameter
references?

Thanks,

David McLure

[EMAIL PROTECTED]
[EMAIL PROTECTED]




Re: need help with struts installation

2001-08-20 Thread Rakesh



see to it that struts.jar is not in your classpath 
while you start up tomcat.
 
 
 Rakesh Ayilliath
 
[EMAIL PROTECTED]

  - Original Message - 
  From: 
  Chuck 
  Carroll 
  To: [EMAIL PROTECTED] 
  
  Sent: Monday, August 20, 2001 10:30 
  PM
  Subject: need help with struts 
  installation
  
  Hi,
   
   I am a new user of the struts package 
  and am using Tomcat 3.2.3 on Windows 2000 Professional with service pack 
  1.  I have tried to follow the 
  directions on the installation of Tomcat, as well as that for struts.  “Normal” servlets and JSPs work just 
  fine, so I think Tomcat is okay.  
  The problem is with the struts-example from Jakarta. 
   Before I install the struts package, I 
  can start Tomcat with no errors.  
  After I install the struts package and start Tomcat, I get the 
  message:
   Call 
  org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,*.do/java.lang.String)
  New 
  org.apache.struts.webapp.example.User
  Begin event threw exception
  java.lang.ClassNotFoundException: 
  org.apache.struts.webapp.example.User
      
  at …
  When doing …/struts-documentation, everything 
  seems to be okay.
  When doing …/struts-example, I get the 
  message:
  Error: 500
  Location: /struts-example/index.jsp
  Internal Servlet Error:javax.servlet.ServletException: Missing message for key index.title    at … However, …/struts-exercise-taglib works for the BEAN Tags and LOGIC Tags but fails on the HTML Tags with the message:
   Error: 
500
  Location: 
  /struts-exercise-taglib/index.jsp
  Internal Servlet Error:javax.servlet.ServletException: Exception creating bean of class org.apache.struts.webapp.exercise.TestBean: java.lang.ClassNotFoundException: org.apache.struts.webapp.exercise.TestBean
  I am obviously doing something wrong, but 
  can’t figure out what it is.  Any 
  help would be very much appreciated.  
  Thank you.
  Chuck 
Carroll


Re: more than one parameter in a forward attribute in struts_config.xml

2001-08-20 Thread Jonathan Yang

But, the problem is when the session lost,
the application will return the index page, and index page 
with frameset, and I do that with a servlet tag like 
the example in struts, 
so the redirect will done in the servlet of checkLogon's class
and how can I do that?
how can I redirect to a frameset page in that servlet?

thx,
Regards,
Jonathan

- Original Message - 
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Jonathan Yang" <[EMAIL PROTECTED]>
Cc: "mohan sreeram" <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 11:27 AM
Subject: Re: more than one parameter in a forward attribute in struts_config.xml


> 
> 
> On Tue, 21 Aug 2001, Jonathan Yang wrote:
> 
> > Hi,
> > Can it support target like these:
> > 
> > because I wanna it can forward to a page with frameset ...
> > 
> 
> This is not going to be possible.
> 
> Frames and Targets are a client-side thing.  Servers don't have any clue
> about them -- they just respond to requests.  You will need to make sure
> that the  or  that *initiated* this request sets the
> appropriate target value so that the response comes back where you want
> it.
> 
> > thx.
> > Regards,
> > Jonathan
> > 
> 
> Craig McClanahan



Re: more than one parameter in a forward attribute in struts_config.xml

2001-08-20 Thread Craig R. McClanahan



On Tue, 21 Aug 2001, Jonathan Yang wrote:

> Hi,
> Can it support target like these:
> 
> because I wanna it can forward to a page with frameset ...
> 

This is not going to be possible.

Frames and Targets are a client-side thing.  Servers don't have any clue
about them -- they just respond to requests.  You will need to make sure
that the  or  that *initiated* this request sets the
appropriate target value so that the response comes back where you want
it.

> thx.
> Regards,
> Jonathan
> 

Craig McClanahan




Re: more than one parameter in a forward attribute in struts_config.xml

2001-08-20 Thread Jonathan Yang

Hi,
Can it support target like these:

because I wanna it can forward to a page with frameset ...

thx.
Regards,
Jonathan


- Original Message - 
From: "mohan sreeram" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 5:22 PM
Subject: Re: more than one parameter in a forward attribute in struts_config.xml


> Sreeram Mohan
> 
> > Hi all !
> >
> > We're trying to use the forward attribute in the struts-config.xml, and
> its
> > working just fine.
> > But is it possible to have more than one parameter in the url ?
> >
> > ex.
> >  >
> "/contactinformationdetails/contactInformationDetails.do?caller=contactInfor
> > mation&task=new" redirect="true"/>
> 
>  ex.
>   
> "/contactinformationdetails/contactInformationDetails.do?caller=contactInfor
>  mation#38;task=new" redirect="true"/>
> 
> Instead of using the '&' you can use this  #38;
> 
> Sreeram Mohan
> 
> 
> >
> > When we try this, the server can't parse the file properly. It doesn't
> like
> > the "&" sign.
> >
> > Any ideas ??
> >
> > Thanks
> > KHL



RE: cannot find the datasource in struts?

2001-08-20 Thread Bradley Cowen

I can show you an example of what i'm using (MySQL):

In struts-config.xml:

  

  
  
  
  
  
  
  
  

  

Then, you can set up a TestAction.java action class with a perform method
like this:

public final class TestAction extends Action {
public ActionForward perform(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
 HttpServletResponse response)
throws IOException, ServletException {
Connection connection = null;
DataSource dataSource = null;
Statement statement = null;
ResultSet resultSet = null;

try {
dataSource = servlet.findDataSource(null);
connection = dataSource.getConnection();

statement = connection.createStatement();
resultSet = statement.executeQuery("SELECT FirstName,LastName
FROM People "
+ "ORDER BY LastName,FirstName");
resultSet.close(); // just a test
} catch (SQLException sqle) {
getServlet().log("Connection.process", sqle);
} finally {

//always close connection
try {
connection.close();
} catch (SQLException e) {
getServlet().log("Connection.close", e);
}
}

// Forward control to the specified success URI
return (mapping.findForward("success"));
}
} // end TestAction

HTH,

-Brad

-Original Message-
From: Manish Pandya [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 3:06 PM
To: [EMAIL PROTECTED]
Subject: cannot find the datasource in struts?


a newbie in using struts...
kindly let me know what i should be doing to define a datasource..
i have the struts-config.xml file where i defined the datasource
parameters...
and now i m trying to run the example provided in the struts
but it is throwing error javax.sql.DataSource not found...

is there anything that i m missing? let me know please...




Re: WARN: email hoax

2001-08-20 Thread John Raley

WHAT?!?  An insincere offer via unsolicited email?  I'm shocked, 
appalled and chagrinned...

Anthony Xin Chen wrote:

>Hello struts-user,
>
>  If   you   have   received  a  email  claiming  a  great  off  from
>  webhosting.com, it is a hoax.
>
>  
>






WARN: email hoax

2001-08-20 Thread Anthony Xin Chen

Hello struts-user,

  If   you   have   received  a  email  claiming  a  great  off  from
  webhosting.com, it is a hoax.

  

-- 
Best regards,
 Anthony





RE: Reuse of JSPs

2001-08-20 Thread JEWeaver


Thanks Nicolas and Larry..

Both the use of templates (although I need to check and see if that is
available in 1.0 or not) and the parameter in the path of the forwarding
seem like they should prevent JSP duplication.  For this particular
problem, I'm leaning towards the request parameters at the moment - since
the target JSP has slightly different buttons available as well as
boilerplate differences.

Looks like there is a struts-template tld in 1.0, so both solutions
available to me.  I have typical header / footer and sidebar type stuff
that looks like the template approach would be good for, so I will probably
end up using both of these techniques.  Again, thanks.

Jim Weaver
Software Developer - ThoughtWorks




[Q] ActionServlet Forwarding

2001-08-20 Thread KenHoying

I have a class that extends the ActionServlet. I would like to be able to
change the navigation in the perform method to forward to a different
address in the even that certain conditions have been met.  However, it is
not clear to me how to forward from the ActionServlet.  Any help would be
greatly appreciated.

Thanks,
Ken Hoying




RE: Back Button in Struts

2001-08-20 Thread Pete Gordon

They need to be set on the HttpServletResponse object.  

Not being as familar with struts as most people on this list... I am going
to take a stab at this... Somebody help me here

In looking at the Controller Servlet (ActionServlet) I found that it has a
nocache member variable on the default Servlet.  This sets the Headers,
although I don't know what headers without looking at the source.  Somewhere
within the ActionServlet you would need to get a reference to the
HttpServletResponse (it is passed around a lot, and then call the setHeader
method with ("Expires", "0").  Of course, this may not be needed if the
nocache does it for you; although  I would imagine that it does the
Cache-Control and/or the Pragma.  I am not that familar with those Headers,
but we had problems with them because they would erase the content in a form
with the back button was used.  We wanted it to go to the server and keep
the content in the form that was entired previously--the Expires Header was
all we needed.  

In case it's not obvious we aren't using Struts.  We created a J2EE
architecture that is very similar in that it uses MVC, action concept, and
templates (we call it conduct); and I am trying to get more familar with
Struts to find the gap and overlaps between the two architectures.  To
hopefully someday come in under the struts framework and share some of our
architecture with the struts world.

Thanks,
Pete Gordon



-Original Message-
From: MacKellar, Kimberly [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 6:01 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


Where do you need to set these header values (Action, ActionServlet...)?  I
added them to my Action classes and it doesn't seem to do anything.

Kim MacKellar

-Original Message-
From: Pete Gordon [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 11:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


You can also look at putting in the Expires HTTP Header parameter to force
the client to hit the server each time.  This forces the back button to go
back to the webserver.

//These Response Headers prevent Client side cache of web pages
//response.setHeader("Cache-Control", "no-cache");  // don't do
this -- prevents back button
//response.setHeader("Pragma", "no-cache"); //
don't do this -- prevents back button
response.setHeader("Expires", "0");


Pete Gordon

-Original Message-
From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


You can't really use the javascript:history.back() function to hit the
Action class as the history.back does not even hit the webserver.  It is an
internal "client" operation, like most javascript is.

One solution you might want to try is to create a stack object for each
session to track what "actions" they have run.  Then you can implement a
fairly decent "back" button.

Haven't done this myself, but know of another project that has.



-Original Message-
From: Larry Maturo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 20, 2001 9:11 AM
To: [EMAIL PROTECTED]
Subject: Back Button in Struts


How do you implement a generic back button in 
struts such that it hits the Action Class?  When  
you use something like:
Back

You go back to the jsp, but miss the Action Class,
which is often a bad thing.

-- Larry Maturo



Is this a bug in STRUTS? or TOMCAT? Or Did I mis something? Please help.

2001-08-20 Thread BinhMinh Nguyen

hi all,
I have a very interesting problem, and here how it
occurs:

my formJSP have two button: SUBMIT and EXIT.
if the user is authenticated, when the Submit button
is clicked, the form is submitted succesfully and the
user is brought to another JSP page, let say Thank-you
page.

But let say, if the session is timed out. Then the 
user is brought back to the loggin page and is forced
to log-in again, after entering usrname and password
and press enter, the browser show a blank screen while
the user is supposed to be redirected to the Thank-you
Page. It seems that the servlet is not retained the
destination: Thank-you page at all.

Is that a problem with STRUTS, TOMCAT or Did I miss
anything in in setting up the servlet?

Thank you very much.
Binh Nguyen



__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Weblogic 5.1 and struts 1.0

2001-08-20 Thread sbhujwa


Hi all,

Has anyone faced problems deploying web app as expanded directory using
Weblogic 5.1(sp10) and struts 1.0
When I deploy war file it works fine but when I try expanded directory I
get the following message :

 Root cause of ServletException
javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
 at org.apache.struts.util.RequestUtils.message(RequestUtils.java:568)
 at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
 at jsp_servlet._hello_45_world.__hello._jspService(__hello.java:83)
 at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
 at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:922)
 at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:886)
 at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
 at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
 at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)


Any help highly appreciated. Thanks for your time.

Shafi.





RE: Back Button in Struts

2001-08-20 Thread MacKellar, Kimberly

Well... I removed the calls from my Actions and added it to the
configuration of my ActionServlet.

  nocache
  true


When I hit the back button its getting the pages from the client cache
instead of from the server.

Kim MacKellar

-Original Message-
From: MacKellar, Kimberly 
Sent: Monday, August 20, 2001 5:01 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


Where do you need to set these header values (Action, ActionServlet...)?  I
added them to my Action classes and it doesn't seem to do anything.

Kim MacKellar

-Original Message-
From: Pete Gordon [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 11:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


You can also look at putting in the Expires HTTP Header parameter to force
the client to hit the server each time.  This forces the back button to go
back to the webserver.

//These Response Headers prevent Client side cache of web pages
//response.setHeader("Cache-Control", "no-cache");  // don't do
this -- prevents back button
//response.setHeader("Pragma", "no-cache"); //
don't do this -- prevents back button
response.setHeader("Expires", "0");


Pete Gordon

-Original Message-
From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


You can't really use the javascript:history.back() function to hit the
Action class as the history.back does not even hit the webserver.  It is an
internal "client" operation, like most javascript is.

One solution you might want to try is to create a stack object for each
session to track what "actions" they have run.  Then you can implement a
fairly decent "back" button.

Haven't done this myself, but know of another project that has.



-Original Message-
From: Larry Maturo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 20, 2001 9:11 AM
To: [EMAIL PROTECTED]
Subject: Back Button in Struts


How do you implement a generic back button in 
struts such that it hits the Action Class?  When  
you use something like:
Back

You go back to the jsp, but miss the Action Class,
which is often a bad thing.

-- Larry Maturo



RE: Reuse of JSPs

2001-08-20 Thread nicolas bonvin

if I understand correctly what you'd like to achieve, one way to do it would
be to use the Templates or Tiles tag library:

- you setup one template: /CarMenu.jsp with the reusable HTML code :
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>


...





- you use one jsp page for selectRentalCar aka /SelectRentalCar.jsp which
simply uses the CarMenu template and provide it with the appropriate message
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>

selectRentalCar text


- and you use another jsp page for addRentalCar (/AddRentalCar.jsp) which
also uses the CarMenu template
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>

addRentalCar text


it's good practice to store your templates under the WEB-INF/ path to
prevent direct access from browser requests (internal access from Servlets
or JSPs will still work, though).

nicolas b.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 20, 2001 11:12 PM
> To: [EMAIL PROTECTED]
> Subject: Reuse of JSPs
>
>
>
> I have a few JSPs for the app I am working on that are virtually
> identical.
> Boilerplate on them changes based on how you got to that screen.  I was
> thinking that I could have a single JSP in these cases, and
> determine which
> boilerplate is to be displayed by some kind of custom tag that evaluates
> the navigation.  My first thought is to use global forwards in the struts
> config, so for instance we have:
>
>   
> 
> 
> 
>
> So say the CarMenu jsp has some text on it that changes based on whether
> the user is choosing their first rental car for a trip or adding a
> subsequent rental car.  Stupid example, but bear with me ;-).
>
> Is there already a way within Struts for me to figure out from the JSP
> whether or not I came from a "selectRentalCar" or "addRentalCar"
> forwarding?  I've eyeballed the Struts bean tag, but can't find an example
> of its use to be sure if there is a Struts object on the request
> that I can
> expose to determine this value
>
> Alternatives?
>
> Jim
>




cannot find the datasource in struts?

2001-08-20 Thread Manish Pandya

a newbie in using struts...
kindly let me know what i should be doing to define a datasource..
i have the struts-config.xml file where i defined the datasource
parameters...
and now i m trying to run the example provided in the struts
but it is throwing error javax.sql.DataSource not found...

is there anything that i m missing? let me know please...




RE: Back Button in Struts

2001-08-20 Thread MacKellar, Kimberly

Where do you need to set these header values (Action, ActionServlet...)?  I
added them to my Action classes and it doesn't seem to do anything.

Kim MacKellar

-Original Message-
From: Pete Gordon [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 11:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


You can also look at putting in the Expires HTTP Header parameter to force
the client to hit the server each time.  This forces the back button to go
back to the webserver.

//These Response Headers prevent Client side cache of web pages
//response.setHeader("Cache-Control", "no-cache");  // don't do
this -- prevents back button
//response.setHeader("Pragma", "no-cache"); //
don't do this -- prevents back button
response.setHeader("Expires", "0");


Pete Gordon

-Original Message-
From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


You can't really use the javascript:history.back() function to hit the
Action class as the history.back does not even hit the webserver.  It is an
internal "client" operation, like most javascript is.

One solution you might want to try is to create a stack object for each
session to track what "actions" they have run.  Then you can implement a
fairly decent "back" button.

Haven't done this myself, but know of another project that has.



-Original Message-
From: Larry Maturo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 20, 2001 9:11 AM
To: [EMAIL PROTECTED]
Subject: Back Button in Struts


How do you implement a generic back button in 
struts such that it hits the Action Class?  When  
you use something like:
Back

You go back to the jsp, but miss the Action Class,
which is often a bad thing.

-- Larry Maturo



RE: Reuse of JSPs

2001-08-20 Thread Larry Maturo

You can add a parameter to the global-forwards, and then
check for it.  For example:
  




and then use, in the action class:

if(request.getParameter("where").equals("select")) {
   // something; }
else if(request.getParaneter("where".equals("add")) {
   etc.
}

-- Larry Maturo

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 4:12 PM
To: [EMAIL PROTECTED]
Subject: Reuse of JSPs



I have a few JSPs for the app I am working on that are virtually identical.
Boilerplate on them changes based on how you got to that screen.  I was
thinking that I could have a single JSP in these cases, and determine which
boilerplate is to be displayed by some kind of custom tag that evaluates
the navigation.  My first thought is to use global forwards in the struts
config, so for instance we have:

  




So say the CarMenu jsp has some text on it that changes based on whether
the user is choosing their first rental car for a trip or adding a
subsequent rental car.  Stupid example, but bear with me ;-).

Is there already a way within Struts for me to figure out from the JSP
whether or not I came from a "selectRentalCar" or "addRentalCar"
forwarding?  I've eyeballed the Struts bean tag, but can't find an example
of its use to be sure if there is a Struts object on the request that I can
expose to determine this value

Alternatives?

Jim





Reuse of JSPs

2001-08-20 Thread JEWeaver


I have a few JSPs for the app I am working on that are virtually identical.
Boilerplate on them changes based on how you got to that screen.  I was
thinking that I could have a single JSP in these cases, and determine which
boilerplate is to be displayed by some kind of custom tag that evaluates
the navigation.  My first thought is to use global forwards in the struts
config, so for instance we have:

  




So say the CarMenu jsp has some text on it that changes based on whether
the user is choosing their first rental car for a trip or adding a
subsequent rental car.  Stupid example, but bear with me ;-).

Is there already a way within Struts for me to figure out from the JSP
whether or not I came from a "selectRentalCar" or "addRentalCar"
forwarding?  I've eyeballed the Struts bean tag, but can't find an example
of its use to be sure if there is a Struts object on the request that I can
expose to determine this value

Alternatives?

Jim




RE: Displaying a hashmap through html:options

2001-08-20 Thread Rey Francois


Have a look at the following messages which discuss the addition of such
feature.
In this message you'll find some source code that can help you until
hopefully this gets into the commons.
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02804.html

Fr.

http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02864.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02863.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02849.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02847.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02843.html

http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02805.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02804.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02802.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02801.html


-Original Message-
From: Will Jaynes [mailto:[EMAIL PROTECTED]]
Sent: 15 August 2001 13:36
To: [EMAIL PROTECTED]
Subject: Re: Displaying a hashmap through html:options


The options tag doesn't permit the use of a Hashmap. A Hashmap is not
actually a
Collection, since it doesn't implement the Collection interface. Perhaps
this
utility is a possible enhancement for the options tag.

- Original Message -
From: "Ganendran Kumaraswamy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 4:45 AM
Subject: Displaying a hashmap through html:options


I have created and set a hashmap called "hm" in the request object in my
action class.  Action class forwards it to a JSP page. In the JSP page, I
have the following line to get the bean into the page.



I am trying to populate the options tag using the data in the hashmap. I
want the keys of the hashmap to be the value of the  tag in html and
the value of the hashmap to be the displayed text.

Currently I have something like,





This doesnt seem to work.  Any ideas ?





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




bluestone trail 4

2001-08-20 Thread Tamanaei, ITS PersWi C500, DA

I tried bluestone tutorial. 
the jsp is simple: 

<%@ page language="java" %> 
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %> 
 
 
 

I got the following exception: 
"javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection "


Thanks for any help! 
Ebi




 <> 


Error: 500
Location: /logon/logon.jsp
Internal Servlet Error:

javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans 
collection
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at 
_0002flogon_0002ejsplogon_jsp_0._jspService(_0002flogon_0002ejsplogon_jsp_0.java:195)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

Root cause: 
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans 
collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:773)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
at 
_0002flogon_0002ejsplogon_jsp_0._jspService(_0002flogon_0002ejsplogon_jsp_0.java:68)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)




Dynamic form generation.

2001-08-20 Thread Sastry Varanasi

I am trying to use dynamically generated forms with Struts. Since the form 
is dynamic I will not know the form fields until runtime. How do I define 
my FormActionbean in this case? Is there a  way to circumvent the 
requirement of having a Bean for holding the form data? Can anyone help me 
out with some ideas on this?

Thanks,
Sastry.

Sastry Varanasi
Tel : 408-526-6278
INSMBU, Cisco Systems





Interate - ideas?

2001-08-20 Thread Rodrigo Zerlotti

Sorry if it is too basic, but i am new on struts...

I have an interate:


   do something


multiCity is a vector...

Suppose I want to display on a table only 2 at the time, I make offset="0"
and lenght="2", how do I repeat the loop without repeating the logic iterate
for [2,2} and [4,2], or in other words, how can I set the offset/length on
the fly? It is the same question for all struts tags, I can never use <%'s
to modify values of the tags... - of course I may be missing something

TIA

-
Regards,

Rod~




RE: Tiles && Struts

2001-08-20 Thread Trieu, Danny

nick,

you are rock:) thanks you so much ... it's works for me now ... I am
rock

danny

-Original Message-
From: nicolas bonvin [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 10:53 AM
To: [EMAIL PROTECTED]
Subject: RE: Tiles && Struts


I had the same problem until I started from "scratch" with a clean tomcat +
jaxp configuration.
I think there was an XML parsing problem using an appropriate version of
jaxp.

let's try this:
1) unpack tomcat4.0b07 into a $TOMCAT_HOME
2) copy $TOMCAT_HOME/jasper/jaxp.jar and $TOMCAT_HOME/jasper/crimson.jar
into $TOMCAT_HOME/lib
3) copy the tiles-webapps into $TOMCAT_HOME/webapps
4) make sure your CLASSPATH is minimal (contains just .; (Win) or .: (Unix)
is the best)
4) start tomcat and go to http://localhost:8080/tiles-doc

if it works, try your custom application.
otherwise let me(us) know.

cheers,

nicolas b.

> -Original Message-
> From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 20, 2001 6:53 PM
> To: '[EMAIL PROTECTED]'
> Subject: Tiles && Struts
>
>
> Craig,
>
> I found Tiles to be very interesting.  However, I have a few question
> regarding Tiles, that I hope you can help me with or point me to some
> sources that I can get my answer from.
>
> My question is I wrote a simple Tiles jsp, and verything work fine till I
> introduced the Definition feature of Tiles and I got this exception:
>
> javax.servlet.ServletException: Can't get definitions factory
> from context.
>
> This happens the same when I tried to deploy and run the 3 sample apps the
> bundled with the distribution I downloaded.  I am run
> tomcat4.0b07+Struts1.0+Tiles
>
> I emailed Cedric Dumoulin Cedric Dumoulin ([EMAIL PROTECTED]) but haven't
> heard form him.  Please let me know of any list or people that I can ask
> question related to Tiles.
>
> Thanks,
>
> danny
>
> ps. here is the stacktrace:
>
> javax.servlet.ServletException: Can't get definitions factory
> from context.
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(Page
> ContextImp
> l.java:452)
> at
> org.apache.jsp._0002fcommon_0002fbasicPage_jsp._jspService(_0002fc
> ommon_0002
> fbasicPage_jsp.java:127)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Jsp
> Servlet.ja
> va:201)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> pplication
> FilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> onFilterCh
> ain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> erValve.ja
> va:243)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardConte
> xtValve.ja
> va:215)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 66)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authent
> icatorBase
> .java:472)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> e.java:164
> )
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 66)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
> Valve.java
> :163)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.connector.

Re: "default action" and templates

2001-08-20 Thread Marcelo Vanzin

Gordon Reynolds wrote:
> I might misunderstand your intention, but could you implement your 'default'
> code as a scriptlet in a template that you reuse for the display of your web
> pages?

Actually all the options suggested would solve my doubt. :-) Thanks guys!

I think I'll go with the subclass/"realPerform"/postPerform way, which 
will help me with another thing I was thinking about.

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
"We're an underground revolution working overtime"




RE: Antw: Re: Error 500 : No action instance could be created

2001-08-20 Thread Toni Charlot

It sounds as if Apache is not forwarding the *.do request at all.  You may
have to modify your httpd.conf file to add the following:

JkMount /*.do ajp13

depending on the version of Tomcat you're using.  I haven't try this myself,
so it's probably worth a try.

good luck.

-Original Message-
From: Marion Schwarz [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 11:33 AM
To: [EMAIL PROTECTED]
Subject: Antw: Re: Error 500 : No action instance could be created


>>if your action class is not being reached, it makes me think that the
action
>>servlet is not configured properly.  do you have the action servlet mapped
>>to the *.do extension inside web.xml?  it should look like this:


   action
   *.do


Yes, my web.xml looks like this.


>>Maybe you
>>have the wrong package name and/or class name in struts-config.xml ? You
>>should check this.

 
 
 
 

>>is "thisandthat_action" really your action class?

Yes, "thisandthat_action" is really my action class, extending Action. Or
should it be ActionServlet ??
I merely copied a struts example and changed some names.

>>including more of the relevant code makes solving these problems easier
and
>>quicker...

There is no more code to it, is there ?









RE: Tiles && Struts

2001-08-20 Thread nicolas bonvin

I had the same problem until I started from "scratch" with a clean tomcat +
jaxp configuration.
I think there was an XML parsing problem using an appropriate version of
jaxp.

let's try this:
1) unpack tomcat4.0b07 into a $TOMCAT_HOME
2) copy $TOMCAT_HOME/jasper/jaxp.jar and $TOMCAT_HOME/jasper/crimson.jar
into $TOMCAT_HOME/lib
3) copy the tiles-webapps into $TOMCAT_HOME/webapps
4) make sure your CLASSPATH is minimal (contains just .; (Win) or .: (Unix)
is the best)
4) start tomcat and go to http://localhost:8080/tiles-doc

if it works, try your custom application.
otherwise let me(us) know.

cheers,

nicolas b.

> -Original Message-
> From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 20, 2001 6:53 PM
> To: '[EMAIL PROTECTED]'
> Subject: Tiles && Struts
>
>
> Craig,
>
> I found Tiles to be very interesting.  However, I have a few question
> regarding Tiles, that I hope you can help me with or point me to some
> sources that I can get my answer from.
>
> My question is I wrote a simple Tiles jsp, and verything work fine till I
> introduced the Definition feature of Tiles and I got this exception:
>
> javax.servlet.ServletException: Can't get definitions factory
> from context.
>
> This happens the same when I tried to deploy and run the 3 sample apps the
> bundled with the distribution I downloaded.  I am run
> tomcat4.0b07+Struts1.0+Tiles
>
> I emailed Cedric Dumoulin Cedric Dumoulin ([EMAIL PROTECTED]) but haven't
> heard form him.  Please let me know of any list or people that I can ask
> question related to Tiles.
>
> Thanks,
>
> danny
>
> ps. here is the stacktrace:
>
> javax.servlet.ServletException: Can't get definitions factory
> from context.
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(Page
> ContextImp
> l.java:452)
> at
> org.apache.jsp._0002fcommon_0002fbasicPage_jsp._jspService(_0002fc
> ommon_0002
> fbasicPage_jsp.java:127)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Jsp
> Servlet.ja
> va:201)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> pplication
> FilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> onFilterCh
> ain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> erValve.ja
> va:243)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardConte
> xtValve.ja
> va:215)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 66)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authent
> icatorBase
> .java:472)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> e.java:164
> )
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 66)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
> Valve.java
> :163)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProce
> ssor.java:
> 1000)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
> .java:1093
> )
> at java.lang.Thread.run(Thread.java:484)
>
> Root Cause:
>
> javax.servlet.jsp.JspException: 

Re: Tiles && Struts

2001-08-20 Thread Matt Raible

This error is caused because you are calling the wrong ActionServlet, in
web.xml, replace  with the one below, and add the init-params.

You will also need to make sure that all the commons*.jar packages are in your
WEB-INF lib directory.

After doing this, the only error I am getting is:

java.io.FileNotFoundException: ...\WEB-INF\tilesDefinitions_en.xml (The system
cannot find the file specified)

java.io.FileNotFoundException: ...\WEB-INF\tilesDefinitions_en_US.xml (The
system cannot find the file specified)

Anyone know how to get rid of these?

   
org.apache.struts.tiles.ActionComponentServlet 

  definitions-config
  /WEB-INF/tilesDefinitions.xml


  definitions-debug
  1


--- "Trieu, Danny" <[EMAIL PROTECTED]> wrote:
> Craig,
> 
> I found Tiles to be very interesting.  However, I have a few question
> regarding Tiles, that I hope you can help me with or point me to some
> sources that I can get my answer from.  
> 
> My question is I wrote a simple Tiles jsp, and verything work fine till I
> introduced the Definition feature of Tiles and I got this exception:  
> 
> javax.servlet.ServletException: Can't get definitions factory from context.
> 
> This happens the same when I tried to deploy and run the 3 sample apps the
> bundled with the distribution I downloaded.  I am run
> tomcat4.0b07+Struts1.0+Tiles
> 
> I emailed Cedric Dumoulin Cedric Dumoulin ([EMAIL PROTECTED]) but haven't
> heard form him.  Please let me know of any list or people that I can ask
> question related to Tiles.
> 
> Thanks,
> 
> danny
> 
> ps. here is the stacktrace:
> 
> javax.servlet.ServletException: Can't get definitions factory from context.
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:452)
> at
> org.apache.jsp._0002fcommon_0002fbasicPage_jsp._jspService(_0002fcommon_0002
> fbasicPage_jsp.java:127)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:201)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:243)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:215)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
> .java:472)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> )
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :163)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> 1000)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
> )
> at java.lang.Thread.run(Thread.java:484)
> 
> Root Cause:
> 
> javax.servlet.jsp.JspException: Can't get definitions factory from context.
> at
> org.apache.struts.taglib.

RE: referring to hashmap elements with struts...

2001-08-20 Thread Rey Francois


Have a look at the following messages which discuss the addition of such
feature.
In this message you'll find some source code that can help you until
hopefully this gets into the commons.
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02804.html

Fr.

http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02864.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02863.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02849.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02847.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02843.html

http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02805.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02804.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02802.html
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02801.html


-Original Message-
From: Andy Goldstein [mailto:[EMAIL PROTECTED]]
Sent: 15 August 2001 04:52
To: [EMAIL PROTECTED]
Subject: referring to hashmap elements with struts...


Hi there.

I have an Action that's tossing a very nice HashMap object at a Struts page.
Is there a way (using Struts) that I can refer to the individual values in
the Hash by using their keys?  I see how I would iterate (although I'm not
crazy about this functionality), but that's not what I'm interested in: I
need to be able to use the key/value pairs.  After all, isn't that what
makes a Hash so helpful?

Thanks,

Andy
[EMAIL PROTECTED]



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: Back Button in Struts

2001-08-20 Thread Pete Gordon

You can also look at putting in the Expires HTTP Header parameter to force
the client to hit the server each time.  This forces the back button to go
back to the webserver.

//These Response Headers prevent Client side cache of web pages
//response.setHeader("Cache-Control", "no-cache");  // don't do
this -- prevents back button
//response.setHeader("Pragma", "no-cache"); //
don't do this -- prevents back button
response.setHeader("Expires", "0");


Pete Gordon

-Original Message-
From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Back Button in Struts


You can't really use the javascript:history.back() function to hit the
Action class as the history.back does not even hit the webserver.  It is an
internal "client" operation, like most javascript is.

One solution you might want to try is to create a stack object for each
session to track what "actions" they have run.  Then you can implement a
fairly decent "back" button.

Haven't done this myself, but know of another project that has.



-Original Message-
From: Larry Maturo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 20, 2001 9:11 AM
To: [EMAIL PROTECTED]
Subject: Back Button in Struts


How do you implement a generic back button in 
struts such that it hits the Action Class?  When  
you use something like:
Back

You go back to the jsp, but miss the Action Class,
which is often a bad thing.

-- Larry Maturo



need help with struts installation

2001-08-20 Thread Chuck Carroll



Hi,
 
 I am a new user of the struts package 
and am using Tomcat 3.2.3 on Windows 2000 Professional with service pack 1.  I have tried to follow the directions on 
the installation of Tomcat, as well as that for struts.  “Normal” servlets and JSPs work just 
fine, so I think Tomcat is okay.  
The problem is with the struts-example from Jakarta.
 Before I install the struts package, I can 
start Tomcat with no errors.  After 
I install the struts package and start Tomcat, I get the message:
 Call 
org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,*.do/java.lang.String)
New 
org.apache.struts.webapp.example.User
Begin event threw exception
java.lang.ClassNotFoundException: 
org.apache.struts.webapp.example.User
    
at …
When doing …/struts-documentation, everything 
seems to be okay.
When doing …/struts-example, I get the 
message:
Error: 500
Location: /struts-example/index.jsp
Internal Servlet Error:javax.servlet.ServletException: Missing message for key index.title    at … However, …/struts-exercise-taglib works for the BEAN Tags and LOGIC Tags but fails on the HTML Tags with the message:
 Error: 500
Location: 
/struts-exercise-taglib/index.jsp
Internal Servlet Error:javax.servlet.ServletException: Exception creating bean of class org.apache.struts.webapp.exercise.TestBean: java.lang.ClassNotFoundException: org.apache.struts.webapp.exercise.TestBean
I am obviously doing something wrong, but can’t 
figure out what it is.  Any help 
would be very much appreciated.  
Thank you.
Chuck 
Carroll


Tiles && Struts

2001-08-20 Thread Trieu, Danny

Craig,

I found Tiles to be very interesting.  However, I have a few question
regarding Tiles, that I hope you can help me with or point me to some
sources that I can get my answer from.  

My question is I wrote a simple Tiles jsp, and verything work fine till I
introduced the Definition feature of Tiles and I got this exception:  

javax.servlet.ServletException: Can't get definitions factory from context.

This happens the same when I tried to deploy and run the 3 sample apps the
bundled with the distribution I downloaded.  I am run
tomcat4.0b07+Struts1.0+Tiles

I emailed Cedric Dumoulin Cedric Dumoulin ([EMAIL PROTECTED]) but haven't
heard form him.  Please let me know of any list or people that I can ask
question related to Tiles.

Thanks,

danny

ps. here is the stacktrace:

javax.servlet.ServletException: Can't get definitions factory from context.
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
at
org.apache.jsp._0002fcommon_0002fbasicPage_jsp._jspService(_0002fcommon_0002
fbasicPage_jsp.java:127)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:472)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1000)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
)
at java.lang.Thread.run(Thread.java:484)

Root Cause:

javax.servlet.jsp.JspException: Can't get definitions factory from context.
at
org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(InsertTag.jav
a:589)
at
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:442
)
at
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:399)
at
org.apache.jsp._0002fcommon_0002fbasicPage_jsp._jspService(_0002fcommon_0002
fbasicPage_jsp.java:65)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doF

RE: Unsubscribe me!

2001-08-20 Thread Craig R. McClanahan



On Mon, 20 Aug 2001, Vince Davis wrote:

> Ditto. Does the email administrator ever read this list ever??? And yes,
> I followed the instructions!
> ("[EMAIL PROTECTED]").Doesn't work.
> 

This works for the STRUTS-DEV list ... it is
[EMAIL PROTECTED] for the user list.

The most common problem is that you attempt this from an email address
other than the one you subscribed under.  The response you get back tells
you how to unsubscribe from an alternate address.

Craig




RE: Back Button in Struts

2001-08-20 Thread Kyle Robinson

You can't really use the javascript:history.back() function to hit the
Action class as the history.back does not even hit the webserver.  It is an
internal "client" operation, like most javascript is.

One solution you might want to try is to create a stack object for each
session to track what "actions" they have run.  Then you can implement a
fairly decent "back" button.

Haven't done this myself, but know of another project that has.



-Original Message-
From: Larry Maturo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 20, 2001 9:11 AM
To: [EMAIL PROTECTED]
Subject: Back Button in Struts


How do you implement a generic back button in 
struts such that it hits the Action Class?  When  
you use something like:
Back

You go back to the jsp, but miss the Action Class,
which is often a bad thing.

-- Larry Maturo



RE: Unsubscribe me!

2001-08-20 Thread Vince Davis

Sorry. I cut and pasted the wrong email address. Yes, I've used the
"[EMAIL PROTECTED]". Any other suggestions?

-Original Message-
From: Mills, Theo [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 9:12 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unsubscribe me!


you realize this is the struts-user list, and not the struts-dev list?

maybe [EMAIL PROTECTED] would work?

dunno if that's your problem or not.  :)

-Original Message-
From: Vince Davis [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 11:12 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unsubscribe me!


Ditto. Does the email administrator ever read this list ever??? And yes,
I followed the instructions!
("[EMAIL PROTECTED]").Doesn't work.

-Original Message-
From: Rehana Sheikh (Contractor) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 6:32 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unsubscribe me!


Me too...and it doesn't work?!?

-Original Message-
From: Gurvits, Alexander [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2001 13:48
To: [EMAIL PROTECTED]
Subject: Unsubscribe me!


Automated Unsubscribe does not work!!!

Alex Gurvits
Brinson Advisors
Application Developer
212 882-5035



RE: Unsubscribe me!

2001-08-20 Thread Mills, Theo

you realize this is the struts-user list, and not the struts-dev list?

maybe [EMAIL PROTECTED] would work?

dunno if that's your problem or not.  :)

-Original Message-
From: Vince Davis [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 11:12 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unsubscribe me!


Ditto. Does the email administrator ever read this list ever??? And yes,
I followed the instructions!
("[EMAIL PROTECTED]").Doesn't work.

-Original Message-
From: Rehana Sheikh (Contractor) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 6:32 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unsubscribe me!


Me too...and it doesn't work?!?

-Original Message-
From: Gurvits, Alexander [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2001 13:48
To: [EMAIL PROTECTED]
Subject: Unsubscribe me!


Automated Unsubscribe does not work!!!

Alex Gurvits
Brinson Advisors
Application Developer
212 882-5035



Back Button in Struts

2001-08-20 Thread Larry Maturo

How do you implement a generic back button in 
struts such that it hits the Action Class?  When  
you use something like:
Back

You go back to the jsp, but miss the Action Class,
which is often a bad thing.

-- Larry Maturo




Re: bean:message tag

2001-08-20 Thread Matt Raible

The problem is that my image changes depending on the error message - so I need
a way of determining which image to display.

Oh well, I do everything from the design to the Action servlets, and stop
before the EJBs - so I guess it's only really a concern if someone else was
doing the design.

Matt

--- Thomas Quas <[EMAIL PROTECTED]> wrote:
> 
> Matt,
> 
> what I'm currently doing is something like this: In, say, x.jsp I write
> 
> ...
>  class="feedback">
>   
>   
>   
> 
> 
> 
> whereas in AppRes.properties I have
> 
> login.error.1=...
> login.error.2=...
> 
> 
> Yeah, it is rather uncomfortable--and only necessary if you really need
> to have support for i18n--but I can be sure that after a designer
> changed the page design there are no disturbing effects coming from my
> language definitions. The designer can concentrate on the .jsp file and
> does not need to care about language--in the ideal case ;-)
> 
> The same concept should work for your table header definitions.
> 
> 
> tom
> 
> 
> Matt Raible wrote:
> > 
> > Tom - it seems that you are correct, my html does show up correctly.
> > 
> > The reason I have html in my properties file is because I want to display
> > certain images with my messages.
> > 
> > Let's take the following key for example:
> > 
> > error.password.mismatch= height="20">   > src="/dc/common/images/iconWarning.gif" width="12" height="12"
> > align="absmiddle" alt="Warning">  Invalid username and/or
> password,
> > please try again.
> > 
> > I can probably move ... into my jsp page, but I'm already
> > using error.header and error.footer with html, so this seemed natural:
> > 
> > errors.header= width="100%">
> > errors.footer=
> > 
> > I could probably also parameterize my  so that this could be a
> > different key in my properties file, but then I'd have to add a little more
> > code to my action classes (or validation.xml file).
> > 
> > This brings up another point - I wish I could dynamically set the path to
> my
> > image, using a scriptlet or  tag, meaning replace "/dc/common"
> with
> > "<%=pathToImages%>" - but doesn't seem to work.
> > 
> > We get all our static files through the webserver (vs. appserver) - that's
> why
> > I can't get it from the war.
> > 
> > Matt
> > 
> > --- Thomas Quas <[EMAIL PROTECTED]> wrote:
> > >
> > > Matt,
> > >
> > > I'm not sure whether I understood the problem correctly, but I did the
> > > same thing for a while, and it worked for me without "flush" or other
> > > tricks. I simply included the message via , not
> > > matter whether there was HTML in it or not.
> > >
> > > Note, however, that it can be problematic to mix layout and content
> > > information. This was the big disadvantage of HTML, and people tried to
> > > address it with XML and stylesheets, making the two independent of each
> > > other. I'd recommend putting layout information, such as , , 
> > > etc. in the .jsp, whereas the .properties file should only contain
> > > content. This way your translators don't need to know HTML. Of course,
> > > we might open up another can of worms here if we don't have the same
> > > page layout for all languages.
> > >
> > >
> > > Just my $0.02, tom
> > >
> > >
> > > Matt Raible wrote:
> > > >
> > > > I am using  and I want to have HTML in
> my
> > > > key.name string, such as:
> > > >
> > > > key.name=Hello World
> > > >
> > > > So ideally, I could make my tag resemble  > > > flush="true" />, but there is no filter attribute on this tag?
> > > >
> > > > How can I do this, do I have to use , and if so, how do I
> get
> > > the
> > > > messages bean?
> > > >
> > > > Can it be done using:
> > > >
> > > > 
> > > >
> > > > Thanks,
> > > >
> > > > Matt
> > > >
> > > > __
> > > > Do You Yahoo!?
> > > > Make international calls for as low as $.04/minute with Yahoo!
> Messenger
> > > > http://phonecard.yahoo.com/
> > >
> > > --
> > > thomas quas| "Art lies in the consciousness of doing the thing,
> > > [EMAIL PROTECTED]  |  in the attention of the happening[...]"
> > >|-- Allen Ginsberg --
> > 
> > __
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > http://phonecard.yahoo.com/
> 
> -- 
> thomas quas| "Art lies in the consciousness of doing the thing,
> [EMAIL PROTECTED]  |  in the attention of the happening[...]"
>|-- Allen Ginsberg --


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



RE: Unsubscribe me!

2001-08-20 Thread Vince Davis

Ditto. Does the email administrator ever read this list ever??? And yes,
I followed the instructions!
("[EMAIL PROTECTED]").Doesn't work.

-Original Message-
From: Rehana Sheikh (Contractor) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 6:32 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unsubscribe me!


Me too...and it doesn't work?!?

-Original Message-
From: Gurvits, Alexander [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2001 13:48
To: [EMAIL PROTECTED]
Subject: Unsubscribe me!


Automated Unsubscribe does not work!!!

Alex Gurvits
Brinson Advisors
Application Developer
212 882-5035



RE: MS SQL JDBC Drivers?

2001-08-20 Thread Kevin McLain

Inet Software makes some really good JDBC drivers. I have used Inet Opta
2000 before and I was very impressed with its performance and specification
conformance. www.inetsoftware.de

-Original Message-
From: Mikkel Bruun [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 3:05 AM
To: '[EMAIL PROTECTED]'
Subject: OT: MS SQL JDBC Drivers?


Hi Guys,

A little of topic, but anyways...

On a current project we will be running an webapp on Solaris, using
Iplanet...

Our application needs to connect to a MS Sql 7.0 running on a win 2k
server...

can you recommend any jdbc drivers???

thanks a lot...

::
  Mikkel Bruun
  Senior IT Developer
  [EMAIL PROTECTED]
  Direct: +45 32 88 22 73

  Valtech A/S
  Kanonbaadsvej 10
  DK-1437 Copenhagen
  Tel  +45 32 88 20 00
  Fax +45 32 88 20 20





Re: method reflection in action classes

2001-08-20 Thread Craig R. McClanahan



On Mon, 20 Aug 2001, Ted Husted wrote:

> A very good example of coding this sort of thing is the DispatchAction
> class in the Struts Action package.
> 
> http://jakarta.apache.org/struts/api/org/apache/struts/actions/DispatchAction.html
> 
> If you are worried about performance, it would be very easy to use
> DispatchAction to combine several of your existing Actions together, and
> then use jMeter to run some load tests. At this time, things like the
> cost of reflection can be vary by setup. 
> 

In modern JVMs (1.3 and later), reflection costs are lower than ever
before -- to the point where they are usually not noticeable compared to
database and network latencies.  Even if they become an issue, it's purely
CPU time, so that is relatively easy to fix.

If you write apps that use EJBs, you're doing a *ton* of Java reflection
behind the scenes already.  In general, I wouldn't worry about it,
especially if it helps you maintain a cleaner and more maintainable
application architecture.

Craig


> 
> Jon Brisbin wrote:
> > 
> > I use a BaseAction class that does all my normal struts stuff like setting
> > the request, doing authentication checking, managing the object cache,
> > etc...and have been contemplating implementing this architecture:
> > 
> > In my form, I already use an "action" variable that tells me what i'm doing
> > in my action class...probably the way most folks do it...but I'd like to
> > have an action variable that might be like:
> > "addSomething,addAnother,editSomethingElse"...the action class would then
> > reflect those methods and call them in order...that way my "real" action
> > classes only subclass my base class and implement any of the methods i
> > choose to call from the action variable...i use object-wide variables for
> > stuff like the request, mapping, etc...
> > 
> > my question, though, is if this would violate any major design concepts, or
> > introduce an unweildy performance bottleneck in my action classes...i
> > already use reflection in my form validation code, but that's just
> > getReadMethod stuff, so no big deal...i was wondering if anyone has
> > experience with all-around performance with reflection in action classes??
> > i know someone posted a while back that they had done some testing and found
> > an insignificant difference between static method calls and reflected stuff,
> > but i didn't know what *types* of reflection that entailed...i would
> > basically have to do a lot of getMethod()s, which i've heard can be quite
> > expensive...
> > 
> > any thoughts/help would be appreciated! :-)
> > 
> > Jon Brisbin
> > www.jbrisbin.net
> 




Antw: Re: Error 500 : No action instance could be created

2001-08-20 Thread Marion Schwarz

>>if your action class is not being reached, it makes me think that the action 
>>servlet is not configured properly.  do you have the action servlet mapped 
>>to the *.do extension inside web.xml?  it should look like this:


   action
   *.do


Yes, my web.xml looks like this.


>>Maybe you
>>have the wrong package name and/or class name in struts-config.xml ? You
>>should check this.

 
 
 
 

>>is "thisandthat_action" really your action class?

Yes, "thisandthat_action" is really my action class, extending Action. Or should it be 
ActionServlet ??
I merely copied a struts example and changed some names.

>>including more of the relevant code makes solving these problems easier and 
>>quicker...

There is no more code to it, is there ?





rwbarnes@home.com

2001-08-20 Thread Mr Roger Barnes

unsubscribe [EMAIL PROTECTED]

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: Validator::validate() reflection - null

2001-08-20 Thread David Winterfeldt

I didn't think it would cause a problem.  I'll look
over it again.  If a field is of type int, you don't
need to validate to see if it is an int.  Also if you
have a field defined as an int, then you don't know if
someone entered something bad because you will always
get the default value of the field.  So on the
ActionForm level it is good to preserve the user's
input so if it fails validation you can return the
value the user entered so it can be corrected.  So an
ActionForm normally uses Strings except for
checkboxes, radio buttons, and select boxes where you
know the user can't enter anything bad.  Then you can
have a bean with all the correct types (int, Date,
etc.), and convert the ActionForm's values to the
other bean.  There are a couple of transformation
packages posted to help with doing this type of
conversion between objects.  Here is the link.

http://www.husted.com/about/struts/resources.htm

David

--- Ho Soo Aun <[EMAIL PROTECTED]> wrote:
> I use Struts 1.0 and Tomcat 3.2.3
> 
> I looked at your validator example again and began
> to see that numeric fields
> in form are defined in String.
> I deduce the problem is in my design. My Meter bean
> has meter1 of type 'int'
> The getMeter1 returns 'int' and setMeter1 has 'int'
> in signature.
> 
> It works without valdiation (as in
> struts-exercise-taglib) so I didnt think it
> could cause problem with Validator.
> 
> Am I right?
> 
> SooAun
> 
> David Winterfeldt wrote:
> 
> > What version of struts are you using?  Struts 1.0?
> > Also what servlet container and version are you
> using?
> >
> > David
> >
> > --- Ho Soo Aun <[EMAIL PROTECTED]> wrote:
> > > Had I missed any step?
> > > Been trying to implement David's Struts
> Validator
> > > for quite a while.
> > >
> > > Every time I access a editmeter.jsp through an
> > > action which populate the
> > > fields.
> > > Tomcat 3.2.2 console show 
> "Validator::validate()
> > > reflection - null"
> > > twice
> > > Enter char in int field (to be validate) is
> saved as
> > > '0'. No validation
> > > was done.
> > > There was no other error message on browser or
> log
> > > file.
> > >
> > > # 1  Got Struts_Validator-20010702.jar in
> > > WEB-INF/lib
> > >
> > > # 2  Got jakarta-regexp-1.2.jar in WEB-INF/lib
> > >
> > > # 3  Set this in web.xml
> > > 
> > > validator
> > >
> > >
> >
>
com.wintecinc.struts.action.ValidatorServlet
> > >
> > > 
> > >   config
> > >
> > >
> /WEB-INF/validation.xml
> > > 
> > > 
> > >   debug
> > >   2
> > > 
> > > 2
> > >   
> > > # 4  In struts-config.xml
> > >   > >type="sg.com.trek.mims5.meter.MeterAction"
> > >name="meterForm"
> > >input="editmeter.jsp"
> > >scope="request"
> > >validate="true">
> > >path="/editmeter.jsp"/>
> > >  
> > >
> > > # 5 In addition to  setting in
> > > validation.xml
> > > #add a form and one to test
> > >
> > > 
> > >   > >   depends="required,integer">
> > >key="meterForm.integer.displayname"/>
> > >  
> > > 
> > >
> > >
> > > # 6 In editmeter.jsp
> > >  name="meterForm"
> > > type="sg.com.trek.mims5.meter.MeterForm"
> > > focus="copierid"
> > > onsubmit="return validateMeterForm(this);">
> > > ...
> > >  > > key="meter.label.meter1"/>:
> > >   name="meterForm"
> > > property="meter.meter1" size="7"
> > > maxlength="7"/>
> > >  
> > > 
> > > ...
> > >   > > property="action"
> > > value="Update"
> > >
> >
>
onclick="bCancel=false;">ENTER  > > onclick="bCancel=true;javascript:window.close()"
> > > value="Cancel">CANCEL
> > >
> > > # 7 In Meterform.java
> > > import
> com.wintecinc.struts.action.ValidatorForm;
> > >
> > > import sg.com.trek.mims5.business.Meter;
> > >
> > > public final class MeterForm extends
> ValidatorForm
> > > implements
> > > Serializable {
> > >
> > >  private String action = "Edit";
> > >  /**
> > >   * Member variable declaration
> > >   */
> > >  private Meter meter = null;
> > >
> > >  public Meter getMeter() {
> > >   if ( meter == null) {
> > >meter = new Meter();
> > >   }
> > >   return meter;
> > >  }
> > > ..
> > >
> > > # 8 Getter and setter for field meter1 are in
> Meter
> > > bean
> > >
> > >
> > > Any one help
> > >
> > >
> > > Soo Aun
> > >
> >
> > __
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute
> with Yahoo! Messenger
> > http://phonecard.yahoo.com/
> 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: Can't find message Resources or DatabaseServlet

2001-08-20 Thread chuck amadi



Hi all , I have a MyApplicationResources at the following level .

wardens/WEB-INF/classes/org/breconbeacons/wardens/MyApplicationResources
wardens/WEB-INF/src/org/breconbeacons/wardens/MyApplicationResources

I have also declared the above path in my web.xml.and consructed a DatabaseServlet
in preparation for connection pooling . The path has also been set as above
and web.xml.

Note only the ActionServlet is set to org.

I intially used a dbTags (taglib) and evrything worked fine but i want to
subtract all the scriptlets out of my html code and utilise the html,form,base
and links tags that are availble
and make better presentation of the view jsp pages.

So why is my message resource missing as i have set the path as above and
not as below error.To MyApplicationResources - and amended  the DatabaseServlet
and message resource in the application web.xml file accordingly.

Any Suggstions - Cheers Chuck
[EMAIL PROTECTED]">
  Error: 500
  Location: /wardenswork/index.jsp
  Internal Servlet Error:
  javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
  
  
  
  
  


AW: SilverStream behind firewall

2001-08-20 Thread Stuber Urs

Thank you for your input! Unfortunately I still get the message

resolveEntity('null',
'file:///C:/WIN32APP/SilverStream37/bin/struts-config_1_0.dtd') Not
registered, use system identifier

after copy and paste your suggestion, and my app still doesn't work as soon
as I select something related to the struts-config file (e.g. a *.do
action). At least the app server doesn't hang anymore - after trying
"http://localhost/myDB/app/dtd/struts-config_1_0.dtd"; it completely refused
to restart and I had to erase the db and create a new one...

Not even the jakarta struts-example works. Today we had an external
specialist at our site. He could run the struts-example at his company,
using SilverStream, whenever they use a firewall there too, but he wasn't
able to get it running here. He tried another workaround which he was
teached in a SilverStream ePortal education, namely to put the DTD's into a
HelpDB and access them with a http://localhost... link, but after deploying
that (successfully) to the app server, the latter refuses to work again and
hangs after the resolveEntity message.

On the other hand we experience no problems with struts 0.5, using
action.xml without a DTD validation.

We've asked SilverStream support now. Do you have an idea why your
workaround works at your site, but not at ours?
Urs

> -Ursprüngliche Nachricht-
> Von:  Ryan Cornia [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Freitag, 17. August 2001 23:04
> An:   [EMAIL PROTECTED]
> Betreff:  Re: SilverStream behind firewall
> 
> I have the same problem with SilverStream 3.7.2.
> 
> My solution was to change the  DOCTYPE to -
> 
> 
> 
> Then put struts-config_1_0.dtd in the SilverStream37\bin directory. I'm
> not satisfied with this solution, but it's the best I could come up
> with... Let me know if you find a better solution.
> 
> 
> HTH,
> Ryan
> 
> >>> [EMAIL PROTECTED] 08/17/01 01:26PM >>>
> Hi
> 
> Like some other people before, I get the error 
> 
>  resolveEntity('-//Apache Software Foundation//DTD Struts
> Configuration 1.0//EN',
> 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd') 
>  Not registered, use system identifier
> 
> when I want to deploy a struts app, sitting behind a firewall. I've tried
> several possibilities which helped users with other app servers, but I
> was't
> able to get it running with SilverStream. Neither worked e.g. using
> "http://localhost:80/myDB/app/dtd/struts-config_1_0.dtd"; nor using
> "c://SilverStream37/Resources/DTDCatalog/struts-config_1_0.dtd". I tried
> to
> add a struts-config_1_0.dtd entry to the index.props file in the
> DTDCatalog
> directory, but this didn't help either.
> 
> Has anybody a solution which works with SilverStream (I use 3.7.3)? Or did
> I
> do something wrong?
> 
> Thanks
> Urs
> 
> 
> 
>>> Rentenanstalt/Swiss Life - Official Partner Expo.02 <<<



RE: Re[2]: Multiple input fields

2001-08-20 Thread SUPRIYA MISRA

Try using an Arraylist in your setter and getter instead of a string array. 
Also System.out the setters and getters to make sure they are being called.


>From: "Michael Terry" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: RE: Re[2]: Multiple input fields
>Date: Mon, 20 Aug 2001 15:32:02 +0100
>
>Kent -
>
>Can you give an example of how you did this? I used an ArrayList
>in my form, with one entry per select element in my form. This
>works fine when only single options can be selected, but I can't
>get it to work with 
>
>In my JSP I want to generate a variable number of multiple select
>boxes containing values taken from a Hashtable containing
>ArrayLists of beans (one entry in the Hashtable for each box):
>
>   <% int n = 0; %>
>   
> <%
>   prop = "attList[" + n + "]";
>   n++;
> %>
> 
> 
>   labelProperty="attValDes"/>
> 
>   
>
>In the associated form bean, I use an ArrayList named attList which will
>contain the variable number of String[] arrays of selected values passed
>back from my select boxes. So I have my getter and setter thus:
>
> public String[] getAttList(int idx) {
> return (String[])attList.get(idx);
> }
>
> public void setAttList(int idx, String[] keys) {
> attList.set(idx, keys);
> }
>
>But the problem is that this collapses in BeanUtils.populate with a
>type mismatch error:
>
>   javax.servlet.ServletException: BeanUtils.populate
>   at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:486)
>   Root cause:
>   java.lang.IllegalArgumentException: argument type mismatch
>   at java.lang.reflect.Method.invoke(Native Method)
>   at 
>org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.java:688)
>
>There is no problem when I remove the multiple=true from the select element
>and use the following:
>
> public String getAttList(int idx) {
> return (String)attList.get(idx);
> }
>
> public void setAttList(int idx, String key) {
> attList.set(idx, key);
> }
>
>I've already posted this problem once, but answer came there none.
>
>Michael
>
>-Original Message-
>From: Kent Roylance [mailto:[EMAIL PROTECTED]]
>Sent: Friday, August 17, 2001 2:50 AM
>To: [EMAIL PROTECTED]; Anthony Xin Chen
>Subject: RE: Re[2]: Multiple input fields
>
>
>Actually, you can do one better than that.  Just pass in beans to the
>form(can have collections in them), and that way you don't have to put a
>bunch of attributes and getter/setters in your form.  Of course you will
>need a getter for your bean that you put in your ActionForm.  As a result,
>my ActionForms are very thin, take advantage of reuseability, better
>performance, and alot less work.
>
>Learned trial and error on this one,
>
>Kent
>
>-Original Message-
>From: Anthony Xin Chen [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, August 16, 2001 6:48 PM
>To: SUPRIYA MISRA
>Subject: Re[2]: Multiple input fields
>
>
>Hello there,
>
>Although  I have not tried it personally, I read from the list that it
>can  be  done  if  your  ActionForm  provides  a  setter which takes a
>collection and a getter which returns a collection.
>
>
>Thursday, August 16, 2001, 5:03:15 AM, you wrote:
>
>SM> No the last category will overwrite the previous ones. You need to add
>an
>SM> integer to category.
>
>SM> <%int x= 0 ;%>
>SM> 
>SM> <%x++;%>
>SM>   " value="">
>
>SM> request.getParameterValues("category0")
>SM> request.getParameterValues("category1")
>
>SM> The best option is to loop it the value of x times;
>
>
> >>From: [EMAIL PROTECTED] (Andrew Myers)
> >>Reply-To: [EMAIL PROTECTED]
> >>To: [EMAIL PROTECTED]
> >>Subject: Multiple input fields
> >>Date: Thu, 16 Aug 2001 02:22:02 -0400
> >>
> >>Is it possible to have multiple input fields with the same name?
> >>
> >>Eg. In regular HTML I would do this
> >>
> >>
> >>
> >>
> >> 
> >>   Category
> >>   Description
> >> 
> >>
> >> 
> >>   
> >>   
> >> 
> >>
> >> 
> >>   
> >>   
> >> 
> >>
> >>...
> >>
> >>
> >>
> >>
> >>
> >>
> >>Then when access all the parameters by calling
> >>request.getParameterValues("category")
> >>Can ActionForm Beans handle multiple values with the same field name?  
>If
> >>so how is this achieved?
> >>
> >>Thanks,
> >>Andrew.
> >>
> >>
> >>__
> >>Your favorite stores, helpful shopping tools and great gift ideas.
> >>Experience the convenience of buying online with Shop@Netscape!
> >>http://shopnow.netscape.com/
> >>
> >>Get your own FREE, personal Netscape Mail account today at
> >>http://webmail.netscape.com/
> >>
>
>
>SM> _
>SM> Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
>
>
>
>--
>Best regards,
>  Anthony
>
>



RE: AW: MS SQL JDBC Drivers?

2001-08-20 Thread Robert Taylor

Matt,

I'm not sure if your statement refers to iPlanet app server or web server,
but we have used the JTurbo SQL Server Type 4 JDBC driver on iPlanet web
server running on Win2k without any issues.

robert

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 7:14 AM
To: [EMAIL PROTECTED]
Subject: Re: AW: MS SQL JDBC Drivers?



Mikkel - just to let you know - Merant are the only SQL Server JDBC drivers
that will work on iPlanet.

Matt


--- "Nimphy, Thomas" <[EMAIL PROTECTED]> wrote:
> I like the JDBC-Drivers from http://www.inetsoftware.de/
>
> Thomas
>
> -Urspr|ngliche Nachricht-
> Von: Mikkel Bruun [mailto:[EMAIL PROTECTED]]
> Gesendet am: Freitag, 17. August 2001 12:05
> An: '[EMAIL PROTECTED]'
> Betreff: OT: MS SQL JDBC Drivers?
>
> Hi Guys,
>
> A little of topic, but anyways...
>
> On a current project we will be running an webapp on Solaris, using
> Iplanet...
>
> Our application needs to connect to a MS Sql 7.0 running on a win 2k
> server...
>
> can you recommend any jdbc drivers???
>
> thanks a lot...
>
> ::
>   Mikkel Bruun
>   Senior IT Developer
>   [EMAIL PROTECTED]
>   Direct: +45 32 88 22 73
>
>   Valtech A/S
>   Kanonbaadsvej 10
>   DK-1437 Copenhagen
>   Tel  +45 32 88 20 00
>   Fax +45 32 88 20 20
>


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/





AW: Antw: Re: Error 500 : No action instance could be created

2001-08-20 Thread Bernhard J. Hirschmann

Hi Marion,

it sounds like you missed to declare your action in struts-config.xml. But
in your first posting you've written that you did the mapping... Maybe you
have the wrong package name and/or class name in struts-config.xml ? You
should check this.

>type="com.servlets.thisandthat_action">
> 
> 
> 

is "thisandthat_action" really your action class?

Best regards,

B.



> -Ursprungliche Nachricht-
> Von: Marion Schwarz [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 20. August 2001 16:01
> An: [EMAIL PROTECTED]
> Betreff: Antw: Re: Error 500 : No action instance could be created
>
>
> Hi Jon,
>
> my action class look just as you described.
> But I looked closer at the error message and discovered that it
> goes like this:
> 500 R< /thisandthat.do + null> No action instance...
>
> So it seems like the parameters don't go through !
> Still my action class doesn't even do a system.out.println, so I
> doubt that the request is passed on to the class correctly.
>
> Marion
>
>
>




unsubscribe me

2001-08-20 Thread Antonio Loureiro

sorry, but automated unsubscribe does't work


___
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
[EMAIL PROTECTED], 8MB Speicher, Verschluesselung - http://freemail.web.de





RE: Re[2]: Multiple input fields

2001-08-20 Thread Michael Terry

Kent -

Can you give an example of how you did this? I used an ArrayList
in my form, with one entry per select element in my form. This
works fine when only single options can be selected, but I can't
get it to work with 

In my JSP I want to generate a variable number of multiple select
boxes containing values taken from a Hashtable containing
ArrayLists of beans (one entry in the Hashtable for each box):

  <% int n = 0; %>
  
<%
  prop = "attList[" + n + "]";
  n++;
%>


  

  

In the associated form bean, I use an ArrayList named attList which will
contain the variable number of String[] arrays of selected values passed
back from my select boxes. So I have my getter and setter thus:

public String[] getAttList(int idx) {
return (String[])attList.get(idx);
}

public void setAttList(int idx, String[] keys) {
attList.set(idx, keys);
}

But the problem is that this collapses in BeanUtils.populate with a
type mismatch error:

  javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:486)
  Root cause: 
  java.lang.IllegalArgumentException: argument type mismatch
at java.lang.reflect.Method.invoke(Native Method)
at 
org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.java:688)

There is no problem when I remove the multiple=true from the select element
and use the following:

public String getAttList(int idx) {
return (String)attList.get(idx);
}

public void setAttList(int idx, String key) {
attList.set(idx, key);
}

I've already posted this problem once, but answer came there none.

Michael

-Original Message-
From: Kent Roylance [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 2:50 AM
To: [EMAIL PROTECTED]; Anthony Xin Chen
Subject: RE: Re[2]: Multiple input fields


Actually, you can do one better than that.  Just pass in beans to the
form(can have collections in them), and that way you don't have to put a
bunch of attributes and getter/setters in your form.  Of course you will
need a getter for your bean that you put in your ActionForm.  As a result,
my ActionForms are very thin, take advantage of reuseability, better
performance, and alot less work.

Learned trial and error on this one,

Kent

-Original Message-
From: Anthony Xin Chen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 6:48 PM
To: SUPRIYA MISRA
Subject: Re[2]: Multiple input fields


Hello there,

Although  I have not tried it personally, I read from the list that it
can  be  done  if  your  ActionForm  provides  a  setter which takes a
collection and a getter which returns a collection.


Thursday, August 16, 2001, 5:03:15 AM, you wrote:

SM> No the last category will overwrite the previous ones. You need to add
an
SM> integer to category.

SM> <%int x= 0 ;%>
SM> 
SM> <%x++;%>
SM>   " value="">

SM> request.getParameterValues("category0")
SM> request.getParameterValues("category1")

SM> The best option is to loop it the value of x times;


>>From: [EMAIL PROTECTED] (Andrew Myers)
>>Reply-To: [EMAIL PROTECTED]
>>To: [EMAIL PROTECTED]
>>Subject: Multiple input fields
>>Date: Thu, 16 Aug 2001 02:22:02 -0400
>>
>>Is it possible to have multiple input fields with the same name?
>>
>>Eg. In regular HTML I would do this
>>
>>
>>
>>
>> 
>>   Category
>>   Description
>> 
>>
>> 
>>   
>>   
>> 
>>
>> 
>>   
>>   
>> 
>>
>>...
>>
>>
>>
>>
>>
>>
>>Then when access all the parameters by calling
>>request.getParameterValues("category")
>>Can ActionForm Beans handle multiple values with the same field name?  If
>>so how is this achieved?
>>
>>Thanks,
>>Andrew.
>>
>>
>>__
>>Your favorite stores, helpful shopping tools and great gift ideas.
>>Experience the convenience of buying online with Shop@Netscape!
>>http://shopnow.netscape.com/
>>
>>Get your own FREE, personal Netscape Mail account today at
>>http://webmail.netscape.com/
>>


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



--
Best regards,
 Anthony





Re: patterns

2001-08-20 Thread Ted Husted

Well, now that you mention it ;-), I just put together a "catalog" of
Struts design patterns and strategies as a followup to a code review.
The first blush is available at 

http://husted.com/about/struts/resources.htm#new

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


> Rakesh wrote:
> 
> 
> Are there any regular Patterns you can make use in Struts ?
> 
> 
>  Rakesh Ayilliath
> (Software Engineer)
> 
> Synergy IT Innovations Pvt Ltd,
> #196, 1st Floor, 9th Cross,
> HMT Layout, RT Nagar
> Bangalore 560032
> 
> [EMAIL PROTECTED]



RE: Expresso integration with Struts now available - v4.0ea Released

2001-08-20 Thread Chuong Huynh

hi,

I can't access www.jcorporate.com site - it said i don't have permission...

Do I need to do something?

Thanks,
- Chuong
=
 HUYNH, N. CHUONG
 TMA Software Solutions, Vietnam
 Tel: (84-8) 990 3848 - Ext: 5272
 Email: [EMAIL PROTECTED]
=


> -Original Message-
> From: Flying Cloud [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 20, 2001 8:51 PM
> To: [EMAIL PROTECTED]
> Subject: Expresso integration with Struts now available - v4.0ea
> Released
> 
> 
> I wanted to let your guys know that Early access (ea) 
> Expresso 4.0 release
> is now available for download - which is fully integrated with Apache
> Jakarta Struts.  Expresso 4.0 is a big jump forward from 3.11, as the
> version number indicates, it includes a number of substantial 
> changes to the
> core API - mostly related to Controller objects, now that we are fully
> integrated with  Struts. Please see the release notes at
> http://www.jcorporate.com/doc/release.html. We look forward 
> to your comments
> and feedback...
> 
> With Release 4.0ea Expresso has made Controller objects 
> available to Struts
> as Actions, so the URL mapping, configuration, and other 
> great capabilities
> of Struts are available - with all of the advantages that 
> Expresso standard
> Web application functionality provides such as Controller 
> object, DBObjects
> (object-relational mapping), configuration management, 
> security, database
> connection pooling, email connectivity, job control, logging, event
> notification, caching, internationalization, and more. The Controller
> servlet (ActionServlet) still handles dispatching, then the specific
> Controller object provides the UI-independant business logic.
> 
> Expresso 4.0ea is intended as a release for users who want to 
> learn about
> the new features and assist in the quality assurance process and
> documentation - it is *not* ready for production use, and 
> problems should be
> expected at this stage. We'd very much appreciate bug reports 
> and input on
> this release - and this can be discussed here on the forums.
> 
> The 4.00ea version is available as a '-complete.jar' file - see the
> http://www.jcorporate.com/doc/expressocomplete.html file for 
> documentation
> about installing this version. The -complete version is bundled with
> Apache's Tomcat 4.0 b5, and includes doc, javadoc, and many 
> other things
> that you don't necessarily want in your own production release of an
> application - it also, however, includes the 'ant' build.xml 
> scripts to
> create other versions of Expresso, including fully binary 
> versions, .war
> files for quick web-application deployment, and so on.
> 
> In order to control the size of the download, the '-complete' 
> file does not
> include the source for 'external' packages, such as Struts 
> (although it does
> contain the full Struts Javadoc for reference). All external 
> package doc can
> be found in CVS if it's required (for reference only). We 
> also exclude the
> Tomcat examples and Javadoc - both of which are available of 
> course in the
> full Tomcat download from Apache's site directly.
> 
> We look forward to your comments and feedback...both here and 
> on our own
> listserv and forums onsite.
> 
> Sandra Cann
> [EMAIL PROTECTED]
> 



Antw: Re: Error 500 : No action instance could be created

2001-08-20 Thread Marion Schwarz

Hi Jon,

my action class look just as you described.
But I looked closer at the error message and discovered that it goes like this:
500 R< /thisandthat.do + null> No action instance...

So it seems like the parameters don't go through !
Still my action class doesn't even do a system.out.println, so I doubt that the 
request is passed on to the class correctly.

Marion





Re: Generating Dynamic Urls with

2001-08-20 Thread Bill Clinton

Hello,
 I don't believe you will be able to do this with the struts link 
tag.  But it should be fairly easy to make your own custom tag that 
would do this.  Take a look inside the source code for the link tag.

Bill

jigerjava wrote:

> Hi all,
> This my first mail to the list. I am just learning Struts. I got stuck at a 
>problem hope I will get some help reg. this.
> Problem:
>   I am displaying a list of orders with links at the end like "Modify Order", "View 
>Order" etc. Ok now these links point to specific directories in the context depending 
>on a key passed from the Server.
> Currently in non-struts based model I do it like this
> href="GetOrderServlet?urltoredirect=/admin/orders/<%=ht2.get("productkey")/ViewOrder.jsp">blah
> blah..
> 
> Now how can I achieve the same dynamic url generation using struts. 
> 
> Any help.
> 
> Thanks in Advance,
> Jiger
> 
> 
> Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
> 
>  Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from 
>http://www.planetm.co.in




Unsubscribe me, please!

2001-08-20 Thread Kwang-Shi Shu



Shu, Kwang-shi  | Tel 732-460-7848
Village Networks, Inc.  | Fax 732-460-9851
246 Industrial Way West |
Eatontown, NJ 078724| email: [EMAIL PROTECTED]




Expresso integration with Struts now available - v4.0ea Released

2001-08-20 Thread Flying Cloud

I wanted to let your guys know that Early access (ea) Expresso 4.0 release
is now available for download - which is fully integrated with Apache
Jakarta Struts.  Expresso 4.0 is a big jump forward from 3.11, as the
version number indicates, it includes a number of substantial changes to the
core API - mostly related to Controller objects, now that we are fully
integrated with  Struts. Please see the release notes at
http://www.jcorporate.com/doc/release.html. We look forward to your comments
and feedback...

With Release 4.0ea Expresso has made Controller objects available to Struts
as Actions, so the URL mapping, configuration, and other great capabilities
of Struts are available - with all of the advantages that Expresso standard
Web application functionality provides such as Controller object, DBObjects
(object-relational mapping), configuration management, security, database
connection pooling, email connectivity, job control, logging, event
notification, caching, internationalization, and more. The Controller
servlet (ActionServlet) still handles dispatching, then the specific
Controller object provides the UI-independant business logic.

Expresso 4.0ea is intended as a release for users who want to learn about
the new features and assist in the quality assurance process and
documentation - it is *not* ready for production use, and problems should be
expected at this stage. We'd very much appreciate bug reports and input on
this release - and this can be discussed here on the forums.

The 4.00ea version is available as a '-complete.jar' file - see the
http://www.jcorporate.com/doc/expressocomplete.html file for documentation
about installing this version. The -complete version is bundled with
Apache's Tomcat 4.0 b5, and includes doc, javadoc, and many other things
that you don't necessarily want in your own production release of an
application - it also, however, includes the 'ant' build.xml scripts to
create other versions of Expresso, including fully binary versions, .war
files for quick web-application deployment, and so on.

In order to control the size of the download, the '-complete' file does not
include the source for 'external' packages, such as Struts (although it does
contain the full Struts Javadoc for reference). All external package doc can
be found in CVS if it's required (for reference only). We also exclude the
Tomcat examples and Javadoc - both of which are available of course in the
full Tomcat download from Apache's site directly.

We look forward to your comments and feedback...both here and on our own
listserv and forums onsite.

Sandra Cann
[EMAIL PROTECTED]




Re: Error 500 : No action instance could be created

2001-08-20 Thread Jon Crater

you should be able to do what you're trying to do without a problem.  do you 
have an action class which extends org.apache.struts.action.Action and which 
is called "com.servlets.thisandthat_action"?  if not, that's the beginning 
of your problem. if so, inside that action class, you should have something 
like the following inside your perform method to determine where to forward:

// assuming someValue is a string and is already initialized
if (someValue.equals("display"))
  return mapping.findForward("display");
else if (someValue.equals("back"))
  return mapping.findForward("back");

supplying more of the relevant code would be helpful.

jon


Original Message Follows
From: "Marion Schwarz" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: Error 500 : No action instance could be created
Date: Mon, 20 Aug 2001 14:58:28 +0200

Hello everybody,

since I have already searched the archives for any posting concerning my 
problem, I only need a confirmation now:
Am I right, assuming that I cannot use action mapping when coming from a URL 
like http://.../thisandthat.do?param1=value
and only wanting to dislpay a thisandthat.jsp page ?
I've tried to map this "action" like this:


 
 


but it apparently does not work.
Is there any other way to display a jsp page using the struts architecture ?

thanx a lot
Marion



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




RE: Unsubscribe me!

2001-08-20 Thread Rehana Sheikh (Contractor)

Me too...and it doesn't work?!?

-Original Message-
From: Gurvits, Alexander [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2001 13:48
To: [EMAIL PROTECTED]
Subject: Unsubscribe me!


Automated Unsubscribe does not work!!!

Alex Gurvits
Brinson Advisors
Application Developer
212 882-5035



Re: bean:message tag

2001-08-20 Thread Thomas Quas


Matt,

what I'm currently doing is something like this: In, say, x.jsp I write

...
 class="feedback">






whereas in AppRes.properties I have

login.error.1=...
login.error.2=...


Yeah, it is rather uncomfortable--and only necessary if you really need
to have support for i18n--but I can be sure that after a designer
changed the page design there are no disturbing effects coming from my
language definitions. The designer can concentrate on the .jsp file and
does not need to care about language--in the ideal case ;-)

The same concept should work for your table header definitions.


tom


Matt Raible wrote:
> 
> Tom - it seems that you are correct, my html does show up correctly.
> 
> The reason I have html in my properties file is because I want to display
> certain images with my messages.
> 
> Let's take the following key for example:
> 
> error.password.mismatch=   src="/dc/common/images/iconWarning.gif" width="12" height="12"
> align="absmiddle" alt="Warning">  Invalid username and/or password,
> please try again.
> 
> I can probably move ... into my jsp page, but I'm already
> using error.header and error.footer with html, so this seemed natural:
> 
> errors.header=
> errors.footer=
> 
> I could probably also parameterize my  so that this could be a
> different key in my properties file, but then I'd have to add a little more
> code to my action classes (or validation.xml file).
> 
> This brings up another point - I wish I could dynamically set the path to my
> image, using a scriptlet or  tag, meaning replace "/dc/common" with
> "<%=pathToImages%>" - but doesn't seem to work.
> 
> We get all our static files through the webserver (vs. appserver) - that's why
> I can't get it from the war.
> 
> Matt
> 
> --- Thomas Quas <[EMAIL PROTECTED]> wrote:
> >
> > Matt,
> >
> > I'm not sure whether I understood the problem correctly, but I did the
> > same thing for a while, and it worked for me without "flush" or other
> > tricks. I simply included the message via , not
> > matter whether there was HTML in it or not.
> >
> > Note, however, that it can be problematic to mix layout and content
> > information. This was the big disadvantage of HTML, and people tried to
> > address it with XML and stylesheets, making the two independent of each
> > other. I'd recommend putting layout information, such as , , 
> > etc. in the .jsp, whereas the .properties file should only contain
> > content. This way your translators don't need to know HTML. Of course,
> > we might open up another can of worms here if we don't have the same
> > page layout for all languages.
> >
> >
> > Just my $0.02, tom
> >
> >
> > Matt Raible wrote:
> > >
> > > I am using  and I want to have HTML in my
> > > key.name string, such as:
> > >
> > > key.name=Hello World
> > >
> > > So ideally, I could make my tag resemble  > > flush="true" />, but there is no filter attribute on this tag?
> > >
> > > How can I do this, do I have to use , and if so, how do I get
> > the
> > > messages bean?
> > >
> > > Can it be done using:
> > >
> > > 
> > >
> > > Thanks,
> > >
> > > Matt
> > >
> > > __
> > > Do You Yahoo!?
> > > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > > http://phonecard.yahoo.com/
> >
> > --
> > thomas quas| "Art lies in the consciousness of doing the thing,
> > [EMAIL PROTECTED]  |  in the attention of the happening[...]"
> >|-- Allen Ginsberg --
> 
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/

-- 
thomas quas| "Art lies in the consciousness of doing the thing,
[EMAIL PROTECTED]  |  in the attention of the happening[...]"
   |-- Allen Ginsberg --



RE: unsubsribe

2001-08-20 Thread Lu, Jennifer
Title: RE: unsubsribe






Unsubscribe me





Error 500 : No action instance could be created

2001-08-20 Thread Marion Schwarz

Hello everybody,

since I have already searched the archives for any posting concerning my problem, I 
only need a confirmation now:
Am I right, assuming that I cannot use action mapping when coming from a URL like 
http://.../thisandthat.do?param1=value
and only wanting to dislpay a thisandthat.jsp page ?
I've tried to map this "action" like this:






but it apparently does not work.
Is there any other way to display a jsp page using the struts architecture ?

thanx a lot
Marion




Unsubscribe me!

2001-08-20 Thread Gurvits, Alexander

Automated Unsubscribe does not work!!!

Alex Gurvits
Brinson Advisors
Application Developer
212 882-5035




Re: session ids

2001-08-20 Thread Guus Holshuijsen

You can retrieve the current user's "session id" from the
HttpSessionBindingEvent e using "e.getSession().getId()". Use this value to
look up an entry in your hastable and remove it.
The HttpSessionBindingEvent is generated when the session is invalidated
(valueUnbound())  or created (valueBound()).

For more details read the Java doc on HttpSessionBindingEvent. Make sure
your class maintaining the hashtable implements the
javax.servlet.http.HttpSessionBindingListener interface.

Regards,
Guus

- Original Message -
From: "Rakesh" <[EMAIL PROTECTED]>
To: "Jon Crater" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, August 19, 2001 12:01
Subject: Re: session ids


> do u have an example
>
>
>  Rakesh Ayilliath
>
> [EMAIL PROTECTED]
>
> - Original Message -
> From: "Jon Crater" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 16, 2001 10:27 PM
> Subject: Re: session ids
>
>
> > rakesh--
> >
> > you can solve this problem by having the class responsible for managing
> the
> > hashtable of session ids implement HttpSessionBindingListener.  fill out
> the
> > valueBound(HttpSessionBindingEvent event) and
> > valueUnbound(HttpSessionBindingEvent event) methods so that the
> appropriate
> > session id is added/removed when the hashtable manager is unbound from
the
> > session.
> >
> > jon
> >
> >
> > Original Message Follows
> > From: "Rakesh" <[EMAIL PROTECTED]>
> > Reply-To: "Rakesh" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> > Subject: Re: session ids
> > Date: Thu, 16 Aug 2001 22:12:50 +0530
> >
> > Hi Greg,
> >
> > I know that this sessioncontext api is currently deprecated.
> > I require this for a very specific reason. When I log-in a user,
> > I save his loginID and the sessionId in a static hash table.
> >
> > and when he is logged out, I remove it. Each time someone tries
> > to log-in, I check in to the hash to see if he is already logged in and
> > display appropriate error messages to him.
> >
> > When he logs out by clicking on a logout.do, I remove his
> > loginID from the hash and invalidate his session. Now what happens; if
> > he just closes the browser window, or if his session is timed out ?
> > How do I remove his name from the Hash ?
> >
> > Kindly help.
> >
> >   Rakesh Ayilliath
> > [EMAIL PROTECTED]
> >
> >
> >
> > - Original Message -
> >From: Greg Maletic
> >To: [EMAIL PROTECTED] ; Rakesh
> >Sent: Thursday, August 16, 2001 9:54 PM
> >Subject: RE: session ids
> >
> >
> >I don't believe you can get all valid sessionIDs from the server.  I
> > think the API for doing so was deprecated a while back for security
> reasons.
> >   The way I've solved this in the past was to have each session register
> > itself into a application-scoped hashmap, and maintain that map myself.
> >
> >--Greg
> >
> >
> > -Original Message-
> >From:
> [EMAIL PROTECTED]
> >
>
[mailto:[EMAIL PROTECTED]]O
> n
> > Behalf Of Rakesh
> >Sent: Thursday, August 16, 2001 12:28 AM
> >To: [EMAIL PROTECTED]
> >Subject: session ids
> >
> >
> >  Hi ,
> >
> >  Is there anyway I can get all valid session ids from the server ?
> >
> >
> >   Rakesh Ayilliath
> >  (Software Engineer)
> >
> >  Synergy IT Innovations Pvt Ltd,
> >  #196, 1st Floor, 9th Cross,
> >  HMT Layout, RT Nagar
> >  Bangalore 560032
> >
> >  [EMAIL PROTECTED]
> >
> >
> > _
> > Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
> >
> >
>




Re: AW: MS SQL JDBC Drivers?

2001-08-20 Thread Matt Raible


Mikkel - just to let you know - Merant are the only SQL Server JDBC drivers
that will work on iPlanet.

Matt


--- "Nimphy, Thomas" <[EMAIL PROTECTED]> wrote:
> I like the JDBC-Drivers from http://www.inetsoftware.de/
> 
> Thomas
> 
> -Ursprüngliche Nachricht-
> Von: Mikkel Bruun [mailto:[EMAIL PROTECTED]]
> Gesendet am: Freitag, 17. August 2001 12:05
> An: '[EMAIL PROTECTED]'
> Betreff: OT: MS SQL JDBC Drivers?
> 
> Hi Guys,
> 
> A little of topic, but anyways...
> 
> On a current project we will be running an webapp on Solaris, using
> Iplanet...
> 
> Our application needs to connect to a MS Sql 7.0 running on a win 2k
> server...
> 
> can you recommend any jdbc drivers???
> 
> thanks a lot...
> 
> :: 
>   Mikkel Bruun
>   Senior IT Developer
>   [EMAIL PROTECTED]
>   Direct: +45 32 88 22 73
> 
>   Valtech A/S
>   Kanonbaadsvej 10
>   DK-1437 Copenhagen
>   Tel  +45 32 88 20 00
>   Fax +45 32 88 20 20
> 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: bean:message tag

2001-08-20 Thread Matt Raible

Tom - it seems that you are correct, my html does show up correctly.

The reason I have html in my properties file is because I want to display
certain images with my messages.

Let's take the following key for example:

error.password.mismatch=Invalid username and/or password,
please try again.

I can probably move ... into my jsp page, but I'm already
using error.header and error.footer with html, so this seemed natural:

errors.header=
errors.footer=

I could probably also parameterize my  so that this could be a
different key in my properties file, but then I'd have to add a little more
code to my action classes (or validation.xml file).

This brings up another point - I wish I could dynamically set the path to my
image, using a scriptlet or  tag, meaning replace "/dc/common" with
"<%=pathToImages%>" - but doesn't seem to work.

We get all our static files through the webserver (vs. appserver) - that's why
I can't get it from the war.

Matt

--- Thomas Quas <[EMAIL PROTECTED]> wrote:
> 
> Matt,
> 
> I'm not sure whether I understood the problem correctly, but I did the
> same thing for a while, and it worked for me without "flush" or other
> tricks. I simply included the message via , not
> matter whether there was HTML in it or not.
> 
> Note, however, that it can be problematic to mix layout and content
> information. This was the big disadvantage of HTML, and people tried to
> address it with XML and stylesheets, making the two independent of each
> other. I'd recommend putting layout information, such as , , 
> etc. in the .jsp, whereas the .properties file should only contain
> content. This way your translators don't need to know HTML. Of course,
> we might open up another can of worms here if we don't have the same
> page layout for all languages.
> 
> 
> Just my $0.02, tom
> 
> 
> Matt Raible wrote:
> > 
> > I am using  and I want to have HTML in my
> > key.name string, such as:
> > 
> > key.name=Hello World
> > 
> > So ideally, I could make my tag resemble  > flush="true" />, but there is no filter attribute on this tag?
> > 
> > How can I do this, do I have to use , and if so, how do I get
> the
> > messages bean?
> > 
> > Can it be done using:
> > 
> > 
> > 
> > Thanks,
> > 
> > Matt
> > 
> > __
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > http://phonecard.yahoo.com/
> 
> -- 
> thomas quas| "Art lies in the consciousness of doing the thing,
> [EMAIL PROTECTED]  |  in the attention of the happening[...]"
>|-- Allen Ginsberg --


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



problems while trying to initialize a Connectionpool

2001-08-20 Thread Marc Weber \(H2Opilot\)

Hello !

i am encountering problems by trying to initialize a
Database Connnectionpool.

in struts-config.xml I got the entries:









but by trying to acces these values by the call

 try {
 GenericDataSource dataSource =
(GenericDataSource)servlet.getServletContext().getAttribute(Action.DATA_SOUR
CE_KEY);
  conn = dataSource.getConnection();

  .
 //here are my MySQL instructions etc..

I got a NULLPOINTEREXCEPTION
If I initialize these values directly via the call
dataSource.setAutoCommit(false); Etc  inside the method
erverything works.

BUT I HAVE TO READ THESE VALUES FROM THE STRUTS-CONFIG!
WHO CAN HELP A POOR FRUSTRATED JSP DEVELOPER (BEGINNER) ?





Re: method reflection in action classes

2001-08-20 Thread Ted Husted

A very good example of coding this sort of thing is the DispatchAction
class in the Struts Action package.

http://jakarta.apache.org/struts/api/org/apache/struts/actions/DispatchAction.html

If you are worried about performance, it would be very easy to use
DispatchAction to combine several of your existing Actions together, and
then use jMeter to run some load tests. At this time, things like the
cost of reflection can be vary by setup. 


Jon Brisbin wrote:
> 
> I use a BaseAction class that does all my normal struts stuff like setting
> the request, doing authentication checking, managing the object cache,
> etc...and have been contemplating implementing this architecture:
> 
> In my form, I already use an "action" variable that tells me what i'm doing
> in my action class...probably the way most folks do it...but I'd like to
> have an action variable that might be like:
> "addSomething,addAnother,editSomethingElse"...the action class would then
> reflect those methods and call them in order...that way my "real" action
> classes only subclass my base class and implement any of the methods i
> choose to call from the action variable...i use object-wide variables for
> stuff like the request, mapping, etc...
> 
> my question, though, is if this would violate any major design concepts, or
> introduce an unweildy performance bottleneck in my action classes...i
> already use reflection in my form validation code, but that's just
> getReadMethod stuff, so no big deal...i was wondering if anyone has
> experience with all-around performance with reflection in action classes??
> i know someone posted a while back that they had done some testing and found
> an insignificant difference between static method calls and reflected stuff,
> but i didn't know what *types* of reflection that entailed...i would
> basically have to do a lot of getMethod()s, which i've heard can be quite
> expensive...
> 
> any thoughts/help would be appreciated! :-)
> 
> Jon Brisbin
> www.jbrisbin.net



struts light bug ?

2001-08-20 Thread juraj Lenharcik

hi all,

does anyone have experience with struts light from jean noel ribette ? i
have a problem with his menu tag. i have implemented a wonderfull deep
search and want to create a tree-menu with the results now. i have created
the necessary code, but this could not be correctly realized. the struts
light flips out ;-) , when there are two menu items like that:











! --> problem start here:   
1.  
2.  









the output shows like that:

menu.test.menu1 
menu.test.menu3 
menu.test.item2 
menu.test.item2 
menu.test.menu4 
> menu.test.item4   
> menu.test.item4   
menu.test.menu3 
menu.test.item2 
menu.test.item2 
menu.test.menu4 
> menu.test.item4   
> menu.test.item4   

does anyone have an idea, or the mailaddress from jean? his
[EMAIL PROTECTED]   is not
availeble now. the example on his page works
(http://struts.application-servers.com/).


thanks
juraj 





RE: Validating a form

2001-08-20 Thread DUPRAT Alexandre

Yes!
It works fine.
I thank you very much for help, Guus.
I was not able to find that in doc for the moment.

-Message d'origine-
De: Guus Holshuijsen [mailto:[EMAIL PROTECTED]]
Date: lundi 20 août 2001 11:39
À: [EMAIL PROTECTED]
Objet: Re: Validating a form


Alexandre,

The input attribute must be added to the action mapping as follows:






where the "input" attribute should contain the name of the JSP you use to
input for the requete action (I assumed it to be '/requete.jsp').

Regards,
Guus
- Original Message -
From: "DUPRAT Alexandre" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 11:00
Subject: RE: Validating a form


Hi agian,
Excuse me for being late in my response but i'm currently between too
projects...

Craig, when you say :
"Note that you *must* specify an input attribute on your , so that
Struts knows where to send the user back to."

What do i need to do, what is the name of this input attribute?
Do you have an example of struts-config.xml code matching the case.

Here is mine:


http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>








 


 




I beleve there is something missing in the action node, but what?
Perhaps struts does not know what page to display when finding errors. How
can i tell it where to go? (another forward???)

Thanks for help.


-Message d'origine-
De: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Date: lundi 6 août 2001 18:35
À: '[EMAIL PROTECTED]'
Objet: Re: Validation a form




On Mon, 6 Aug 2001, DUPRAT Alexandre wrote:

> hi,
>
> How can i validate a form?
> I tried :
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
req)
> {
> ActionErrors errors= new ActionErrors();
> if(! getSqlQuery().startsWith("select")){
> ActionError error = new ActionError("error.requete");
> errors.add("sqlQuery", error);
> }
> return errors;
> }
>
> it works when there is no error but not when i've one
> Is there somebody with an idea?
>

The above code looks OK -- what about it doesn't work?

Note that you *must* specify an input attribute on your , so that
Struts knows where to send the user back to.

> Alexandre Duprat
> SOPRA. Direction France Sud. Bordeaux
> [EMAIL PROTECTED]
>

Craig McClanahan


++
| Ce courrier ainsi que les fichiers joints sont confidentiels.  |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du systeme : [EMAIL PROTECTED]   |
|  - |
| Ce message confirme que le courrier a passe le controle|
| antivirus du relais de messagerie Internet avec succes.|
++




++
| Ce courrier ainsi que les fichiers joints sont confidentiels.  |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du système : [EMAIL PROTECTED]   |
|  - |
| Ce message confirme que le courrier a passé le contrôle|
| antivirus du relais de messagerie Internet avec succés.|
++



Generating Dynamic Urls with

2001-08-20 Thread jigerjava

Hi all,
This my first mail to the list. I am just learning Struts. I got stuck at a 
problem hope I will get some help reg. this.
Problem:
  I am displaying a list of orders with links at the end like "Modify Order", "View 
Order" etc. Ok now these links point to specific directories in the context depending 
on a key passed from the Server.
Currently in non-struts based model I do it like this
blah
 blah..

Now how can I achieve the same dynamic url generation using struts. 

Any help.

Thanks in Advance,
Jiger


Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

 Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from 
http://www.planetm.co.in




Re: Validating a form

2001-08-20 Thread Guus Holshuijsen

Alexandre,

The input attribute must be added to the action mapping as follows:






where the "input" attribute should contain the name of the JSP you use to
input for the requete action (I assumed it to be '/requete.jsp').

Regards,
Guus
- Original Message -
From: "DUPRAT Alexandre" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 11:00
Subject: RE: Validating a form


Hi agian,
Excuse me for being late in my response but i'm currently between too
projects...

Craig, when you say :
"Note that you *must* specify an input attribute on your , so that
Struts knows where to send the user back to."

What do i need to do, what is the name of this input attribute?
Do you have an example of struts-config.xml code matching the case.

Here is mine:


http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>








 


 




I beleve there is something missing in the action node, but what?
Perhaps struts does not know what page to display when finding errors. How
can i tell it where to go? (another forward???)

Thanks for help.


-Message d'origine-
De: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Date: lundi 6 août 2001 18:35
À: '[EMAIL PROTECTED]'
Objet: Re: Validation a form




On Mon, 6 Aug 2001, DUPRAT Alexandre wrote:

> hi,
>
> How can i validate a form?
> I tried :
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
req)
> {
> ActionErrors errors= new ActionErrors();
> if(! getSqlQuery().startsWith("select")){
> ActionError error = new ActionError("error.requete");
> errors.add("sqlQuery", error);
> }
> return errors;
> }
>
> it works when there is no error but not when i've one
> Is there somebody with an idea?
>

The above code looks OK -- what about it doesn't work?

Note that you *must* specify an input attribute on your , so that
Struts knows where to send the user back to.

> Alexandre Duprat
> SOPRA. Direction France Sud. Bordeaux
> [EMAIL PROTECTED]
>

Craig McClanahan


++
| Ce courrier ainsi que les fichiers joints sont confidentiels.  |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du systeme : [EMAIL PROTECTED]   |
|  - |
| Ce message confirme que le courrier a passe le controle|
| antivirus du relais de messagerie Internet avec succes.|
++





patterns

2001-08-20 Thread Rakesh



 
Are there any regular Patterns you can make use in 
Struts ?
 
 
 Rakesh Ayilliath(Software 
Engineer)
 
Synergy IT Innovations Pvt Ltd,#196, 1st Floor, 
9th Cross,HMT Layout, RT NagarBangalore 560032
 
[EMAIL PROTECTED]


RE: What is Titles? and what gonna happens to template tag in thefurture?

2001-08-20 Thread Trieu, Danny

Ted,

Thank you for answering my question.  I found Tiles to be very interesting.
However, I have a few question regarding Tiles, that I hope you can help me
with or point me to some sources that I can get my answer from.  

My question is I wrote a simple Tiles jsp, and verything work fine till I
introduced the Definition feature of Tiles and I got this exception:  

javax.servlet.ServletException: Can't get definitions factory from context.

This happens the same when I tried to deploy and run the 3 sample apps the
bundled with the distribution I downloaded.  I am run
tomcat4.0b07+Struts1.0+Tiles

I emailed Cedric Dumoulin Cedric Dumoulin ([EMAIL PROTECTED]) but haven't
heard form him.  Please let me know of any list or people that I can ask
question related to Tiles.

Thanks,

danny

ps. here is the stacktrace:

javax.servlet.ServletException: Can't get definitions factory from context.
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
at
org.apache.jsp._0002fcommon_0002fbasicPage_jsp._jspService(_0002fcommon_0002
fbasicPage_jsp.java:127)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:472)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1000)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
)
at java.lang.Thread.run(Thread.java:484)

Root Cause:

javax.servlet.jsp.JspException: Can't get definitions factory from context.
at
org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(InsertTag.jav
a:589)
at
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:442
)
at
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:399)
at
org.apache.jsp._0002fcommon_0002fbasicPage_jsp._jspService(_0002fcommon_0002
fbasicPage_jsp.java:65)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catal

Re: How to keep ActionForm in session from being reset?

2001-08-20 Thread Gregor Rayman

"Wilhelm Fitzpatrick" <[EMAIL PROTECTED]> wrote:
 
> It seems to me that struts *shouldn't* reset form beans that are 
> stored with session scope.  Or am I misunderstanding something?
> 
> -wilhelm

No, the reset has to be done, otherwise the checkboxes would not
work.

--
gR




RE: Validating a form

2001-08-20 Thread DUPRAT Alexandre

Hi agian,
Excuse me for being late in my response but i'm currently between too
projects...

Craig, when you say : 
"Note that you *must* specify an input attribute on your , so that
Struts knows where to send the user back to."

What do i need to do, what is the name of this input attribute?
Do you have an example of struts-config.xml code matching the case.

Here is mine:


http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>








 


 




I beleve there is something missing in the action node, but what?
Perhaps struts does not know what page to display when finding errors. How
can i tell it where to go? (another forward???)

Thanks for help.


-Message d'origine-
De: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Date: lundi 6 août 2001 18:35
À: '[EMAIL PROTECTED]'
Objet: Re: Validation a form




On Mon, 6 Aug 2001, DUPRAT Alexandre wrote:

> hi,
> 
> How can i validate a form?
> I tried : 
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
req)
> {
>   ActionErrors errors= new ActionErrors();
>   if(! getSqlQuery().startsWith("select")){
>   ActionError error = new ActionError("error.requete");
>   errors.add("sqlQuery", error);
>   }
>   return errors;
> }
> 
> it works when there is no error but not when i've one
> Is there somebody with an idea?
> 

The above code looks OK -- what about it doesn't work?

Note that you *must* specify an input attribute on your , so that
Struts knows where to send the user back to.

> Alexandre Duprat
> SOPRA. Direction France Sud. Bordeaux 
> [EMAIL PROTECTED]
> 

Craig McClanahan


++
| Ce courrier ainsi que les fichiers joints sont confidentiels.  |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du systeme : [EMAIL PROTECTED]   |
|  - |
| Ce message confirme que le courrier a passe le controle|
| antivirus du relais de messagerie Internet avec succes.|
++



including other actions

2001-08-20 Thread Andreas Leitner


Hi,

>From within Action.perform, I can return an ActionForward. This way I
can subsequentially go from one action to the other. That's fine, but
how can I "include" other actions. I would like to activate several
other actions from within one action, and at the end return a final
forward to a jsp.


Tia,
Andreas




Re: How to keep ActionForm in session from being reset?

2001-08-20 Thread Wilhelm Fitzpatrick

From: [EMAIL PROTECTED]

>One way of resolving this is to have a hidden field in your forms which
>specifies which step is being performed. Then in your reset() method, you
>can check which step you are at, and reset (or not) fields as appropriate.
>
>  > I'm trying to use form beans as suggested in the struts documentation,
>  > where I use a single form across several actions and pages, accumulating
>  > data as a I go.
>...
>  > At first, I couldn't get this to work until I figured out that the
>  > framework is calling reset() on the form bean on each action.

This would work of course, but it seems wrong, since now there is 
something on the form which ties behavior of the form (model) to the 
page (presentation).  If I move fields from one page to another, I'll 
have to modify the form bean.

It seems to me that struts *shouldn't* reset form beans that are 
stored with session scope.  Or am I misunderstanding something?

-wilhelm

-- 
__
Eric: I want to live in a world where software doesn't suck //
Richard: Any software that isn't free sucks // [EMAIL PROTECTED]
Linus: I'm interested in free beer /