Re: Deactivate URL-rewriting in logoff action.

2001-03-16 Thread Ana Narvaez Vila

What I was trying to say is that when logoff action is called, my
application ends and the user goes to another location. Although I
invalidate() session in logoff, when ActionServlet forward to next page
creates a new session that is not really used by anyone.

For example, I want user to go to www.altavista.com after logoff action
so I don't need new session.

action path="/logoff"
type="com.company.package.LogoffAction"
forward name="finish" path="http://altavista.com"
redirect="true" /
/action

Thaks

"Craig R. McClanahan" wrote:
 
 On Thu, 15 Mar 2001, Ana Narvaez Vila wrote:
 
  Logoff action usually invalidates session and sends browser to a index
  or welcome page, so it is not necesary to rewrite the URL.
 
  ActionServlet must have a session, so if there isn't a valid session it
  creates one.
  Question is: Is there a way to say to ActionServlet not to create a new
  session ?
 
 
 It's not just the controller servlet that creates sessions -- JSP pages do
 as well, unless you tell them not to with a page directive:
 
 %@ page session="false" %
 
 However, trying to run Struts based apps completely without sessions is
 going to cause you some grief in the following areas:
 
 - Internationalized message lookups in the bean:message
   tag depend on a Locale object stored in the user's session,
   which indicates this user's current Locale preference.
 
 - The html:errors mechanism for displaying validation errors
   relies on the same thing, so you cannot use this.
 
 My advice would be to go ahead and let the sessions be created, and
 minimize the memory occupancy by using request scope (rather than session
 scope) for all your application's form beans.  We're talking tens of bytes
 per simultaneous user for the session itself (and the associated Locale),
 so the memory requirements are not onerous -- even if it took 100 bytes
 per user, 10,000 simultaneous users is still only a megabyte.  And you are
 pretty much certain to run into other resource limits (CPU, database,
 network) before you reach that many users anyway.
 
 Craig
--
This email is confidential and intended solely for the use of the individual to whom 
it is addressed. Any views or opinions presented are solely those of the author and do 
not necessarily represent those of Sema Group. 
If you are not the intended recipient, be advised that you have received this email in 
error and that any use, dissemination, forwarding, printing, or copying of this email 
is strictly prohibited.
--




Re: WebSphere problem

2001-03-16 Thread Bernard Genin



[EMAIL PROTECTED] wrote:

 Can anyone provide a stack trace?


here it is.

 We're about to move to 3.5.3 from a working 3.5.2, so I'd appreciate a head
 start. As the author of the 3.5.2 instructions, I'd like to know that you
 changed the ActionServlet class and stored it in the servlet directory of
 your web app.


I'm already on 3.5.3 and I've changed the ActionServlet class as you specified
it in the installations notes, before trying struts.


Bernard.


[01.03.15 17:03:24:187 GMT+01:00] 882a2f98 DrAdminServer A SMTL0018I: DrAdmin 
disponible sur le port 3,550

[01.03.15 17:03:27:250 GMT+01:00] 8871af98 ServletEngine A IBM WebSphere Application 
Server - Web Container.  Copyright IBM Corp. 1998-2000

[01.03.15 17:03:27:578 GMT+01:00] 8871af98 ServletEngine A Servlet Specification 
Level: 2.2 - Full Servlet 2.2 Compliance Mode

[01.03.15 17:03:28:078 GMT+01:00] 8871af98 ServletEngine A Supported JSP Specification 
Levels: 1.1, 1.0, 0.91

[01.03.15 17:03:28:484 GMT+01:00] 8871af98 ServletHost   A Loading group: "struts-ex"

[01.03.15 17:03:28:890 GMT+01:00] 8871af98 CacheManager  A 
Servlet.cache.file."/dynacache.xml".not.found.Caching.is.disabled

[01.03.15 17:03:29:046 GMT+01:00] 8871af98 ServletInstan A SRVE0048I: Chargement du 
servlet : "database"

[01.03.15 17:03:29:187 GMT+01:00] 8871af98 WebGroup  A SRVE0091I: [Servlet LOG] : 
"database: init"

[01.03.15 17:03:29:281 GMT+01:00] 8871af98 WebGroup  A SRVE0091I: [Servlet LOG] : 
"database: Initializing database servlet"

[01.03.15 17:03:29:312 GMT+01:00] 8871af98 WebGroup  A SRVE0091I: [Servlet LOG] : 
"database: Loading database from '/WEB-INF/database.xml'"

[01.03.15 17:03:29:375 GMT+01:00] 8871af98 WebGroup  A SRVE0091I: [Servlet LOG] : 
"database: No such resource available - loading empty database"

[01.03.15 17:03:29:421 GMT+01:00] 8871af98 ServletInstan A SRVE0130I: Servlet 
disponible pour le service : "database"

[01.03.15 17:03:29:531 GMT+01:00] 8871af98 ServletInstan A SRVE0048I: Chargement du 
servlet : "action"

[01.03.15 17:03:29:703 GMT+01:00] 8871af98 WebGroup  A SRVE0091I: [Servlet LOG] : 
"action: init"

[01.03.15 17:03:29:781 GMT+01:00] 8871af98 WebGroup  A SRVE0091I: [Servlet LOG] : 
"action: Loading application resources from resource 
org.apache.struts.example.ApplicationResources"

[01.03.15 17:03:29:843 GMT+01:00] 8871af98 WebGroup  A SRVE0091I: [Servlet LOG] : 
"action: Initializing configuration from resource path /WEB-INF/struts-config.xml"

register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 
'classloader:C:\WebSphere\AppServer\hosts\default_host\struts-example\servlets\org\apache\struts\resources\struts-config_1_0.dtd'

register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 
'classloader:C:\WebSphere\AppServer\hosts\default_host\struts-example\servlets\org\apache\struts\resources\web-app_2_2.dtd'

register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 
'classloader:C:\WebSphere\AppServer\hosts\default_host\struts-example\servlets\org\apache\struts\resources\web-app_2_3.dtd'

[01.03.15 17:03:30:375 GMT+01:00] 8871af98 ServletInstan X Uncaught init() exception 
thrown by servlet {0}: {1}

 "action"

 javax.servlet.ServletException: Parsing error 
processing resource path /WEB-INF/struts-config.xml

at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleServlet.java:142)

at 
com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycleServlet.java:244)

at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleServlet.java:102)

at com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:284)

at javax.servlet.GenericServlet.init(GenericServlet.java:258)

at 
com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java:76)

at 
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:91)

at 
com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:158)

at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:802)

at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:89)

at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:121)

at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:82)

at com.ibm.servlet.engine.ServletHost.addWebGroup(ServletHost.java:109)

at 
com.ibm.servlet.engine.ServletEngineDynamicUpdateSupport.addWebGroup(ServletEngineDynamicUpdateSupport.java:126)

at 
com.ibm.ejs.sm.active.ActiveServletGroup.startAction(ActiveServletGroup.java:76)

at com.ibm.ejs.sm.active.ActiveObject.startObject(ActiveObject.java:682)

at com.ibm.ejs.sm.active.ActiveObject.start(ActiveObject.java:117)

at 

Prechecking with html:multibox

2001-03-16 Thread Firmin David



-Original Message-
From: Ana Narvaez Vila [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2001 08:56
To: [EMAIL PROTECTED]
Subject: Re: Deactivate URL-rewriting in logoff action.


What I was trying to say is that when logoff action is called, my
application ends and the user goes to another location. Although I
invalidate() session in logoff, when ActionServlet forward to next page
creates a new session that is not really used by anyone.

For example, I want user to go to www.altavista.com after logoff action
so I don't need new session.

action path="/logoff"
type="com.company.package.LogoffAction"
forward name="finish" path="http://altavista.com"
redirect="true" /
/action

Thaks

"Craig R. McClanahan" wrote:
 
 On Thu, 15 Mar 2001, Ana Narvaez Vila wrote:
 
  Logoff action usually invalidates session and sends browser to a index
  or welcome page, so it is not necesary to rewrite the URL.
 
  ActionServlet must have a session, so if there isn't a valid session it
  creates one.
  Question is: Is there a way to say to ActionServlet not to create a new
I've seen it in action in the test app, I've read the documentation, but I
still can't make it happen.

I have a list of checkboxes generated *dynamically* from DB records by the
logic:iterate  html:multibox tags. The user defines their own subset of
these checkboxes by checking them on the screen. Their DB record is then
updated accordingly when the form is submitted. When the user views their
subset at a later date, the boxes they've chosen need to appear prechecked
in the list.
The value of the checkbox has to be the DB identity(?), as the list contains
all possibilities and not just the user subset. So how can I work
out/display with html:multibox which of the boxes the user selected?
(Would be easy with an if(item.isChecked()) scriptlet, but sadly, this will
not parse within the multibox tag)

At the moment I have this (within iterate):
html:multibox property="item_ids" value="%=item.getId()%"/
where item_ids is a collection of all possible ids returned from the DB,
from which the user can select/edit their own subset. This gives me my list
with all the correct Ids behind all the correct checkboxes, but I can't
figure out how to incorporate the user's existing selection and precheck
them...

Any advice would be greatly appreciated.

Thanks in advance

Rgds

David


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
The Capital Markets Company.

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




Prechecking with html:multibox

2001-03-16 Thread Firmin David

All, sorry about the last mail. This is what I meant to post:-)


I've seen it in action in the test app, I've read the documentation, but I
still can't make it happen.
 
I have a list of checkboxes generated *dynamically* from DB records by the
logic:iterate  html:multibox tags. The user defines their own subset of
these checkboxes by checking them on the screen. Their DB record is then
updated accordingly when the form is submitted. When the user views their
subset at a later date, the boxes they've chosen need to appear prechecked
in the list.
The value of the checkbox has to be the DB identity as I'd need to work out
which were selected/deselected, so it can't correspond to the list as
defined by the user(?) so how can I work out with html:multibox which of the
boxes the user selected?
(Would be easy with an if(item.isChecked) scriptlet, but sadly, this will
not parse within the multibox tag)
 
At the moment I have this (within iterate):
html:multibox property="item_ids" value="%=item.getId()%"/
where item_ids is a collection of all possible box ids returned from the DB.
This gives me my list with all the correct Ids behind all the correct
checkboxes, but I can't figure out how to incorporate the user's selection
and precheck them...
 
Any advice would be greatly appreciated.
 
Thanks in advance
 
Rgds

David




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
The Capital Markets Company.

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




RE: WebSphere problem

2001-03-16 Thread Markus Torpvret

We're running struts on WebSphere 3.5.3 and don't have any problems parsing
the config file. We have not made any modifications at all to the
ActionServlet class, it runs just fine out of the box.

Maybe you could turn up the debug and detail init args to the ActionServlet
to get a more specific trace, it's kind of hard to see what's going on. Are
you sure that there's nothing wrong with the config file?

On a side note:
The only exception I've had during init was due to the fact that we had no
web.xml file. Since that particular message seems to be missing from the
ActionResources.properties file in struts 1.0 beta1 it was kind of hard to
find... It cleared up fine when I created an empty web.xml file (or rather
one containing web-app/)

Why does Struts try to read web.xml? Shouldn't that be left to the servlet
container? All init information is stored in the WebSphere database, so we
don't really need a web.xml file...

/Markus


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:31 AM
 To: [EMAIL PROTECTED]
 Subject: Re: WebSphere problem
 
 
 
 
 [EMAIL PROTECTED] wrote:
 
  Can anyone provide a stack trace?
 
 
 here it is.
 
  We're about to move to 3.5.3 from a working 3.5.2, so I'd 
 appreciate a head
  start. As the author of the 3.5.2 instructions, I'd like to 
 know that you
  changed the ActionServlet class and stored it in the 
 servlet directory of
  your web app.
 
 
 I'm already on 3.5.3 and I've changed the ActionServlet class 
 as you specified
 it in the installations notes, before trying struts.
 
 
 Bernard.
 



Please Help

2001-03-16 Thread JOEL VOGT

Okay,

I've been trying to get my own struts apps going without much success. I 
get the following error:

javax.servlet.ServletException: Cannot find ActionMappings or 
ActionFormBeans collection

I also get the message:
"cannot load servlet name action"

I have everything in the places suggested by the user-guides and about 
1 struts mailing list helpers, I don't have servlet.jar floating 
around or anything else obvious that might stuff it up. The example 
programs with struts all seem to work. It's only when I try to get some 
action classes or similar going that I get problems.
I'm trying to run the app on tomcat3.2.1 in windows.

Any suggestions/solutions? Thanks, Joel. 




RE: findDataSource not found

2001-03-16 Thread Satyen . Chikan

this may be due to different servlet engine/servlet api version
struts is using servlet2.2


-Original Message-
From: John McClain [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 1:49 AM
To: [EMAIL PROTECTED]
Subject: findDataSource not found


When I compile LogonAction.java - a bastardized
version of the example apps LogonAction.java - I get
the following. Any Ideas out there???...

LogonAction.java:50: Method findDataSource() not found
in class org.apache.struts.action.ActionServl
et.
  ds = servlet.findDataSource();
 ^
LogonAction.java:88: No method matching getSession()
found in interface javax.servlet.http.HttpServl
etRequest.
HttpSession session = request.getSession();
^
LogonAction.java:89: Method
setAttribute(java.lang.String, logon.User) not found
in interface javax.
servlet.http.HttpSession.
session.setAttribute(Constants.USER_KEY, user);
^
LogonAction.java:101: Method
removeAttribute(java.lang.String) not found in
interface javax.servlet.
http.HttpServletRequest.
   
request.removeAttribute(mapping.getAttribute());
   ^
LogonAction.java:103: Method
removeAttribute(java.lang.String) not found in
interface javax.servlet.
http.HttpSession.
   
session.removeAttribute(mapping.getAttribute());
   ^
5 errors

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


--
The information in this Internet email is confidential and may be 
legally privileged. It is intended solely for the addressee. Access 
to this Internet email by anyone else is unauthorised.

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this Internet email are subject to the terms and conditions
expressed in any applicable governing ING Barings' terms of business or
client engagement letter.

Visit us at www.ingbarings.com

--



RE: datasource - connection timeout

2001-03-16 Thread Kartik Sudarsan

hi,
thanks for replying at such short notice.i compiled the java file and
replaced the class file in the struts jar. but it doesnt seem to work for
the oracle jdbc driver. if you any solutions for this, please do let me
know.

thanks,
Kartik

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Matthias Bauer
Sent: Friday, March 16, 2001 4:45 PM
To: Kartik Sudarsan
Cc: [EMAIL PROTECTED]
Subject: Re: datasource - connection timeout


Here is the change in class GenericDataSource: I am just checking whether
the
connection has been closed by the database server. And if it has, then I
obtain
a new connection.

For this to work, you have to make sure that your jdbc driver is returning
the
correct value for the isClosed() method. Please try to ensure this first. I
am
saying this, because the Interbase jdbc driver Interclient 1.6 did not work,
PostgreSQL driver did not work, we had to patch it, only MySQL driver worked
ok.

I also attached the complete file GenericDataSource.java.

Maybe you can let me know if it worked for you.

Good luck,

--- Matthias


Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++
www.livinglogic.de


 /**
  * Attempt to establish a database connection.
  *
  * @exception SQLException if a database access error occurs
  */
 public Connection getConnection() throws SQLException {

 int seconds = 0;

 // Validate the opened status of this data source
 if (closed)
 throw new SQLException("getConnection:  Data source is
closed");
 if (driver == null)
 open();

 while (true) {

 // Have we timed out yet?
 if ((loginTimeout  0)  (seconds = loginTimeout))
 break;

 // Return an existing connection from the pool if there is one
 synchronized (connections) {
 if (!connections.isEmpty()) {
 useCount++;
 GenericConnection connection = (GenericConnection)
connections.removeFirst();

 // Create a new connection if the connection has been
closed due to timeout or server restart
 if (connection.conn.isClosed())
 {
 connection = new GenericConnection
 (this, driver.connect(url, properties),
autoCommit, readOnly);
 }
 // unclose the connection's wrapper
 connection.setClosed(false);
 return(connection);

 // return ((Connection) connections.removeFirst());
DEBUG
 }
 }

 // Create a new connection if we are not yet at the maximum
 if (activeCount  maxCount) {
 Connection conn = createConnection();
 useCount++;
 return (conn);
 }

 // Wait for an existing connection to be returned
 try {
 Thread.sleep(1000);
 seconds++;
 } catch (InterruptedException e) {
 ;
 }

 }

 // We have timed out awaiting an available connection
 throw new SQLException
 ("getConnection: Timeout awaiting connection");

 }




Kartik Sudarsan wrote:

 hi,
 i saw your posted message about having patched the connection
timeout bug.
 please send me the patch too as i am facing the same problem while using
 datasource

 Regards,

 Kartik Sudarsan

 IT Cube India Pvt. Ltd,
 Unit 1, 8th Floor,
 Innovator Building
 ITPL, Whitefield Road
 Ph:98450 74666

 Quality is a mindset,not an event




Missing Property

2001-03-16 Thread Marty Fisher

Hi,

Can a second pair of eyes point out the problem with the iterate and form code
below:

The jsp code:

  jsp:useBean id="jobQueueForm" type="JobQueueForm" /

  logic:iterate id="list" name="jobQueueForm" property="JqRow"
 bean:write name="list" /
  /logic:iterate

The form code:

  public String [] getJqRow ()
 {
   .
   .
   .
 }

The error:

 javax.servlet.jsp.JspException: No getter method for bean jobQueueForm
and property JqRow


Other jsps use different properties of the form with no problem.  Any
suggestions ?

Marty Fisher




BeanMessage Tag proposal

2001-03-16 Thread Johan Compagner

Hi,

When setting the args (arg0,arg1,arg2,arg3,arg4)
you must do this:
bean:message key="foo.foo.foo" arg0="foo1" arg1="foo2"/

But i think it is very rare that you know exactly at design time of the jsp
what value there must be. Because if you do then why not set it directly in
the message it self?

So it is almost any time a runtime expression.
But then i must do things like this:

bean:define id="argstring1" value="totalautotheft"/
bean:define id="argstring2" value="autotheft"/
bean:define id="insurance" name="carinsurance" scope="session"
type="nl.topicus.thema.DynamicForm"/
bean:message key="prompt.advise.wacasco" arg0="%=
insurance.getProperty(argstring1).toString() %" arg1="%=
insurance.getProperty(argstring2).toString() %"/


I must define
bean:define id="argstring1" value="totalautotheft"/
because i can't do this:
bean:message arg0="%= insurance.getProperty("totalautotheft").toString()
%"

I find this a bug of the Tomcat parser if you ask me. Because if he sees
that it is a reqexpr (%=)
then it should first find the % before looking at the closing "!!

Because if these problems i wanted to find a solution
Why is is not possible that i get the Object[] from a name/property???
Then the BeanTag is also not limmited to only 5 args

My example for the above one:

app:message key="prompt.advise.wacasco" (arg)name="insurance"
(arg)property="wacascoObjects"/

and the insurance.getWacascoObjects() does return the Object[] for that
string:
object[0] = insurance.getProperty("totalautotheft");
object[1] = insurance.getProperty("autotheft");
return object;

Johan Compagner














RE: Missing Property

2001-03-16 Thread Matthias Strolz

Hi

I think you do not need the jsp:useBean Tag but you need to define the
bean in the 
"iterator" Tag. So you have to set the property name="JobQueueForm".

I use some quite similar lines of code in a test apllication:


logic:iterate id="result" name="TableRowActionForm"
property="results"
bean:write name="result"/
br
br
/logic:iterate


public List getResults(){
return myResults;
}



-Original Message-
From: Marty Fisher [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 16. Mrz 2001 14:19
To: [EMAIL PROTECTED]
Subject: Missing Property


Hi,

Can a second pair of eyes point out the problem with the iterate and
form code
below:

The jsp code:

  jsp:useBean id="jobQueueForm" type="JobQueueForm" /

  logic:iterate id="list" name="jobQueueForm" property="JqRow"
 bean:write name="list" /
  /logic:iterate

The form code:

  public String [] getJqRow ()
 {
   .
   .
   .
 }

The error:

 javax.servlet.jsp.JspException: No getter method for bean
jobQueueForm
and property JqRow


Other jsps use different properties of the form with no problem.  Any
suggestions ?

Marty Fisher




struts - error message

2001-03-16 Thread Dileep John
Title: struts - error message









hi 
any one know to set parameterised error messages using struts.
At present I am able to set the error messages like the 
username already exists by using the property file.
But I need to display  username Dileep already exists. ie I need 
to pass parameter in the error message. Is that possible? any one can help me?
thank you 
dileep











Re: struts - error message

2001-03-16 Thread Maya Muchnik


You can see examples for this message in ApplicationResourses.properties
file. A parameter is passing as {0} for the one parameter. Also see some
source code in XxxxAction.java how to pass a message with a parameter.

Dileep John wrote:




hi
any one know to set parameterised error messages using
struts.
At present I am able to set the error messages
like the
"username already exists" by using the property
file.
But I need to display " username Dileep already
exists". ie I need
to pass parameter in the error message. Is that possible?
any one can help me?
thank you
dileep








RE: Unsafe path error

2001-03-16 Thread Anderson, Jessica

I am still trying to troubleshoot this problem, and therefore, I still need
assistance.

I am setting up another developer to use Struts, but we are receiving a
message that tomcat cannot load controller and something about an Unsafe
Path (see below).

We installed the jaxp parser but he doesn't have ant - is ant required
eventhough he will not be building from src dist?

When trying to request a page using the controller a NullPointerExeption is
encountered.

Any ideas?
Thanks a lot,
jessica

-Original Message-
From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 1:48 PM
To: '[EMAIL PROTECTED]'
Subject: "Unsafe path" error


Can anyone tell why I am getting this error when starting tomcat?

2001-03-14 12:25:24 - Ctx( /best ): Unsafe path G:\BestPilot\src\trs\best
/WEB-INF/struts-config.xml
cannot load servlet name: controller

thanks,
jessica



Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

I remember the similar error "Unsafe Path" in the mail. Try to find it.

"Anderson, Jessica" wrote:

 I am still trying to troubleshoot this problem, and therefore, I still need
 assistance.

 I am setting up another developer to use Struts, but we are receiving a
 message that tomcat cannot load controller and something about an Unsafe
 Path (see below).

 We installed the jaxp parser but he doesn't have ant - is ant required
 eventhough he will not be building from src dist?

 When trying to request a page using the controller a NullPointerExeption is
 encountered.

 Any ideas?
 Thanks a lot,
 jessica

 -Original Message-
 From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 1:48 PM
 To: '[EMAIL PROTECTED]'
 Subject: "Unsafe path" error

 Can anyone tell why I am getting this error when starting tomcat?

 2001-03-14 12:25:24 - Ctx( /best ): Unsafe path G:\BestPilot\src\trs\best
 /WEB-INF/struts-config.xml
 cannot load servlet name: controller

 thanks,
 jessica




RE: Unsafe path error

2001-03-16 Thread Anderson, Jessica

Yes,
it was from me and I never received any replies.
:)
jessica

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error


I remember the similar error "Unsafe Path" in the mail. Try to find it.

"Anderson, Jessica" wrote:

 I am still trying to troubleshoot this problem, and therefore, I still
need
 assistance.

 I am setting up another developer to use Struts, but we are receiving a
 message that tomcat cannot load controller and something about an Unsafe
 Path (see below).

 We installed the jaxp parser but he doesn't have ant - is ant required
 eventhough he will not be building from src dist?

 When trying to request a page using the controller a NullPointerExeption
is
 encountered.

 Any ideas?
 Thanks a lot,
 jessica

 -Original Message-
 From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 1:48 PM
 To: '[EMAIL PROTECTED]'
 Subject: "Unsafe path" error

 Can anyone tell why I am getting this error when starting tomcat?

 2001-03-14 12:25:24 - Ctx( /best ): Unsafe path G:\BestPilot\src\trs\best
 /WEB-INF/struts-config.xml
 cannot load servlet name: controller

 thanks,
 jessica



Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

Here is a link to those emails:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
Maybe it will help?!

"Anderson, Jessica" wrote:

 Yes,
 it was from me and I never received any replies.
 :)
 jessica

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 8:17 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 I remember the similar error "Unsafe Path" in the mail. Try to find it.

 "Anderson, Jessica" wrote:

  I am still trying to troubleshoot this problem, and therefore, I still
 need
  assistance.
 
  I am setting up another developer to use Struts, but we are receiving a
  message that tomcat cannot load controller and something about an Unsafe
  Path (see below).
 
  We installed the jaxp parser but he doesn't have ant - is ant required
  eventhough he will not be building from src dist?
 
  When trying to request a page using the controller a NullPointerExeption
 is
  encountered.
 
  Any ideas?
  Thanks a lot,
  jessica
 
  -Original Message-
  From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 15, 2001 1:48 PM
  To: '[EMAIL PROTECTED]'
  Subject: "Unsafe path" error
 
  Can anyone tell why I am getting this error when starting tomcat?
 
  2001-03-14 12:25:24 - Ctx( /best ): Unsafe path G:\BestPilot\src\trs\best
  /WEB-INF/struts-config.xml
  cannot load servlet name: controller
 
  thanks,
  jessica




RE: Unsafe path error

2001-03-16 Thread Anderson, Jessica

Thanks.

Another tidbit - i just discovered that this error only occurs in Tomcat
3.2.1 - Tomcat 3.1 works fine with no changes to the application,
environment or anything...

Any comments regarding versions of Tomcat?

Jessica

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 8:36 AM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error


Here is a link to those emails:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
Maybe it will help?!

"Anderson, Jessica" wrote:

 Yes,
 it was from me and I never received any replies.
 :)
 jessica

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 8:17 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 I remember the similar error "Unsafe Path" in the mail. Try to find it.

 "Anderson, Jessica" wrote:

  I am still trying to troubleshoot this problem, and therefore, I still
 need
  assistance.
 
  I am setting up another developer to use Struts, but we are receiving a
  message that tomcat cannot load controller and something about an Unsafe
  Path (see below).
 
  We installed the jaxp parser but he doesn't have ant - is ant required
  eventhough he will not be building from src dist?
 
  When trying to request a page using the controller a NullPointerExeption
 is
  encountered.
 
  Any ideas?
  Thanks a lot,
  jessica
 
  -Original Message-
  From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 15, 2001 1:48 PM
  To: '[EMAIL PROTECTED]'
  Subject: "Unsafe path" error
 
  Can anyone tell why I am getting this error when starting tomcat?
 
  2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
G:\BestPilot\src\trs\best
  /WEB-INF/struts-config.xml
  cannot load servlet name: controller
 
  thanks,
  jessica



Subclass of ActionServlet not registering correct locale...

2001-03-16 Thread Jannik Nørgaard Steen



Hi,

We've created a subclass of the ActionServlet and 
arestoring a locale object in the session under the
key Action.LOCALE_KEY. Apparently this has no 
effect on our rendered messages. 

Does anything special apply in regard to locale 
handlingwhen you subclass the ActionServlet ??

Any hints appreciated..:)

Med venlig hilsen/Best 
Regards---Jannik Nørgaard 
SteenSoftware DeveloperDigital Zone International

http://www.digitalzone.dkmailto:[EMAIL PROTECTED]---The 
most critical design decision youwill ever make is naming 
things...


Re: Missing Property

2001-03-16 Thread Jean-Noel Ribette

 The jsp code:

   jsp:useBean id="jobQueueForm" type="JobQueueForm" /

   logic:iterate id="list" name="jobQueueForm" property="JqRow"
  bean:write name="list" /
   /logic:iterate

 The form code:

   public String [] getJqRow ()
  {
.
.
.
  }

 The error:

  javax.servlet.jsp.JspException: No getter method for bean jobQueueForm
 and property JqRow


 Other jsps use different properties of the form with no problem.  Any
 suggestions ?

I think it is a problem with Javabean naming convention.
Try to replace property="JqRow" by property="jqRow".

Jean-Nol




Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

The best specialist in Tomcat is Graig M. If you read our email archive, that
Tomcat 3.2.1 and higher is the best "place" for struts, because 3.1 has a lot
of bugs.

"Anderson, Jessica" wrote:

 Thanks.

 Another tidbit - i just discovered that this error only occurs in Tomcat
 3.2.1 - Tomcat 3.1 works fine with no changes to the application,
 environment or anything...

 Any comments regarding versions of Tomcat?

 Jessica

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 8:36 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 Here is a link to those emails:

 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
 Maybe it will help?!

 "Anderson, Jessica" wrote:

  Yes,
  it was from me and I never received any replies.
  :)
  jessica
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Friday, March 16, 2001 8:17 AM
  To: [EMAIL PROTECTED]
  Subject: Re: "Unsafe path" error
 
  I remember the similar error "Unsafe Path" in the mail. Try to find it.
 
  "Anderson, Jessica" wrote:
 
   I am still trying to troubleshoot this problem, and therefore, I still
  need
   assistance.
  
   I am setting up another developer to use Struts, but we are receiving a
   message that tomcat cannot load controller and something about an Unsafe
   Path (see below).
  
   We installed the jaxp parser but he doesn't have ant - is ant required
   eventhough he will not be building from src dist?
  
   When trying to request a page using the controller a NullPointerExeption
  is
   encountered.
  
   Any ideas?
   Thanks a lot,
   jessica
  
   -Original Message-
   From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, March 15, 2001 1:48 PM
   To: '[EMAIL PROTECTED]'
   Subject: "Unsafe path" error
  
   Can anyone tell why I am getting this error when starting tomcat?
  
   2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
 G:\BestPilot\src\trs\best
   /WEB-INF/struts-config.xml
   cannot load servlet name: controller
  
   thanks,
   jessica




first steps

2001-03-16 Thread Marcin Baj



Hello,

I'm new to Struts. I wanted to arrange JSP page, 
which had two forms, each was redirected to another target.
I have problems with more than one mapping on page. 


Please help me to solve this problem.

Thanks in advance.

Marcin Baj,
Poland
 display.jsp
 displayAgent.jsp
 input.jsp
 GroupAction.java
 CustomMapping.java
 CustomForm.java
 AgentMapping.java
 AgentForm.java
 AgentAction.java


extension mapping with tomcat

2001-03-16 Thread Perez, Bill

i can't seem to get extension mapping to work in tomcat within VAJ 3.5.

here is my web.xml:

?xml version="1.0" encoding="ISO-8859-1"?

!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd"

web-app
servlet
servlet-name
dispatcher
/servlet-name
servlet-class
webwork.servlets.Dispatcher
/servlet-class
/servlet

servlet-mapping
servlet-name
dispatcher
/servlet-name
url-pattern
*.action
/url-pattern
/servlet-mapping

/web-app

is this not supported in tomcat or something

- billy



Re: Missing Property

2001-03-16 Thread Maya Muchnik

Good eye!

Jean-Noel Ribette wrote:

  The jsp code:
 
jsp:useBean id="jobQueueForm" type="JobQueueForm" /
 
logic:iterate id="list" name="jobQueueForm" property="JqRow"
   bean:write name="list" /
/logic:iterate
 
  The form code:
 
public String [] getJqRow ()
   {
 .
 .
 .
   }
 
  The error:
 
   javax.servlet.jsp.JspException: No getter method for bean jobQueueForm
  and property JqRow
 
 
  Other jsps use different properties of the form with no problem.  Any
  suggestions ?
 
 I think it is a problem with Javabean naming convention.
 Try to replace property="JqRow" by property="jqRow".

 Jean-Nol




Craig M. - Comments on Minimizing Action class proliferation

2001-03-16 Thread DONNIE HALE

Craig,

Last week, there was a thread labelled: "Minimizing Action class proliferation". I 
think you were on your brief "no list access" hiatus. :)

Below is the long-and-short of a proposed enhancement to Struts that could optionally 
be used by developers if they are so inclined. The only piece missing from this is a 
proposed change to the "action" XML elemen to include a "handler" or "method" 
attribute. This would be used as the first parameter to the "class.getMethod" call in 
the code below.

I won't regurgitate the whole thread here. I was just wondering if you had any 
thoughts on this?

Thanks,

Donnie


 [EMAIL PROTECTED] 03/07/01 10:05PM 
Donnie,

How about this as an alternative. I have created a subclass of Action called
StandardAction which uses reflection to invoke a method with the same name
as the "actions" path (defined in the struts-config.xml file). So all you
have to do is extend the Standard action and implement methods that
correspond to the paths that use it.

For example if you define three actions in your struts-config.xml file of
/saveOrder, /editOrder and /deleteOrder that all use a class OrderAction
which extends StandardAction and then create a OrderAction class as shown
below:

I hope this is of use.

Niall


--Example of StandardAction implementation---

public class OrderAction extends StandardAction{

  public ActionForward saveOrder(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response) {


  }
  public ActionForward editOrder(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response) {


  }
  public ActionForward deleteOrder(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response) {


  }
}

---StandardAction Class---
package nkp;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;

/**
 * @author Niall Pemberton
 * @version 1.0
 */

public abstract class StandardAction  extends Action {

  public ActionForward perform(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response) {


// Determine the method name to call (based on the path without the "/")
String methodName = mapping.getPath().substring(1);

// Get the method with the same name as the path
Class cls = this.getClass();
Method method = null;
try {
  method = cls.getMethod(methodName, new Class[] {ActionMapping.class,
  ActionForm.class,

HttpServletRequest.class,

HttpServletResponse.class});
}
catch (NoSuchMethodException ex) {
  servlet.log("Method "+methodName+" not found in class
"+this.toString());
}

// Invoke the Method
Object obj = null;
try {
  obj = method.invoke(this, new Object[] {mapping, form, request,
response});
}
catch (InvocationTargetException etargEx) {
  servlet.log("Error Involing Method
"+methodName+"(InvocationTargetException) "+this.toString());
}
catch (IllegalAccessException illEx) {
  servlet.log("Error Involing Method
"+methodName+"(IllegalAccessException) "+this.toString());
}
ActionForward actionForward = (ActionForward)obj;

// Forward control to the specified success URI
return actionForward;
  }
}



Re: Please Help

2001-03-16 Thread Marc Antoine Garrigue

i had the same probleme under windows..
i try everything possible (path classpath, jars server.xml...) nothing
works..

my advice : try linux ;-))




- Original Message -
From: "JOEL VOGT" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 16, 2001 11:44 AM
Subject: Please Help


 Okay,

 I've been trying to get my own struts apps going without much success. I
 get the following error:

 javax.servlet.ServletException: Cannot find ActionMappings or
 ActionFormBeans collection

 I also get the message:
 "cannot load servlet name action"

 I have everything in the places suggested by the user-guides and about
 1 struts mailing list helpers, I don't have servlet.jar floating
 around or anything else obvious that might stuff it up. The example
 programs with struts all seem to work. It's only when I try to get some
 action classes or similar going that I get problems.
 I'm trying to run the app on tomcat3.2.1 in windows.

 Any suggestions/solutions? Thanks, Joel.






RE: Unsafe path error

2001-03-16 Thread Anderson, Jessica

well,
the best "place" for my application is "working" and until I figure out how
to configure for tomcat 3.2, 3.1 will have to suffice. 
:)
i am concerned for the future though, so I will most likely revisit this
topic if I don't receive any feedback.

It was suggested that i change Web-inf to WEB-INF in one of the email links
you sent, but i was unable to change my folder to all caps.  I don't refer
to Web-inf anywhere else except the directory structure - it's implicit with
the context of my application.  So once again, i am at a loss...

It seems that someone else must have experienced this.
jessica

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 9:09 AM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error


The best specialist in Tomcat is Graig M. If you read our email archive,
that
Tomcat 3.2.1 and higher is the best "place" for struts, because 3.1 has a
lot
of bugs.

"Anderson, Jessica" wrote:

 Thanks.

 Another tidbit - i just discovered that this error only occurs in Tomcat
 3.2.1 - Tomcat 3.1 works fine with no changes to the application,
 environment or anything...

 Any comments regarding versions of Tomcat?

 Jessica

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 8:36 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 Here is a link to those emails:

 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
 Maybe it will help?!

 "Anderson, Jessica" wrote:

  Yes,
  it was from me and I never received any replies.
  :)
  jessica
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Friday, March 16, 2001 8:17 AM
  To: [EMAIL PROTECTED]
  Subject: Re: "Unsafe path" error
 
  I remember the similar error "Unsafe Path" in the mail. Try to find it.
 
  "Anderson, Jessica" wrote:
 
   I am still trying to troubleshoot this problem, and therefore, I still
  need
   assistance.
  
   I am setting up another developer to use Struts, but we are receiving
a
   message that tomcat cannot load controller and something about an
Unsafe
   Path (see below).
  
   We installed the jaxp parser but he doesn't have ant - is ant required
   eventhough he will not be building from src dist?
  
   When trying to request a page using the controller a
NullPointerExeption
  is
   encountered.
  
   Any ideas?
   Thanks a lot,
   jessica
  
   -Original Message-
   From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, March 15, 2001 1:48 PM
   To: '[EMAIL PROTECTED]'
   Subject: "Unsafe path" error
  
   Can anyone tell why I am getting this error when starting tomcat?
  
   2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
 G:\BestPilot\src\trs\best
   /WEB-INF/struts-config.xml
   cannot load servlet name: controller
  
   thanks,
   jessica



Re: Missing Property

2001-03-16 Thread Ken Beyer


On the same thread... can someone tell me why I can't put 
property="aBCDefg" with a bean getter of "getABCDefg()"

Note the 2nd char being an uppercase "B".  I were to make the "B" a
lowercase "b",  it works.  The problem stems from the 2nd char in the
property name being a capital.  I'm on Tomcat 3.3m1 + Struts 1.0b1

Any advice?   is this a bug?
Thx-
Ken

Jean-Noel Ribette wrote:

  The jsp code:
 
jsp:useBean id="jobQueueForm" type="JobQueueForm" /
 
logic:iterate id="list" name="jobQueueForm" property="JqRow"
   bean:write name="list" /
/logic:iterate
 
  The form code:
 
public String [] getJqRow ()
   {
 .
 .
 .
   }
 
  The error:
 
   javax.servlet.jsp.JspException: No getter method for bean jobQueueForm
  and property JqRow
 
 
  Other jsps use different properties of the form with no problem.  Any
  suggestions ?
 
 I think it is a problem with Javabean naming convention.
 Try to replace property="JqRow" by property="jqRow".

 Jean-Nol

--
Ken Beyer
Metatec Internet Products Group
[EMAIL PROTECTED]  |  http://www.metatec.com/
"The box said 'Requires Windows 95 or better.' - so I installed Linux."






Re: Struts and Sun's J2EE Patterns

2001-03-16 Thread Dan Malks

Jorge,
Just catching up some email.

Jorge Ribeiro Jordo wrote:

 Has anybody read Sun Java Center J2EE Patterns
 (http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/)
 yet ?

 For those that did, it seemed that Struts is pretty much an implementation
 of the "Front Controller" pattern (no surprises so far), using the
 "ServletFront", "Command and Controller", "Multiplexed Resource Mapping" and
 "Dispatcher in Controller" stategies.

You've done an excellent job of understanding this pattern and describing the
aspects of Struts it describes!

The one minor clarification is about the 'Dispatcher in Controller' strategy.
While I'm not a Struts expert, I believe that Struts uses a separate mapping
mechanism that sits outside of the controller servlet, does it not?

If the controller is delegating to an external component in order to do view
mgmt (ie:choosing the view) and navigation (ie:actually dispatching to that
view) then I probably wouldn't describe it as using the 'Dispatcher in
Controller' strategy. This strategy is meant to describe more simplistic cases
where the controller inlines the work itself, for example if it just grabs a
string and a requestDispatcher instance and forwards things on their way.

See the 'solution' section of the 'Service to Worker' pattern for a bit more
discussion on this issue. 'Service to Worker' is a pattern that combines a
couple other "smaller" patterns in the catalog into a larger one.

Let me know if I got anything wrong wrt to the discussion of Struts in this
email :-)
I'm interested in any other comments on this issue (or others related to any of
the Pattern material in the above URL - pls feel free to email the provided
aliases, if you'd like to discuss outside of this list).

Thanks,
Dan



 What do you think ?

 --
 This message may contain confidential information or privileged material,
 and is intended only for the individual(s) named. If you are not in the
 named addressee you should not disseminate, distribute or copy this e-mail.
 Please notify the sender immediately by e-mail if you have received this
 e-mail by mistake and delete this e-mail from your system.
 E-mail transmission cannot be guaranteed to be secure or error-free as
 information could be intercepted, corrupted, lost, destroyed, arrive late or
 incomplete, or contain viruses.  The sender therefore does not accept
 liability for any errors or omissions in the contents of this message which
 arise as a result of e-mail transmission. If verification is required please
 request a hard-copy version.

--
Dan MalksSun Java Center
Enterprise Java Architect703.208.5794





Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

I did not know that you have Web-inf. This is absolutely not good for Tomcat
3.2. Relocate all your files under WEB-INF!!!

"Anderson, Jessica" wrote:

 well,
 the best "place" for my application is "working" and until I figure out how
 to configure for tomcat 3.2, 3.1 will have to suffice.
 :)
 i am concerned for the future though, so I will most likely revisit this
 topic if I don't receive any feedback.

 It was suggested that i change Web-inf to WEB-INF in one of the email links
 you sent, but i was unable to change my folder to all caps.  I don't refer
 to Web-inf anywhere else except the directory structure - it's implicit with
 the context of my application.  So once again, i am at a loss...

 It seems that someone else must have experienced this.
 jessica

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:09 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 The best specialist in Tomcat is Graig M. If you read our email archive,
 that
 Tomcat 3.2.1 and higher is the best "place" for struts, because 3.1 has a
 lot
 of bugs.

 "Anderson, Jessica" wrote:

  Thanks.
 
  Another tidbit - i just discovered that this error only occurs in Tomcat
  3.2.1 - Tomcat 3.1 works fine with no changes to the application,
  environment or anything...
 
  Any comments regarding versions of Tomcat?
 
  Jessica
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Friday, March 16, 2001 8:36 AM
  To: [EMAIL PROTECTED]
  Subject: Re: "Unsafe path" error
 
  Here is a link to those emails:
 
  http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
  http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
  http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
  Maybe it will help?!
 
  "Anderson, Jessica" wrote:
 
   Yes,
   it was from me and I never received any replies.
   :)
   jessica
  
   -Original Message-
   From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
   Sent: Friday, March 16, 2001 8:17 AM
   To: [EMAIL PROTECTED]
   Subject: Re: "Unsafe path" error
  
   I remember the similar error "Unsafe Path" in the mail. Try to find it.
  
   "Anderson, Jessica" wrote:
  
I am still trying to troubleshoot this problem, and therefore, I still
   need
assistance.
   
I am setting up another developer to use Struts, but we are receiving
 a
message that tomcat cannot load controller and something about an
 Unsafe
Path (see below).
   
We installed the jaxp parser but he doesn't have ant - is ant required
eventhough he will not be building from src dist?
   
When trying to request a page using the controller a
 NullPointerExeption
   is
encountered.
   
Any ideas?
Thanks a lot,
jessica
   
-Original Message-
From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 1:48 PM
To: '[EMAIL PROTECTED]'
Subject: "Unsafe path" error
   
Can anyone tell why I am getting this error when starting tomcat?
   
2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
  G:\BestPilot\src\trs\best
/WEB-INF/struts-config.xml
cannot load servlet name: controller
   
thanks,
jessica




Connection Pool

2001-03-16 Thread Christophe Vigny

Where is the connection pool ?
in tomcat, in turbine or in strut ?




RE: Unsafe path error

2001-03-16 Thread Anderson, Jessica

do you mean capitalize?

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 10:29 AM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error


I did not know that you have Web-inf. This is absolutely not good for Tomcat
3.2. Relocate all your files under WEB-INF!!!

"Anderson, Jessica" wrote:

 well,
 the best "place" for my application is "working" and until I figure out
how
 to configure for tomcat 3.2, 3.1 will have to suffice.
 :)
 i am concerned for the future though, so I will most likely revisit this
 topic if I don't receive any feedback.

 It was suggested that i change Web-inf to WEB-INF in one of the email
links
 you sent, but i was unable to change my folder to all caps.  I don't refer
 to Web-inf anywhere else except the directory structure - it's implicit
with
 the context of my application.  So once again, i am at a loss...

 It seems that someone else must have experienced this.
 jessica

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:09 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 The best specialist in Tomcat is Graig M. If you read our email archive,
 that
 Tomcat 3.2.1 and higher is the best "place" for struts, because 3.1 has a
 lot
 of bugs.

 "Anderson, Jessica" wrote:

  Thanks.
 
  Another tidbit - i just discovered that this error only occurs in Tomcat
  3.2.1 - Tomcat 3.1 works fine with no changes to the application,
  environment or anything...
 
  Any comments regarding versions of Tomcat?
 
  Jessica
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Friday, March 16, 2001 8:36 AM
  To: [EMAIL PROTECTED]
  Subject: Re: "Unsafe path" error
 
  Here is a link to those emails:
 
  http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
  http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
  http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
  Maybe it will help?!
 
  "Anderson, Jessica" wrote:
 
   Yes,
   it was from me and I never received any replies.
   :)
   jessica
  
   -Original Message-
   From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
   Sent: Friday, March 16, 2001 8:17 AM
   To: [EMAIL PROTECTED]
   Subject: Re: "Unsafe path" error
  
   I remember the similar error "Unsafe Path" in the mail. Try to find
it.
  
   "Anderson, Jessica" wrote:
  
I am still trying to troubleshoot this problem, and therefore, I
still
   need
assistance.
   
I am setting up another developer to use Struts, but we are
receiving
 a
message that tomcat cannot load controller and something about an
 Unsafe
Path (see below).
   
We installed the jaxp parser but he doesn't have ant - is ant
required
eventhough he will not be building from src dist?
   
When trying to request a page using the controller a
 NullPointerExeption
   is
encountered.
   
Any ideas?
Thanks a lot,
jessica
   
-Original Message-
From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 1:48 PM
To: '[EMAIL PROTECTED]'
Subject: "Unsafe path" error
   
Can anyone tell why I am getting this error when starting tomcat?
   
2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
  G:\BestPilot\src\trs\best
/WEB-INF/struts-config.xml
cannot load servlet name: controller
   
thanks,
jessica



RE: Connection Pool

2001-03-16 Thread Kyle Robinson

http://jakarta.apache.org/struts/api/org/apache/struts/util/package-summary.
html#doc.JDBC

-Original Message-
From: Christophe Vigny [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 08:31
To: [EMAIL PROTECTED]
Subject: Connection Pool


Where is the connection pool ?
in tomcat, in turbine or in strut ?



Re: Connection Pool

2001-03-16 Thread Vladimir Levin

Ooops. I forget how to un-subscribe to this list. I would like to use a 
different E-mail address for this list because it carries so many E-mail 
messages. Could someone a) remind me how to unsubscribe and b) put this 
information into the struts web site under mailing lists!

Thanks,

Vlad

From: Christophe Vigny [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Connection Pool
Date: Fri, 16 Mar 2001 17:31:25 +0100

Where is the connection pool ?
in tomcat, in turbine or in strut ?


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: Connection Pool

2001-03-16 Thread Vladimir Levin

Ooops. I forget how to un-subscribe to this list. I would like to use a 
different E-mail address for this list because it carries so many E-mail 
messages. Could someone a) remind me how to unsubscribe and b) put this 
information into the struts web site under mailing lists!

Thanks,

Vlad

From: Christophe Vigny [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Connection Pool
Date: Fri, 16 Mar 2001 17:31:25 +0100

Where is the connection pool ?
in tomcat, in turbine or in strut ?


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: Missing Property

2001-03-16 Thread Marty Fisher

I cleared up the 500 error below by enclosing the bean:write with a logic:present tag.
As a newbie I'm happy to get it working and am interested in why it does.

  logic:iterate id="list" name="jobQueueForm" property="JqRow"
logic:present name="list" 
 bean:write name="list" /
/logic:present
  /logic:iterate

Thanks

Marty Fisher wrote:

 Thanks, that did the trick - sort of.  There is the correct amount of data being
 displayed and then an usuall error.

  1 U COMMAND1 2000-01-01 00:00:00.0 2000-01-01 00:00:00.0 P mfisher 2000-01-01
 00:00:00.0 N 0 0 0 LOG 2

  500 Internal Server Error

  /struts/jobQueue.do:

  javax.servlet.ServletException: Exception thrown processing JSP page.
  javax.servlet.jsp.JspException: No bean found for attribute key list

 If no bean can be found, where did the '1 U COMMAND1 ...' come from ?.  That line is
 the correct contents of the String [] jqRow property.  It looks like the iterate
 choked when it ran out of data.  Is that possible ?

 Thanks again,
 Marty Fisher

 Jean-Noel Ribette wrote:

   The jsp code:
  
 jsp:useBean id="jobQueueForm" type="JobQueueForm" /
  
 logic:iterate id="list" name="jobQueueForm" property="JqRow"
bean:write name="list" /
 /logic:iterate
  
   The form code:
  
 public String [] getJqRow ()
{
  .
  .
  .
}
  
   The error:
  
javax.servlet.jsp.JspException: No getter method for bean jobQueueForm
   and property JqRow
  
  
   Other jsps use different properties of the form with no problem.  Any
   suggestions ?
  
  I think it is a problem with Javabean naming convention.
  Try to replace property="JqRow" by property="jqRow".
 
  Jean-Nol

 --
 Marty Fisher
 Cranbury
 609-409-0909
 HNC Software, Inc. (formerly Systems/Link Corporation)

 The information contained in this transmission is privileged and/or confidential
 information intended for the use of the individual(s) or entity named above. If
 the reader of this message is not the intended recipient, you are hereby notified
 that any dissemination, distribution, or copying of this communication is strictly
 prohibited.

--
Marty Fisher
Cranbury
609-409-0909
HNC Software, Inc. (formerly Systems/Link Corporation)

The information contained in this transmission is privileged and/or confidential
information intended for the use of the individual(s) or entity named above. If
the reader of this message is not the intended recipient, you are hereby notified
that any dissemination, distribution, or copying of this communication is strictly
prohibited.





Populate ActionForm

2001-03-16 Thread Frank Ling

Hi, There:

Here is the some question I have for the from populating, This maybe a
stupid question.

In the my simple search functionality Project.

I have the form-action combination as following.

PaymentSearchActionPaymentSearchForm

DisplayStmAction  DisplayStmForm

in the PaymentSearchForm I take in all the search conditions, like
consultant name, stating date, ending date etc, then PaymentSearchAction
will perform the search and get all the result set in the session, then I
need populate all the result to DisplayStmForm, based on the setting in
struts-config.xml,  DisplayStmAction is the guy can access DisplayStmForm,
then the question is How DisplayStmAction can take control from this point
automaticlly, then I can populate the DisplayStmForm.

By another word, how can I jump from paymentSearchAction to DisplayStmAction
automatically, then I can use PaymentSearchAction populate PaymentSearchForm
to do the search then automatically switch to DisplayStmAction to populate
DisplayStmForm for the display.

Thanks

Frank Ling



Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

Create a new directory WEB-INF under tomcat/webapps/you_app, Copy all files
from tomcat/webapps/you_app/Web-inf to tomcat/webapps/you_app/WEB-INF. Remove
directory Web-inf.
Change all config files accordingly.

"Anderson, Jessica" wrote:

 do you mean capitalize?

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:29 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 I did not know that you have Web-inf. This is absolutely not good for Tomcat
 3.2. Relocate all your files under WEB-INF!!!

 "Anderson, Jessica" wrote:

  well,
  the best "place" for my application is "working" and until I figure out
 how
  to configure for tomcat 3.2, 3.1 will have to suffice.
  :)
  i am concerned for the future though, so I will most likely revisit this
  topic if I don't receive any feedback.
 
  It was suggested that i change Web-inf to WEB-INF in one of the email
 links
  you sent, but i was unable to change my folder to all caps.  I don't refer
  to Web-inf anywhere else except the directory structure - it's implicit
 with
  the context of my application.  So once again, i am at a loss...
 
  It seems that someone else must have experienced this.
  jessica
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Friday, March 16, 2001 9:09 AM
  To: [EMAIL PROTECTED]
  Subject: Re: "Unsafe path" error
 
  The best specialist in Tomcat is Graig M. If you read our email archive,
  that
  Tomcat 3.2.1 and higher is the best "place" for struts, because 3.1 has a
  lot
  of bugs.
 
  "Anderson, Jessica" wrote:
 
   Thanks.
  
   Another tidbit - i just discovered that this error only occurs in Tomcat
   3.2.1 - Tomcat 3.1 works fine with no changes to the application,
   environment or anything...
  
   Any comments regarding versions of Tomcat?
  
   Jessica
  
   -Original Message-
   From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
   Sent: Friday, March 16, 2001 8:36 AM
   To: [EMAIL PROTECTED]
   Subject: Re: "Unsafe path" error
  
   Here is a link to those emails:
  
   http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
   http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
   http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
   Maybe it will help?!
  
   "Anderson, Jessica" wrote:
  
Yes,
it was from me and I never received any replies.
:)
jessica
   
-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error
   
I remember the similar error "Unsafe Path" in the mail. Try to find
 it.
   
"Anderson, Jessica" wrote:
   
 I am still trying to troubleshoot this problem, and therefore, I
 still
need
 assistance.

 I am setting up another developer to use Struts, but we are
 receiving
  a
 message that tomcat cannot load controller and something about an
  Unsafe
 Path (see below).

 We installed the jaxp parser but he doesn't have ant - is ant
 required
 eventhough he will not be building from src dist?

 When trying to request a page using the controller a
  NullPointerExeption
is
 encountered.

 Any ideas?
 Thanks a lot,
 jessica

 -Original Message-
 From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 1:48 PM
 To: '[EMAIL PROTECTED]'
 Subject: "Unsafe path" error

 Can anyone tell why I am getting this error when starting tomcat?

 2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
   G:\BestPilot\src\trs\best
 /WEB-INF/struts-config.xml
 cannot load servlet name: controller

 thanks,
 jessica




Re: findDataSource not found

2001-03-16 Thread Craig R. McClanahan



On Thu, 15 Mar 2001, John McClain wrote:

 When I compile LogonAction.java - a bastardized
 version of the example apps LogonAction.java - I get
 the following. Any Ideas out there???...
 
 LogonAction.java:50: Method findDataSource() not found
 in class org.apache.struts.action.ActionServl
 et.
   ds = servlet.findDataSource();
  ^

What version of struts.jar are you compiling against.  This method was
added a while back, but if you're using an older struts.jar in your
compiles you would get this error.

 LogonAction.java:88: No method matching getSession()
 found in interface javax.servlet.http.HttpServl
 etRequest.
 HttpSession session = request.getSession();
 ^

This and the following ones mean you definitely have a wrong servlet.jar
or jsdk.jar file in your classpath.  Use the one from your servlet
container (which must support the Servlet 2.2 spec).

 LogonAction.java:89: Method
 setAttribute(java.lang.String, logon.User) not found
 in interface javax.
 servlet.http.HttpSession.
 session.setAttribute(Constants.USER_KEY, user);
 ^
 LogonAction.java:101: Method
 removeAttribute(java.lang.String) not found in
 interface javax.servlet.
 http.HttpServletRequest.

 request.removeAttribute(mapping.getAttribute());
^
 LogonAction.java:103: Method
 removeAttribute(java.lang.String) not found in
 interface javax.servlet.
 http.HttpSession.

 session.removeAttribute(mapping.getAttribute());
^
 5 errors
 

Craig




Re: extension mapping with tomcat

2001-03-16 Thread Craig R. McClanahan



On Thu, 15 Mar 2001, Perez, Bill wrote:

 i can't seem to get extension mapping to work in tomcat within VAJ 3.5.
 
 here is my web.xml:
 
 ?xml version="1.0" encoding="ISO-8859-1"?
 
 !DOCTYPE web-app
 PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
 "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd"
 
 web-app
 servlet
 servlet-name
 dispatcher
 /servlet-name
 servlet-class
 webwork.servlets.Dispatcher
 /servlet-class
 /servlet
 
 servlet-mapping
 servlet-name
 dispatcher
 /servlet-name
 url-pattern
 *.action
 /url-pattern
 /servlet-mapping
 
 /web-app
 

Tomcat supports extension mappings quite well -- the example application
uses extension mapping with the "*.do" extension.  I'm not familiar enough
with the VAJ integration, though, to know what might be going on here.

 is this not supported in tomcat or something
 
 - billy
 

Craig





RE: WebSphere problem

2001-03-16 Thread Craig R. McClanahan



On Fri, 16 Mar 2001, Markus Torpvret wrote:

 We're running struts on WebSphere 3.5.3 and don't have any problems parsing
 the config file. We have not made any modifications at all to the
 ActionServlet class, it runs just fine out of the box.
 
 Maybe you could turn up the debug and detail init args to the ActionServlet
 to get a more specific trace, it's kind of hard to see what's going on. Are
 you sure that there's nothing wrong with the config file?
 
 On a side note:
 The only exception I've had during init was due to the fact that we had no
 web.xml file. Since that particular message seems to be missing from the
 ActionResources.properties file in struts 1.0 beta1 it was kind of hard to
 find... It cleared up fine when I created an empty web.xml file (or rather
 one containing web-app/)
 
Oops ... that is a bug.

 Why does Struts try to read web.xml? Shouldn't that be left to the servlet
 container? All init information is stored in the WebSphere database, so we
 don't really need a web.xml file...
 

Struts needs to read the web.xml file to figure out what kind of servlet
mapping you are using -- path-mapped or extension-mapped.  This is needed
in order to construct correct URLs in the html:form tag, when you just
include the action name:

html:form action="/logon"
...
/html:form

This will be translated into "/myapp/logon.do" if you are using extension
mapping, or "/myapp/perform/logon" if you are using path mapping to
"/perform/*".

 /Markus
 

Craig McClanahan




Re: Please Help

2001-03-16 Thread Craig R. McClanahan



On Fri, 16 Mar 2001, JOEL VOGT wrote:

 Okay,
 
 I've been trying to get my own struts apps going without much success. I 
 get the following error:
 
 javax.servlet.ServletException: Cannot find ActionMappings or 
 ActionFormBeans collection
 

If the controller servlet is not marked load-on-startup, or it fails to
start correctly, you will get this.

 I also get the message:
 "cannot load servlet name action"
 

And that message would imply that the init() method of the controller
servlet threw an exception.  There should also be some other messages in
the Tomcat logs, or to the output stream from Tomcat, describing what it
is complaining about in more detail.

One of many possible causes for this would be if there was a parsing error
reading your struts-config.xml file, for example.

 I have everything in the places suggested by the user-guides and about 
 1 struts mailing list helpers, I don't have servlet.jar floating 
 around or anything else obvious that might stuff it up. The example 
 programs with struts all seem to work. It's only when I try to get some 
 action classes or similar going that I get problems.
 I'm trying to run the app on tomcat3.2.1 in windows.
 
 Any suggestions/solutions? Thanks, Joel. 
 
 
Craig





RE: Connection Pool

2001-03-16 Thread Tait, Allen



 -Original Message-
 From: Vladimir Levin [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 12:14 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Connection Pool
 
 Ooops. I forget how to un-subscribe to this list. I would like to use a 
 different E-mail address for this list because it carries so many E-mail 
 messages. Could someone a) remind me how to unsubscribe and b) put this 
 information into the struts web site under mailing lists!
 
 Thanks,
 
 Vlad
 
 From: Christophe Vigny [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Connection Pool
 Date: Fri, 16 Mar 2001 17:31:25 +0100
 
 Where is the connection pool ?
 in tomcat, in turbine or in strut ?
 
 
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.



Re: Missing Property

2001-03-16 Thread Craig R. McClanahan



On Fri, 16 Mar 2001, Marty Fisher wrote:

 I cleared up the 500 error below by enclosing the bean:write with a logic:present 
tag.
 As a newbie I'm happy to get it working and am interested in why it does.
 
   logic:iterate id="list" name="jobQueueForm" property="JqRow"
 logic:present name="list" 
  bean:write name="list" /
 /logic:present
   /logic:iterate
 

Does your String array have any null values in it?  There is an
outstanding bug report about that right now.

Also, at one point the logic:iterate tag had a bug where it did not
actually expose the loop control variable ("list" in your example) to the
rest of the page.  This was fixed several weeks ago, but if your copy of
Struts is quite old it may still have this problem.

 Thanks
 

Craig




Re: Subclass of ActionServlet not registering correct locale...

2001-03-16 Thread Craig R. McClanahan



On Fri, 16 Mar 2001, [iso-8859-1] Jannik Nørgaard Steen wrote:

 Hi,
 
 We've created a subclass of the ActionServlet and are storing a locale object in the 
session under the
 key Action.LOCALE_KEY. Apparently this has no effect on our rendered messages. 
 

Does the standard support for Locales not take care of your needs?  Set
the "locale" initialization parameter to "true", and the controller will
store a locale for you if there isn't one present.

Second, how are you actually storing the Locale?  Note the difference
between the following two statements:

session.setAttribute("Action.LOCALE_KEY", locale);

session.setAttribute(Action.LOCALE_KEY, locale);

The first one will not work correctly - the actual String constant that
Struts wants is the *value* of Action.LOCALE_KEY, which is
"org.apache.struts.action.LOCALE".  You need to use the second form.


 Does anything special apply in regard to locale handling when you subclass the 
ActionServlet ??
 
 Any hints appreciated..:)
 
 Med venlig hilsen/Best Regards
 ---
 Jannik Nørgaard Steen

Craig McClanahan




Re: Connection Pool

2001-03-16 Thread Craig R. McClanahan



On Fri, 16 Mar 2001, Christophe Vigny wrote:

 Where is the connection pool ?
 in tomcat, in turbine or in strut ?
 
 

Turbine and Struts both have connection pool implementations.

Struts can actually use any connection pool that implements
javax.sql.DataSource -- it only defaults to its own.  The Turbine
connection pool, unfortunately, is not useful for this because it does not
implement the DataSource interface.  However, several other connection
pool implementations available on the web are suitable.

There is an ongoing discussion about creating a "Commons" project within
the Jakarta framework to create and maintain shareable implementations of
components like this -- and a connection pool is the primary example of
the kind of code we all want to be able to share.  Once the commons
project is started, the physical source code for the connection pool
Struts uses will move to the Commons project, but this move will have
little or no impact on Struts applications (you'll need a separate JAR
file, but that's easy to deal with).

Craig





Populating ActionForm

2001-03-16 Thread Frank Ling



Hi, 
There:Here is the some question I have for the from populating, This 
maybe astupid question.In the my simple search functionality 
Project.I have the form-action combination as 
following.PaymentSearchAction 
PaymentSearchFormDisplayStmAction 
DisplayStmFormin the PaymentSearchForm I take in all the search 
conditions, likeconsultant name, stating date, ending date etc, then 
PaymentSearchActionwill perform the search and get all the result set in the 
session, then Ineed populate all the result to DisplayStmForm, based on the 
setting instruts-config.xml, DisplayStmAction is the guy can access 
DisplayStmForm,then the question is How DisplayStmAction can take control 
from this pointautomaticlly, then I can populate the 
DisplayStmForm.By another word, how can I jump from paymentSearchAction 
to DisplayStmActionautomatically, then I can use PaymentSearchAction 
populate PaymentSearchFormto do the search then automatically switch to 
DisplayStmAction to populateDisplayStmForm for the 
display.ThanksFrank


500 Error

2001-03-16 Thread Tait, Allen

With my new Struts installation I get the following error when trying to
"add" a current subscription.  

Error: 500
Location: /struts-example/subscription.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSPE:\Program
Files\jakarta-tomcat-3.2.1\work\localhost_8080%2Fstruts-example\_0002fsubscr
iption_0002ejspsubscription_jsp_0.java:99: Class java.util.ArrayList not
found in type declaration.
  java.util.ArrayList list = new java.util.ArrayList();
   ^
E:\Program
Files\jakarta-tomcat-3.2.1\work\localhost_8080%2Fstruts-example\_0002fsubscr
iption_0002ejspsubscription_jsp_0.java:99: Class java.util.ArrayList not
found in type declaration.
  java.util.ArrayList list = new java.util.ArrayList();
  


Is there a bug fix for this.  Where/how do I find these?




 -Original Message-
 From: Marty Fisher [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 12:28 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Missing Property
 
 I cleared up the 500 error below by enclosing the bean:write with a
 logic:present tag.
 As a newbie I'm happy to get it working and am interested in why it does.
 
   logic:iterate id="list" name="jobQueueForm" property="JqRow"
 logic:present name="list" 
  bean:write name="list" /
 /logic:present
   /logic:iterate
 
 Thanks
 
 Marty Fisher wrote:
 
  Thanks, that did the trick - sort of.  There is the correct amount of
 data being
  displayed and then an usuall error.
 
   1 U COMMAND1 2000-01-01 00:00:00.0 2000-01-01 00:00:00.0 P mfisher
 2000-01-01
  00:00:00.0 N 0 0 0 LOG 2
 
   500 Internal Server Error
 
   /struts/jobQueue.do:
 
   javax.servlet.ServletException: Exception thrown processing JSP
 page.
   javax.servlet.jsp.JspException: No bean found for attribute key
 list
 
  If no bean can be found, where did the '1 U COMMAND1 ...' come from ?.
 That line is
  the correct contents of the String [] jqRow property.  It looks like the
 iterate
  choked when it ran out of data.  Is that possible ?
 
  Thanks again,
  Marty Fisher
 
  Jean-Noel Ribette wrote:
 
The jsp code:
   
  jsp:useBean id="jobQueueForm" type="JobQueueForm" /
   
  logic:iterate id="list" name="jobQueueForm"
 property="JqRow"
 bean:write name="list" /
  /logic:iterate
   
The form code:
   
  public String [] getJqRow ()
 {
   .
   .
   .
 }
   
The error:
   
 javax.servlet.jsp.JspException: No getter method for bean
 jobQueueForm
and property JqRow
   
   
Other jsps use different properties of the form with no problem.
 Any
suggestions ?
   
   I think it is a problem with Javabean naming convention.
   Try to replace property="JqRow" by property="jqRow".
  
   Jean-Nol
 
  --
  Marty Fisher
  Cranbury
  609-409-0909
  HNC Software, Inc. (formerly Systems/Link Corporation)
 
  The information contained in this transmission is privileged and/or
 confidential
  information intended for the use of the individual(s) or entity named
 above. If
  the reader of this message is not the intended recipient, you are hereby
 notified
  that any dissemination, distribution, or copying of this communication
 is strictly
  prohibited.
 
 --
 Marty Fisher
 Cranbury
 609-409-0909
 HNC Software, Inc. (formerly Systems/Link Corporation)
 
 The information contained in this transmission is privileged and/or
 confidential
 information intended for the use of the individual(s) or entity named
 above. If
 the reader of this message is not the intended recipient, you are hereby
 notified
 that any dissemination, distribution, or copying of this communication is
 strictly
 prohibited.
 



struts-user@jakarta.apache.org struts-user@jakarta.apache.org

2001-03-16 Thread Frank Ling






Problem with JoinStruts Example

2001-03-16 Thread Anil Guntgatti

Hi ,
I am new to struts, so need your help.
I have installed Apache Tomcat test environment v3.1 on VAJ 3.5.
I am using struts email examples which comes as part of the joinStruts.zip
to understand how all the struts
components work.
Have imported all the required parsers.
I can get the joinMVC.jsp page, but when I click on submit, it gives me
HTTP 400 - Bad Request error.

Relevant console output is given below:

New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call
org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
Call
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/join,
type=web.mailinglist.JoinAction])
Pop org.apache.struts.action.ActionMapping

JASPER_LOG Fri Mar 16 13:56:55 EST 2001 JspEngine --
/web/joinMVC.jsp/JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001   ServletPath:
/web/joinMVC.jsp/JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001  PathInfo:
/web//JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001  RealPath: D:\Program
Files\IBM\VisualAge for
Java\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\joinStruts\web\joinMVC.jsp/JASPER_LOG

JASPER_LOG Fri Mar 16 13:56:55 EST 2001RequestURI:
/joinStruts/web/joinMVC.jsp/JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001   QueryString:
null/JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001Request Params: /JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001 Classpath according to the init
parameter is:
/JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001 Package name is: web/JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001 Class file name is: D:\Program
Files\IBM\VisualAge for
Java\ide\project_resources\Apache_Tomcat_Test_Environment\work\localhost_8080%2FjoinStruts\_0002fweb_0002fjoinMVC_0002ejspjoinMVC.class/JASPER_LOG

JASPER_LOG Fri Mar 16 13:56:55 EST 2001 Package name is: web/JASPER_LOG
JASPER_LOG Fri Mar 16 13:56:55 EST 2001 Class file name is: D:\Program
Files\IBM\VisualAge for
Java\ide\project_resources\Apache_Tomcat_Test_Environment\work\localhost_8080%2FjoinStruts\_0002fweb_0002fjoinMVC_0002ejspjoinMVC.class/JASPER_LOG

JASPER_LOG Fri Mar 16 13:56:56 EST 2001 Class name is:
_0002fweb_0002fjoinMVC_0002ejspjoinMVC_jsp_0/JASPER_LOG
Context log path="/joinStruts" :action: Processing a POST for /web/join
Context log path="/joinStruts" :action: Setting locale 'en_US'
Context log path="/joinStruts" :action:  No mapping available for path
/web/join


Relevant contents of struts-config.xml is shown below:

global-forwards
forward   name="logon" path="/logon.jsp"/
forward   name="success"   path="/mainMenu.jsp"/
/global-forwards


!-- == Action Mapping Definitions
== --
action-mappings
!-- add user to mailing list --
action  path="/join"
 name="joinForm"
 type="web.mailinglist.JoinAction"
scope="request"
input="/joinMVC.jsp"
 validate="true"
forward  name="success"  path="/welcome.html"/
/action

Would appreciate any help.
AAG.




chaining of actions

2001-03-16 Thread Sachin Tendulkar

Hi,
Is there is a way in struts I can chain actions
together.Like instead of going from an action to a jsp
can i call another action after I am done processing
one action?

Thanks
Vinay

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



Re: Craig M. - Comments on Minimizing Action class proliferation

2001-03-16 Thread David Winterfeldt

I made something along the same lines, but not with
reflection.  I've attached the file.

David

--- DONNIE HALE [EMAIL PROTECTED] wrote:
 Craig,
 
 Last week, there was a thread labelled: "Minimizing
 Action class proliferation". I think you were on
 your brief "no list access" hiatus. :)
 
 Below is the long-and-short of a proposed
 enhancement to Struts that could optionally be used
 by developers if they are so inclined. The only
 piece missing from this is a proposed change to the
 "action" XML elemen to include a "handler" or
 "method" attribute. This would be used as the first
 parameter to the "class.getMethod" call in the code
 below.
 
 I won't regurgitate the whole thread here. I was
 just wondering if you had any thoughts on this?
 
 Thanks,
 
 Donnie
 
 
  [EMAIL PROTECTED] 03/07/01 10:05PM
 
 Donnie,
 
 How about this as an alternative. I have created a
 subclass of Action called
 StandardAction which uses reflection to invoke a
 method with the same name
 as the "actions" path (defined in the
 struts-config.xml file). So all you
 have to do is extend the Standard action and
 implement methods that
 correspond to the paths that use it.
 
 For example if you define three actions in your
 struts-config.xml file of
 /saveOrder, /editOrder and /deleteOrder that all use
 a class OrderAction
 which extends StandardAction and then create a
 OrderAction class as shown
 below:
 
 I hope this is of use.
 
 Niall
 
 
 --Example of StandardAction
 implementation---
 
 public class OrderAction extends StandardAction{
 
   public ActionForward saveOrder(ActionMapping
 mapping,
ActionForm form,
HttpServletRequest
 request,
HttpServletResponse
 response) {
 
 
   }
   public ActionForward editOrder(ActionMapping
 mapping,
ActionForm form,
HttpServletRequest
 request,
HttpServletResponse
 response) {
 
 
   }
   public ActionForward deleteOrder(ActionMapping
 mapping,
ActionForm form,
HttpServletRequest
 request,
HttpServletResponse
 response) {
 
 
   }
 }
 
 ---StandardAction
 Class---
 package nkp;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
 import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
 
 /**
  * @author Niall Pemberton
  * @version 1.0
  */
 
 public abstract class StandardAction  extends Action
 {
 
   public ActionForward perform(ActionMapping
 mapping,
ActionForm form,
HttpServletRequest
 request,
HttpServletResponse
 response) {
 
 
 // Determine the method name to call (based on
 the path without the "/")
 String methodName =
 mapping.getPath().substring(1);
 
 // Get the method with the same name as the path
 Class cls = this.getClass();
 Method method = null;
 try {
   method = cls.getMethod(methodName, new Class[]
 {ActionMapping.class,
 
  ActionForm.class,
 
 HttpServletRequest.class,
 
 HttpServletResponse.class});
 }
 catch (NoSuchMethodException ex) {
   servlet.log("Method "+methodName+" not found
 in class
 "+this.toString());
 }
 
 // Invoke the Method
 Object obj = null;
 try {
   obj = method.invoke(this, new Object[]
 {mapping, form, request,
 response});
 }
 catch (InvocationTargetException etargEx) {
   servlet.log("Error Involing Method
 "+methodName+"(InvocationTargetException)
 "+this.toString());
 }
 catch (IllegalAccessException illEx) {
   servlet.log("Error Involing Method
 "+methodName+"(IllegalAccessException)
 "+this.toString());
 }
 ActionForward actionForward =
 (ActionForward)obj;
 
 // Forward control to the specified success URI
 return actionForward;
   }
 }


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
 GenericAction.java


RE: Unsafe path error

2001-03-16 Thread Anderson, Jessica

I figured out what the problem is.

It has nothing to do with capitalization of Web-inf.

In server.xml i had the crossContext attribute set to false and when i
changed it to "true" it worked.

Jessica

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 12:09 PM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error


Create a new directory WEB-INF under tomcat/webapps/you_app, Copy all files
from tomcat/webapps/you_app/Web-inf to tomcat/webapps/you_app/WEB-INF.
Remove
directory Web-inf.
Change all config files accordingly.

"Anderson, Jessica" wrote:

 do you mean capitalize?

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:29 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 I did not know that you have Web-inf. This is absolutely not good for
Tomcat
 3.2. Relocate all your files under WEB-INF!!!

 "Anderson, Jessica" wrote:

  well,
  the best "place" for my application is "working" and until I figure out
 how
  to configure for tomcat 3.2, 3.1 will have to suffice.
  :)
  i am concerned for the future though, so I will most likely revisit this
  topic if I don't receive any feedback.
 
  It was suggested that i change Web-inf to WEB-INF in one of the email
 links
  you sent, but i was unable to change my folder to all caps.  I don't
refer
  to Web-inf anywhere else except the directory structure - it's implicit
 with
  the context of my application.  So once again, i am at a loss...
 
  It seems that someone else must have experienced this.
  jessica
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Friday, March 16, 2001 9:09 AM
  To: [EMAIL PROTECTED]
  Subject: Re: "Unsafe path" error
 
  The best specialist in Tomcat is Graig M. If you read our email archive,
  that
  Tomcat 3.2.1 and higher is the best "place" for struts, because 3.1 has
a
  lot
  of bugs.
 
  "Anderson, Jessica" wrote:
 
   Thanks.
  
   Another tidbit - i just discovered that this error only occurs in
Tomcat
   3.2.1 - Tomcat 3.1 works fine with no changes to the application,
   environment or anything...
  
   Any comments regarding versions of Tomcat?
  
   Jessica
  
   -Original Message-
   From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
   Sent: Friday, March 16, 2001 8:36 AM
   To: [EMAIL PROTECTED]
   Subject: Re: "Unsafe path" error
  
   Here is a link to those emails:
  
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
   Maybe it will help?!
  
   "Anderson, Jessica" wrote:
  
Yes,
it was from me and I never received any replies.
:)
jessica
   
-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error
   
I remember the similar error "Unsafe Path" in the mail. Try to find
 it.
   
"Anderson, Jessica" wrote:
   
 I am still trying to troubleshoot this problem, and therefore, I
 still
need
 assistance.

 I am setting up another developer to use Struts, but we are
 receiving
  a
 message that tomcat cannot load controller and something about an
  Unsafe
 Path (see below).

 We installed the jaxp parser but he doesn't have ant - is ant
 required
 eventhough he will not be building from src dist?

 When trying to request a page using the controller a
  NullPointerExeption
is
 encountered.

 Any ideas?
 Thanks a lot,
 jessica

 -Original Message-
 From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 1:48 PM
 To: '[EMAIL PROTECTED]'
 Subject: "Unsafe path" error

 Can anyone tell why I am getting this error when starting tomcat?

 2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
   G:\BestPilot\src\trs\best
 /WEB-INF/struts-config.xml
 cannot load servlet name: controller

 thanks,
 jessica



RE: Unsafe path error

2001-03-16 Thread Craig R. McClanahan



On Fri, 16 Mar 2001, Anderson, Jessica wrote:

 Windows will not let me create an all caps WEB-INF folder.  I try and it
 lower-cases all but the first letter.  Any more suggestions?
 

Two different ways:

* Open a DOS shell, and type "mkdir WEB-INF".  Even though
  Windows Explorer stupidly displays this as "Web-inf", it
  is actually corerct on disk.

* Use Ant, or another development tool that does this right,
  to create WEB-INF directories for you.

Craig





Re: chaining of actions

2001-03-16 Thread Craig R. McClanahan



On Fri, 16 Mar 2001, Sachin Tendulkar wrote:

 Hi,
 Is there is a way in struts I can chain actions
 together.Like instead of going from an action to a jsp
 can i call another action after I am done processing
 one action?
 

One way would be to set up a forward entry that points back at the
controller servlet, rather than to a JSP page.

The example application illustrates this -- in the
"/saveSubscription" action, the "success" forward goes to
"/editRegistration.do?action=Edit" which will flow back through the
controller servlet again.

 Thanks
 Vinay
 

Craig




Re: Struts and Sun's J2EE Patterns

2001-03-16 Thread Craig R. McClanahan



On Fri, 16 Mar 2001, Dan Malks wrote:

 
 I understand and welcome your feedback once you've had a chance to have a look.
 
 Jorge's initial comment is interesting, given the fact that as Ralph Johnson, Doug
 Schmidt, and Mohamed Fayad state in 'Building Application Frameworks', Wiley 1999
 "Patterns are the architectural elements of frameworks.". I agree with this
 sentiment, and it is good to see this relationship between the Struts Framework and
 the J2EE Patterns catalog.
 
 In fact, I've gotten some emails recently asking me to write a paper about the
 relationship of an existing framework and the Patterns. Describing the synergy
 between Struts and the J2EE Patterns might be an interesting example of the
 decomposition of a specific framework into some of the component patterns from which
 it is composed. Craig, any interest in working together on something like this? (I'm
 too busy at the moment too, but maybe sometime in the not so distant future ;-)
 Anyway, not sure if this would be of interest to the community at large, but I think
 it might be...
 
 Thanks,
 Dan
 

I would be interested in working on something like this.  The next three
weeks are totally impossible (I'm speaking at both O'Reilly Enterprise
Java Conference and ApacheCon, and have some "real work" to get done along
the way :-), but would have a little time to talk about this in April.

 
 
   Thanks,
   Dan
  
 
  Craig
 
 --
 Dan MalksSun Java Center
 Enterprise Java Architect703.208.5794
 
 
 

Craig





RE: Unsafe path error

2001-03-16 Thread Curt Hagenlocher

 Windows will not let me create an all caps WEB-INF folder.  I 
 try and it lower-cases all but the first letter.  Any more
 suggestions?

Don't use Explorer.  From a command prompt create the directory.
Then, from the command prompt, verify that the directory name
is all upper-case.  Explorer tries to be helpful for the end-
user, but this can often bite you.  It will also display names
that are in all caps and matching 8.3 by capitalizing the first
letter and making the rest lower case.  It does this because it
thinks that you're using FAT without a long file name.

--
Curt Hagenlocher
[EMAIL PROTECTED]



RE: Unsafe path error

2001-03-16 Thread Shamdasani Nimmi-ANS004

If you put WEB-INF in caps, windows will show it to you as Web-inf but internally it 
would 've made it all caps. BTW it is a good idea to convert it Web-inf to caps.

-Original Message-
From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 2:24 PM
To: '[EMAIL PROTECTED]'
Subject: RE: "Unsafe path" error


Windows will not let me create an all caps WEB-INF folder.  I try and it
lower-cases all but the first letter.  Any more suggestions?

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 12:09 PM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error


Create a new directory WEB-INF under tomcat/webapps/you_app, Copy all files
from tomcat/webapps/you_app/Web-inf to tomcat/webapps/you_app/WEB-INF.
Remove
directory Web-inf.
Change all config files accordingly.

"Anderson, Jessica" wrote:

 do you mean capitalize?

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:29 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 I did not know that you have Web-inf. This is absolutely not good for
Tomcat
 3.2. Relocate all your files under WEB-INF!!!

 "Anderson, Jessica" wrote:

  well,
  the best "place" for my application is "working" and until I figure out
 how
  to configure for tomcat 3.2, 3.1 will have to suffice.
  :)
  i am concerned for the future though, so I will most likely revisit this
  topic if I don't receive any feedback.
 
  It was suggested that i change Web-inf to WEB-INF in one of the email
 links
  you sent, but i was unable to change my folder to all caps.  I don't
refer
  to Web-inf anywhere else except the directory structure - it's implicit
 with
  the context of my application.  So once again, i am at a loss...
 
  It seems that someone else must have experienced this.
  jessica
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Friday, March 16, 2001 9:09 AM
  To: [EMAIL PROTECTED]
  Subject: Re: "Unsafe path" error
 
  The best specialist in Tomcat is Graig M. If you read our email archive,
  that
  Tomcat 3.2.1 and higher is the best "place" for struts, because 3.1 has
a
  lot
  of bugs.
 
  "Anderson, Jessica" wrote:
 
   Thanks.
  
   Another tidbit - i just discovered that this error only occurs in
Tomcat
   3.2.1 - Tomcat 3.1 works fine with no changes to the application,
   environment or anything...
  
   Any comments regarding versions of Tomcat?
  
   Jessica
  
   -Original Message-
   From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
   Sent: Friday, March 16, 2001 8:36 AM
   To: [EMAIL PROTECTED]
   Subject: Re: "Unsafe path" error
  
   Here is a link to those emails:
  
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
   Maybe it will help?!
  
   "Anderson, Jessica" wrote:
  
Yes,
it was from me and I never received any replies.
:)
jessica
   
-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error
   
I remember the similar error "Unsafe Path" in the mail. Try to find
 it.
   
"Anderson, Jessica" wrote:
   
 I am still trying to troubleshoot this problem, and therefore, I
 still
need
 assistance.

 I am setting up another developer to use Struts, but we are
 receiving
  a
 message that tomcat cannot load controller and something about an
  Unsafe
 Path (see below).

 We installed the jaxp parser but he doesn't have ant - is ant
 required
 eventhough he will not be building from src dist?

 When trying to request a page using the controller a
  NullPointerExeption
is
 encountered.

 Any ideas?
 Thanks a lot,
 jessica

 -Original Message-
 From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 1:48 PM
 To: '[EMAIL PROTECTED]'
 Subject: "Unsafe path" error

 Can anyone tell why I am getting this error when starting tomcat?

 2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
   G:\BestPilot\src\trs\best
 /WEB-INF/struts-config.xml
 cannot load servlet name: controller

 thanks,
 jessica



HTML paramter and its getter name

2001-03-16 Thread Yao, Guang

Hi,

I have the following parameter defined in a JSP page using html:hidden
tag:

html:hidden property="CompanyID"/

In its correpsonding ActionForm class, there is a getter for it which name
is "getCompanyID()".

However, Struts can not find this getter:
javax.servlet.ServletException: No getter method for property CompanyID of
bean org.apache.struts.taglib.html.BEAN
If I change "CompanyID" to "companyID", then problem is fixed. Can anybody
tell me why? What is the right getter name for a parameter which starts with
upper case letter?
Thanks,
- Guang





Re: Craig M. - Comments on Minimizing Action class proliferation

2001-03-16 Thread John Wright

I also created something similar based on a Javaworld article.  My Action
class takes a url  like /objectX/methodX and lookes up in application scope
an object called objectX and invokes the  method called methodX (via
reflection as below).  The method signature is the same as that for perform
except I pass the reference to the Action class in case the class needs
access to certain data that only the Action class holds.  In my Action class
perform method I can then do perform certain global rules like checking for
login, implementing some common routing algorithm, etc..., and I don't have
all those Action classes.  I call these other classes controllers and they
are seperated by business functionality (e.g. AccountWebControl,ler,
MetadataWebController etc..)..  The in turn access a web-neutral JDBC layer
(I don't use EJBs).

If anyone is interested in the code let me know.

John Wright


- Original Message -
From: "DONNIE HALE" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 16, 2001 9:22 AM
Subject: Craig M. - Comments on "Minimizing Action class proliferation"


 Craig,

 Last week, there was a thread labelled: "Minimizing Action class
proliferation". I think you were on your brief "no list access" hiatus. :)

 Below is the long-and-short of a proposed enhancement to Struts that could
optionally be used by developers if they are so inclined. The only piece
missing from this is a proposed change to the "action" XML elemen to include
a "handler" or "method" attribute. This would be used as the first parameter
to the "class.getMethod" call in the code below.

 I won't regurgitate the whole thread here. I was just wondering if you had
any thoughts on this?

 Thanks,

 Donnie


  [EMAIL PROTECTED] 03/07/01 10:05PM 
 Donnie,

 How about this as an alternative. I have created a subclass of Action
called
 StandardAction which uses reflection to invoke a method with the same name
 as the "actions" path (defined in the struts-config.xml file). So all you
 have to do is extend the Standard action and implement methods that
 correspond to the paths that use it.

 For example if you define three actions in your struts-config.xml file of
 /saveOrder, /editOrder and /deleteOrder that all use a class OrderAction
 which extends StandardAction and then create a OrderAction class as shown
 below:

 I hope this is of use.

 Niall


 --Example of StandardAction implementation---

 public class OrderAction extends StandardAction{

   public ActionForward saveOrder(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {


   }
   public ActionForward editOrder(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {


   }
   public ActionForward deleteOrder(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {


   }
 }

 ---StandardAction Class---
 package nkp;

 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;

 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
 import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;

 /**
  * @author Niall Pemberton
  * @version 1.0
  */

 public abstract class StandardAction  extends Action {

   public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {


 // Determine the method name to call (based on the path without the
"/")
 String methodName = mapping.getPath().substring(1);

 // Get the method with the same name as the path
 Class cls = this.getClass();
 Method method = null;
 try {
   method = cls.getMethod(methodName, new Class[] {ActionMapping.class,
   ActionForm.class,

 HttpServletRequest.class,

 HttpServletResponse.class});
 }
 catch (NoSuchMethodException ex) {
   servlet.log("Method "+methodName+" not found in class
 "+this.toString());
 }

 // Invoke the Method
 Object obj = null;
 try {
   obj = method.invoke(this, new Object[] {mapping, form, request,
 response});
 }
 catch (InvocationTargetException etargEx) {
   servlet.log("Error Involing Method
 "+methodName+"(InvocationTargetException) "+this.toString());
 }
 catch (IllegalAccessException 

Fully decoupling the VIEW from the CONTROL

2001-03-16 Thread Rob Leland

  
Given an action mapping with these attributes set:
 
!-- Process a admin logon --
action   path="/admin/logon"
  type="com.solers.portal.pcontrol.admin.LogonAction"
  name="logonForm"
  scope="request"
  validate="true"
  input="/admin/logonVue.jsp"
  forward name="success"   path="/admin/mainMenu.jsp"/
/action

and if additionally we could tell struts via the struts-config.xml that 

the input .jsp file was guranteed to only have ONE and only one action

Then couldn't the action attribute in the FormTag become optional ?


So this:

 html:form action="/logon" focus="username"

would become this:

 html:form focus="username"

which would FULLY uncouple the VIEW file from the CONTROL ?



Re: HTML paramter and its getter name

2001-03-16 Thread Ken Beyer


That is correct behavior.  You MUST use property="companyID"
and the getter method for it would be "getCompanyID()"

As I just recently found out :-) you should use a capital letter
*only* when followed by another capital letter.  For example, if you
had a "getAAA()" defined in your JavaBean, you'd use property="AAA",
but if you had "getAaA()", you'd use property="aaA".

Ken

"Yao, Guang" wrote:

 Hi,

 I have the following parameter defined in a JSP page using html:hidden
 tag:

 html:hidden property="CompanyID"/

 In its correpsonding ActionForm class, there is a getter for it which name
 is "getCompanyID()".

 However, Struts can not find this getter:
 javax.servlet.ServletException: No getter method for property CompanyID of
 bean org.apache.struts.taglib.html.BEAN
 If I change "CompanyID" to "companyID", then problem is fixed. Can anybody
 tell me why? What is the right getter name for a parameter which starts with
 upper case letter?
 Thanks,
 - Guang

--
Ken Beyer
Metatec Internet Products Group
[EMAIL PROTECTED]  |  http://www.metatec.com/
"The box said 'Requires Windows 95 or better.' - so I installed Linux."






struts-template tag library vs. jsp:include/

2001-03-16 Thread Jim Newsham


Hi,

What are the differences between using the struts template tag library and
jsp's include action?  What are the advantages and trade-offs of each?

Thanks,

Jim Newsham






populate select box from formbean collection?

2001-03-16 Thread Phillip Rhodes

In my struts jsp page, I have a form.  It's corresponding formbean is in 
the request via my action class.  My formbean has a property of type 
collection that I would like to use to populate a select box.  I have done 
it a couple of ways, but it's real messy.

Does anybody have a more elegant solution?  Both ways below work.  but ugh!

Thanks!

%
   //get the formbean out of request
   com.healthgauge.UserForm uf = 
(com.healthgauge.UserForm)request.getAttribute("userForm"); 
   //get the collection and stuff in pageContext
   pageContext.setAttribute("companies",uf.getCompanies());
%
   html:select property="companyId"
 html:options collection="companies" property="id"
labelProperty="companyName"/
   /html:select
vs.
   html:select property="companyId"
logic:iterate id="company" name="userForm" property="companies"
option value="bean:write name="company" property="id" filter="true"/"
bean:write name="company" property="companyName" filter="true"/
/logic:iterate
   /html:select




Re: populate select box from formbean collection?

2001-03-16 Thread David Winterfeldt

The scope value is optional.

bean:define id="companies" name="userForm"
 property="companies" scope="request"/
html:select property="companyId"
  html:options collection="companies" property="id"
labelProperty="companyName"/
/html:select

David

--- Phillip Rhodes [EMAIL PROTECTED] wrote:
 In my struts jsp page, I have a form.  It's
 corresponding formbean is in 
 the request via my action class.  My formbean has a
 property of type 
 collection that I would like to use to populate a
 select box.  I have done 
 it a couple of ways, but it's real messy.
 
 Does anybody have a more elegant solution?  Both
 ways below work.  but ugh!
 
 Thanks!
 
 %
//get the formbean out of request
com.healthgauge.UserForm uf = 

(com.healthgauge.UserForm)request.getAttribute("userForm");
 
//get the collection and stuff in pageContext
   

pageContext.setAttribute("companies",uf.getCompanies());
 %
html:select property="companyId"
  html:options collection="companies"
 property="id"
 labelProperty="companyName"/
/html:select
 vs.
html:select property="companyId"
 logic:iterate id="company" name="userForm"
 property="companies"
 option value="bean:write name="company"
 property="id" filter="true"/"
 bean:write name="company" property="companyName"
 filter="true"/
 /logic:iterate
/html:select
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/