Re: Accessing action object inside the form bean

2002-03-28 Thread Nicolas De Loof

Be carreful, your action class must be threadsafe, so you cannot store datas
as intance variable. Use session scope instead.

 Hi,

 I open a form, collect user input and on submit store it in the action
class
 (inside perform()) as
 instance variables. Next time when the same form is opened, I want to
 retrieve the values
 stored in the action class. Since a new instance of the form bean is
created
 every time a form
 is accessed, is there anyway to get the field values stored in the action
 class from the bean
 form?

 Thanks,
 Bhaskar

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


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




RE: Why Struts - Ryan Norman

2002-03-28 Thread Jon.Ridgway

Hi Ryan,

Most of the frameworks available are very similar to Struts. The only
difference is that they tie you into the specific app server in most cases.
Also as they are only used by a subset of developers that use the specific
app server their user base and hence experience base will be much smaller.
You will find it harder to get answers to problems.

Also you may not have access to the source. The vendor will certainly not be
as responsive as the Struts team to introducing requested features and their
development team will be much smaller than the Struts team (as its open
source any of us can contribute extensions, ala Struts Menu, Struts
Validator, etc..).

Jon.

-Original Message-
From: Ryan Norman [mailto:[EMAIL PROTECTED]] 
Sent: 27 March 2002 17:48
To: [EMAIL PROTECTED]; LA Java User Group
Subject: Why Struts - Ryan Norman

Hi,

I am Ryan Norman.

Are there frameworks available in other commercial Java Web Servers like Web
Sphere, iPlanet, JRun, etc.

. If so why should somebody use struts framework rather than using the Web
Server's native framework?
. Are there people who are using struts with commercial Java Web Server like
Web Sphere, iPlanet, JRun, etc.

Thanks in advance

Ryan Norman


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




Re: Form Beans - Vector

2002-03-28 Thread Ian Tomey


This will work if the form is in session scope, but NOT if it is in request scope. the 
reason being is that the form is recreated every time, and the parameterList will be 
null.

what is needed is some kind of creation description in the config file - which I built 
a quick version of yesterday. I don't know if the dynamic form beans are supposed to 
fix this kind of issue... does anybody know? (aka when is that going to get 
documented? lol)

if not I should be able tidy this stuff up a bit and submit it to somebody who can do 
the proper integration.

my config xml stuff looks like this:

form-creation-definition name=aForm
form-creation-property name=someProperties
type=java.util.ArrayList
sizeProperty=propertyCount
childType=foo.bar.SomePropertyType

form-creation-property
 name=subProperties
 type=java.util.Vector
 sizeProperty=someProperties[].subPropertiesSize
 childType=foo.bar.AnotherPropertyType/
 
/form-creation-property
/form-creation-definition

only aggravating thing is placing the size of collections into the form, so they can 
(have) to be written out by nested:hiddens. Would be easier if either the collection 
interfaces could be accessed as a bean properly (ie. getSize() instead of size() ) or 
the commons output code could handle it.

Regards
Ian


 [EMAIL PROTECTED] 03/27/02 07:54pm 
Hi, Perpetua
The attachement is  the example,  I tested it, it is OK.
It is not my work. A kind person.send me.
Hope it is useful for you.

Annie


- Original Message -
From: Ted Husted [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 27, 2002 5:42 AM
Subject: Re: Form Beans - Vector


 Generally, specifying the type seems to help.

 .. type=java.util.Vector ...

 I don't use Vectors myself, since the synchronized aspect is not useful
 in the kind of applications I tend to work on, but using them with the
 iterate tags does seem to generate a lot of messages.

 If you continue to have problems, and if it's possible to use another
 collection class, like ArrayList, I'd do that. If not, I'd add a helper
 method that returned the Vector as an array.

 -- Ted Husted, Husted dot Com, Fairport NY US
 -- Developing Java Web Applications with Struts
 -- Tel: +1 585 737-3463
 -- Web: http://husted.com/about/services 

 Perpetua Cysne wrote:
 
  Could someone please provide me with an example of Form Beans using a
Vector
  of objects? How do display it in a iterate tag?
 
  The object is Passenger(firstName, lastName).
 
  Thank you!
 
  Perpetua
 
  --
  To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




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




RE: Cannot preload ActionServlet in JRun3.1using Struts1.1-b1

2002-03-28 Thread Jesse Alexander (KADA 12)

Hi,

having done some classloading lately... I would say it is a standard issue
with J2EE-compatible servlet-engines.

It depends where you have the struts- and logging-jars. If they are in 
one of the parent-classloader-paths then they cannot load the classes
from WEB-INF/lib (and classes) as long as they use the old
class.forName(class_name) method.

As both libraries that you mention are opensource, why not try to change
the code to use either
class.forName(class_name, true, Thread.currentThread().getContextClassLoader());
or
Thread.currentThread().getContextClassLoader().loadClass(class_name);

hope this helps
Alexander

-Original Message-
From: Ronel Sumibcay [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 26. März 2002 00:32
To: 'Struts Users Mailing List'
Subject: Cannot preload ActionServlet in JRun3.1using Struts1.1-b1


This may be a problem in JRun's web app class loading implementation or in
the commons-logging implementation. The exception occurs if you try to
preload the ActionServlet. But if the ActionServlet is initialized from a
request it is loaded just fine. It looks like the
org.apache.commons.logging.LogFactory.findClassLoader() maybe returning the
wrong ClassLoader when called when an ActionServlet is being preloaded...all
the struts and commons-*.jar files are in the usual web-inf/lib folder.

This is a show stopper for those who are extending ActionServlet to do some
extra initialization which needs to be initialized before anything else. Its
forcing me to go back to a struts nightly build that does not have the
commons-logging implementation. 

If this a bug in org.apache.commons.logging.LogFactory.findClassLoader(),
then would the fix cause changes in struts or would i simply have to get the
latest commons-logging.jar if and when this is addressed?

Thanks.

-ronel

03/25 14:44:34 error (JRun) Could not pre-load servlet: action
[javax.servlet.ServletException: Could not instantiate
org.apache.struts.action.ActionServlet]
[1]org.apache.commons.logging.LogConfigurationException:
java.lang.ClassNotFoundException:
org.apache.commons.logging.impl.LogFactoryImpl
at
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:497)
at
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:331)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:197)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:161)
at
allaire.jrun.servlet.JRunServletLoader.loadServlet(../servlet/JRunServletLoa
der.java:149)
at
allaire.jrun.servlet.JRunSE.getServletReference(../servlet/JRunSE.java:1705)
at
allaire.jrun.servlet.JRunSE.preloadServlets(../servlet/JRunSE.java:1371)
at allaire.jrun.servlet.JRunSE.init(../servlet/JRunSE.java:236)
at allaire.jrun.ServletService.init(../ServletService.java:66)
at allaire.jrun.ServletService.init(../ServletService.java:31)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:203)
at
allaire.jrun.servlet.JRunSE.initService(../servlet/JRunSE.java:891)
at
allaire.jrun.servlet.JRunSE.initServices(../servlet/JRunSE.java:858)
at
allaire.jrun.servlet.JvmContext.initServices(../servlet/JvmContext.java:130)
at allaire.jrun.servlet.JRunSE.init(../servlet/JRunSE.java:222)
at
allaire.jrun.servlet.JvmContext.init(../servlet/JvmContext.java:69)
at allaire.jrun.ServletService.init(../ServletService.java:66)
at allaire.jrun.ServletService.init(../ServletService.java:31)
at JRun.main(../../../JRun.java:172)
[0]javax.servlet.ServletException: Could not instantiate
org.apache.struts.action.ActionServlet
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:209)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:161)
at
allaire.jrun.servlet.JRunServletLoader.loadServlet(../servlet/JRunServletLoa
der.java:149)
at
allaire.jrun.servlet.JRunSE.getServletReference(../servlet/JRunSE.java:1705)
at
allaire.jrun.servlet.JRunSE.preloadServlets(../servlet/JRunSE.java:1371)
at allaire.jrun.servlet.JRunSE.init(../servlet/JRunSE.java:236)
at allaire.jrun.ServletService.init(../ServletService.java:66)
at allaire.jrun.ServletService.init(../ServletService.java:31)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:203)
at
allaire.jrun.servlet.JRunSE.initService(../servlet/JRunSE.java:891)
at

Incompatibility between Struts 1.0.x and 1.1.x ?

2002-03-28 Thread Slimane Zouggari

Hi,

I decided today to migrate to the last build of Struts (nightly build of 
27/03/2002) and to my surprise it didn't work.
Previously, I was using a nightly build of February (don't remember which one).

Here's a part of the error message I get (the complete error message is 
just below):
 Cannot find message resources under key org.apache.struts.action.MESSAGE

I had once that error message and I solved it putting an 
ApplicationResource file in my class dir. But now, it doesn't seem to work 
anymore...

Could anybody please tell me where exactly is the problem ?

Thanx in advance.

Friendly Regards,
Slimane

The complete error message is :

Apache Tomcat/4.0.1 - Error report!--H1{font-family : 
sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} 
BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : 
white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} 
--Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Errortype 
Exception reportmessage Internal Server Errordescription The server 
encountered an internal error (Internal Server Error) that prevented it 
from fulfilling this request.exception javax.servlet.ServletException: 
Cannot find message resources under key org.apache.struts.action.MESSAGE
  at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
  at org.apache.jsp.Selection$jsp._jspService(Selection$jsp.java:260)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
  at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
  at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
  at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
  at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
  at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
  at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
  at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
  at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
  at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
  at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
  at java.lang.Thread.run(Thread.java:484)
root cause javax.servlet.jsp.JspException: Cannot find message resources 
under key org.apache.struts.action.MESSAGE
  at org.apache.struts.util.RequestUtils.message(RequestUtils.java:793)
  at org.apache.struts.util.RequestUtils.message(RequestUtils.java:755)
  at 
org.apache.struts.taglib.html.BaseHandlerTag.message(BaseHandlerTag.java:568)
  at 
org.apache.struts.taglib.html.BaseHandlerTag.prepareStyles(BaseHandlerTag.java:623)
  at org.apache.struts.taglib.html.RadioTag.doStartTag(RadioTag.java:233)
  at org.apache.jsp.Selection$jsp._jspService(Selection$jsp.java:134)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
  at 

Problem with select and option tag

2002-03-28 Thread Slimane Zouggari

Hi,

When I tru to use the following piece of code, it doesn't work :

html:form action=handleprojecteditrequest.do method=post scope=session
   html:options collection=listParticipant property=id 
labelProperty=name
 name=projecteditrequestform /
/html:form

I think the previous one doesn't work because Struts doesn't find my bean 
projecteditrequestform as it isn't the same of my form bean.

But when I replace it with the following, then it works without any problem:

html:form action=handleprojecteditrequest.do method=post scope=session
html:select property=codcat value=REQ
   logic:iterate id=elt name=projecteditrequestform 
scope=session property=listCat type=be.stluc.info.element.ElementSimple
 option value=bean:write name=elt 
property=id/bean:write name=elt property=name/
   /logic:iterate
   /html:selectBR
/html:form

Could anybody point me to a way to solve this ?

Thanx in advance.

Friendly Regards,
Slimane


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




RES: Struts Config Problem - Ryan Norman

2002-03-28 Thread Gilson Nascimento D Elrei

What about the error message ? What error message do you receiving ?
Could you send it!?
  cheers 


 - Mensagem original -
 De:   Ryan Norman [SMTP:[EMAIL PROTECTED]]
 Enviada em:   quarta-feira, 27 de março de 2002 21:42
 Para: [EMAIL PROTECTED]; LA Java User Group
 Assunto:  Struts Config Problem - Ryan Norman
 
 Hi All,
 
 I am Ryan Norman
 
 I am trying to put together a simple sample application. 
 Right now I have a login page upon submitting the user name and password I
 want it to be transferred
 to another page.
 
 For some reason, it is not working.
 
 Can somebody help me with this?
 
 I am pasting my code and struts-config.xml file contents.
 
 Thanks in advance
 
 struts-config.xml
 
 ?xml version=1.0 encoding=ISO-8859-1 ?
 
 !DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
 http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
 
 !--
  This is a blank Struts configuration file based on the example
 application,
  with commented examples of some items.
 
  NOTE: If you have a generator tool to create the corresponding Java
 classes
  for you, you could include the details in the form-bean
 declarations.
  Otherwise, you would only define the form-bean element itself, with
 the
  corresponding name and type attributes, as shown here.
 --
 
 struts-config
   !-- == Data Source Configuration
 === --
   data-sources
 data-source autoCommit=false description=Struts Test1 DB
   driverClass=sun.jdbc.odbc.JdbcOdbcDriver maxCount=4 minCount=2
 password=TIGER url=jdbc:odbc:DEVELOPMENT
 user=SCOTT /
   /data-sources
 
   !-- == Form Bean Definitions
 === --
   form-beans
 !-- Example logon form bean --
form-bean name=loginForm type=strutstest1.LoginForm/
   /form-beans
 
   !-- == Global Forward Definitions
 == --
   global-forwards
!-- Example logon forward --
forward name=login path=/login.jsp/
 forward name=failure path=/login.jsp/
 forward name=success path=/mainmenu.jsp/
   /global-forwards
 
   !-- == Action Mapping Definitions
 == --
   action-mappings
 !-- Example logon action --
 action path=/login type=strutstest1.LoginAction
   name=loginForm scope=request input=/login.jsp
 /action
 
 !-- The standard administrative actions available with Struts --
 !-- These would be either omitted or protected by security --
 !-- in a real application deployment --
 action path=/admin/addFormBean
 type=org.apache.struts.actions.AddFormBeanAction/
 action path=/admin/addForward
 type=org.apache.struts.actions.AddForwardAction/
 action path=/admin/addMapping
 type=org.apache.struts.actions.AddMappingAction/
 action path=/admin/reload
 type=org.apache.struts.actions.ReloadAction/
 action path=/admin/removeFormBean
 type=org.apache.struts.actions.RemoveFormBeanAction/
 action path=/admin/removeForward
 type=org.apache.struts.actions.RemoveForwardAction/
 action path=/admin/removeMapping
 type=org.apache.struts.actions.RemoveMappingAction/
 
   /action-mappings
 /struts-config
 
 LoginAction.java
 
 package strutstest1;
 
 import java.io.PrintWriter;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionServlet;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionForm;
 
 public class LoginAction extends Action
 {
  public ActionForward perform( ActionServlet servlet,
ActionMapping mapping,
   ActionForm form,
   javax.servlet.http.HttpServletRequest request,
   javax.servlet.http.HttpServletResponse response )
   {
   String userID = ;
 String password = ;
 
 PrintWriter out = null;
 
ActionForward actionForward = null;
 
 try
 {
  userID = ( ( LoginForm ) form ).getUserID();
  password = ( ( LoginForm ) form ).getPassword();
 
   out = response.getWriter();
 
   out.println( User ID  = [ + userID + ] br );
   out.println( Password = [ + password + ] br );
 }
 catch( Exception error )
 {
  System.out.println( Error Occurred:  + error.toString() );
 }
 
 actionForward = mapping.findForward( success );
 
 return( actionForward );
   }
 }
 
 
 LoginForm.java
 ===
 package strutstest1;
 
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionErrors;
 
 public class LoginForm extends ActionForm
 {
  private String userID = ;
   private String password = ;
 
   public 

RES: Struts Config Problem - Ryan Norman

2002-03-28 Thread Gilson Nascimento D Elrei


Send us the error message that you're receiving.
cheers
Gilson DElrei


 - Mensagem original -
 De:   Ryan Norman [SMTP:[EMAIL PROTECTED]]
 Enviada em:   quarta-feira, 27 de março de 2002 21:42
 Para: [EMAIL PROTECTED]; LA Java User Group
 Assunto:  Struts Config Problem - Ryan Norman
 
 Hi All,
 
 I am Ryan Norman
 
 I am trying to put together a simple sample application. 
 Right now I have a login page upon submitting the user name and password I
 want it to be transferred
 to another page.
 
 For some reason, it is not working.
 
 Can somebody help me with this?
 
 I am pasting my code and struts-config.xml file contents.
 
 Thanks in advance
 
 struts-config.xml
 
 ?xml version=1.0 encoding=ISO-8859-1 ?
 
 !DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
 http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
 
 !--
  This is a blank Struts configuration file based on the example
 application,
  with commented examples of some items.
 
  NOTE: If you have a generator tool to create the corresponding Java
 classes
  for you, you could include the details in the form-bean
 declarations.
  Otherwise, you would only define the form-bean element itself, with
 the
  corresponding name and type attributes, as shown here.
 --
 
 struts-config
   !-- == Data Source Configuration
 === --
   data-sources
 data-source autoCommit=false description=Struts Test1 DB
   driverClass=sun.jdbc.odbc.JdbcOdbcDriver maxCount=4 minCount=2
 password=TIGER url=jdbc:odbc:DEVELOPMENT
 user=SCOTT /
   /data-sources
 
   !-- == Form Bean Definitions
 === --
   form-beans
 !-- Example logon form bean --
form-bean name=loginForm type=strutstest1.LoginForm/
   /form-beans
 
   !-- == Global Forward Definitions
 == --
   global-forwards
!-- Example logon forward --
forward name=login path=/login.jsp/
 forward name=failure path=/login.jsp/
 forward name=success path=/mainmenu.jsp/
   /global-forwards
 
   !-- == Action Mapping Definitions
 == --
   action-mappings
 !-- Example logon action --
 action path=/login type=strutstest1.LoginAction
   name=loginForm scope=request input=/login.jsp
 /action
 
 !-- The standard administrative actions available with Struts --
 !-- These would be either omitted or protected by security --
 !-- in a real application deployment --
 action path=/admin/addFormBean
 type=org.apache.struts.actions.AddFormBeanAction/
 action path=/admin/addForward
 type=org.apache.struts.actions.AddForwardAction/
 action path=/admin/addMapping
 type=org.apache.struts.actions.AddMappingAction/
 action path=/admin/reload
 type=org.apache.struts.actions.ReloadAction/
 action path=/admin/removeFormBean
 type=org.apache.struts.actions.RemoveFormBeanAction/
 action path=/admin/removeForward
 type=org.apache.struts.actions.RemoveForwardAction/
 action path=/admin/removeMapping
 type=org.apache.struts.actions.RemoveMappingAction/
 
   /action-mappings
 /struts-config
 
 LoginAction.java
 
 package strutstest1;
 
 import java.io.PrintWriter;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionServlet;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionForm;

 public class LoginAction extends Action
 {
  public ActionForward perform( ActionServlet servlet,
ActionMapping mapping,
   ActionForm form,
   javax.servlet.http.HttpServletRequest request,
   javax.servlet.http.HttpServletResponse response )
   {
   String userID = ;
 String password = ;
 
 PrintWriter out = null;
 
ActionForward actionForward = null;
 
 try
 {
  userID = ( ( LoginForm ) form ).getUserID();
  password = ( ( LoginForm ) form ).getPassword();
 
   out = response.getWriter();
 
   out.println( User ID  = [ + userID + ] br );
   out.println( Password = [ + password + ] br );
 }
 catch( Exception error )
 {
  System.out.println( Error Occurred:  + error.toString() );
 }
 
 actionForward = mapping.findForward( success );
 
 return( actionForward );
   }
 }
 
 
 LoginForm.java
 ===
 package strutstest1;
 
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionErrors;
 
 public class LoginForm extends ActionForm
 {
  private String userID = ;
   private String password = ;
 
   public String getUserID()
   {
return( ( userID 

Re: struts get and set methods in formbeans

2002-03-28 Thread @Basebeans.com

Subject: Re: struts get and set methods in formbeans
From: David Bolsover [EMAIL PROTECTED]
 ===
Hi Jose.

Check out the standard rules for JavaBeans - generally:

private String foo;

public String getFoo(){
return this.foo;
}

public void setFoo(String foo){
this.foo = foo;
}

Note the case of  variable and get/set methods.

If you use an IDE like JBuilder, you will find that there are various helper
tools available to generate the get/set methods from the variables.

regards

David Bolsover
[EMAIL PROTECTED]

Jose Casas [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hello,

 I got a question about the get and set methods in the form beans.  Does
the
 get or set method need to have the name of the member variable in it?
 For example, if I have a member variable named userPassword do I have to
 have a get/set method called getuserPassword/setuserPassword or can I put
 getPassword/setPassword.  I guess what I'm asking is does the variable
have
 to appear exactly the same in the get/set method.

 Thank you.



 **
 This email and any files transmitted with it are confidential
 and intended solely for the individual or entity to
 whom they are addressed.  If you have received this email
 in error destroy it immediately.
 **


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




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




Re: Save/Update data to XML-File

2002-03-28 Thread Ted Husted

The digester is bi-directional, and can create a JavaBean from XML, or
XML from a JavaBean. The RSS digester is a good example. 

http://jakarta.apache.org/commons/digester/commons-digester-1.1.1/docs/api/org/apache/commons/digester/rss/RSSDigester.html

This approach could be used to store user profiles, but I'm not aware of
a published implementation. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


[EMAIL PROTECTED] wrote:
 
 Hi,
 
 in the struts-example the user data can be read with the help of a
 hashtable an a struts digester.
 But whats about updating the data in the xml-file after user changes?
 The digester can't do. Is there any possibility with struts to update the
 hastable data in the xml-file comfortable.
 Or is there a need to do this outside with e.g. jdom and xerces not so
 comfortable?
 
 Has somebody an advice or an code example?
 
 Thanks
 Susanne
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Logical OR, AND etc....in Struts

2002-03-28 Thread Ted Husted

The logic tags are not designed to do anything so complex. Generally
complex logic would be resolved in the Action before forwarding to the
bean, or by some helper JavaBean in the request that would return a
simple value that would be meaningful to a page designer. It's important
to remember that Struts encourages the use of tags as way of exposing
JavaBean properties, not as a true programming element. 

The logic tags can be nested, but resolving complex equations is outside
the intended scope.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Tanmay Ghorai wrote:
 
 Hi All,
  Can you please let me know how to write Logical OR, AND etc in the Jsp
 pages using struts Logic template.
 Thanks and Regds
 Tanmay
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Error: Cannot find message resources

2002-03-28 Thread Ted Husted

If it seems like JRUN issue then take it up with JRUN. It's a commercial
product and should have people who are paid to solve problems like this.
If it works under Tomcat, Sun's reference implementation, but not under
JRUN, then the implication is that JRUN is non-compliant. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Gilson Nascimento D Elrei wrote:
 
 I'm trying to running a simple example JSP/Servlet application on JRUN, but
 i'm receiving this error message below
  javax.servlet.jsp.JspException: Cannot find message resources under key
 org.apache.struts.action.MESSAGE
 I have checked the ARCHIVE message and looking for on search mechanisms
 about it, but i didn't find a solution.
 In Tomcat my sample application has running without problems. I have
 verified my web.xml file for path errors, and i haven't encountered problems
 in it. The applicationResources.properties file is localized in a classpath
 directory and match with web.xml parameter.
 I think that it's a JRUN problem cos in my house i have installed the same
 application on Tomcat and it's OK.
 Any idea ?
 Thanks in advance.
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Which action to go back?

2002-03-28 Thread Ted Husted

It sounds like that you need some type of JavaBean in the session that
will store that you can set to the name of an ActionForward representing
the current SomeCaller. A html:link tag on the page could then look
for that bean, and obtain the correct action forward for that user.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


[EMAIL PROTECTED] wrote:
 
 Let's say I have application that let's me go5 pages deep from some starting point 
(every 1 has own menu pointing to subpages).
 And most of these pages have link Back.
 Everything would be very easy if Back on some page Deep ALWAYS points topage 
SomeCaller.
 The problem is that page Deep may be called from more than 1 place, and I want to 
return to the caller. Always.
 What is the best way to do it?
 It should probably always point to some action, that would know to which 
forward-mapping redirect to.
 But how does it know where to go?
 Remember that is is multilevel hierarchy ...
 
   Darek
 
 --
 
 Okre¶l Swoje potrzeby - my znajdziemy ofertê za Ciebie!
 
 [ http://oferty.onet.pl ]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: email format

2002-03-28 Thread Ted Husted

I wasn't actually aware that a change had taken place. If it has
changed, it was at the system admin level. It would probably affect all
the digest, not just ours, and so you might want to take it up with the
PMC on the General list. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Yu, Yanhui wrote:
 
 Hi,
 
 I am sending my own opinion on the new attachment format on the emails.  I
 hope I am not asking for something that no other people likes.
 
 I liked the old format where all the posted messages are listed in the
 preview of the email, so I can see all the posted messages with titles at a
 glance, and easier to keep track which posting I read and which not yet.
 Now the message itself is empty, I have to check the attachment list to read
 individual posting, not very convenient.
 
 Wonder if we can go back to the old email format.
 
 Thanks very much,
 Yanhui
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Struts and Client Side JavaScript Design Question

2002-03-28 Thread Ted Husted

Managing JavaScripts in a Struts application is not much different than
managing it any Java application, so everything you've already read
should apply. 

One trick is to use the html:rewrite tag to resolve the address to
JavaScripts and other HTML assets, so that the path does not have to be
embedded in the markup. You can also use it to set the base hyperlink
for passing values to a script

SCRIPT
!--
function doScript(aScript) {
  aBase = 'html:rewrite forward=itemPreview/';
  HC_doOpenRemote(aBase + '?item=' +
aScript,'preview','*','600','scrollbars','form');
}
// --
/SCRIPT

and of course bean:write can help you buld runtime referneces 

a href='javascript:doScript(bean:write name=row
property=item/)'bean:write name=row property=item//a

I believe you can also use actions to create dynamic JavaScripts. So
instead of storing the *.js file on the server, you could have it
returned by an Action. 

Of course, JSP tags can also write dynamic scripts into the file, as the
Struts Validator does. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


[EMAIL PROTECTED] wrote:
 
 Greetings.
  We are in the early planning stages of a rather large Java/jsp application
 that if I have my way will use struts.  There will be a requirement for some
 convenience  features that will need to be in javascript.   I understand the
 pros's and con's of javascript and this will for the most part be for internal
 users.
 
 Where possible, I look forward to using the validator  and  I like the way that
 it 'manages' the validation library.
 There will be many other functions such as auto population of controls from
 other events and some simple column math and so on.
 
 In the past I read several articles on managing javascript from the server side.
 Other than storing all of it in a bunch of *.js files, can anyone share any
 experience they have had where they have been forced to maintain a large amount
 of javascript in a Struts application.
 
 Thanks everyone
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




RE: Struts Config Problem - Ryan Norman

2002-03-28 Thread Mike Finn

Ryan,

Please include more detail than  it is not working, like what the error or
exception thrown is. Otherwise we can't help troubleshoot.

Also, if it's an option, you may want to take a look at declarative
security. The container manages the authentication and authorization
procedures. You have an option of FORM (HTML login form, in which you
basically post j_username and j_password to j_security_check), or BASIC, in
which case the user is prompted by the browser (popup window) for user and
passwd.

Mike

-Original Message-
From: Ryan Norman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 7:42 PM
To: [EMAIL PROTECTED]; LA Java User Group
Subject: Struts Config Problem - Ryan Norman


Hi All,

I am Ryan Norman

I am trying to put together a simple sample application.
Right now I have a login page upon submitting the user name and password I
want it to be transferred
to another page.

For some reason, it is not working.

Can somebody help me with this?

I am pasting my code and struts-config.xml file contents.

Thanks in advance

struts-config.xml

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

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

!--
 This is a blank Struts configuration file based on the example
application,
 with commented examples of some items.

 NOTE: If you have a generator tool to create the corresponding Java
classes
 for you, you could include the details in the form-bean declarations.
 Otherwise, you would only define the form-bean element itself, with
the
 corresponding name and type attributes, as shown here.
--

struts-config
  !-- == Data Source Configuration
=== --
  data-sources
data-source autoCommit=false description=Struts Test1 DB
  driverClass=sun.jdbc.odbc.JdbcOdbcDriver maxCount=4 minCount=2
password=TIGER url=jdbc:odbc:DEVELOPMENT
user=SCOTT /
  /data-sources

  !-- == Form Bean Definitions
=== --
  form-beans
!-- Example logon form bean --
   form-bean name=loginForm type=strutstest1.LoginForm/
  /form-beans

  !-- == Global Forward Definitions
== --
  global-forwards
   !-- Example logon forward --
   forward name=login path=/login.jsp/
forward name=failure path=/login.jsp/
forward name=success path=/mainmenu.jsp/
  /global-forwards

  !-- == Action Mapping Definitions
== --
  action-mappings
!-- Example logon action --
action path=/login type=strutstest1.LoginAction
  name=loginForm scope=request input=/login.jsp
/action

!-- The standard administrative actions available with Struts --
!-- These would be either omitted or protected by security --
!-- in a real application deployment --
action path=/admin/addFormBean
type=org.apache.struts.actions.AddFormBeanAction/
action path=/admin/addForward
type=org.apache.struts.actions.AddForwardAction/
action path=/admin/addMapping
type=org.apache.struts.actions.AddMappingAction/
action path=/admin/reload
type=org.apache.struts.actions.ReloadAction/
action path=/admin/removeFormBean
type=org.apache.struts.actions.RemoveFormBeanAction/
action path=/admin/removeForward
type=org.apache.struts.actions.RemoveForwardAction/
action path=/admin/removeMapping
type=org.apache.struts.actions.RemoveMappingAction/

  /action-mappings
/struts-config

LoginAction.java

package strutstest1;

import java.io.PrintWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;

public class LoginAction extends Action
{
 public ActionForward perform( ActionServlet servlet,
   ActionMapping mapping,
  ActionForm form,
  javax.servlet.http.HttpServletRequest request,
  javax.servlet.http.HttpServletResponse response )
  {
  String userID = ;
String password = ;

PrintWriter out = null;

   ActionForward actionForward = null;

try
{
 userID = ( ( LoginForm ) form ).getUserID();
 password = ( ( LoginForm ) form ).getPassword();

  out = response.getWriter();

  out.println( User ID  = [ + userID + ] br );
  out.println( Password = [ + password + ] br );
}
catch( Exception error )
{
 System.out.println( Error Occurred:  + error.toString() );
}

actionForward = mapping.findForward( success );

return( actionForward );
  }
}


LoginForm.java
===
package strutstest1;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import 

Re: html:options Iterator Creation error -

2002-03-28 Thread Ted Husted

If PersonalForm has a 

Collection getSecurityOptions();

method then it does look OK. 

This shouldn't matter, but you could try a type property with
bean:define

-Ted.


Sunder wrote:
 
 Hi,
 I am trying to implement the html:options tag in one of our
 applications,
 
 I have a form bean with the following attributes,
 
 private Collection securityOptions = null;
 private String security = Default;
 
 In my action class, I populate the collection with
 
 PersonalForm perform = (PersonalForm) form;
 Collection list = (Collection) new ArrayList();
 for(int i = 0; i10; i++)
 {
 list.add(new LabelValueBean(Default,Value));
 }
 perform.setSecurityOptions(list);
 
 and finally in my jsp, I try to display the collection using
 html:options tag as follows
 
  html:select property=security multiple=false
  bean:define id=myCollection name=personalForm
 property=securityOptions/
   html:options collection=myCollection property=value
 labelProperty=label/
 /html:select
 
 I get the following error when I try to view the page
 
 javax.servlet.ServletException: Cannot create iterator for
 at
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
 tImpl.java:463)
 at
 org.apache.jsp.personal$jsp._jspService(personal$jsp.java:1031)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
 t.java:202)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
 her.java:683)
 - Root Cause -
 javax.servlet.jsp.JspException: Cannot create iterator for
 at
 org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:420
 )
 at
 org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:222)
 at
 org.apache.jsp.personal$jsp._jspService(personal$jsp.java:785)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
 Any comments,suggestions? Appreciate your help.
 
 Thanks,
 Sunder
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Can Dreamweaver and Struts work together

2002-03-28 Thread Daniel WAMARA

I'm using Dreamweaver since the version 2 and now I'm in the 4th and work 
with Struts, you can use DW4 qith Struts by adding an extension that you can 
find on http://javacentral.compuware.com and download OptimalJ Dreamweaver 
Integration Kit 1.0.9 and you will be able to directly add Struts tag into 
your JSPs but the only problem is the fact that the process takes 2 or 3 
seconds when normal tags take less than a second.

Daniel

_
MSN Photos est le moyen le plus simple de partager, modifier et imprimer vos 
photos préférées. http://photos.msn.fr/Support/WorldWide.aspx


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




Re: Websphere specific problem with template:get tag (flushing..

2002-03-28 Thread Marcelo Caldas

Hi guys,

I realized that adding the flush=true to my  templage:get tag works just fine...
The problem is that inside that template:put direct=true tag, I have some 
jsp:include flush=true that is the reason for all my problems...

Does anyone knows a good workaround for that?
I'm trying bean:include, so far without success...

thanks in advance,
Marcelo.

On Wed, 27 Mar 2002 12:52:17 -0500
Marcelo Caldas [EMAIL PROTECTED] wrote:

 Hi guys,
 I'm trying to deploy my application (developed so far on Oracle 91AS) to
 WebSphere...
 
 First error I got is a illegal to flush within a custom tag...
 I realized that the only struts tag that tries to flush is the
 template.GetTag. Although I'm using a very recent nightly build
 (2002-03-17), this behavior exists even on struts 1.0
 
 I tried to add the template:get flush=true, but so far, no success..
 Any one knows how to overcome this problem?
 
 The Websphere that I'm using is 4.0.2 on a linux machine
 
 thanks in advance, Marcelo.
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




RE: Save/Update data to XML-File

2002-03-28 Thread Tero P Paananen

 The digester is bi-directional, and can create a JavaBean from XML, or
 XML from a JavaBean. The RSS digester is a good example. 
 
 http://jakarta.apache.org/commons/digester/commons-digester-1.
 1.1/docs/api/org/apache/commons/digester/rss/RSSDigester.html
 
 This approach could be used to store user profiles, but I'm 
 not aware of
 a published implementation. 

I have been experimenting with Castor (castor.exolab.org),
an open source data binding framework for Java.

It's rather nice, but one thing it can't, yet, do too
well is xml mapping into hashtables, sets or maps.

JavaBeans it can do very nicely.

-TPP

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




RE: struts get and set methods in formbeans

2002-03-28 Thread Jose Casas

Thanks David,

Does the foo member variable have to be exactly the same as the property in
the jsp?
THanks.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Struts Newsgroup [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 5:55 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: struts get and set methods in formbeans
 
 Subject: Re: struts get and set methods in formbeans
 From: David Bolsover [EMAIL PROTECTED]
  ===
 Hi Jose.
 
 Check out the standard rules for JavaBeans - generally:
 
 private String foo;
 
 public String getFoo(){
 return this.foo;
 }
 
 public void setFoo(String foo){
 this.foo = foo;
 }
 
 Note the case of  variable and get/set methods.
 
 If you use an IDE like JBuilder, you will find that there are various
 helper
 tools available to generate the get/set methods from the variables.
 
 regards
 
 David Bolsover
 [EMAIL PROTECTED]
 
 Jose Casas [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]...
  Hello,
 
  I got a question about the get and set methods in the form beans.  Does
 the
  get or set method need to have the name of the member variable in it?
  For example, if I have a member variable named userPassword do I have to
  have a get/set method called getuserPassword/setuserPassword or can I
 put
  getPassword/setPassword.  I guess what I'm asking is does the variable
 have
  to appear exactly the same in the get/set method.
 
  Thank you.
 
 
 
  **
  This email and any files transmitted with it are confidential
  and intended solely for the individual or entity to
  whom they are addressed.  If you have received this email
  in error destroy it immediately.
  **
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




Problem starting struts beta 1.1

2002-03-28 Thread Juan Alvarado \(Struts List\)

After following the directions for installation of the 1.1 beta of struts, I
got the following message when I started tomcat:

The lib folder of my app contains all the jar files that I believe are
needed. Additionally, my classpath is set to include jaxp.jar, crimson.jar
and jdbc2_0-stdext.jar as it is instructed in the installation
documentation.

Can anybody please tell what might be wrong.

Thanks


2002-03-28 09:03:18 - Ctx(/struts-upload) : Validating web.xml
2002-03-28 09:03:18 - Ctx(/struts-upload) : Exception in preInit
java.lang.Cla
NotFoundException: org.apache.commons.logging.impl.LogFactoryImpl -
org.apache
ommons.logging.LogConfigurationException: java.lang.ClassNotFoundException:
or
apache.commons.logging.impl.LogFactoryImpl
at
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:49

at
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:35

at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:33

at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.tomcat.facade.ServletHandler.getServlet(Unknown
Source)
at org.apache.tomcat.facade.ServletHandler.preInit(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.init(Unknown Source)
at
org.apache.tomcat.facade.LoadOnStartupInterceptor.contextInit(Unkno
 Source)
at org.apache.tomcat.core.Context.init(Unknown Source)
at org.apache.tomcat.core.ContextManager.init(Unknown Source)
at
org.apache.tomcat.startup.EmbededTomcat.initContextManager(Unknown
urce)
at org.apache.tomcat.startup.EmbededTomcat.execute1(Unknown Source)
at org.apache.tomcat.startup.EmbededTomcat$1.run(Unknown Source)
at
org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Unkn
n Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Unknown
Sou
e)
at org.apache.tomcat.startup.EmbededTomcat.execute(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.tomcat.util.IntrospectionUtils.execute(Unknown Source)
at org.apache.tomcat.startup.Main.execute(Unknown Source)
at org.apache.tomcat.startup.Main.main(Unknown Source)

EmbededTomcat: Init time 9223
2002-03-28 09:03:18 - Http10Interceptor: Starting on 8080
2002-03-28 09:03:18 - Ajp12Interceptor: Starting on 8007
2002-03-28 09:03:18 - Ajp13Interceptor: Starting on 8009
EmbededTomcat: Startup time 91

**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]


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




RE: Problem starting struts beta 1.1

2002-03-28 Thread Juan Alvarado \(Struts List\)

Thanks for the quick reply. I will give it a try also.

**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]

-Original Message-
From: Marcelo Vanzin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 9:38 AM
To: Struts Users Mailing List
Subject: Re: Problem starting struts beta 1.1


Juan Alvarado (Struts List) wrote:
 2002-03-28 09:03:18 - Ctx(/struts-upload) : Validating web.xml
 2002-03-28 09:03:18 - Ctx(/struts-upload) : Exception in preInit
 java.lang.Cla
 NotFoundException: org.apache.commons.logging.impl.LogFactoryImpl -

I had exactly the same problem when we switched from Weblogic 6.1 sp1 to
sp2. Under both sp1 and tomcat 4.0 all worked fine.

I worked around the problem by putting the commons-logging.jar in the
server classpath (not in WEB-INF/lib). This is not the ideal solution if
you have more than 1 application running in the server, though.

Anyone knows what is the cause of this problem?

--
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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



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




RE: Struts 1.0.2 checkbox - Error Message: No collection found

2002-03-28 Thread Yu, Yanhui

Mike,

Actually I did have data in the ArrayList, but I still get this no
collection found error.  Which version of Struts are you using?  Please
post the solution if you find it too :)

Yanhui

-Original Message-
From: Mike Finn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 12:54 PM
To: Struts Users Mailing List
Subject: RE: Struts 1.0.2 checkbox - Error Message: No collection found


Yu,
This looks like the same problem I posted this AM (subject = logic:iterate
and no collection found). I found that if the array actually has data in
it, everything works OK. It's only when it's empty or null that it blows up.
Post if you find a solution and I will do the same. I am going to try to
step through the source this afternoon.
Mike

-Original Message-
From: Yu, Yanhui [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:03 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts 1.0.2 checkbox - Error Message: No collection found


Sorry I forgot that the reset method in the ActionForm looks like this:
==
public void reset(ActionMapping mapping, HttpServletRequest request)
{
cat.debug(ConflictResolutionForm reset);
/*
this.checked = false;
this.linenum = null;
this.field = null;
this.level = null;
this.currentValue = null;
this.overrideValue = null;
*/

 if(conflicts != null) {
for(int i=0; i conflicts.size(); i++) {
((ConflictBean) conflicts.get(i)).setChecked(false);
}
}
}
==
Looking forward to hearing any hints, thank you very much,
Yanhui



-Original Message-
From: Yu, Yanhui
Sent: Wednesday, March 27, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Struts 1.0.2 checkbox - Error Message: No collection found


Hi All,

We are using struts verions 1.0.2 here.  I have a problem using checkbox in
a jsp, getting No collection found error.  Here is my sample code and I
really appreciate if anyone can give me a hand on this.

in jsp
=
logic:iterate id=conflicts name=ConflictResolutionForm
property=conflicts
 type=com.pioneer.sales.terrmaint.demo.ConflictBean
tr
tdhtml:checkbox name=conflicts  property=checked
//td
tdbean:write name=conflicts property=field / /td
tdbean:write name=conflicts property=level / /td
tdbean:write name=conflicts property=currentValue
//td
tdbean:write name=conflicts property=overrideValue /
/td
/tr
/logic:iterate
===

in ConflictBean class

private String linenum = null;
private String field = null;
private String level = null;
private String currentValue = null;
private String overrideValue = null;
private boolean checked = false;

// all public getters and setters for all the String attributes

public boolean getChecked() {
return checked;
}
public void setChecked(boolean _checked){
checked = _checked;
}
==

in Action class
==
ConflictResolutionForm conFlictForm = new ConflictResolutionForm();
ArrayList conflicts = new ArrayList();
// Fill in the list here

ConflictBean cb = new ConflictBean();
cb.setLinenum(1);
cb.setField(Field 1);
cb.setLevel(Area);
cb.setCurrentValue(012345678);
cb.setOverrideValue(012345678);
conflicts.add(cb);

conFlictForm.setConflicts(conflicts);
return (mapping.findForward(conflictresolution));   //set up in
struts-config.xml


in ActionForm
=
private ArrayList conflicts = null;

public ArrayList getConflicts() {
return conflicts;
}

public void setConflicts(ArrayList _conflicts) {
conflicts = _conflicts;
}

public ConflictBean getConflicts(int index) {
return (ConflictBean) conflicts.get(index);
}

public void setConflicts(int index, ConflictBean conflict) {
conflicts.set(index,conflict);
}
==


Any help would be greatly appreciated.  What I did wrong here? Maybe
multibox is what I need?

Yanhui




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



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




RE: self.close() exception

2002-03-28 Thread Dimitar Stavrakov

Try using this : 

function loadOne() {
document.PipelineFilterForm.submit();
setTimeout(self.close(),5000);
}
This should give the form enough time to get submitted, before you
actually close the window. If you're still getting an error, try increasing
the time( which is in milliseconds by the way).

Regards, Dimitar

-Original Message-
From: srinivas [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 27, 2002 5:31 PM
To: Struts Users Mailing List
Subject: RE: self.close() exception

hello,

thats not an error actually.
You are submitting a form and closing the window. So the webserver couldn't
complete ur request so the stack trace.

regards,
srinivas

-Original Message-
From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 11:15 PM
To: Struts Group (E-mail)
Subject: self.close() exception


Hi,
I'm trying to close a window from a javascript function and getting this
error:

java.net.SocketException: socket closed (code=0)
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.io.IOException(java.lang.String)
java.net.SocketException(java.lang.String)
int java.net.SocketInputStream.socketRead(byte [], int, int,
java.net.SocketImpl, java.io.FileDescriptor)
int java.net.SocketInputStream.read(byte [], int, int)
int java.net.SocketInputStream.read()
java.lang.String java.io.DataInputStream.readLine()
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(
java.net.Socket)
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
void java.lang.Thread.run()

The code is:
function setFilter() {
document.PipelineFilterForm.submit();
self.close();
}

html:button value=Set filter onclick=javascript:setFilter();
property=submitButton/

Pls help.

Thnx,
Bhaskar

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



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

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




Struts 1.1Beta and Log4J, No appender Issue

2002-03-28 Thread hemant

Fellow Strutters and Loggers,

I have a webapp using Struts1.0.2 and it works fine. Iam currently using Tomcat 4.0.2 
and Log4J 1.1.3. I read about the enhancements in 1.1beta and decided to use it my 
webapp. 

I suddenly get the following... 

log4j: No appenders could be found for category (org.apache.commons.digester.Digester).
log4j: Please initialize the log4j system properly

I removed 1.1beta and rollbacked to my good ol 1.0.2 and everything works fine. 

Why is Struts 1.1beta messing with my Log4J configuration? (or am I missing 
something?). Please advise.


Thanks for your time
hemant












Re: error

2002-03-28 Thread Jim Crossley

Hi Jose.

The name property should refer to an actual name, not a class.  The
name you should use will be the one referred to in the name
attribute specified in the corresponding action tag in
struts-config.xml.

-- Jim

Jose Casas [EMAIL PROTECTED] writes:

 Does anybody know what this error means. 
 
 Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm in scope
 null
 
 THe following line seems to be causing this error.  When i take it out of my
 jsp, the jsp works fine.
 
 bean:define id=somebean
 name=com.walmart.telecomorder.formbeans.RelocationForm
 property=SelectBox1List type=java.util.ArrayList/
 
 Thanks.
 
 Jose Casas
 
 E-Commerce Applications
 (501) 277-3112
 [EMAIL PROTECTED]
 
 
 
 **
 This email and any files transmitted with it are confidential
 and intended solely for the individual or entity to 
 whom they are addressed.  If you have received this email 
 in error destroy it immediately.
 **
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




error

2002-03-28 Thread Jose Casas

Does anybody know what this error means. 

Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm in scope
null

THe following line seems to be causing this error.  When i take it out of my
jsp, the jsp works fine.

bean:define id=somebean
name=com.walmart.telecomorder.formbeans.RelocationForm
property=SelectBox1List type=java.util.ArrayList/

Thanks.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



**
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email 
in error destroy it immediately.
**

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




RE: error

2002-03-28 Thread Jose Casas

Jim,

I tried changing the name to the one in the struts-config file and it gave
me this error   Cannot find bean logonForm in scope null

bean:define id=somebean name=logonForm property=SelectBox1List
type=java.util.ArrayList/

Here's my struts-config file

struts-config

form-beans
  form-bean name=logonForm
 
type=com.walmart.telecomorder.formbeans.RelocationForm /
/form-beans

action-mappings
action path=/logon
   type=com.walmart.telecomorder.formbeans.RelocationAction
   name=logonForm 
   input=/f_Relocation.jsp
  
  
  forward name=success path=/success.jsp /
  
  forward name=failure path=/failure.jsp /
 
  
/action
/action-mappings
/struts-config

what did i do wrong?

Thanks for your help.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 10:02 AM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 Hi Jose.
 
 The name property should refer to an actual name, not a class.  The
 name you should use will be the one referred to in the name
 attribute specified in the corresponding action tag in
 struts-config.xml.
 
 -- Jim
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  Does anybody know what this error means. 
  
  Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm in
 scope
  null
  
  THe following line seems to be causing this error.  When i take it out
 of my
  jsp, the jsp works fine.
  
  bean:define id=somebean
  name=com.walmart.telecomorder.formbeans.RelocationForm
  property=SelectBox1List type=java.util.ArrayList/
  
  Thanks.
  
  Jose Casas
  
  E-Commerce Applications
  (501) 277-3112
  [EMAIL PROTECTED]
  
  
  
  **
  This email and any files transmitted with it are confidential
  and intended solely for the individual or entity to 
  whom they are addressed.  If you have received this email 
  in error destroy it immediately.
  **
  
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




ANN: Struts BOF-2293 / Thu 28 Mar

2002-03-28 Thread Ted Husted

 Original Message 
Subject: Design Strategies Using Struts
Date: Wed, 27 Mar 2002 10:19:33 -0800 (PST)
From: Christine Eckstein [EMAIL PROTECTED]
Reply-To: Struts Developers List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

I'm currently on a project that is one-year into
implementing a VERY large-scale J2EE solution. We have
chosen to use Struts as our presentation-layer framework. 
While we were completing our physical design activities, we
starting brainstorming on how we wanted to effectively make
use of what Struts had to offer in programmatic application
flow.

If you are interested in observing the strategies we
discussed, the implications of these strategies and what we
eventually decided as our strategy of choice, we will
speaking to these strategies at a Birds of a Feather talk
at JavaOne.  It will be Thursday night, 8:00PM - 8:50PM in
the Sea Cliff room at the Sheraton Palace hotel.  Our
session is titled Coupled and Decoupled Design Strategies
Using Struts and is BOF-2293.  I'm looking forward to
meeting some of you!

~Christine Eckstein

__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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

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




Re: Struts 1.1Beta and Log4J, No appender Issue

2002-03-28 Thread Marcelo Vanzin

hemant wrote:
 log4j: No appenders could be found for category
 (org.apache.commons.digester.Digester).
 log4j: Please initialize the log4j system properly

Struts 1.1b is using the commons-logging package for logging, and in your 
case it is falling back to the Log4j system.

It seems that your Log4j configuration is not being loaded before the 
ActionServlet is loaded, so you get this configuration error from Log4j.

Try doing the Log4j initialization before the ActionServlet initialization.

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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




Re: Need example on using roles in struts-tiles

2002-03-28 Thread mharris

Hello,

We are trying to do a similar thing (authentication and role-based
security based on user and role info acquired from database). Can
someone point me to a good resource to get started or explain how they
set up their system. Users will number in the thousands and there will
be some dynamic comparison of roles, hence setting it up in web.xml
isn't practical.

However, we're not using tiles. The path of the workflow will be based
on roles and whether or not a certain Action can be executed is also
based on roles.

Any advice is much appreciated.

Thanks,
Michelle Harris


On Wed, 2002-03-27 at 20:25, Reynaldo Timonera wrote:
 Thanks Ted.
 
 We are using database-based authentifiication -- we store our user and role
 in a database. We retrieve these user and role info everytime the user logs
 in and place the info in session scrope. I was thinking  if we can set the
 isUserInRole according to the user's role from the database and not from the
 container's web.xml. So I guess the question would be: is it still possible
 to use the security role of tiles for this setup -- database-based.
 
 
 Thanks again,
 
 Reynaldo
 
 - Original Message -
 From: Ted Husted [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, March 27, 2002 8:43 AM
 Subject: Re: Need example on using roles in struts-tiles
 
 
  When container-based authentification is being used, you can specify the
  secuirty role for a tile. If the user is not in the specified role, then
  the attribute value is not set. This allows you to specify a tile for
  each security role, and let the framework select the appropriate one for
  the current user.
 
  tiles:put name=title  value=myValue role=myManager/
  tiles:put name=title  value=myValue role=myStaff/
 
  If the put command is being used in an insert tag, the role is checked
  immediately.  If the put command is being used within a definition tag,
  the role is checked when the Tile context is initialized
 
  Jakarta taglibs also has a handy IsUserInRole tag in the request taglib.
 
  http://jakarta.apache.org/taglibs/doc/request-doc/index.html
 
  -- Ted Husted, Husted dot Com, Fairport NY US
  -- Developing Java Web Applications with Struts
  -- Tel: +1 585 737-3463
  -- Web: http://husted.com/about/services
 
 
  Reynaldo Timonera wrote:
  
   Hi,
  
   We are now in the middle of a project and we're using tiles. Does anyone
 have a sample code on how to use roles in tiles?
  
   Thanks,
   Reynaldo
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]



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




RE: Problem starting struts beta 1.1

2002-03-28 Thread Juan Alvarado \(Struts List\)

A work around for this in Tomcat 3.3a is to put the commons-logging.jar in
the /lib/common folder.

The documentation does not state this. It would be nice to know if this is a
bug, or if this is the way the designers implemented it.

Thanks

**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]

-Original Message-
From: Marcelo Vanzin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 9:38 AM
To: Struts Users Mailing List
Subject: Re: Problem starting struts beta 1.1


Juan Alvarado (Struts List) wrote:
 2002-03-28 09:03:18 - Ctx(/struts-upload) : Validating web.xml
 2002-03-28 09:03:18 - Ctx(/struts-upload) : Exception in preInit
 java.lang.Cla
 NotFoundException: org.apache.commons.logging.impl.LogFactoryImpl -

I had exactly the same problem when we switched from Weblogic 6.1 sp1 to
sp2. Under both sp1 and tomcat 4.0 all worked fine.

I worked around the problem by putting the commons-logging.jar in the
server classpath (not in WEB-INF/lib). This is not the ideal solution if
you have more than 1 application running in the server, though.

Anyone knows what is the cause of this problem?

--
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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



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




FW: Beans Tutorial

2002-03-28 Thread Tarek M. Nabil

I'll try to post this maybe too simple question again.

-Original Message-
From: Tarek M. Nabil 
Sent: Tuesday, March 26, 2002 3:41 PM
To: Struts (E-mail)
Subject: Beans Tutorial


Hi everyone,

I'm new to Struts, and the first thing I learned was that Struts uses a lot of Java 
beans :)

I've done some server side Java development before, but I usually went for the 
spaghetti code method and when I needed to encapsualte any functionality outside of 
the JSP, I usually used normal Java classes. Now, that I want to improve my methods, 
and think Struts is a very good way to do it, I need to learn about Java beans. I 
checked the Java tutorial, but it seems that it is very much focused on beans as gui 
components. I'm not interested in this and I need a beans tutorial that is more 
inclined towards server side development. Can anyone guide me to such a tutorial?

Thanks in advance for your help :)

Tarek M. Nabil
Software Engineer
ITWorx
[EMAIL PROTECTED]
Free Zone, Area 7 (B),
Block (J), Nasr City,
Cairo, Egypt
TEL.: 20-2-2766226
http://www.itworx.com
 

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




RES: Beans Tutorial

2002-03-28 Thread RODRIGO CARVALHO DOS SANTOS


Hi Tarek,

Have you tried http://java.sun.com/j2ee/tutorial/?

Rodrigo.

-Mensagem original-
De: Tarek M. Nabil [mailto:[EMAIL PROTECTED]]
Enviada em: quinta-feira, 28 de março de 2002 13:49
Para: Struts (E-mail)
Assunto: FW: Beans Tutorial


I'll try to post this maybe too simple question again.

-Original Message-
From: Tarek M. Nabil 
Sent: Tuesday, March 26, 2002 3:41 PM
To: Struts (E-mail)
Subject: Beans Tutorial


Hi everyone,

I'm new to Struts, and the first thing I learned was that Struts uses a lot
of Java beans :)

I've done some server side Java development before, but I usually went for
the spaghetti code method and when I needed to encapsualte any functionality
outside of the JSP, I usually used normal Java classes. Now, that I want to
improve my methods, and think Struts is a very good way to do it, I need to
learn about Java beans. I checked the Java tutorial, but it seems that it is
very much focused on beans as gui components. I'm not interested in this and
I need a beans tutorial that is more inclined towards server side
development. Can anyone guide me to such a tutorial?

Thanks in advance for your help :)

Tarek M. Nabil
Software Engineer
ITWorx
[EMAIL PROTECTED]
Free Zone, Area 7 (B),
Block (J), Nasr City,
Cairo, Egypt
TEL.: 20-2-2766226
http://www.itworx.com
 

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

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




Re: FW: Beans Tutorial

2002-03-28 Thread Rick Reumann

Actually you probably won't find many tutorials on this. Someone will
correct me if I'm wrong but all a bean is is basically a java class
with set and get methods. The neat thing about using the set and get
methods in a j2ee world is that there are ways that the application
can just call these set and get methods without you really having to
manually make the calls. So a simple bean might be...

public class Employee {
  private String name;
  private String address;

  public void setName( String name ) {
this.name = name;
  }
  public String getName() {
return name;
  }

  public void setAddress( String address ) {
this.address = address;
  }
  public String getAddress() {
return address;
  }
}

The neat thing about Struts (and I'm totally new to using Struts so
pardon if I state this wrong) is that if you submit a JSP form to an
Action class that uses a form bean like above it will automatically
populate the fields for you ( In other words you don't have to
actually do employee.setName( request.getParameter(name) );, all
that is done for you ). Really cool. There are other things about
beans also like they are usually made serializable, etc., but the
basic thing to know is that a bean is an object with set and get
methods.



On Thursday, March 28, 2002, 11:48:39 AM, Tarek wrote:

TMN I'll try to post this maybe too simple question again.

TMN -Original Message-
TMN From: Tarek M. Nabil 
TMN Sent: Tuesday, March 26, 2002 3:41 PM
TMN To: Struts (E-mail)
TMN Subject: Beans Tutorial


TMN Hi everyone,

TMN I'm new to Struts, and the first thing I learned was that Struts uses a lot of 
Java beans :)

TMN I've done some server side Java development before, but I usually went for the 
spaghetti code method and when I needed to encapsualte any functionality outside of 
the JSP, I usually used normal
TMN Java classes. Now, that I want to improve my methods, and think Struts is a very 
good way to do it, I need to learn about Java beans. I checked the Java tutorial, but 
it seems that it is very
TMN much focused on beans as gui components. I'm not interested in this and I need a 
beans tutorial that is more inclined towards server side development. Can anyone guide 
me to such a tutorial?

TMN Thanks in advance for your help :)

TMN Tarek M. Nabil
TMN Software Engineer
TMN ITWorx
TMN [EMAIL PROTECTED]
TMN Free Zone, Area 7 (B),
TMN Block (J), Nasr City,
TMN Cairo, Egypt
TMN TEL.: 20-2-2766226
TMN http://www.itworx.com
 

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



-- 

Rick
mailto:[EMAIL PROTECTED]

Perhaps, if I am very lucky, the feeble efforts of my lifetime will
someday be noticed, and maybe, in some small way, they will be
acknowledged as the greatest works of genius ever created by Man. 
  -Jack Handey


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




Upload problem

2002-03-28 Thread Frederic Bidet


Hi,

I'm working on a content management project and I'm having some problem with upload.
I have a document bean and I'm trying to upload files as attachements.
When I run my app, the file is uploaded on the server and the database is updated.
Then my uploadAction forward to the viewDocumentAction but I get an exception
before the viewDocumentAction is executed.

--- end of my uploadAction file :
String forward = mapping.findForward(success).getPath();
forward = forward + ?idDoc= + idDoc;
servlet.log( Forwarding to success page + forward);
return (new ActionForward(forward));
}
}

--- my struts-config.xml file:
!-- Upload attachement --
action path=/uploadAttachement
 type=proto.UploadAction
   name=uploadForm
  scope=request
   validate=true
input=/docview.jsp
forward name=success
path=/viewDocument.do
   redirect=true/
/action

Could someone explain me why I get this exception although the upload action 
ended well ?
Thanks.

Fred

-
2002-03-28 17:57:17 jsp: init
2002-03-28 17:57:25 action: UploadAction:  Processing action for Document: n45tf1g8
2002-03-28 17:57:25 action:  Populating Attachement bean: 
Attachement[idAttachement=td45, name=index.jsp, size=1023, type=text/html]
2002-03-28 17:57:25 action:  Forwarding to success page: 
/viewDocument.do?idDoc=n45tf1g8
2002-03-28 17:57:25 ApplicationDispatcher[/proto] Servlet.service() for servlet action 
threw exception
javax.servlet.ServletException: Multipart data doesn't start with boundary
at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:103)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:908)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:795)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:244)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:972)
at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:408)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 

dynamic select box

2002-03-28 Thread Jose Casas

when you build a dyanmic select tag, do you need a bean:define tag?

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]




**
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email 
in error destroy it immediately.
**

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




Forwarding to action

2002-03-28 Thread Bhaskar Gopalan

Hi,
what's the way to forward to another action?

This doesn't work:
action path=/LoanPipeline
type=com.mortgagehub.cba.actions.LoanPipelineAction
name=LoanPipelineForm scope=session input=jsp/Pipeline.jsp
validate=true/

action path=/PipelineFilter
type=com.mortgagehub.cba.actions.PipelineFilterAction
name=PipelineFilterForm scope=session input=jsp/Filter.jsp
validate=false
forward name=success path=/LoanPipeline.do/
forward name=failure path=jsp/Filter.jsp/
/action

Thnx,
Bhaskar

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




Is FindDataSource method deprecated ?

2002-03-28 Thread Gilson Nascimento D Elrei

I have read that FindDataSource is deprecated ? Is it correct ? In positive
case, what do I must to use in place ?
thanks 

Gilson

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




Re: Struts 1.1Beta and Log4J, No appender Issue

2002-03-28 Thread hemant

Marcelo ,

Thanks for your response,

The Log4J configuration loaded property when I used Struts 1.0.2. If it
worked then, shouldn't it work now with struts 1.1beta?
Yes, I did look at the Logging class for Log4J, Log4JCategoryLog. but, it
should not interfere with my Log4J settings unless I specifically want it
to.

Regards
hemant








 Original Message -
From: Marcelo Vanzin [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 11:48 AM
Subject: Re: Struts 1.1Beta and Log4J, No appender Issue


 hemant wrote:
  log4j: No appenders could be found for category
  (org.apache.commons.digester.Digester).
  log4j: Please initialize the log4j system properly

 Struts 1.1b is using the commons-logging package for logging, and in your
 case it is falling back to the Log4j system.

 It seems that your Log4j configuration is not being loaded before the
 ActionServlet is loaded, so you get this configuration error from Log4j.

 Try doing the Log4j initialization before the ActionServlet
initialization.

 --
 []'s
 Marcelo Vanzin
 Touch Tecnologia
 [EMAIL PROTECTED]
 Life is too short to drink cheap beer


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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




RE: error

2002-03-28 Thread Joseph Barefoot

Hi Jose,

You need a scope attribute in the action tag for your RelocationAction,
to tell Struts in what context the associated form bean gets placed (legal
values are request, session, and application).  Seems to me that Struts
should complain about the struts-config file if this is missing and there's
an associated form bean, but whatever.  That's why it says ..in scope
null.  There's no value for the scope, so it can't find the bean, and it
just prints out null.

Try this:

..

action path=/logon
   type=com.walmart.telecomorder.formbeans.RelocationAction
   name=logonForm
   input=/f_Relocation.jsp
   scope=request 



more info:
http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_model.html#jav
abeans


happy coding,

Joe Barefoot

-Original Message-
From: Jose Casas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 8:11 AM
To: 'Struts Users Mailing List'
Subject: RE: error


Jim,

I tried changing the name to the one in the struts-config file and it gave
me this error   Cannot find bean logonForm in scope null

bean:define id=somebean name=logonForm property=SelectBox1List
type=java.util.ArrayList/

Here's my struts-config file

struts-config

form-beans
  form-bean name=logonForm

type=com.walmart.telecomorder.formbeans.RelocationForm /
/form-beans

action-mappings
action path=/logon
   type=com.walmart.telecomorder.formbeans.RelocationAction
   name=logonForm
   input=/f_Relocation.jsp


  forward name=success path=/success.jsp /

  forward name=failure path=/failure.jsp /


/action
/action-mappings
/struts-config

what did i do wrong?

Thanks for your help.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 10:02 AM
 To:   Struts Users Mailing List
 Subject:  Re: error

 Hi Jose.

 The name property should refer to an actual name, not a class.  The
 name you should use will be the one referred to in the name
 attribute specified in the corresponding action tag in
 struts-config.xml.

 -- Jim

 Jose Casas [EMAIL PROTECTED] writes:

  Does anybody know what this error means.
 
  Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm in
 scope
  null
 
  THe following line seems to be causing this error.  When i take it out
 of my
  jsp, the jsp works fine.
 
  bean:define id=somebean
  name=com.walmart.telecomorder.formbeans.RelocationForm
  property=SelectBox1List type=java.util.ArrayList/
 
  Thanks.
 
  Jose Casas
 
  E-Commerce Applications
  (501) 277-3112
  [EMAIL PROTECTED]
 
 
 
  **
  This email and any files transmitted with it are confidential
  and intended solely for the individual or entity to
  whom they are addressed.  If you have received this email
  in error destroy it immediately.
  **
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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

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


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




RE: error

2002-03-28 Thread Jose Casas

Thanks for your reply Joseph, but I just finished doing that and now it
tells me this:
Cannot find bean logonForm in scope session

Thanks.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Joseph Barefoot [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 12:16 PM
 To:   Struts Users Mailing List
 Subject:  RE: error
 
 Hi Jose,
 
 You need a scope attribute in the action tag for your
 RelocationAction,
 to tell Struts in what context the associated form bean gets placed (legal
 values are request, session, and application).  Seems to me that Struts
 should complain about the struts-config file if this is missing and
 there's
 an associated form bean, but whatever.  That's why it says ..in scope
 null.  There's no value for the scope, so it can't find the bean, and it
 just prints out null.
 
 Try this:
 
 ..
 
 action path=/logon
type=com.walmart.telecomorder.formbeans.RelocationAction
name=logonForm
input=/f_Relocation.jsp
  scope=request 
 
 
 
 more info:
 http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_model.html#j
 av
 abeans
 
 
 happy coding,
 
 Joe Barefoot
 
 -Original Message-
 From: Jose Casas [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 8:11 AM
 To: 'Struts Users Mailing List'
 Subject: RE: error
 
 
 Jim,
 
 I tried changing the name to the one in the struts-config file and it gave
 me this error   Cannot find bean logonForm in scope null
 
 bean:define id=somebean name=logonForm property=SelectBox1List
 type=java.util.ArrayList/
 
 Here's my struts-config file
 
 struts-config
 
 form-beans
   form-bean name=logonForm
 
 type=com.walmart.telecomorder.formbeans.RelocationForm /
 /form-beans
 
 action-mappings
 action path=/logon
type=com.walmart.telecomorder.formbeans.RelocationAction
name=logonForm
input=/f_Relocation.jsp
 
 
   forward name=success path=/success.jsp /
 
   forward name=failure path=/failure.jsp /
 
 
 /action
 /action-mappings
 /struts-config
 
 what did i do wrong?
 
 Thanks for your help.
 
 Jose Casas
 
 E-Commerce Applications
 (501) 277-3112
 [EMAIL PROTECTED]
 
 
 
  -Original Message-
  From:   Jim Crossley [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, March 28, 2002 10:02 AM
  To: Struts Users Mailing List
  Subject:Re: error
 
  Hi Jose.
 
  The name property should refer to an actual name, not a class.  The
  name you should use will be the one referred to in the name
  attribute specified in the corresponding action tag in
  struts-config.xml.
 
  -- Jim
 
  Jose Casas [EMAIL PROTECTED] writes:
 
   Does anybody know what this error means.
  
   Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm in
  scope
   null
  
   THe following line seems to be causing this error.  When i take it out
  of my
   jsp, the jsp works fine.
  
   bean:define id=somebean
   name=com.walmart.telecomorder.formbeans.RelocationForm
   property=SelectBox1List type=java.util.ArrayList/
  
   Thanks.
  
   Jose Casas
  
   E-Commerce Applications
   (501) 277-3112
   [EMAIL PROTECTED]
  
  
  
   **
   This email and any files transmitted with it are confidential
   and intended solely for the individual or entity to
   whom they are addressed.  If you have received this email
   in error destroy it immediately.
   **
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




Long Live Poolman

2002-03-28 Thread hemant

Yep, Poolman rocks, Its insanely easy to use and setup. Iam currently using
it in my webapp and it works like a charm. Iam curious to know if anyone has
setup poolman as a Server(ala JDBC datasources on WebSphere) and was able to
do a JNDI lookup on its datasources. How did you get the InitialContext? .

Thanks for your time
hemant


- Original Message -
From: Martin Samm [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 7:08 AM
Subject: Re: HOWTO: Lessons learned from using Struts, Tomcat and Oracle


 alternatively, use poolman, which although 'dead' can still be had from
 Sourceforge. i'm also using Struts / Tomcat (3.2 however) and Oracle (all
on
 *nix). I haven't tried Tomcat / Struts pooling, but opted for poolman
instead
 and found it easy to setup

 On Friday 22 Mar 2002 12:04 pm, you wrote:
   Original Message 
  Subject: Lessons learned from using Struts, Tomcat and Oracle
  Date: Thu, 21 Mar 2002 19:43:22 -0800 (PST)
  From: Walter S. So [EMAIL PROTECTED]
 
  Hi Ted,
 
  I just want to share this information in case someone else also
  goes through the same problems I did.  I was able to come up
  with this solution after spending an entire afternoon searching
  through the net and archives, so if it saves people a few hours
  of debugging, I'll be happy.  I am not sure how to categorize it
  or even which mailing list to send this, whether it should go to
  Tomcat, Struts, or Tyrex, so I decided to send it to you since
  you are active in Jakarta.
 
  My goal was to set up a Connection Pooled DataSource using
  Oracle running Struts on Tomcat.  I use Tomcat 4.0.3, Struts
  1.1-b1-lib, Oracle 8.1.7 classes12.zip running on Windows 98,
  but it should work well on Solaris/Linux.
 
  Initially, I set up the Oracle JDBC drivers under my webapp and
  used the datasource in struts-config.xml to access Oracle.  My
  application consistently hung after the pool was exhausted.
  (For example, if I set the minCount and maxCount to 10, my
  webapp would hang after 10 requests)  The problem of Oracle
  connections not being returned properly by the Struts pool was
  well documented in the mailing list, so I switched the
  datasource from struts-config.xml to tomcat's server.xml.  I
  followed the instructions in the Tomcat jndi-resources-howto and
  copied the Oracle drivers to common/lib after renaming the
  classes12.zip to classes12.jar as suggested by the mailing
  list.
 
  I found my webapp wasn't running properly as the servlet would
  stop executing after context.lookup().  This bothered me because
  Tomcat was not throwing any exceptions. After some more
  research, I changed the debug level in server.xml from 0 to
  99.  This time, the log generated showed a
  java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
  when the lookup() is called.  A post in the tomcat-dev mailing
  list provided the answer:  There was a conflict in the jars of
  tomcat and the webapp.  True enough, I found a
  jdbc2_0-stdext.jar (83KB) that came in tomcat\common\lib, and a
  jdbc2_0-stdext.jar (7KB) that i had unpacked from Struts to my
  web-app.  After deleting the 7KB jar, the lookup() executed
  properly.
 
  To sum up, when using a DataSource in Tomcat and Struts in the
  webapp, make sure to remove the extraneous jdbc2_0-stdext.jar
  that comes with the Struts Lib. :)
 
  Hope that helps,
 
  Walter
 
 
  __
  Do You Yahoo!?
  Yahoo! Movies - coverage of the 74th Academy Awards®
  http://movies.yahoo.com/

 --
 Martin Samm
 [EMAIL PROTECTED]

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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: Struts 1.1Beta and Log4J, No appender Issue

2002-03-28 Thread Marcelo Vanzin

hemant wrote:
 The Log4J configuration loaded property when I used Struts 1.0.2. If it
 worked then, shouldn't it work now with struts 1.1beta?

It worked with 1.0.2, but Struts did not use the commons-logging package 
then, so the log messages weren't printed through Log4j, which is the 
case now.

It seems that you initialize the log4j configuration after the Struts' 
ActionServlet loads, so when the ActionServlet (and the Digester, and 
Beanutils, etc) try to log and log4j is not yet configured, you get that 
error.

I have a servlet that loads some configuration for my application. I've 
set it up so that it loads before the Struts' ActionServlet, so that the 
log4j system is properly initialized when called. Try do do something 
similar.

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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




Newbie question

2002-03-28 Thread Hairon, Patrick

Hi,

I'm new with Struts and I try to make a sample application, but it
doesn't work!  I got this error:

Error: 500 
Location: /stjco/Index.jsp
Internal Servlet Error:
javax.servlet.ServletException: Cannot find bean
org.apache.struts.taglib.html.BEAN in scope null
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
 at
_0002fIndex_0002ejspIndex_jsp_4._jspService(_0002fIndex_0002ejspIndex_jsp_4.
java:196)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)
 Root cause: 
javax.servlet.jsp.JspException: Cannot find bean
org.apache.struts.taglib.html.BEAN in scope null
 at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493)
 at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:188)
 at
_0002fIndex_0002ejspIndex_jsp_4._jspService(_0002fIndex_0002ejspIndex_jsp_4.
java:114)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

Thank you to help me!!!




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




Re: Long Live Poolman

2002-03-28 Thread mharris

I should comment that when we used poolman with Weblogic running against
MySQL at my last job, we suffered performance problems that were fixed
by using the Weblogic pool manager.

However, we're tomcat where I'm at now -- not weblogic. Have not had to
deal with performance yet. I believe we'll be using Avalon for our pool
management.

Best,
Michelle Harris


On Thu, 2002-03-28 at 13:28, hemant wrote:
 Yep, Poolman rocks, Its insanely easy to use and setup. Iam currently using
 it in my webapp and it works like a charm. Iam curious to know if anyone has
 setup poolman as a Server(ala JDBC datasources on WebSphere) and was able to
 do a JNDI lookup on its datasources. How did you get the InitialContext? .
 
 Thanks for your time
 hemant
 
 
 - Original Message -
 From: Martin Samm [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, March 22, 2002 7:08 AM
 Subject: Re: HOWTO: Lessons learned from using Struts, Tomcat and Oracle
 
 
  alternatively, use poolman, which although 'dead' can still be had from
  Sourceforge. i'm also using Struts / Tomcat (3.2 however) and Oracle (all
 on
  *nix). I haven't tried Tomcat / Struts pooling, but opted for poolman
 instead
  and found it easy to setup
 
  On Friday 22 Mar 2002 12:04 pm, you wrote:
    Original Message 
   Subject: Lessons learned from using Struts, Tomcat and Oracle
   Date: Thu, 21 Mar 2002 19:43:22 -0800 (PST)
   From: Walter S. So [EMAIL PROTECTED]
  
   Hi Ted,
  
   I just want to share this information in case someone else also
   goes through the same problems I did.  I was able to come up
   with this solution after spending an entire afternoon searching
   through the net and archives, so if it saves people a few hours
   of debugging, I'll be happy.  I am not sure how to categorize it
   or even which mailing list to send this, whether it should go to
   Tomcat, Struts, or Tyrex, so I decided to send it to you since
   you are active in Jakarta.
  
   My goal was to set up a Connection Pooled DataSource using
   Oracle running Struts on Tomcat.  I use Tomcat 4.0.3, Struts
   1.1-b1-lib, Oracle 8.1.7 classes12.zip running on Windows 98,
   but it should work well on Solaris/Linux.
  
   Initially, I set up the Oracle JDBC drivers under my webapp and
   used the datasource in struts-config.xml to access Oracle.  My
   application consistently hung after the pool was exhausted.
   (For example, if I set the minCount and maxCount to 10, my
   webapp would hang after 10 requests)  The problem of Oracle
   connections not being returned properly by the Struts pool was
   well documented in the mailing list, so I switched the
   datasource from struts-config.xml to tomcat's server.xml.  I
   followed the instructions in the Tomcat jndi-resources-howto and
   copied the Oracle drivers to common/lib after renaming the
   classes12.zip to classes12.jar as suggested by the mailing
   list.
  
   I found my webapp wasn't running properly as the servlet would
   stop executing after context.lookup().  This bothered me because
   Tomcat was not throwing any exceptions. After some more
   research, I changed the debug level in server.xml from 0 to
   99.  This time, the log generated showed a
   java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
   when the lookup() is called.  A post in the tomcat-dev mailing
   list provided the answer:  There was a conflict in the jars of
   tomcat and the webapp.  True enough, I found a
   jdbc2_0-stdext.jar (83KB) that came in tomcat\common\lib, and a
   jdbc2_0-stdext.jar (7KB) that i had unpacked from Struts to my
   web-app.  After deleting the 7KB jar, the lookup() executed
   properly.
  
   To sum up, when using a DataSource in Tomcat and Struts in the
   webapp, make sure to remove the extraneous jdbc2_0-stdext.jar
   that comes with the Struts Lib. :)
  
   Hope that helps,
  
   Walter
  
  
   __
   Do You Yahoo!?
   Yahoo! Movies - coverage of the 74th Academy Awards®
   http://movies.yahoo.com/
 
  --
  Martin Samm
  [EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]



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




Re: error

2002-03-28 Thread Jim Crossley

What you have looks correct to me, Jose.  What are you trying to pull
up in the browser: the JSP or the Action?  The error you're getting
makes me think you're not invoking the ActionServlet (the C in MVC) so
it's not instantiating your formbean (the M in MVC) and making it
available to the JSP (the V in MVC).  Are you trying to pull up the
JSP in the browser directly?  That won't work.

-- Jim

Jose Casas [EMAIL PROTECTED] writes:

 Jim,
 
 I tried changing the name to the one in the struts-config file and it gave
 me this error   Cannot find bean logonForm in scope null
 
 bean:define id=somebean name=logonForm property=SelectBox1List
 type=java.util.ArrayList/
 
 Here's my struts-config file
 
 struts-config
 
 form-beans
   form-bean name=logonForm
  
 type=com.walmart.telecomorder.formbeans.RelocationForm /
 /form-beans
 
 action-mappings
 action path=/logon
type=com.walmart.telecomorder.formbeans.RelocationAction
name=logonForm 
input=/f_Relocation.jsp
   
   
   forward name=success path=/success.jsp /
   
   forward name=failure path=/failure.jsp /
  
   
 /action
 /action-mappings
 /struts-config
 
 what did i do wrong?
 
 Thanks for your help.
 
 Jose Casas
 
 E-Commerce Applications
 (501) 277-3112
 [EMAIL PROTECTED]
 
 
 
  -Original Message-
  From:   Jim Crossley [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, March 28, 2002 10:02 AM
  To: Struts Users Mailing List
  Subject:Re: error
  
  Hi Jose.
  
  The name property should refer to an actual name, not a class.  The
  name you should use will be the one referred to in the name
  attribute specified in the corresponding action tag in
  struts-config.xml.
  
  -- Jim
  
  Jose Casas [EMAIL PROTECTED] writes:
  
   Does anybody know what this error means. 
   
   Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm in
  scope
   null
   
   THe following line seems to be causing this error.  When i take it out
  of my
   jsp, the jsp works fine.
   
   bean:define id=somebean
   name=com.walmart.telecomorder.formbeans.RelocationForm
   property=SelectBox1List type=java.util.ArrayList/
   
   Thanks.
   
   Jose Casas
   
   E-Commerce Applications
   (501) 277-3112
   [EMAIL PROTECTED]
   
   
   
   **
   This email and any files transmitted with it are confidential
   and intended solely for the individual or entity to 
   whom they are addressed.  If you have received this email 
   in error destroy it immediately.
   **
   
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




RE: error

2002-03-28 Thread Jose Casas

What do you mean by invoking the ActionServlet?  I put it in the web.xml and
my html:form action looks like this 
   html:form action=logon.do

Also, what do you mean when you say that trying to pull up the JSP in the
browser directly won't work?  How am I supposed to do it?  Is there a right
way to do it?

Thanks for helping me out.  


this is my web.xml

web-app
servlet

servlet-nameaction/servlet-name

servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
 param-nameapplication/param-name
 
param-valuecom.walmart.telecomorder.formbeans.ApplicationResources/param-
value
 /init-param
init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namevalidate/param-name
param-valuetrue/param-value
/init-param

load-on-startup1/load-on-startup
/servlet

servlet-mapping

servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping

welcome-file-list

welcome-filelogon.jsp/welcome-file
/welcome-file-list

taglib

taglib-uri/WEB-INF/struts-html.tld/taglib-uri
taglib-location/WEB-INF/struts-html.tld/taglib-location
/taglib

taglib

taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib

/web-app

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 12:43 PM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 What you have looks correct to me, Jose.  What are you trying to pull
 up in the browser: the JSP or the Action?  The error you're getting
 makes me think you're not invoking the ActionServlet (the C in MVC) so
 it's not instantiating your formbean (the M in MVC) and making it
 available to the JSP (the V in MVC).  Are you trying to pull up the
 JSP in the browser directly?  That won't work.
 
 -- Jim
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  Jim,
  
  I tried changing the name to the one in the struts-config file and it
 gave
  me this error   Cannot find bean logonForm in scope null
  
  bean:define id=somebean name=logonForm property=SelectBox1List
  type=java.util.ArrayList/
  
  Here's my struts-config file
  
  struts-config
  
  form-beans
form-bean name=logonForm
   
  type=com.walmart.telecomorder.formbeans.RelocationForm /
  /form-beans
  
  action-mappings
  action path=/logon
 
 type=com.walmart.telecomorder.formbeans.RelocationAction
 name=logonForm 
 input=/f_Relocation.jsp


forward name=success path=/success.jsp /

forward name=failure path=/failure.jsp /
   

  /action
  /action-mappings
  /struts-config
  
  what did i do wrong?
  
  Thanks for your help.
  
  Jose Casas
  
  E-Commerce Applications
  (501) 277-3112
  [EMAIL PROTECTED]
  
  
  
   -Original Message-
   From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
   Sent: Thursday, March 28, 2002 10:02 AM
   To:   Struts Users Mailing List
   Subject:  Re: error
   
   Hi Jose.
   
   The name property should refer to an actual name, not a class.  The
   name you should use will be the one referred to in the name
   attribute specified in the corresponding action tag in
   struts-config.xml.
   
   -- Jim
   
   Jose Casas [EMAIL PROTECTED] writes:
   
Does anybody know what this error means. 

Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm
 in
   scope
null

THe following line seems to be causing this error.  When i take it
 out
   of my
jsp, the jsp works fine.

bean:define id=somebean
name=com.walmart.telecomorder.formbeans.RelocationForm
property=SelectBox1List type=java.util.ArrayList/

Thanks.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



   
 **
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email 
in error destroy it immediately.
   
 **

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

Re: Multiple Selects in a JSP

2002-03-28 Thread @Basebeans.com

Subject: Re: Multiple Selects in a JSP
From: Ken Holzer [EMAIL PROTECTED]
 ===
Hi Larry,

Do you have a sample app demoing this concept? I am not sure how the Action
Form, Action Class and JSP should be setup.

Are the lists built in the Action Form or the Action Class?

Thanks for your help,

Ken
Maturo, Larry [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hi Ken,

 Yes, but by using a small amount of JavaScript:

 html:select property=orgId onchange='document.forms[0].submit()'
 html:options collection=orgList property=value
 labelProperty=shortName/
 /html:select

 You should 0 out the string field orgId in your form bean so that you
 can tell a selection was made comparing it to 0.

 -- Larry Maturo
[EMAIL PROTECTED]

 -Original Message-
 From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
 Sent: Tuesday, March 26, 2002 4:25 PM
 To: [EMAIL PROTECTED]
 Subject: Multiple Selects in a JSP


 Subject: Multiple Selects in a JSP
 From: Ken Holzer [EMAIL PROTECTED]
  ===
 I have two selects in my JSP and I want to be able to dynamically change
the
 options of the 2nd select based on the choice selected from the 1st
select.

 Is there a way to do that using the Struts tags?

 Thanks,

 Ken



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


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




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




error compiling source code bean

2002-03-28 Thread Gilson Nascimento D Elrei

I'm trying to implement this piece of code extracted from 
http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_model.html#dat
abases
but i'm receiving some errors.
Which packages i have to import in my source bean ?
thanks in advance.
Gilson

-- from struts documentation ---

public ActionForward
   perform(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response)
{
 try {
   javax.sql.DataSource dataSource =
 servlet.findDataSource(null);
   java.sql.Connection myConnection =
 dataSource.getConnection();

   //do what you wish with myConnection
 } catch (SQLException sqle) {
   getServlet().log(Connection.process, sqle);
 } finally {

   //enclose this in a finally block to make
   //sure the connection is closed
   try {
 myConnection.close();
   } catch (SQLException e) {
 getServlet().log(Connection.close, e);
   }
 }
}



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




Elegant way of displaying error message - Ryan Norman

2002-03-28 Thread Ryan Norman

Hi,

I am Ryan Norman.

I am using struts framework for my application.

I have a login screen. I authenticate the the user id and password. 
When the authentication fails, I want to display an error message saying User ID 
X does not exist.
Where X is the typed user id. My error message is coming from the 
ApplicationResource.properties file.
I can always have a place holder for the user id in the error message and replace it 
with the current user id. 
But I don't want to do that.

Is there an elegant way of doing this?

Thanks in advance

Ryan Norman




Sun's application compatibility kit?

2002-03-28 Thread Joey Trevino

Does anyone know anything about the new application
compatibility kit that Sun announced at JavaOne. 
Supposedly, it will ensure that your app will work
across all compliant app servers.


Joey

--- Ted Husted [EMAIL PROTECTED] wrote:
 If it seems like JRUN issue then take it up with
 JRUN. It's a commercial
 product and should have people who are paid to solve
 problems like this.
 If it works under Tomcat, Sun's reference
 implementation, but not under
 JRUN, then the implication is that JRUN is
 non-compliant. 
 
 -- Ted Husted, Husted dot Com, Fairport NY US
 -- Developing Java Web Applications with Struts
 -- Tel: +1 585 737-3463
 -- Web: http://husted.com/about/services
 
 
 Gilson Nascimento D Elrei wrote:
  
  I'm trying to running a simple example JSP/Servlet
 application on JRUN, but
  i'm receiving this error message below
   javax.servlet.jsp.JspException: Cannot find
 message resources under key
  org.apache.struts.action.MESSAGE
  I have checked the ARCHIVE message and looking for
 on search mechanisms
  about it, but i didn't find a solution.
  In Tomcat my sample application has running
 without problems. I have
  verified my web.xml file for path errors, and i
 haven't encountered problems
  in it. The applicationResources.properties file is
 localized in a classpath
  directory and match with web.xml parameter.
  I think that it's a JRUN problem cos in my house i
 have installed the same
  application on Tomcat and it's OK.
  Any idea ?
  Thanks in advance.
  
  --
  To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




Re: Struts 1.1Beta and Log4J, No appender Issue

2002-03-28 Thread hemant

Marcelo

Thanks, Will try to make sure that Log4J initializes prior to ActionServlet
load. Earlier, I had a Logger class which had a Category instance
initialized in a static block. Looks like my Logger was loaded prior to
ActionServlet with 1.0.2. Now, I guess I have to write a startup servlet and
load it prior to ActionServlet as you said.

have a good weekend
hemant


public class Logger
{
static Category category = Category.getInstance(mpi);
static {
try
{

String pc = CommonConstants.LOG4JPATH;
System.out.println(pc is  + pc);
if ((pc.trim().length()  0)  (null != pc))
{
Properties pp = new Properties();
URL url = pp.getClass().getResource(pc);
PropertyConfigurator.configure(url);
}
else
{
BasicConfigurator.configure();
}
}
catch (Exception e)
{
System.err.println(Error in Configuration:  + e);
}
}

///
// Lots of methods here for debug(), info(), etc
//

}




---

 hemant wrote:
  The Log4J configuration loaded property when I used Struts 1.0.2. If it
  worked then, shouldn't it work now with struts 1.1beta?

 It worked with 1.0.2, but Struts did not use the commons-logging package
 then, so the log messages weren't printed through Log4j, which is the
 case now.

 It seems that you initialize the log4j configuration after the Struts'
 ActionServlet loads, so when the ActionServlet (and the Digester, and
 Beanutils, etc) try to log and log4j is not yet configured, you get that
 error.

 I have a servlet that loads some configuration for my application. I've
 set it up so that it loads before the Struts' ActionServlet, so that the
 log4j system is properly initialized when called. Try do do something
 similar.

 --
 []'s
 Marcelo Vanzin
 Touch Tecnologia
 [EMAIL PROTECTED]
 Life is too short to drink cheap beer


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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Automatic way of transferring to login screen - Ryan Norman

2002-03-28 Thread Ryan Norman

Hi,

I am running Win 2K advanced server, JDK 1.3, Tomcat 4.0 and struts framework.

I would like to know whether there is an automatic way of transferring the user to the 
login screen in the below given scenarios.
. The first time he enters the application.
. When the session variables expire.
. When an intruder tries to get into the application by typing an valid URL without 
loging into the application.

Thanks in advance

Ryan Norman




RE: Struts 1.0.2 checkbox - Error Message: No collection found

2002-03-28 Thread Yu, Yanhui

Thanks for quite a few very kind people who spent a lot of time trying to
help, but I've not found the solution yet.  Here is our problem again,
please help us if you find a way to solve this problem:

1. There is a class called ConflictBean which has a few String attributes
and a boolean attribute called isChecked to record if the jsp user checked
this bean.
2. The Action constructs a few of these ConflictBean objects, stores them in
an ArrayList, then sets this ArrayList in the ActionForm bean.
3. The JSP page iterates through the ArrayList to build a table so that each
row of this table represents an element  on the ArrayList (a ConflictBean
object).  All the attributes of the ArrayList element, the ConflictBean
object are displayed in different column (cells) of this row.  A checkbox is
provided somewhere in each row (say in the most left column) so that the
user can view all the rows, then he can select all/some/none of the rows
(the ConflictBean objects).  After the form was submitted, the Action needs
to get the list back out and see which ConflictBean were checked.

Please tell us if we have to use an indexed property such as the checkbox in
the newer version to accomplish this or there is a way to do it with version
1.0.2?  Answering this question will point us to the right direction.
THANKS!

Yanhui





-Original Message-
From: Yu, Yanhui 
Sent: Wednesday, March 27, 2002 12:03 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts 1.0.2 checkbox - Error Message: No collection found


Sorry I forgot that the reset method in the ActionForm looks like this:
==
public void reset(ActionMapping mapping, HttpServletRequest request)
{
cat.debug(ConflictResolutionForm reset);
/*
this.checked = false;
this.linenum = null;
this.field = null; 
this.level = null;
this.currentValue = null;
this.overrideValue = null;
*/

 if(conflicts != null) {
for(int i=0; i conflicts.size(); i++) {
((ConflictBean) conflicts.get(i)).setChecked(false);
}
}
}
==
Looking forward to hearing any hints, thank you very much,
Yanhui



-Original Message-
From: Yu, Yanhui 
Sent: Wednesday, March 27, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Struts 1.0.2 checkbox - Error Message: No collection found


Hi All,

We are using struts verions 1.0.2 here.  I have a problem using checkbox in
a jsp, getting No collection found error.  Here is my sample code and I
really appreciate if anyone can give me a hand on this.  

in jsp
=
logic:iterate id=conflicts name=ConflictResolutionForm
property=conflicts
 type=com.pioneer.sales.terrmaint.demo.ConflictBean
tr
tdhtml:checkbox name=conflicts  property=checked
//td
tdbean:write name=conflicts property=field / /td
tdbean:write name=conflicts property=level / /td
tdbean:write name=conflicts property=currentValue
//td
tdbean:write name=conflicts property=overrideValue /
/td
/tr
/logic:iterate
===

in ConflictBean class

private String linenum = null;
private String field = null;
private String level = null;
private String currentValue = null;
private String overrideValue = null;
private boolean checked = false;

// all public getters and setters for all the String attributes

public boolean getChecked() {
return checked;
}
public void setChecked(boolean _checked){
checked = _checked;
}
==

in Action class
==
ConflictResolutionForm conFlictForm = new ConflictResolutionForm();
ArrayList conflicts = new ArrayList();
// Fill in the list here

ConflictBean cb = new ConflictBean();
cb.setLinenum(1);
cb.setField(Field 1);
cb.setLevel(Area);
cb.setCurrentValue(012345678);
cb.setOverrideValue(012345678);
conflicts.add(cb);

conFlictForm.setConflicts(conflicts);
return (mapping.findForward(conflictresolution));   //set up in
struts-config.xml 


in ActionForm
=
private ArrayList conflicts = null;

public ArrayList getConflicts() {
return conflicts;
}

public void setConflicts(ArrayList _conflicts) {
conflicts = _conflicts;
}

public ConflictBean getConflicts(int index) {
return (ConflictBean) conflicts.get(index);
}

public void setConflicts(int 

Re: error

2002-03-28 Thread Jim Crossley

You probably need to set aside an hour and take a gander at the user
guide: http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html

You need to understand why you put these lines in your web.xml file:
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
/servlet-mapping

In an MVC application, all requests go through a controller.  Struts
utilizes the url-pattern as the way to direct requests to its
controller, ActionServlet.  That means you invoke your actions by
appending '.do' to your action paths, like so:

  http://yourhost/yourapp/logon.do

Good luck.

-- Jim

Jose Casas [EMAIL PROTECTED] writes:

 What do you mean by invoking the ActionServlet?  I put it in the web.xml and
 my html:form action looks like this 
html:form action=logon.do
 
 Also, what do you mean when you say that trying to pull up the JSP in the
 browser directly won't work?  How am I supposed to do it?  Is there a right
 way to do it?
 
 Thanks for helping me out.  
 
 
 this is my web.xml
 
 web-app
 servlet
   
   servlet-nameaction/servlet-name
   
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
param-nameapplication/param-name
  
 param-valuecom.walmart.telecomorder.formbeans.ApplicationResources/param-
 value
  /init-param
   init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
   param-namevalidate/param-name
   param-valuetrue/param-value
   /init-param
   
   load-on-startup1/load-on-startup
 /servlet
 
 servlet-mapping
   
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
   /servlet-mapping
 
   welcome-file-list
   
   welcome-filelogon.jsp/welcome-file
   /welcome-file-list
 
   taglib
   
   taglib-uri/WEB-INF/struts-html.tld/taglib-uri
   taglib-location/WEB-INF/struts-html.tld/taglib-location
   /taglib
   
   taglib
   
   taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
   taglib-location/WEB-INF/struts-bean.tld/taglib-location
   /taglib
   
 /web-app
 
 Jose Casas
 
 E-Commerce Applications
 (501) 277-3112
 [EMAIL PROTECTED]
 
 
 
  -Original Message-
  From:   Jim Crossley [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, March 28, 2002 12:43 PM
  To: Struts Users Mailing List
  Subject:Re: error
  
  What you have looks correct to me, Jose.  What are you trying to pull
  up in the browser: the JSP or the Action?  The error you're getting
  makes me think you're not invoking the ActionServlet (the C in MVC) so
  it's not instantiating your formbean (the M in MVC) and making it
  available to the JSP (the V in MVC).  Are you trying to pull up the
  JSP in the browser directly?  That won't work.
  
  -- Jim
  
  Jose Casas [EMAIL PROTECTED] writes:
  
   Jim,
   
   I tried changing the name to the one in the struts-config file and it
  gave
   me this error   Cannot find bean logonForm in scope null
   
   bean:define id=somebean name=logonForm property=SelectBox1List
   type=java.util.ArrayList/
   
   Here's my struts-config file
   
   struts-config
   
   form-beans
 form-bean name=logonForm

   type=com.walmart.telecomorder.formbeans.RelocationForm /
   /form-beans
   
   action-mappings
   action path=/logon
  
  type=com.walmart.telecomorder.formbeans.RelocationAction
  name=logonForm 
  input=/f_Relocation.jsp
 
 
 forward name=success path=/success.jsp /
 
 forward name=failure path=/failure.jsp /

 
   /action
   /action-mappings
   /struts-config
   
   what did i do wrong?
   
   Thanks for your help.
   
   Jose Casas
   
   E-Commerce Applications
   (501) 277-3112
   [EMAIL PROTECTED]
   
   
   
-Original Message-
From:   Jim Crossley [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, March 28, 2002 10:02 AM
To: Struts Users Mailing List
Subject:Re: error

Hi Jose.

The name property should refer to an actual name, not a class.  The
name you should use will be the one referred to in the name
attribute specified in the corresponding action tag in
struts-config.xml.

-- Jim

Jose Casas [EMAIL PROTECTED] writes:

 Does anybody know what this error means. 
 
 Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm
  in
scope
 null
 
 THe following line seems to be causing this error.  When i take it
  out
of my
 jsp, the jsp works fine.
 
 bean:define id=somebean
 name=com.walmart.telecomorder.formbeans.RelocationForm
 property=SelectBox1List 

RE: error

2002-03-28 Thread Jose Casas

I know how all that works.  The only thing that's giving me problems is the
bean:define declaration.

As soon as I take it out my jsp (accessing directly!!!) works.

Thanks for trying.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 1:20 PM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 You probably need to set aside an hour and take a gander at the user
 guide: http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html
 
 You need to understand why you put these lines in your web.xml file:
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
 /servlet-mapping
 
 In an MVC application, all requests go through a controller.  Struts
 utilizes the url-pattern as the way to direct requests to its
 controller, ActionServlet.  That means you invoke your actions by
 appending '.do' to your action paths, like so:
 
   http://yourhost/yourapp/logon.do
 
 Good luck.
 
 -- Jim
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  What do you mean by invoking the ActionServlet?  I put it in the web.xml
 and
  my html:form action looks like this 
 html:form action=logon.do
  
  Also, what do you mean when you say that trying to pull up the JSP in
 the
  browser directly won't work?  How am I supposed to do it?  Is there a
 right
  way to do it?
  
  Thanks for helping me out.  
  
  
  this is my web.xml
  
  web-app
  servlet
  
  servlet-nameaction/servlet-name
  
  servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param
   param-nameapplication/param-name
   
 
 param-valuecom.walmart.telecomorder.formbeans.ApplicationResources/para
 m-
  value
   /init-param
  init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
  /init-param
  
  load-on-startup1/load-on-startup
  /servlet
  
  servlet-mapping
  
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
  /servlet-mapping
  
  welcome-file-list
  
  welcome-filelogon.jsp/welcome-file
  /welcome-file-list
  
  taglib
  
  taglib-uri/WEB-INF/struts-html.tld/taglib-uri
  taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib
  
  taglib
  
  taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
  taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib
  
  /web-app
  
  Jose Casas
  
  E-Commerce Applications
  (501) 277-3112
  [EMAIL PROTECTED]
  
  
  
   -Original Message-
   From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
   Sent: Thursday, March 28, 2002 12:43 PM
   To:   Struts Users Mailing List
   Subject:  Re: error
   
   What you have looks correct to me, Jose.  What are you trying to pull
   up in the browser: the JSP or the Action?  The error you're getting
   makes me think you're not invoking the ActionServlet (the C in MVC) so
   it's not instantiating your formbean (the M in MVC) and making it
   available to the JSP (the V in MVC).  Are you trying to pull up the
   JSP in the browser directly?  That won't work.
   
   -- Jim
   
   Jose Casas [EMAIL PROTECTED] writes:
   
Jim,

I tried changing the name to the one in the struts-config file and
 it
   gave
me this error   Cannot find bean logonForm in scope null

bean:define id=somebean name=logonForm
 property=SelectBox1List
type=java.util.ArrayList/

Here's my struts-config file

struts-config

form-beans
  form-bean name=logonForm
 
type=com.walmart.telecomorder.formbeans.RelocationForm /
/form-beans

action-mappings
action path=/logon
   
   type=com.walmart.telecomorder.formbeans.RelocationAction
   name=logonForm 
   input=/f_Relocation.jsp
  
  
  forward name=success path=/success.jsp /
  
  forward name=failure path=/failure.jsp /
 
  
/action
/action-mappings
/struts-config

what did i do wrong?

Thanks for your help.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 10:02 AM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 Hi Jose.
 
 The name property should refer to an actual name, not a class.
 The
 name you should use will be the one referred to in the name
 attribute specified in 

RE: Multiple Selects in a JSP

2002-03-28 Thread Maturo, Larry

Hi Ken,

I have a Struts white paper, with an example of this.
It also has lots of other examples as well.  You can 
get it at: http://stealthis.athensgroup.com/presentations/
under Model Layer Framework.

Basically you set up both lists in the Action Class and
put them into the session or request (depends on how you
set this action up in struts-config.xml).  When the user
selects an item in the first list it submits the form, and
in your action you retrieve the variable from the form that
gets set.  This allows you to redo the second list to match
the first list, and then you put the new list back into the
session (or request) and go back to your jsp to redisplay
the new list.

-- Larry


-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 12:55 PM
To: [EMAIL PROTECTED]
Subject: Re: Multiple Selects in a JSP


Subject: Re: Multiple Selects in a JSP
From: Ken Holzer [EMAIL PROTECTED]
 ===
Hi Larry,

Do you have a sample app demoing this concept? I am not sure how the Action
Form, Action Class and JSP should be setup.

Are the lists built in the Action Form or the Action Class?

Thanks for your help,

Ken
Maturo, Larry [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hi Ken,

 Yes, but by using a small amount of JavaScript:

 html:select property=orgId onchange='document.forms[0].submit()'
 html:options collection=orgList property=value
 labelProperty=shortName/
 /html:select

 You should 0 out the string field orgId in your form bean so that you
 can tell a selection was made comparing it to 0.

 -- Larry Maturo
[EMAIL PROTECTED]

 -Original Message-
 From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
 Sent: Tuesday, March 26, 2002 4:25 PM
 To: [EMAIL PROTECTED]
 Subject: Multiple Selects in a JSP


 Subject: Multiple Selects in a JSP
 From: Ken Holzer [EMAIL PROTECTED]
  ===
 I have two selects in my JSP and I want to be able to dynamically change
the
 options of the 2nd select based on the choice selected from the 1st
select.

 Is there a way to do that using the Struts tags?

 Thanks,

 Ken



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


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




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


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




RE: Struts 1.0.2 checkbox - Error Message: No collection found

2002-03-28 Thread Maturo, Larry

Hi Yu,

I'm pretty sure you are going to need the indexed 
attribute to get this to work.  You might also want
to try the mutibox instead of the checkbox.  I have
never gotten the checkbox to work in a table.  I
have an example of how it should work, at least as
far as I can tell.  When I tried debugging this it
seemed that the reset method always got called at
the wrong time.  If you are interested in trying
to get the example to work, it's in the Struts
white paper at:

http://stealthis.athensgroup.com/presentations/

under Model Layer Framework.

I don't have an example of using the multibox
yet, since I have never tried it.

-- Larry Maturo


-Original Message-
From: Yu, Yanhui [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 1:13 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts 1.0.2 checkbox - Error Message: No collection found


Thanks for quite a few very kind people who spent a lot of time trying to
help, but I've not found the solution yet.  Here is our problem again,
please help us if you find a way to solve this problem:

1. There is a class called ConflictBean which has a few String attributes
and a boolean attribute called isChecked to record if the jsp user checked
this bean.
2. The Action constructs a few of these ConflictBean objects, stores them in
an ArrayList, then sets this ArrayList in the ActionForm bean.
3. The JSP page iterates through the ArrayList to build a table so that each
row of this table represents an element  on the ArrayList (a ConflictBean
object).  All the attributes of the ArrayList element, the ConflictBean
object are displayed in different column (cells) of this row.  A checkbox is
provided somewhere in each row (say in the most left column) so that the
user can view all the rows, then he can select all/some/none of the rows
(the ConflictBean objects).  After the form was submitted, the Action needs
to get the list back out and see which ConflictBean were checked.

Please tell us if we have to use an indexed property such as the checkbox in
the newer version to accomplish this or there is a way to do it with version
1.0.2?  Answering this question will point us to the right direction.
THANKS!

Yanhui





-Original Message-
From: Yu, Yanhui 
Sent: Wednesday, March 27, 2002 12:03 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts 1.0.2 checkbox - Error Message: No collection found


Sorry I forgot that the reset method in the ActionForm looks like this:
==
public void reset(ActionMapping mapping, HttpServletRequest request)
{
cat.debug(ConflictResolutionForm reset);
/*
this.checked = false;
this.linenum = null;
this.field = null; 
this.level = null;
this.currentValue = null;
this.overrideValue = null;
*/

 if(conflicts != null) {
for(int i=0; i conflicts.size(); i++) {
((ConflictBean) conflicts.get(i)).setChecked(false);
}
}
}
==
Looking forward to hearing any hints, thank you very much,
Yanhui



-Original Message-
From: Yu, Yanhui 
Sent: Wednesday, March 27, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Struts 1.0.2 checkbox - Error Message: No collection found


Hi All,

We are using struts verions 1.0.2 here.  I have a problem using checkbox in
a jsp, getting No collection found error.  Here is my sample code and I
really appreciate if anyone can give me a hand on this.  

in jsp
=
logic:iterate id=conflicts name=ConflictResolutionForm
property=conflicts
 type=com.pioneer.sales.terrmaint.demo.ConflictBean
tr
tdhtml:checkbox name=conflicts  property=checked
//td
tdbean:write name=conflicts property=field / /td
tdbean:write name=conflicts property=level / /td
tdbean:write name=conflicts property=currentValue
//td
tdbean:write name=conflicts property=overrideValue /
/td
/tr
/logic:iterate
===

in ConflictBean class

private String linenum = null;
private String field = null;
private String level = null;
private String currentValue = null;
private String overrideValue = null;
private boolean checked = false;

// all public getters and setters for all the String attributes

public boolean getChecked() {
return checked;
}
public void setChecked(boolean _checked){
checked = _checked;
}
==

in Action class
==
ConflictResolutionForm conFlictForm = new ConflictResolutionForm();
ArrayList conflicts = new ArrayList();
// Fill in the list here

ConflictBean cb = new ConflictBean();

Re: error

2002-03-28 Thread Jim Crossley

Jose Casas [EMAIL PROTECTED] writes:

 I know how all that works.  The only thing that's giving me problems is the
 bean:define declaration.

The eternal paradox, eh?  To be all-knowing and still have problems...

The bean:define expects there to be a bean named logonForm in scope.
Something has to put it there, right?  The ActionServlet will put it
there if you let it, but accessing the page directly bypasses the
ActionServlet. 

 As soon as I take it out my jsp (accessing directly!!!) works.

That's because you took out the only thing that expected the logonForm
bean to be around.

Maybe someone else on the list can clarify better than I can, but
everything I'm saying is already said well-enough in the user guide,
IMHO.

 Thanks for trying.
 
 Jose Casas
 
 E-Commerce Applications
 (501) 277-3112
 [EMAIL PROTECTED]
 
 
 
  -Original Message-
  From:   Jim Crossley [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, March 28, 2002 1:20 PM
  To: Struts Users Mailing List
  Subject:Re: error
  
  You probably need to set aside an hour and take a gander at the user
  guide: http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html
  
  You need to understand why you put these lines in your web.xml file:
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
  
  In an MVC application, all requests go through a controller.  Struts
  utilizes the url-pattern as the way to direct requests to its
  controller, ActionServlet.  That means you invoke your actions by
  appending '.do' to your action paths, like so:
  
http://yourhost/yourapp/logon.do
  
  Good luck.
  
  -- Jim
  
  Jose Casas [EMAIL PROTECTED] writes:
  
   What do you mean by invoking the ActionServlet?  I put it in the web.xml
  and
   my html:form action looks like this 
  html:form action=logon.do
   
   Also, what do you mean when you say that trying to pull up the JSP in
  the
   browser directly won't work?  How am I supposed to do it?  Is there a
  right
   way to do it?
   
   Thanks for helping me out.  
   
   
   this is my web.xml
   
   web-app
   servlet
 
 servlet-nameaction/servlet-name
 
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
  param-nameapplication/param-name

  
  param-valuecom.walmart.telecomorder.formbeans.ApplicationResources/para
  m-
   value
/init-param
 init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
 param-namevalidate/param-name
 param-valuetrue/param-value
 /init-param
 
 load-on-startup1/load-on-startup
   /servlet
   
   servlet-mapping
 
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
 /servlet-mapping
   
 welcome-file-list
 
 welcome-filelogon.jsp/welcome-file
 /welcome-file-list
   
 taglib
 
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
 /taglib
 
 taglib
 
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
 /taglib
 
   /web-app
   
   Jose Casas
   
   E-Commerce Applications
   (501) 277-3112
   [EMAIL PROTECTED]
   
   
   
-Original Message-
From:   Jim Crossley [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, March 28, 2002 12:43 PM
To: Struts Users Mailing List
Subject:Re: error

What you have looks correct to me, Jose.  What are you trying to pull
up in the browser: the JSP or the Action?  The error you're getting
makes me think you're not invoking the ActionServlet (the C in MVC) so
it's not instantiating your formbean (the M in MVC) and making it
available to the JSP (the V in MVC).  Are you trying to pull up the
JSP in the browser directly?  That won't work.

-- Jim

Jose Casas [EMAIL PROTECTED] writes:

 Jim,
 
 I tried changing the name to the one in the struts-config file and
  it
gave
 me this error   Cannot find bean logonForm in scope null
 
 bean:define id=somebean name=logonForm
  property=SelectBox1List
 type=java.util.ArrayList/
 
 Here's my struts-config file
 
 struts-config
 
 form-beans
   form-bean name=logonForm
  
 type=com.walmart.telecomorder.formbeans.RelocationForm /
 /form-beans
 
 action-mappings
 action path=/logon

type=com.walmart.telecomorder.formbeans.RelocationAction
name=logonForm 
input=/f_Relocation.jsp
   
   
   forward name=success path=/success.jsp /
   
   forward name=failure 

Re: lajug - Where is struts-config.xml specification - Ryan Norman

2002-03-28 Thread Jeremy Leader

Is http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd
(the DTD, Document Type Definition, for the struts-config.xml
file) what you're looking for?  That's the official machine
readable specification of what goes in the struts-config.xml file.

Or are you looking for something more tutorial, like
http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_controller.html#config
in the Struts User Guide?

Jeremy Leader

At 03:25 PM 3/27/02 , Ryan Norman wrote:
I know there is a specification given by sun for the web deployment description 
(web.xml).
Is there one for the struts-config.xml file? Does anybody know where to find the 
struts-config.xml tag specification file?



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




Installing Struts with WebSphere3.5.4,I can not even make struts-example work

2002-03-28 Thread kelly lan

Hi,roger

My name is Kelly. 
I am working on a project using Struts.  I do not have
any problem on using Struts with Tomcat.  However, my
boss decided our project had to use WebSphere on
Window 2000.  Since then, I have been struggling for
almost a week.  I can not even make struts-example
work on WebSphere.  The WebSphere version is 3.5. I
upgraded it to 3.5.4 usig a fix pack.  
What I did is to follow the instruction downloaded
from Jakarta web site. The procedure is as following: 

1)Start up Admin Console,use the Conver War file task
to conver the struts-example.war from the struts-b1
distrib as-is.
2)Create a WEB-INF dir in the servlets dir and copy
struts-config.xml, databse.xml, web.xml into it. 
3)Copy jaxp 1.0.1¡¯s jaxp.jar and parser.jar to the
servlets dir of the strut-example webapp.
4)In the servlets directory open struts.jar with
WinZip
5)Start the Default Server via the Admin Console.,in
this step.  

After done all of above, I can successfully access
http://localhost/strut-example/index.jsp. 

However,  I got error messages when I click any link. 

Did I miss something? By the way, I did not do the
replacement of ¡°PUBLIC¡­¡± with ¡°SYSTEM¡± in
strut-config.xml and web.xml.  In your discussion
mail, you said it was not necessary to do that in
Window2000.  Do you think I should try it?  

Sorry to bother you.  I am very appreciated if you
could give me some advice. 

Sincerely, 

Kelly


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




Re: Can Dreamweaver and Struts work together

2002-03-28 Thread Rick Kalifa

Tony,

I've been trying to get it work also. I've installed the custom tag library
extension but I can't seem to get it to work.

Have you gone down this path also?

Thanks,
RK.

- Original Message -
From: $B% %s%H%K!(B $B%9%F%$%9(B [EMAIL PROTECTED]
Newsgroups: Struts
Sent: Wednesday, March 27, 2002 12:27 AM
Subject: Can Dreamweaver and Struts work together


 Hi

 Has anyone successfully got Dreamweaver and Struts to cooperate together.
I want to be able to edit
 my jsp files(with struts tags) in Dreamweaver 4 UltraDeveloper.

 Cheers

 Tony

 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


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


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




RE: error

2002-03-28 Thread Jose Casas

So you're saying that when I post the form, the logonForm bean is not used
at all.  All my values are being set by something...I don't understand what
you're trying to say when you say that the bean:define is the only thing
that is expecting the logonForm bean to be there.

Thanks.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 1:40 PM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  I know how all that works.  The only thing that's giving me problems is
 the
  bean:define declaration.
 
 The eternal paradox, eh?  To be all-knowing and still have problems...
 
 The bean:define expects there to be a bean named logonForm in scope.
 Something has to put it there, right?  The ActionServlet will put it
 there if you let it, but accessing the page directly bypasses the
 ActionServlet. 
 
  As soon as I take it out my jsp (accessing directly!!!) works.
 
 That's because you took out the only thing that expected the logonForm
 bean to be around.
 
 Maybe someone else on the list can clarify better than I can, but
 everything I'm saying is already said well-enough in the user guide,
 IMHO.
 
  Thanks for trying.
  
  Jose Casas
  
  E-Commerce Applications
  (501) 277-3112
  [EMAIL PROTECTED]
  
  
  
   -Original Message-
   From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
   Sent: Thursday, March 28, 2002 1:20 PM
   To:   Struts Users Mailing List
   Subject:  Re: error
   
   You probably need to set aside an hour and take a gander at the user
   guide: http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html
   
   You need to understand why you put these lines in your web.xml file:
   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping
   
   In an MVC application, all requests go through a controller.  Struts
   utilizes the url-pattern as the way to direct requests to its
   controller, ActionServlet.  That means you invoke your actions by
   appending '.do' to your action paths, like so:
   
 http://yourhost/yourapp/logon.do
   
   Good luck.
   
   -- Jim
   
   Jose Casas [EMAIL PROTECTED] writes:
   
What do you mean by invoking the ActionServlet?  I put it in the
 web.xml
   and
my html:form action looks like this 
   html:form action=logon.do

Also, what do you mean when you say that trying to pull up the JSP
 in
   the
browser directly won't work?  How am I supposed to do it?  Is there
 a
   right
way to do it?

Thanks for helping me out.  


this is my web.xml

web-app
servlet

servlet-nameaction/servlet-name

   
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
 param-nameapplication/param-name
 
   
  
 param-valuecom.walmart.telecomorder.formbeans.ApplicationResources/para
   m-
value
 /init-param
init-param
param-nameconfig/param-name
   
 param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namevalidate/param-name
param-valuetrue/param-value
/init-param

load-on-startup1/load-on-startup
/servlet

servlet-mapping

servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping

welcome-file-list

welcome-filelogon.jsp/welcome-file
/welcome-file-list

taglib

taglib-uri/WEB-INF/struts-html.tld/taglib-uri
   
 taglib-location/WEB-INF/struts-html.tld/taglib-location
/taglib

taglib

taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
   
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib

/web-app

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 12:43 PM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 What you have looks correct to me, Jose.  What are you trying to
 pull
 up in the browser: the JSP or the Action?  The error you're
 getting
 makes me think you're not invoking the ActionServlet (the C in
 MVC) so
 it's not instantiating your formbean (the M in MVC) and making it
 available to the JSP (the V in MVC).  Are you trying to pull up
 the
 JSP in the browser directly?  That won't work.
 
 -- Jim
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  Jim,
  
 

Re: error

2002-03-28 Thread Marcelo Vanzin

Jose Casas wrote:
 I don't understand what
 you're trying to say when you say that the bean:define is the only thing
 that is expecting the logonForm bean to be there.

He's saying that since you're calling the JSP file directly (instead of 
calling the related action mapping, e.g., /logon.do), the ActionServlet 
won't be called, so you'll not have a ActionForm object instantiated and 
put in the logonForm key in some scope.

So, if your bean:define tag tries to reference the logonForm bean, it 
will get a null value, and won't work.

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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




Re: error

2002-03-28 Thread Jim Crossley

Jose Casas [EMAIL PROTECTED] writes:

 So you're saying that when I post the form, the logonForm bean is not used
 at all.  

Not quite.  The problem occurs when you *retrieve* the form, not when
you *post* it.

Assuming that the scope attribute of your action is session, try
this little test.  Take the bean:define out of your page, access it
directly, and post your form.  The post will cause the ActionServlet
to put the formbean in session scope.

Now, without shutting your app server down -- we're assuming that the
app server recompiles jsp's on the fly if they change -- put the
bean:define back in the page, and access it directly.  Because the
formbean is in the session, the bean:define tag should not complain
this time.

The bottom line is that you need an Action (possibly the same one)
that not only handles the posting of the form, but the initial
creation of the form.  Or at least whatever beans your view requires.

-- Jim

 All my values are being set by something...I don't understand what
 you're trying to say when you say that the bean:define is the only thing
 that is expecting the logonForm bean to be there.
 
 Thanks.
 
 Jose Casas
 
 E-Commerce Applications
 (501) 277-3112
 [EMAIL PROTECTED]
 
 
 
  -Original Message-
  From:   Jim Crossley [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, March 28, 2002 1:40 PM
  To: Struts Users Mailing List
  Subject:Re: error
  
  Jose Casas [EMAIL PROTECTED] writes:
  
   I know how all that works.  The only thing that's giving me problems is
  the
   bean:define declaration.
  
  The eternal paradox, eh?  To be all-knowing and still have problems...
  
  The bean:define expects there to be a bean named logonForm in scope.
  Something has to put it there, right?  The ActionServlet will put it
  there if you let it, but accessing the page directly bypasses the
  ActionServlet. 
  
   As soon as I take it out my jsp (accessing directly!!!) works.
  
  That's because you took out the only thing that expected the logonForm
  bean to be around.
  
  Maybe someone else on the list can clarify better than I can, but
  everything I'm saying is already said well-enough in the user guide,
  IMHO.
  
   Thanks for trying.
   
   Jose Casas
   
   E-Commerce Applications
   (501) 277-3112
   [EMAIL PROTECTED]
   
   
   
-Original Message-
From:   Jim Crossley [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, March 28, 2002 1:20 PM
To: Struts Users Mailing List
Subject:Re: error

You probably need to set aside an hour and take a gander at the user
guide: http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html

You need to understand why you put these lines in your web.xml file:
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
/servlet-mapping

In an MVC application, all requests go through a controller.  Struts
utilizes the url-pattern as the way to direct requests to its
controller, ActionServlet.  That means you invoke your actions by
appending '.do' to your action paths, like so:

  http://yourhost/yourapp/logon.do

Good luck.

-- Jim

Jose Casas [EMAIL PROTECTED] writes:

 What do you mean by invoking the ActionServlet?  I put it in the
  web.xml
and
 my html:form action looks like this 
html:form action=logon.do
 
 Also, what do you mean when you say that trying to pull up the JSP
  in
the
 browser directly won't work?  How am I supposed to do it?  Is there
  a
right
 way to do it?
 
 Thanks for helping me out.  
 
 
 this is my web.xml
 
 web-app
 servlet
   
   servlet-nameaction/servlet-name
   

  servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
param-nameapplication/param-name
  

   
  param-valuecom.walmart.telecomorder.formbeans.ApplicationResources/para
m-
 value
  /init-param
   init-param
   param-nameconfig/param-name

  param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
   param-namevalidate/param-name
   param-valuetrue/param-value
   /init-param
   
   load-on-startup1/load-on-startup
 /servlet
 
 servlet-mapping
   
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
   /servlet-mapping
 
   welcome-file-list
   
   welcome-filelogon.jsp/welcome-file
   /welcome-file-list
 
   taglib
   
   taglib-uri/WEB-INF/struts-html.tld/taglib-uri

  taglib-location/WEB-INF/struts-html.tld/taglib-location
   /taglib
   
   taglib
   
   

RE: error

2002-03-28 Thread Jose Casas

Thanks, I'll try this.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 2:14 PM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  So you're saying that when I post the form, the logonForm bean is not
 used
  at all.  
 
 Not quite.  The problem occurs when you *retrieve* the form, not when
 you *post* it.
 
 Assuming that the scope attribute of your action is session, try
 this little test.  Take the bean:define out of your page, access it
 directly, and post your form.  The post will cause the ActionServlet
 to put the formbean in session scope.
 
 Now, without shutting your app server down -- we're assuming that the
 app server recompiles jsp's on the fly if they change -- put the
 bean:define back in the page, and access it directly.  Because the
 formbean is in the session, the bean:define tag should not complain
 this time.
 
 The bottom line is that you need an Action (possibly the same one)
 that not only handles the posting of the form, but the initial
 creation of the form.  Or at least whatever beans your view requires.
 
 -- Jim
 
  All my values are being set by something...I don't understand what
  you're trying to say when you say that the bean:define is the only
 thing
  that is expecting the logonForm bean to be there.
  
  Thanks.
  
  Jose Casas
  
  E-Commerce Applications
  (501) 277-3112
  [EMAIL PROTECTED]
  
  
  
   -Original Message-
   From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
   Sent: Thursday, March 28, 2002 1:40 PM
   To:   Struts Users Mailing List
   Subject:  Re: error
   
   Jose Casas [EMAIL PROTECTED] writes:
   
I know how all that works.  The only thing that's giving me problems
 is
   the
bean:define declaration.
   
   The eternal paradox, eh?  To be all-knowing and still have problems...
   
   The bean:define expects there to be a bean named logonForm in scope.
   Something has to put it there, right?  The ActionServlet will put it
   there if you let it, but accessing the page directly bypasses the
   ActionServlet. 
   
As soon as I take it out my jsp (accessing directly!!!) works.
   
   That's because you took out the only thing that expected the logonForm
   bean to be around.
   
   Maybe someone else on the list can clarify better than I can, but
   everything I'm saying is already said well-enough in the user guide,
   IMHO.
   
Thanks for trying.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 1:20 PM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 You probably need to set aside an hour and take a gander at the
 user
 guide:
 http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html
 
 You need to understand why you put these lines in your web.xml
 file:
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
 /servlet-mapping
 
 In an MVC application, all requests go through a controller.
 Struts
 utilizes the url-pattern as the way to direct requests to its
 controller, ActionServlet.  That means you invoke your actions by
 appending '.do' to your action paths, like so:
 
   http://yourhost/yourapp/logon.do
 
 Good luck.
 
 -- Jim
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  What do you mean by invoking the ActionServlet?  I put it in the
   web.xml
 and
  my html:form action looks like this 
 html:form action=logon.do
  
  Also, what do you mean when you say that trying to pull up the
 JSP
   in
 the
  browser directly won't work?  How am I supposed to do it?  Is
 there
   a
 right
  way to do it?
  
  Thanks for helping me out.  
  
  
  this is my web.xml
  
  web-app
  servlet
  
  servlet-nameaction/servlet-name
  
 
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param
   param-nameapplication/param-name
   
 

  
 param-valuecom.walmart.telecomorder.formbeans.ApplicationResources/para
 m-
  value
   /init-param
  init-param
  param-nameconfig/param-name
 
   param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
  /init-param
  
  load-on-startup1/load-on-startup
  /servlet
  
  servlet-mapping
  
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
  /servlet-mapping
  
  

RE: error

2002-03-28 Thread Jose Casas

I think this worked.  Now I'm getting another error, but I'll try to figure
it out.

Thanks.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 2:14 PM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  So you're saying that when I post the form, the logonForm bean is not
 used
  at all.  
 
 Not quite.  The problem occurs when you *retrieve* the form, not when
 you *post* it.
 
 Assuming that the scope attribute of your action is session, try
 this little test.  Take the bean:define out of your page, access it
 directly, and post your form.  The post will cause the ActionServlet
 to put the formbean in session scope.
 
 Now, without shutting your app server down -- we're assuming that the
 app server recompiles jsp's on the fly if they change -- put the
 bean:define back in the page, and access it directly.  Because the
 formbean is in the session, the bean:define tag should not complain
 this time.
 
 The bottom line is that you need an Action (possibly the same one)
 that not only handles the posting of the form, but the initial
 creation of the form.  Or at least whatever beans your view requires.
 
 -- Jim
 
  All my values are being set by something...I don't understand what
  you're trying to say when you say that the bean:define is the only
 thing
  that is expecting the logonForm bean to be there.
  
  Thanks.
  
  Jose Casas
  
  E-Commerce Applications
  (501) 277-3112
  [EMAIL PROTECTED]
  
  
  
   -Original Message-
   From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
   Sent: Thursday, March 28, 2002 1:40 PM
   To:   Struts Users Mailing List
   Subject:  Re: error
   
   Jose Casas [EMAIL PROTECTED] writes:
   
I know how all that works.  The only thing that's giving me problems
 is
   the
bean:define declaration.
   
   The eternal paradox, eh?  To be all-knowing and still have problems...
   
   The bean:define expects there to be a bean named logonForm in scope.
   Something has to put it there, right?  The ActionServlet will put it
   there if you let it, but accessing the page directly bypasses the
   ActionServlet. 
   
As soon as I take it out my jsp (accessing directly!!!) works.
   
   That's because you took out the only thing that expected the logonForm
   bean to be around.
   
   Maybe someone else on the list can clarify better than I can, but
   everything I'm saying is already said well-enough in the user guide,
   IMHO.
   
Thanks for trying.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



 -Original Message-
 From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 1:20 PM
 To:   Struts Users Mailing List
 Subject:  Re: error
 
 You probably need to set aside an hour and take a gander at the
 user
 guide:
 http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html
 
 You need to understand why you put these lines in your web.xml
 file:
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
 /servlet-mapping
 
 In an MVC application, all requests go through a controller.
 Struts
 utilizes the url-pattern as the way to direct requests to its
 controller, ActionServlet.  That means you invoke your actions by
 appending '.do' to your action paths, like so:
 
   http://yourhost/yourapp/logon.do
 
 Good luck.
 
 -- Jim
 
 Jose Casas [EMAIL PROTECTED] writes:
 
  What do you mean by invoking the ActionServlet?  I put it in the
   web.xml
 and
  my html:form action looks like this 
 html:form action=logon.do
  
  Also, what do you mean when you say that trying to pull up the
 JSP
   in
 the
  browser directly won't work?  How am I supposed to do it?  Is
 there
   a
 right
  way to do it?
  
  Thanks for helping me out.  
  
  
  this is my web.xml
  
  web-app
  servlet
  
  servlet-nameaction/servlet-name
  
 
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param
   param-nameapplication/param-name
   
 

  
 param-valuecom.walmart.telecomorder.formbeans.ApplicationResources/para
 m-
  value
   /init-param
  init-param
  param-nameconfig/param-name
 
   param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
  /init-param
  
  load-on-startup1/load-on-startup
  /servlet
  
  servlet-mapping
  
  servlet-nameaction/servlet-name
  

Re: Getting a value from the request object for variable for a custom tag?

2002-03-28 Thread David M. Karr

 Struts == Struts Newsgroup (@Basebeans.com) [EMAIL PROTECTED] writes:

Struts Subject: Getting a value from the request object for variable for a custom 
tag?
Struts From: Preston Crawford [EMAIL PROTECTED]
Struts  ===
Struts I'm writing a custom pager for a resultset my company needs to page 
through.
Struts I don't return every record, just the amount and set indicated by page size
Struts and page number in the query. But I also want to return the total number
Struts found.

Struts So what I do, is in my action I make two calls..

Struts request.setAttribute(ARRAYLIST_OF_STUFF, myCollection);
Struts request.setAttribute(NUMBER_FOUND, intFound);

Struts Now in the JSP page I forward to I retrieve ARRAYLIST_OF_STUFF to iterate
Struts using the logic:iterate tag. However, here is the tricky part. I want to 
use
Struts the number found as part of the pager tag. The reason being that the pager
Struts tag needs to know how many records were found in order to produce the
Struts following

Struts 1-10  |  11-20 |  21-30. etc...

Struts So how do I get the value in my custom tag?

Struts I've tried the following...

Struts pager:pager currentPage=2 pageSize=10 totalResults=%=(Integer)
Struts request.getAttribute(NUMBER_FOUND)% url=participantSearch.do

Struts ..but that doesn't work. What works? Or am I approaching this entirely
Struts wrong?

Whenever you say that doesn't work, it would help if you say what happens.

One minor change that might help is making sure your quotes nest properly.
This would mean changing the quoting around the totalResults attribute to be
a pair of single quotes, instead of double quotes.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


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




Re: Sun's application compatibility kit?

2002-03-28 Thread bhatia10

Hey Joey,

Do u have an online link that points to that compatibility kit.

Thanks.

- Original Message -
From: Joey Trevino [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 1:01 PM
Subject: Sun's application compatibility kit?


 Does anyone know anything about the new application
 compatibility kit that Sun announced at JavaOne.
 Supposedly, it will ensure that your app will work
 across all compliant app servers.


 Joey

 --- Ted Husted [EMAIL PROTECTED] wrote:
  If it seems like JRUN issue then take it up with
  JRUN. It's a commercial
  product and should have people who are paid to solve
  problems like this.
  If it works under Tomcat, Sun's reference
  implementation, but not under
  JRUN, then the implication is that JRUN is
  non-compliant.
 
  -- Ted Husted, Husted dot Com, Fairport NY US
  -- Developing Java Web Applications with Struts
  -- Tel: +1 585 737-3463
  -- Web: http://husted.com/about/services
 
 
  Gilson Nascimento D Elrei wrote:
  
   I'm trying to running a simple example JSP/Servlet
  application on JRUN, but
   i'm receiving this error message below
javax.servlet.jsp.JspException: Cannot find
  message resources under key
   org.apache.struts.action.MESSAGE
   I have checked the ARCHIVE message and looking for
  on search mechanisms
   about it, but i didn't find a solution.
   In Tomcat my sample application has running
  without problems. I have
   verified my web.xml file for path errors, and i
  haven't encountered problems
   in it. The applicationResources.properties file is
  localized in a classpath
   directory and match with web.xml parameter.
   I think that it's a JRUN problem cos in my house i
  have installed the same
   application on Tomcat and it's OK.
   Any idea ?
   Thanks in advance.
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 


 __
 Do You Yahoo!?
 Yahoo! Movies - coverage of the 74th Academy Awards®
 http://movies.yahoo.com/

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



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




declarative exception

2002-03-28 Thread See Yam Lim


After i look at the struts-config_1_1.dtd for element exception, i do not
see the bundle as an attribute for user to specify which bundle should the
framework use to look up by using key attribute to retrieve the I18N
message. so does it mean declarative exception only support default
ApplicationResouces and not multiple MessageResourceses or i need to upgrade
my DTD? 

Thanks.

See-Yam Lim




Re: FW: Beans Tutorial

2002-03-28 Thread humera . f . arshi


http://jakarta.apache.org/struts/userGuide/index.html this should give u an
idea about the java beans used as form beans


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




Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread struts-user

It looks like I'm going to get approval to post preview chapters from my OReilly 
Struts book somewhere on the net. There are still a few preliminary things that have 
to be worked out, but I don't think they will be a big deal. There are a few things 
that I'm not sure about yet. If anyone has an opinion, please let me know.

First, where to post them. I was thinking about talking with the folks at 
theserverside.com, but might also be worth posting them here in the user mailing list 
as well. I'm not sure. Anyone know of a good reason to go either way. I'm a little 
afraid of the flood of emails to everyone's box that this could generate, but it might 
also generate some good discussions?

Also, because of time and everything that's going on, I doubt that I'll be able to 
post all of them. So which ones are of the most interest? Here's what I thought:

Chapter 2.  The Web Server/Servlet Container Relationship
Chapter 3.  Overview of the Struts Framework
Chapter 4.  Configuring web.xml and struts-config.xml
Chapter 5.  Struts Controller Components
Chapter 6.  Struts Model Components
Chapter 8.  Custom Tag Libraries
Chapter 10. Exception Handling
Chapter 12. Internationalization and Localization
Chapter 13. Struts and Enterprise JavaBeans (EJB)
Chapter 16. Using Alternate Presentation Technologies
Chapter 18. Logging in a Struts Application
Chapter 19. Addressing Performance
Chapter 20. Packaging your Struts Application
Chapter 21. Struts Design Strategies

(As many as I could get to before I finish the book)

Anyone would be able to download the chapters, read them, and send me their comments 
(both good and bad). I'll make any neccessary changes to the source document. I would 
probably post a new one every week or so.

This may take a couple of weeks to get everything setup, but I have 9 that are ready 
to go. I also have a complete 1.1 storefront application that I could make available. 
It's what I'm using to showcase the Struts framework. It will eventually include every 
1.1 feature in it.

Let me know what everyone thinks.

Chuck Cavaness
--
Sent via jApache.org

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




multiple html:image tags used as submits

2002-03-28 Thread @Basebeans.com

Subject: multiple html:image tags used as submits
From: Scott Danzig [EMAIL PROTECTED]
 ===
Hi,

I have a jsp page that has a number of images, each acting as a submit
button for a form, as follows:

html:image page=/someimage.gif

Now, I know when doing a normal submit button, you can specify the property
and value to figure out which button was clicked.. if the property name is
action, then getAction in the form bean would work.  How can I get similar
functionality with an image?  Please don't assume I know too much :)
Thanks.

- Scott



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




Changing the Browser url from action.do to the real JSP

2002-03-28 Thread Gennadiy Civil

Hello:


After the logon that has been processed by LogonAction the browser URL shows
logon.do
How do I make it actually show the actual /cmm  - the path for this forward?
I can not use redirect=true because that causes me to lose current session.

TIA
Gennadiy


Here is the snipped from struts-config

!-- Process a user logon and Display customer main menu --
action path=/logon
type=com.company.LogonAction
name=logonForm
scope=request
input=logon.jsp
validate=true

forward name=success path=/cmm /
forward name=failure path=/logon.jsp /
forward name=initfail path=/initfail.jsp /

/action


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




RE: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread Chappell, Simon P

This is a wonderful idea. The chapter at a time thing will also force us to read the 
chapter you want reviewed rather than the one that grabs our attention at the time, 
given that these may not always be the same chapter! :-)

You have my commitment to read and comment upon each chapter that you release. This 
list has been good to me, so this will be a way that I can give back to the struts 
community.

And I will be BUYING the book! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 3:32 PM
To: [EMAIL PROTECTED]
Subject: Preview OReilly Struts Chapters Online - Soon


It looks like I'm going to get approval to post preview 
chapters from my OReilly Struts book somewhere on the net. 
There are still a few preliminary things that have to be 
worked out, but I don't think they will be a big deal. There 
are a few things that I'm not sure about yet. If anyone has an 
opinion, please let me know.

First, where to post them. I was thinking about talking with 
the folks at theserverside.com, but might also be worth 
posting them here in the user mailing list as well. I'm not 
sure. Anyone know of a good reason to go either way. I'm a 
little afraid of the flood of emails to everyone's box that 
this could generate, but it might also generate some good discussions?

Also, because of time and everything that's going on, I doubt 
that I'll be able to post all of them. So which ones are of 
the most interest? Here's what I thought:

Chapter 2. The Web Server/Servlet Container Relationship
Chapter 3. Overview of the Struts Framework
Chapter 4. Configuring web.xml and struts-config.xml
Chapter 5. Struts Controller Components
Chapter 6. Struts Model Components
Chapter 8. Custom Tag Libraries
Chapter 10.Exception Handling
Chapter 12.Internationalization and Localization
Chapter 13.Struts and Enterprise JavaBeans (EJB)
Chapter 16.Using Alternate Presentation Technologies
Chapter 18.Logging in a Struts Application
Chapter 19.Addressing Performance
Chapter 20.Packaging your Struts Application
Chapter 21.Struts Design Strategies

(As many as I could get to before I finish the book)

Anyone would be able to download the chapters, read them, and 
send me their comments (both good and bad). I'll make any 
neccessary changes to the source document. I would probably 
post a new one every week or so.

This may take a couple of weeks to get everything setup, but I 
have 9 that are ready to go. I also have a complete 1.1 
storefront application that I could make available. It's what 
I'm using to showcase the Struts framework. It will eventually 
include every 1.1 feature in it.

Let me know what everyone thinks.

Chuck Cavaness
--
Sent via jApache.org

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


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




RE: multiple html:image tags used as submits

2002-03-28 Thread Greg Hess

Scott,

One way is to write a JavaScript method to respond to the onClick event of
the image that would set a hidden input field named action to a specific
value and then call form.submit(). That way bean introspection would work
matching html input fields to bean properties.

Greg

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 4:40 PM
To: [EMAIL PROTECTED]
Subject: multiple html:image tags used as submits


Subject: multiple html:image tags used as submits
From: Scott Danzig [EMAIL PROTECTED]
 ===
Hi,

I have a jsp page that has a number of images, each acting as a submit
button for a form, as follows:

html:image page=/someimage.gif

Now, I know when doing a normal submit button, you can specify the property
and value to figure out which button was clicked.. if the property name is
action, then getAction in the form bean would work.  How can I get similar
functionality with an image?  Please don't assume I know too much :)
Thanks.

- Scott



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



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




Error when success page is the SAME JSP - cannot find form bean

2002-03-28 Thread Sexton, Allane (ELS)

I'm building a struts application based on the struts example app.  Here's
the problem:

The user logs in.
The user is redirected to receipt.jsp which has an hmtl form.
The user fills out the form and hits submit.
---Everything is fine so far---
The ActionServlet validates everything.
BUT when the Action servlet redirects to the success page (which is the same
jsp - receipt.jsp) I get an exception thrown:

javax.servlet.ServletException: No bean found under attribute key
receiptForm

I have not been able to track down this problem or see why its happening.  I
redirect the user back to the same jsp because the user should be allowed to
use this form again after hitting submit.
The only work around I've been able to do is to redirect the user to a
different jsp and then the user can successfully reload the receipt.jsp page
again from there.  But this isn't a very ideal solution if the user needs to
use the form several times.  Is there a way to fix this problem??  Thanks.
Please find code snippets below: 

Here's a snippet from the struts-config.xml:
action path=/saveReceipt
type=apple.action.SaveReceiptAction
name=receiptForm
scope=request
input=/receipt.jsp
validate=true
forward name=failure path=/receipt.jsp/
/action

and a snippet from the log:

2002-03-28 16:26:15 action: Processing a POST for /saveReceipt
2002-03-28 16:26:15 action:  Looking for ActionForm bean under attribute
'receiptForm'
2002-03-28 16:26:15 action:  Recycling existing ActionForm bean instance of
class 'apple.form.ReceiptForm'
2002-03-28 16:26:15 action:  Populating bean properties from this request
2002-03-28 16:26:15 action:  Validating input form properties
2002-03-28 16:26:15 action:   No errors detected, accepting input
2002-03-28 16:26:15 action:  Looking for Action instance for class
apple.action.SaveReceiptAction
2002-03-28 16:26:15 action:   Double checking for Action instance already
there
2002-03-28 16:26:15 action:   Creating new Action instance
2002-03-28 16:26:15 action: SaveReceiptAction:  Processing Create action
2002-03-28 16:26:15 action:  Performing extra validations
2002-03-28 16:26:16 action: Forwarding to success page
2002-03-28 16:26:16 jsp: init
2002-03-28 16:26:16 ApplicationDispatcher[/apple] Servlet.service() for
servlet jsp threw exception
javax.servlet.ServletException: No bean found under attribute key
receiptForm

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




RE: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread Robert J. Sanford, Jr.

i vote for the struts design strategies, packaging, and taglibs
as the most interesting.

rjsjr

 Chapter 2.The Web Server/Servlet Container Relationship
 Chapter 3.Overview of the Struts Framework
 Chapter 4.Configuring web.xml and struts-config.xml
 Chapter 5.Struts Controller Components
 Chapter 6.Struts Model Components
 Chapter 8.Custom Tag Libraries
 Chapter 10.   Exception Handling
 Chapter 12.   Internationalization and Localization
 Chapter 13.   Struts and Enterprise JavaBeans (EJB)
 Chapter 16.   Using Alternate Presentation Technologies
 Chapter 18.   Logging in a Struts Application
 Chapter 19.   Addressing Performance
 Chapter 20.   Packaging your Struts Application
 Chapter 21.   Struts Design Strategies


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




RE: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread John Menke

when does the book come out in print?

 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 4:49 PM
 To: Struts Users Mailing List
 Subject: RE: Preview OReilly Struts Chapters Online - Soon


 This is a wonderful idea. The chapter at a time thing will also
 force us to read the chapter you want reviewed rather than the
 one that grabs our attention at the time, given that these may
 not always be the same chapter! :-)

 You have my commitment to read and comment upon each chapter that
 you release. This list has been good to me, so this will be a way
 that I can give back to the struts community.

 And I will be BUYING the book! :-)

 Simon

 -
 Simon P. Chappell [EMAIL PROTECTED]
 Java Programming Specialist  www.landsend.com
 Lands' End, Inc.   (608) 935-4526


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 3:32 PM
 To: [EMAIL PROTECTED]
 Subject: Preview OReilly Struts Chapters Online - Soon
 
 
 It looks like I'm going to get approval to post preview
 chapters from my OReilly Struts book somewhere on the net.
 There are still a few preliminary things that have to be
 worked out, but I don't think they will be a big deal. There
 are a few things that I'm not sure about yet. If anyone has an
 opinion, please let me know.
 
 First, where to post them. I was thinking about talking with
 the folks at theserverside.com, but might also be worth
 posting them here in the user mailing list as well. I'm not
 sure. Anyone know of a good reason to go either way. I'm a
 little afraid of the flood of emails to everyone's box that
 this could generate, but it might also generate some good discussions?
 
 Also, because of time and everything that's going on, I doubt
 that I'll be able to post all of them. So which ones are of
 the most interest? Here's what I thought:
 
 Chapter 2.   The Web Server/Servlet Container Relationship
 Chapter 3.   Overview of the Struts Framework
 Chapter 4.   Configuring web.xml and struts-config.xml
 Chapter 5.   Struts Controller Components
 Chapter 6.   Struts Model Components
 Chapter 8.   Custom Tag Libraries
 Chapter 10.  Exception Handling
 Chapter 12.  Internationalization and Localization
 Chapter 13.  Struts and Enterprise JavaBeans (EJB)
 Chapter 16.  Using Alternate Presentation Technologies
 Chapter 18.  Logging in a Struts Application
 Chapter 19.  Addressing Performance
 Chapter 20.  Packaging your Struts Application
 Chapter 21.  Struts Design Strategies
 
 (As many as I could get to before I finish the book)
 
 Anyone would be able to download the chapters, read them, and
 send me their comments (both good and bad). I'll make any
 neccessary changes to the source document. I would probably
 post a new one every week or so.
 
 This may take a couple of weeks to get everything setup, but I
 have 9 that are ready to go. I also have a complete 1.1
 storefront application that I could make available. It's what
 I'm using to showcase the Struts framework. It will eventually
 include every 1.1 feature in it.
 
 Let me know what everyone thinks.
 
 Chuck Cavaness
 --
 Sent via jApache.org
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


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


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




RE: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread Chuck Cavaness

I'm scheduled to finish it in July. There's a technical editor process that 
must be completed also a copy edit process (to fix all of my typos and 
check the formatting). Probably about August.

Chuck

p.s. I'm going as fast as I can :)


At 05:18 PM 3/28/2002 -0500, you wrote:
when does the book come out in print?

  -Original Message-
  From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 28, 2002 4:49 PM
  To: Struts Users Mailing List
  Subject: RE: Preview OReilly Struts Chapters Online - Soon
 
 
  This is a wonderful idea. The chapter at a time thing will also
  force us to read the chapter you want reviewed rather than the
  one that grabs our attention at the time, given that these may
  not always be the same chapter! :-)
 
  You have my commitment to read and comment upon each chapter that
  you release. This list has been good to me, so this will be a way
  that I can give back to the struts community.
 
  And I will be BUYING the book! :-)
 
  Simon
 
  -
  Simon P. Chappell [EMAIL PROTECTED]
  Java Programming Specialist  www.landsend.com
  Lands' End, Inc.   (608) 935-4526
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 28, 2002 3:32 PM
  To: [EMAIL PROTECTED]
  Subject: Preview OReilly Struts Chapters Online - Soon
  
  
  It looks like I'm going to get approval to post preview
  chapters from my OReilly Struts book somewhere on the net.
  There are still a few preliminary things that have to be
  worked out, but I don't think they will be a big deal. There
  are a few things that I'm not sure about yet. If anyone has an
  opinion, please let me know.
  
  First, where to post them. I was thinking about talking with
  the folks at theserverside.com, but might also be worth
  posting them here in the user mailing list as well. I'm not
  sure. Anyone know of a good reason to go either way. I'm a
  little afraid of the flood of emails to everyone's box that
  this could generate, but it might also generate some good discussions?
  
  Also, because of time and everything that's going on, I doubt
  that I'll be able to post all of them. So which ones are of
  the most interest? Here's what I thought:
  
  Chapter 2.   The Web Server/Servlet Container Relationship
  Chapter 3.   Overview of the Struts Framework
  Chapter 4.   Configuring web.xml and struts-config.xml
  Chapter 5.   Struts Controller Components
  Chapter 6.   Struts Model Components
  Chapter 8.   Custom Tag Libraries
  Chapter 10.  Exception Handling
  Chapter 12.  Internationalization and Localization
  Chapter 13.  Struts and Enterprise JavaBeans (EJB)
  Chapter 16.  Using Alternate Presentation Technologies
  Chapter 18.  Logging in a Struts Application
  Chapter 19.  Addressing Performance
  Chapter 20.  Packaging your Struts Application
  Chapter 21.  Struts Design Strategies
  
  (As many as I could get to before I finish the book)
  
  Anyone would be able to download the chapters, read them, and
  send me their comments (both good and bad). I'll make any
  neccessary changes to the source document. I would probably
  post a new one every week or so.
  
  This may take a couple of weeks to get everything setup, but I
  have 9 that are ready to go. I also have a complete 1.1
  storefront application that I could make available. It's what
  I'm using to showcase the Struts framework. It will eventually
  include every 1.1 feature in it.
  
  Let me know what everyone thinks.
  
  Chuck Cavaness
  --
  Sent via jApache.org
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


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


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


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




Re: multiple html:image tags used as submits

2002-03-28 Thread @Basebeans.com

Subject: Re: multiple html:image tags used as submits
From: Scott Danzig [EMAIL PROTECTED]
 ===
Well, unless someone has a better idea than this hack I found in the
archives:

In the JSP:
html:image page=/someimage.gif property=firstSubmit value=whatever
border=0/
html:image page=/someimage.gif property=secondSubmit value=whatever
border=0/


public String getFirstSubmit() {
return buttonPressed = first;
}

public String getSecondSubmit() {
return buttonPressed = second;
}

public String getButtonPressed() {
return buttonPressed;
}

Then form.getButtonPressed() identifies the button.  It just seems like
there should be a more standardized way of doing this, and I didn't really
want to use StrutsX cause it seems like it's not stable.

So if you have a better idea, please tell me.  Thanks.

- Scott

Scott Danzig [EMAIL PROTECTED] wrote in message
news:a80214$9a8$[EMAIL PROTECTED]...
 I have a jsp page that has a number of images, each acting as a submit
 button for a form, as follows:

 html:image page=/someimage.gif

 Now, I know when doing a normal submit button, you can specify the
property
 and value to figure out which button was clicked.. if the property name is
 action, then getAction in the form bean would work.  How can I get
similar
 functionality with an image?  Please don't assume I know too much :)



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




RE: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread Kelm, Scott

Internationalization would be one I would be interested in.

-Original Message-
From: John Menke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 4:18 PM
To: Struts Users Mailing List
Subject: RE: Preview OReilly Struts Chapters Online - Soon


when does the book come out in print?

 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 4:49 PM
 To: Struts Users Mailing List
 Subject: RE: Preview OReilly Struts Chapters Online - Soon


 This is a wonderful idea. The chapter at a time thing will also
 force us to read the chapter you want reviewed rather than the
 one that grabs our attention at the time, given that these may
 not always be the same chapter! :-)

 You have my commitment to read and comment upon each chapter that
 you release. This list has been good to me, so this will be a way
 that I can give back to the struts community.

 And I will be BUYING the book! :-)

 Simon

 -
 Simon P. Chappell [EMAIL PROTECTED]
 Java Programming Specialist  www.landsend.com
 Lands' End, Inc.   (608) 935-4526


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 3:32 PM
 To: [EMAIL PROTECTED]
 Subject: Preview OReilly Struts Chapters Online - Soon
 
 
 It looks like I'm going to get approval to post preview
 chapters from my OReilly Struts book somewhere on the net.
 There are still a few preliminary things that have to be
 worked out, but I don't think they will be a big deal. There
 are a few things that I'm not sure about yet. If anyone has an
 opinion, please let me know.
 
 First, where to post them. I was thinking about talking with
 the folks at theserverside.com, but might also be worth
 posting them here in the user mailing list as well. I'm not
 sure. Anyone know of a good reason to go either way. I'm a
 little afraid of the flood of emails to everyone's box that
 this could generate, but it might also generate some good discussions?
 
 Also, because of time and everything that's going on, I doubt
 that I'll be able to post all of them. So which ones are of
 the most interest? Here's what I thought:
 
 Chapter 2.   The Web Server/Servlet Container Relationship
 Chapter 3.   Overview of the Struts Framework
 Chapter 4.   Configuring web.xml and struts-config.xml
 Chapter 5.   Struts Controller Components
 Chapter 6.   Struts Model Components
 Chapter 8.   Custom Tag Libraries
 Chapter 10.  Exception Handling
 Chapter 12.  Internationalization and Localization
 Chapter 13.  Struts and Enterprise JavaBeans (EJB)
 Chapter 16.  Using Alternate Presentation Technologies
 Chapter 18.  Logging in a Struts Application
 Chapter 19.  Addressing Performance
 Chapter 20.  Packaging your Struts Application
 Chapter 21.  Struts Design Strategies
 
 (As many as I could get to before I finish the book)
 
 Anyone would be able to download the chapters, read them, and
 send me their comments (both good and bad). I'll make any
 neccessary changes to the source document. I would probably
 post a new one every week or so.
 
 This may take a couple of weeks to get everything setup, but I
 have 9 that are ready to go. I also have a complete 1.1
 storefront application that I could make available. It's what
 I'm using to showcase the Struts framework. It will eventually
 include every 1.1 feature in it.
 
 Let me know what everyone thinks.
 
 Chuck Cavaness
 --
 Sent via jApache.org
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


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


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

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




RE: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread Thinh Doan

My vote:
Chapter 13. Struts and Enterprise JavaBeans (EJB)

Thank you,

Thinh

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 3:32 PM
To: [EMAIL PROTECTED]
Subject: Preview OReilly Struts Chapters Online - Soon


It looks like I'm going to get approval to post preview chapters from my
OReilly Struts book somewhere on the net. There are still a few preliminary
things that have to be worked out, but I don't think they will be a big
deal. There are a few things that I'm not sure about yet. If anyone has an
opinion, please let me know.

First, where to post them. I was thinking about talking with the folks at
theserverside.com, but might also be worth posting them here in the user
mailing list as well. I'm not sure. Anyone know of a good reason to go
either way. I'm a little afraid of the flood of emails to everyone's box
that this could generate, but it might also generate some good discussions?

Also, because of time and everything that's going on, I doubt that I'll be
able to post all of them. So which ones are of the most interest? Here's
what I thought:

Chapter 2.  The Web Server/Servlet Container Relationship
Chapter 3.  Overview of the Struts Framework
Chapter 4.  Configuring web.xml and struts-config.xml
Chapter 5.  Struts Controller Components
Chapter 6.  Struts Model Components
Chapter 8.  Custom Tag Libraries
Chapter 10. Exception Handling
Chapter 12. Internationalization and Localization
Chapter 13. Struts and Enterprise JavaBeans (EJB)
Chapter 16. Using Alternate Presentation Technologies
Chapter 18. Logging in a Struts Application
Chapter 19. Addressing Performance
Chapter 20. Packaging your Struts Application
Chapter 21. Struts Design Strategies

(As many as I could get to before I finish the book)

Anyone would be able to download the chapters, read them, and send me their
comments (both good and bad). I'll make any neccessary changes to the source
document. I would probably post a new one every week or so.

This may take a couple of weeks to get everything setup, but I have 9 that
are ready to go. I also have a complete 1.1 storefront application that I
could make available. It's what I'm using to showcase the Struts framework.
It will eventually include every 1.1 feature in it.

Let me know what everyone thinks.

Chuck Cavaness
--
Sent via jApache.org

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



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




RE: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread Marc-André Thibodeau


Very good idea!
Chapters 13, 16, 19 and 21 look the most interesting to me...

MA

-Message d'origine-
De : Kelm, Scott [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 28 mars 2002 17:20
À : 'Struts Users Mailing List'
Objet : RE: Preview OReilly Struts Chapters Online - Soon


Internationalization would be one I would be interested in.

-Original Message-
From: John Menke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 4:18 PM
To: Struts Users Mailing List
Subject: RE: Preview OReilly Struts Chapters Online - Soon


when does the book come out in print?

 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 4:49 PM
 To: Struts Users Mailing List
 Subject: RE: Preview OReilly Struts Chapters Online - Soon


 This is a wonderful idea. The chapter at a time thing will also
 force us to read the chapter you want reviewed rather than the
 one that grabs our attention at the time, given that these may
 not always be the same chapter! :-)

 You have my commitment to read and comment upon each chapter that
 you release. This list has been good to me, so this will be a way
 that I can give back to the struts community.

 And I will be BUYING the book! :-)

 Simon

 -
 Simon P. Chappell [EMAIL PROTECTED]
 Java Programming Specialist  www.landsend.com
 Lands' End, Inc.   (608) 935-4526


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 3:32 PM
 To: [EMAIL PROTECTED]
 Subject: Preview OReilly Struts Chapters Online - Soon
 
 
 It looks like I'm going to get approval to post preview
 chapters from my OReilly Struts book somewhere on the net.
 There are still a few preliminary things that have to be
 worked out, but I don't think they will be a big deal. There
 are a few things that I'm not sure about yet. If anyone has an
 opinion, please let me know.
 
 First, where to post them. I was thinking about talking with
 the folks at theserverside.com, but might also be worth
 posting them here in the user mailing list as well. I'm not
 sure. Anyone know of a good reason to go either way. I'm a
 little afraid of the flood of emails to everyone's box that
 this could generate, but it might also generate some good discussions?
 
 Also, because of time and everything that's going on, I doubt
 that I'll be able to post all of them. So which ones are of
 the most interest? Here's what I thought:
 
 Chapter 2.   The Web Server/Servlet Container Relationship
 Chapter 3.   Overview of the Struts Framework
 Chapter 4.   Configuring web.xml and struts-config.xml
 Chapter 5.   Struts Controller Components
 Chapter 6.   Struts Model Components
 Chapter 8.   Custom Tag Libraries
 Chapter 10.  Exception Handling
 Chapter 12.  Internationalization and Localization
 Chapter 13.  Struts and Enterprise JavaBeans (EJB)
 Chapter 16.  Using Alternate Presentation Technologies
 Chapter 18.  Logging in a Struts Application
 Chapter 19.  Addressing Performance
 Chapter 20.  Packaging your Struts Application
 Chapter 21.  Struts Design Strategies
 
 (As many as I could get to before I finish the book)
 
 Anyone would be able to download the chapters, read them, and
 send me their comments (both good and bad). I'll make any
 neccessary changes to the source document. I would probably
 post a new one every week or so.
 
 This may take a couple of weeks to get everything setup, but I
 have 9 that are ready to go. I also have a complete 1.1
 storefront application that I could make available. It's what
 I'm using to showcase the Struts framework. It will eventually
 include every 1.1 feature in it.
 
 Let me know what everyone thinks.
 
 Chuck Cavaness
 --
 Sent via jApache.org
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


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


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

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


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




Passing JSP Variable Values to html:link tag - Ryan Norman

2002-03-28 Thread Ryan Norman

Hi,

I am Ryan Norman.

The JSP variable userID is never evaluated. It displays the URL as 
a href=/strutstest1/viewUser.do?UserID=%= userID %ADMINISTRATOR/a

Does anybody know how to make this work. 

html:link page=/viewUser.do?UserID=%= userID %
%= userID %
/html:link

Thanks

Ryan Norman




RE: Passing JSP Variable Values to html:link tag - Ryan Norman

2002-03-28 Thread Tim Sawyer

Try:

html:link page=/strutstest1/viewUser.do  paramId=UserID
paramName=BeanName paramProperty=userIDbean:write name=BeanName
property=userID//html:link

Where BeanName is a JavaBean and userID is a property of that bean that
contains the value of userID you want to pass on the URL.

Try to get out of the habit of using scriptlets in your pages, I'm just
starting with struts and trying to remove all code, and just use custom
tags.  It makes things simpler.

Tim.

-Original Message-
From: Ryan Norman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 10:46 PM
To: Struts User Mailing List
Subject: Passing JSP Variable Values to html:link tag - Ryan Norman


Hi,

I am Ryan Norman.

The JSP variable userID is never evaluated. It displays the URL as
a href=/strutstest1/viewUser.do?UserID=%= userID %ADMINISTRATOR/a

Does anybody know how to make this work.

html:link page=/viewUser.do?UserID=%= userID %
%= userID %
/html:link

Thanks

Ryan Norman




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




RE: Newbie question

2002-03-28 Thread phil_hershkowitz

Hi Patrick,

I would suggest that you first install one of the sample applications
distributed with struts to make sure you have your tomcat environment set up
correctly.

Then, there a several excellent struts tutorials available on the web that
take you through the process of creating and deploying a struts application.
(Search for struts tutorials).

The two key xml files that define a struts application are web.xml, which is
part of tomcat and the servlet environment, and struts-config.xml, which is
struts specific. If you take the time to understand what is in these files,
a lot of what is going on in the struts framework will make more sense.

If you are new to web development with jsp and java then you will need to
familiarize yourself with those languages.
Struts and java is a great web development environment - Good Luck!


Regards,
Phil

 -Original Message-
 From: Hairon, Patrick [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 10:37 AM
 To: '[EMAIL PROTECTED]'
 Subject: Newbie question
 
 
 Hi,
 
   I'm new with Struts and I try to make a sample 
 application, but it
 doesn't work!  I got this error:
 
 Error: 500 
 Location: /stjco/Index.jsp
 Internal Servlet Error:
 javax.servlet.ServletException: Cannot find bean
 org.apache.struts.taglib.html.BEAN in scope null
  at
 org.apache.jasper.runtime.PageContextImpl.handlePageException(
 PageContextImp
 l.java:459)
  at
 _0002fIndex_0002ejspIndex_jsp_4._jspService(_0002fIndex_0002ej
 spIndex_jsp_4.
 java:196)
  at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
 (JspServlet.ja
 va:177)
  at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:318)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at 
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper
 .java:404)
  at org.apache.tomcat.core.Handler.service(Handler.java:286)
  at 
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
  at
 org.apache.tomcat.core.ContextManager.internalService(ContextM
 anager.java:79
 7)
  at 
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
  at
 org.apache.tomcat.service.http.HttpConnectionHandler.processCo
 nnection(HttpC
 onnectionHandler.java:210)
  at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
 t.java:416)
  at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
 ol.java:498)
  at java.lang.Thread.run(Thread.java:484)
  Root cause: 
 javax.servlet.jsp.JspException: Cannot find bean
 org.apache.struts.taglib.html.BEAN in scope null
  at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493)
  at
 org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFiel
 dTag.java:188)
  at
 _0002fIndex_0002ejspIndex_jsp_4._jspService(_0002fIndex_0002ej
 spIndex_jsp_4.
 java:114)
  at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
 (JspServlet.ja
 va:177)
  at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:318)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at 
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper
 .java:404)
  at org.apache.tomcat.core.Handler.service(Handler.java:286)
  at 
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
  at
 org.apache.tomcat.core.ContextManager.internalService(ContextM
 anager.java:79
 7)
  at 
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
  at
 org.apache.tomcat.service.http.HttpConnectionHandler.processCo
 nnection(HttpC
 onnectionHandler.java:210)
  at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
 t.java:416)
  at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
 ol.java:498)
  at java.lang.Thread.run(Thread.java:484)
 
 Thank you to help me!!!
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




Re: Long Live Poolman

2002-03-28 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B


 I should comment that when we used poolman with Weblogic running against
 MySQL at my last job, we suffered performance problems that were fixed
 by using the Weblogic pool manager.

Is Poolman a lot faster than the inbuilt db pool manager in Struts.  What are the
advantages of Poolman over Struts pool manager?

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread Aaron Oathout

+1 for chapters  13, 19, 21. I'll gladly read and provide feedback on any
chapters you make available. Can't wait to buy the book.

Aaron

Marc-André Thibodeau wrote:

Very good idea!
Chapters 13, 16, 19 and 21 look the most interesting to me...

MA

-Message d'origine-
De : Kelm, Scott [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 28 mars 2002 17:20
À : 'Struts Users Mailing List'
Objet : RE: Preview OReilly Struts Chapters Online - Soon


Internationalization would be one I would be interested in.

-Original Message-
From: John Menke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 4:18 PM
To: Struts Users Mailing List
Subject: RE: Preview OReilly Struts Chapters Online - Soon


when does the book come out in print?

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 4:49 PM
To: Struts Users Mailing List
Subject: RE: Preview OReilly Struts Chapters Online - Soon


This is a wonderful idea. The chapter at a time thing will also
force us to read the chapter you want reviewed rather than the
one that grabs our attention at the time, given that these may
not always be the same chapter! :-)

You have my commitment to read and comment upon each chapter that
you release. This list has been good to me, so this will be a way
that I can give back to the struts community.

And I will be BUYING the book! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 3:32 PM
To: [EMAIL PROTECTED]
Subject: Preview OReilly Struts Chapters Online - Soon


It looks like I'm going to get approval to post preview
chapters from my OReilly Struts book somewhere on the net.
There are still a few preliminary things that have to be
worked out, but I don't think they will be a big deal. There
are a few things that I'm not sure about yet. If anyone has an
opinion, please let me know.

First, where to post them. I was thinking about talking with
the folks at theserverside.com, but might also be worth
posting them here in the user mailing list as well. I'm not
sure. Anyone know of a good reason to go either way. I'm a
little afraid of the flood of emails to everyone's box that
this could generate, but it might also generate some good discussions?

Also, because of time and everything that's going on, I doubt
that I'll be able to post all of them. So which ones are of
the most interest? Here's what I thought:

Chapter 2.   The Web Server/Servlet Container Relationship
Chapter 3.   Overview of the Struts Framework
Chapter 4.   Configuring web.xml and struts-config.xml
Chapter 5.   Struts Controller Components
Chapter 6.   Struts Model Components
Chapter 8.   Custom Tag Libraries
Chapter 10.  Exception Handling
Chapter 12.  Internationalization and Localization
Chapter 13.  Struts and Enterprise JavaBeans (EJB)
Chapter 16.  Using Alternate Presentation Technologies
Chapter 18.  Logging in a Struts Application
Chapter 19.  Addressing Performance
Chapter 20.  Packaging your Struts Application
Chapter 21.  Struts Design Strategies

(As many as I could get to before I finish the book)

Anyone would be able to download the chapters, read them, and
send me their comments (both good and bad). I'll make any
neccessary changes to the source document. I would probably
post a new one every week or so.

This may take a couple of weeks to get everything setup, but I
have 9 that are ready to go. I also have a complete 1.1
storefront application that I could make available. It's what
I'm using to showcase the Struts framework. It will eventually
include every 1.1 feature in it.

Let me know what everyone thinks.

Chuck Cavaness
--
Sent via jApache.org

--
To unsubscribe, e-mail:

mailto:[EMAIL PROTECTED]
For additional commands, e-mail:

mailto:[EMAIL PROTECTED]


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


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

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


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






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




Re: Elegant way of displaying error message - Ryan Norman

2002-03-28 Thread Mikael Eriksson

The elegant way to do this is to have a placeholder for the user id.

Why would you not want to do that?

  Regards
  Mikael


I have a login screen. I authenticate the the user id and password.
When the authentication fails, I want to display an error message saying 
User ID X does not exist.
Where X is the typed user id. My error message is coming from the 
ApplicationResource.properties file.
I can always have a place holder for the user id in the error message and 
replace it with the current user id.
But I don't want to do that.

Is there an elegant way of doing this?

Thanks in advance

Ryan Norman



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




height and width of html:image?

2002-03-28 Thread @Basebeans.com

Subject: height and width of html:image?
From: Scott Danzig [EMAIL PROTECTED]
 ===
How do I set the height and width of a graphic using html:image ?

- Scott



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




Re: Automatic way of transferring to login screen - Ryan Norman

2002-03-28 Thread Mikael Eriksson


Check out this link

http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Security4.html#67530

Regards

The standard J2EE web security does all the things you want.
At 11:03 2002-03-28 -0800, you wrote:
Hi,

I am running Win 2K advanced server, JDK 1.3, Tomcat 4.0 and struts framework.

I would like to know whether there is an automatic way of transferring the 
user to the login screen in the below given scenarios.
. The first time he enters the application.
. When the session variables expire.
. When an intruder tries to get into the application by typing an valid 
URL without loging into the application.

Thanks in advance

Ryan Norman



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




RE: Automatic way of transferring to login screen - Ryan Norman

2002-03-28 Thread Tero P Paananen

 Check out this link
 
 http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Security4.html#67530
 
 Regards
 
 The standard J2EE web security does all the things you want.

Unless your application needs a customized login process.

If that's the case, it's kludge hacking time...

-TPP

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




Re: Need example on using roles in struts-tiles

2002-03-28 Thread @Basebeans.com

Subject: Re: Need example on using roles in struts-tiles
From: Matt Raible [EMAIL PROTECTED]
 ===
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg27034.html

In response to this thread, I'm wondering if it's possible to specify
multiple roles in the role attribute - similar to how logic:present works?

I'd love to be able to do tiles:put name=title  value=myValue
role=marketing,accounting/

Thanks,

Matt



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




Error Explanation Needed - Ryan Norman

2002-03-28 Thread Ryan Norman

Hi,

Can somebody tell me what this error message mean?
Also can you please tell me what I should do to solve this problem.

Thanks in advance

Ryan Norman

javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in 
scope null
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
at org.apache.jsp.dsp_0005fUser$jsp._jspService(dsp_0005fUser$jsp.java:207)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
at 
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2149)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:484)


root cause 

javax.servlet.jsp.JspException: Cannot find bean org.apache.struts.taglib.html.BEAN in 
scope null
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493)
at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:188)
at org.apache.jsp.dsp_0005fUser$jsp._jspService(dsp_0005fUser$jsp.java:104)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 

RE: Automatic way of transferring to login screen - Ryan Norman

2002-03-28 Thread HERSHKOWITZ,PHIL (A-Sonoma,ex1)

Hi Ryan,

Check out the example application struts-example.war which is in the current
struts distribution. Each JSP page uses the custom tag  app:checkLogon/ to
determine if a user is logged in. If not, the user is redirected to a login
page.

Phil


 -Original Message-
 From: Ryan Norman [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 28, 2002 11:03 AM
 To: Struts User Mailing List; LA Java User Group
 Subject: Automatic way of transferring to login screen - Ryan Norman
 
 
 Hi,
 
 I am running Win 2K advanced server, JDK 1.3, Tomcat 4.0 and 
 struts framework.
 
 I would like to know whether there is an automatic way of 
 transferring the user to the login screen in the below given 
 scenarios.
 . The first time he enters the application.
 . When the session variables expire.
 . When an intruder tries to get into the application by 
 typing an valid URL without loging into the application.
 
 Thanks in advance
 
 Ryan Norman
 
 

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




WebSphere3.5.4 and Struts Example Application

2002-03-28 Thread kelly lan

Hi,

I install struts example with WebSphere3.5.4 
After done , I can successfully access
http://localhost/struts-example/index.jsp¡±.

When I click ¡°A Walking Tour of the Example
Application¡±,it work successfully.

 However,  I got error messages when I click¡±Register
with the MailResder Demonstration
Application.¡±or¡±Log on to the MailReader
Demonstration Application¡± 
The error messages  are same :

Error 500
request
error£ºhttp://localhost/struts-example/editRegistration.do
message£º Server caught unhandled exception from
servlet [action]: Server caught unhandled exception
from servlet [jsp11]: cant remove Attributes from
request scope

I have been struggling for almost a week,but I cann't
get the reason.
Thanks for your help


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




errors tag

2002-03-28 Thread Juan Alvarado

Does anyone know why in Struts 1.02 when using the html:errors/ tag, any
error that gets added to the ActionErrors object is displayed in the
following format:

null
message string null

An example would be as follows

The html output of my errors tag in Struts 1.02 would yield the following
when a user leaves a text field blank:

ul
null
liSu búsqueda no devolvio resultados null
p
/ul

With Struts 1.0:

ul
liSu búsqueda no devolvio resultados
p
/ul

I apologize about the spanish bit, it's a straight copy and paste from our
app.

Thanks in advance

**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]


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




  1   2   >