HELP! How do I share DB result set between nested JSP (Tiles) pages...

2002-01-16 Thread Michael Mehrle

This is what I am trying to do is to populate the same nested JSP template
over and over again with different page data coming from the database. This
is the process I imagine:

- The user presses a link containing a pageID, which in turn gets send to
   Struts as a request.
- The associated Action class parses and validates the request and then
either
   returns an error page or launches a Java bean that gets the result (page
content,
   title, etc..)

so far so good - here's the nifty part

- There is a main.jsp template that's implemented via Tiles and references
  exactly three JSPs: west.jsp, center.jsp, and east.jsp.
- Each of the three templates contain only layout  code and an entry like
this:
   html:text property=west /

Q: Since those jsps are nested and especially since Tiles is doing its own
thing - how can I get the page content to all three (nested) jsps? Should I
put the object(s) in the session or something?

I'm a bit lost - any input would be appreciated...

Cheers,

Michael




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




about connectionPool

2002-01-16 Thread @Basebeans.com

Subject: about connectionPool
From: Gary [EMAIL PROTECTED]
 ===
Since most of u r using Structs, what kind of database connection pool do u
highly recommend to adopt? ( shareware will be better)

Thanks.

--
/**
 * Name: Gary Wang
 * Tele: 010-65546668-8119
 * Mail: [EMAIL PROTECTED]
 */



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




alernatives to tomcat-4.0.1

2002-01-16 Thread Amitkumar J Malhotra



hello everybody,
i require an alternative to tomcat 4.0.1, i have upgraded from tomcat 3.2.1 and
am looking for a freeware which will reduce my configuration setting overheads
to minimum , and also has good document to support it..your opinion will be
highly appreciated..i had also applied on-line for HP-Bluestone application
server (they have yet to send me the cd)
...has anyone tried it as yet and if yes what were your experiences about the
same.

rgds
amit



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




problem with properties file

2002-01-16 Thread Martin Fekete

Hi,
i got problem with .properties file. when i'm dysplaing errors form my properties file 
it's not correctly printed. instead of special local characters are dysplayed only ? 
symbols. all my JSP files are encoded in Cp1250 and content-type contains 
charset=windows-1250.
everything else works fine.

are there some requirements for encoding of .properties file (i tried UTF-8, Cp1250 
...) or local characters are not supported ?

any suggestions welcome

Martin Fekete



JDeveloper

2002-01-16 Thread Barry Dreckmann

Hello there !

I was wondering if anybody was using Oracle9i JDeveloper with Struts.

If someone is...How do you go about configuring JDeveloper to use it ?

Thanks in advance.

Baz



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




How to store a String[] in a hidden field?

2002-01-16 Thread Christian Bouessay

Hi,
I have a form with a multiple select box.

class myForm1 extends ActionForm {
 String[] getFields() { ...}
 void setFields(String[] fields )
 ...
}
html:select property=fields multiple=1 size=3
 html:options collection=list property=value
 labelProperty=label/
/html:select

When I submit the form and validate() return null, it forwards to an 
other view of the same form where I would like to store this property in 
a hidden field.

And HTML output is:

input type=hidden name=fields value=[Ljava.lang.String;@1765ae

How can I tell struts to store it in a String format?


Thanks for help.
--
C. Bouessay


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




SOLVED problem with properties file

2002-01-16 Thread Martin Fekete

this works ...

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

Martin Fekete

- Original Message -
From: Martin Fekete [EMAIL PROTECTED]
To: Struts Users List [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 10:10 AM
Subject: problem with properties file


Hi,
i got problem with .properties file. when i'm dysplaing errors form my
properties file it's not correctly printed. instead of special local
characters are dysplayed only ? symbols. all my JSP files are encoded in
Cp1250 and content-type contains charset=windows-1250.
everything else works fine.

are there some requirements for encoding of .properties file (i tried UTF-8,
Cp1250 ...) or local characters are not supported ?

any suggestions welcome

Martin Fekete




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




Re: JDeveloper

2002-01-16 Thread Christian Bouessay

Barry Dreckmann wrote:

 Hello there !
 
 I was wondering if anybody was using Oracle9i JDeveloper with Struts.
 
 If someone is...How do you go about configuring JDeveloper to use it ?
 


I'm using struts with JDev O9iAS RC (Win NT).
JDev seams to have some pbs using a .jar in the WEB-INF/lib directory 
with ejbs (only when I use ejbs ... maybe a problem with the Release 
Candidate NT version ???).
It forces me to work with the sources of struts.

Except this, all work fine.

--
C. Bouessay





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




RE: Subclassing ActionMapping

2002-01-16 Thread Rey Francois

Typically you would derive it in order to add a new property, which value
can be set in the struts-config.xml (as Ted described in his post). This
property can be used for example to control the logic of
ActionForm.validate() or of Action.perform(): both are given the
ActionMapping instance as parameter and thus can access this extra property.
That would be a nice way to integrate a validation framework: this extra
property can specify which validation logic to use.

Fr.

-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]]
Sent: 16 January 2002 01:15
To: Struts Users Mailing List
Subject: Re: Subclassing ActionMapping


Ted Husted wrote:

 You can create your own ActionMapping subclass, and specify that in the
 web.xml.

 If it uses additional methods, you would type-cast the mapping in the
 perform to access those, just as you type-case the ActionForm to get to
 its extended properties.

 To set new properties on the ActionMapping subclass, you can use the
 Digester syntax:

 set-property property=myProperty value=myValue /

 to avoid touching the struts-config syntax.

You know, I've never really understood what to do with the ActionMapping
objects.
Maybe that's because I absolutely don't need to touch it, like I don't need
to
touch ActionServer, but it kinda nags at me.

So, why/when would I want to subclass ActionMapping?

Thanks,
-Mark


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

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

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


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




Re: about connectionPool

2002-01-16 Thread Dick Starr

From what I have seen by the postings, Poolman is the favorite.

Dick Starr

- Original Message -
From: Struts Newsgroup @[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 2:25 AM
Subject: about connectionPool


 Subject: about connectionPool
 From: Gary [EMAIL PROTECTED]
  ===
 Since most of u r using Structs, what kind of database connection pool do
u
 highly recommend to adopt? ( shareware will be better)

 Thanks.

 --
 /**
  * Name: Gary Wang
  * Tele: 010-65546668-8119
  * Mail: [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]




session id appearing

2002-01-16 Thread Henrik Chua

Hi folks... 

I have a problem.  What should i do so that the session ids do not appear in
the hyperlinks or in the address bar when you execute a link or an action?
coz right now, here is what comes out on my address bar.

http://devbox/Project/logon.do;jsessionid=abdev995-3%3A3c44d1fc%3A8bc344f1fe
edf33a

I don't want the jsessionid to appear.

thanx in advance... 


regards,
henrik

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




Re: session id appearing

2002-01-16 Thread Alvin Kutttikkat Antony


You can call the HttpSession.Invalidate() method, if you are not using Session any more

Alvin



alvin kuttikkat antony
Internet und Virtuelle Hochshule
Directory
Universität München

Leopoldstr .3
80802 München
Germany

Office Tel + 49.89.21025979
Office Fax + 49.89.21025980

 [EMAIL PROTECTED] 01/16/02 02:12am 
Hi folks... 

I have a problem.  What should i do so that the session ids do not appear in
the hyperlinks or in the address bar when you execute a link or an action?
coz right now, here is what comes out on my address bar.

http://devbox/Project/logon.do;jsessionid=abdev995-3%3A3c44d1fc%3A8bc344f1fe
edf33a

I don't want the jsessionid to appear.

thanx in advance... 


regards,
henrik

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



Report TagLib

2002-01-16 Thread Rubens Gama

can somebody tell if exists some report taglib ?


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




Re: RES: Report's Tag

2002-01-16 Thread Jon Ferguson

You can get headers etc.  using tiles...

Have a look at www.DBForms.org

Jon

Rubens Gama wrote:

 well, i have a ResultSet object populated, ok?

 i want a header..
 page break...
 a footer

 the report's body can use the ResultSet to show the data in a determined
 way(like 3 columns and 60 lines, etc).
 and the pagination feature, for example.

 -Mensagem original-
 De: Tom Klaasen (TeleRelay) [mailto:[EMAIL PROTECTED]]
 Enviada em: terca-feira, 15 de janeiro de 2002 15:28
 Para: Struts Users Mailing List
 Assunto: RE: Report's Tag

  -Original Message-
  From: Rubens Gama [mailto:[EMAIL PROTECTED]]
  Sent: dinsdag 15 januari 2002 17:52
  To: Struts-User
  Subject: Report's Tag
 
 
  could you tell me if exists any JSP report tag?

 If you can tell what that tag is supposed to do ...

 tomK

 --
 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: How to store a String[] in a hidden field?

2002-01-16 Thread Christian Bouessay

Well, I've found one solution:

logic:present parameter=fields property=fields
   logic:iterate id=fieldsValue
collection=%=request.getParameterValues(fields)%

 html:hidden property=fields value=%=fieldsValue%/

   /logic:iterate
/logic:present

Is there a better way to do this?

--
C. Bouessay

Christian Bouessay wrote:

 Hi,
 I have a form with a multiple select box.
 
 class myForm1 extends ActionForm {
 String[] getFields() { ...}
 void setFields(String[] fields )
 ...
 }
 html:select property=fields multiple=1 size=3
 html:options collection=list property=value
 labelProperty=label/
 /html:select
 
 When I submit the form and validate() return null, it forwards to an 
 other view of the same form where I would like to store this property in 
 a hidden field.
 
 And HTML output is:
 
 input type=hidden name=fields value=[Ljava.lang.String;@1765ae
 
 How can I tell struts to store it in a String format?
 
 
 Thanks for help.
 -- 
 C. Bouessay
 
 
 -- 
 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: /admin/ mappings

2002-01-16 Thread João Guilherme Del Valle

Try:

http://dyn21:8080/struts-example/admin/reload.do

The .do suffix is needed, only then the request will be forwarded to
ActionServlet.

João.


Joao Guilherme Del Valle
[EMAIL PROTECTED]
Visionnaire Informática SA
http://www.visionnaire.com.br
Tel/Fax: +55 41 373-7400 r: 217


- Original Message -
From: Wim Fournier [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 9:59 AM
Subject: /admin/ mappings


 hya,

 I'm still buggin' on my 'mapping not found' problem.

 I found that the /admin/ mappings (like in the struts-example war) don't
work.
 Is this normal behavior? Or will this lead me to an answer ? :o)

 url: http://dyn21:8080/struts-example/admin/reload
 Apache Tomcat/4.0.1 - HTTP Status 404 - /admin/reload



 type Status report

 message /admin/reload

 description The requested resource (/admin/reload) is not available.


 and totaly NO log messages in the server logs

 grtz

 Wim Fournier




 --
 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: session id appearing

2002-01-16 Thread Andrew B Forman

One option would be to create a frameset
with a full screen frame as so:

HTML
HEADTITLEWebApp/TITLE/HEAD
FRAMESET
 FRAME name=main src=/webapp/appEntry.do scrolling=auto
frameborder=no
/FRAMESET
/HTML

all the user will see in the address bar
is http://server/webapp/appEntry.do and the
page title will remain as WeApp.

otherwise you'll probably want to look into
tracking sessions with cookies rather than
URL rewriting.

andrew

 -Original Message-
 From: Henrik Chua [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 15, 2002 7:12 PM
 To: Struts Users Mailing List (E-mail)
 Subject: session id appearing


 Hi folks...

 I have a problem.  What should i do so that the session ids do
 not appear in
 the hyperlinks or in the address bar when you execute a link or an action?
 coz right now, here is what comes out on my address bar.

 http://devbox/Project/logon.do;jsessionid=abdev995-3%3A3c44d1fc%3A
 8bc344f1fe
 edf33a

 I don't want the jsessionid to appear.

 thanx in advance...


 regards,
 henrik

 --
 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: How to use Log4j with a startup logging servlet

2002-01-16 Thread Alex Colic

Hi,

I have used option two.

The code for my servlet is below. It works for me. If you have any
suggestions, enhancements please send me a note.

Alex



package com.sirius.struts.action;

import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.log4j.*;


public class genericLog4JServlet extends HttpServlet
{

  private static final Category
cat=Category.getInstance(genericLog4JServlet.class.getName());

  public void init() throws javax.servlet.ServletException
{

  ServletContext context=getServletContext();

  /**
  * Get the Log4J settings and the logging paramters
  */
 try
  {
String strLogSetting
=(String)this.getInitParameter(Log4JFileSetting);

PropertyConfigurator.configure(context.getResource(strLogSetting));
  }
catch(java.net.MalformedURLException e){e.printStackTrace();}

}
}

-Original Message-
From: Eric Ma [mailto:[EMAIL PROTECTED]]
Sent: January 15, 2002 12:33 PM
To: [EMAIL PROTECTED]
Subject: How to use Log4j with a startup logging servlet


I want to use Log4J for logging exceptions thrown in a Struts-based web app.
After searching through this list, I found 2 common solutions:

1. Extend the Struts ActionServlet and override the init() method to set up
a Log4J Category.  Then in any custom Action class I can just call
servlet.Category.debug() (let's assume Category is a protected or public
variable).

2. Write a separate startup servlet and again set up LOG4J in the init()
method.  But my question is, how do I invoke this servlet from my custom
Action class?  Do I need to do a RequestDispatcher.forward() to the servlet
when an exception is thrown?  Then how do I get back to the page I am on to
display the error message?

Eric Ma


--

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.




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




Config Problem using Struts with WebSphere 3.5.4 on Linux 7.2

2002-01-16 Thread Anton_Grimm

hi all,

sorry first for one more question on this topic,
but I am trying to run struts-sample and another application using
WebSphere 3.5.4 on Linux 7.2 for almost 4 days without success.

I was reading the installation hints
 http://jakarta.apache.org/struts/installation-was352-x.html
 http://www.distribucon.com/struts/WASInstall.htm

I tried several things, but still get the error ...

 [02.01.16 11:07:11:630 CET] cacd731a ServletInstan X Uncaught service
() exception thrown by servlet {0}: {1}
 jsp11
 javax.servlet.ServletException: Cannot
retrieve mapping for action /login
 at javax.servlet.ServletException.init(ServletException.java:161)
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:392)


 at jsp._login_jsp_1._jspService(_login_jsp_1.java:782)


As I understand this means the ActionServlet has not initialized the
Mappings
defined in struts-config.xml

  action path=/login
   type=de.man.mn.aaw.okbv.struts.action.LoginAction
   name=userProfile
   input=jsp/login.jsp
   
 forward name=ok path=jsp/vehiclechoice.jsp /
 forward name=fehler path=jsp/login.jsp?target=error/
  /action

The DOCTYPE-Declaration looks like this

 !DOCTYPE struts-config SYSTEM
file:///opt/IBMWebAS/hosts/default_host/OKBVWebApp/servlets/org/apache/struts/resources/struts-config_1_0.dtd




WebSphere stdout.txt

[02.01.16 11:06:04:958 CET] f00bf31f ServletInstan A SRVE0048I: Loading
servlet: action
[02.01.16 11:06:05:007 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
LOG]: action: init
[02.01.16 11:06:05:031 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
LOG]: action: Loading application resources from resource
de.man.mn.aaw.okbv.struts.OKBVResources
[02.01.16 11:06:05:036 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
LOG]: action: Initializing configuration from resource path
/WEB-INF/struts-config.xml
resolveEntity('null',
'file:///opt/IBMWebAS/hosts/default_host/OKBVWebApp/servlets/org/apache/struts/resources/struts-config_1_0.dtd')


 Not registered, use system identifier
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
'file:/opt/IBMWebAS/classes/org/apache/struts/resources/struts-config_1_0.dtd'


register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'file:/opt/IBMWebAS/classes/org/apache/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'file:/opt/IBMWebAS/classes/org/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('null',
'file:///opt/IBMWebAS/hosts/default_host/OKBVWebApp/servlets/org/apache/struts/resources/web-app_2_2.dtd')


 Not registered, use system identifier
Call
org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,



.do/java.lang.String)
[02.01.16 11:06:05:469 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
LOG]: action: Process servletName=action, urlPattern=*.do
[02.01.16 11:06:05:491 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
LOG]: action: Mapping for servlet 'action' = '*.do'
[02.01.16 11:06:05:498 CET] f00bf31f ServletInstan A SRVE0130I: Servlet
available for service: action


any help is very much appreciated

thanks in advance

Toni Grimm

A. Grimm


MAN Nutzfahrzeuge AG
Anton Grimm
Abt. IDP (SoftwareProduktionsumgebungen)
Dachauerstr.667
80995 München

Tel.:  089/1580-1054
Fax:  089/1580-911054
E-Mail: [EMAIL PROTECTED]



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




Re: Is there a better way to write this code?

2002-01-16 Thread c tang

I agree with Alex that current strut taglib has a big
deficiency.  It allows only access through get/set
methods of a property.  How do I write the size of
collection object to a page without resorting
scriptlet or %=?  How do I write toString() output to
a page without resorting scriptlet or %=?

I had a proposal to allow x.y expression to get y
in the this order:
(1) x.getY()
(2) x.y()
(3) x.y

In this way, to write toString of x object to a page,
simply use
bean:write name=x property=toString/

This proposal is shotdown.  Without this, scriptlet
has to be used in jsp.

ct


--- Arron Bates [EMAIL PROTECTED] wrote:
 For one, I recommend getting your properties into
 getter/setter 
 methodology. Simply so you can use the wealth that
 is the Struts tagging 
 system (as it's (the bean spec Struts runs against
 for it's model 
 components) kind of what it's all about).
 
 By 'raw' String do you mean the object's
 toString() method?... Any 
 property that yields and object to be written out
 will have it's 
 toString() method called to write it to the
 output.
 
 I'm also curious about your null pointer issue
 with the nested 
 extension (for some reason :).
 Can I get a hold of the bean and JSP you were trying
 to run it with?...
 
 Arron.
 
 
 Alex Paransky wrote:
 
 I am pretty new with struts and wrote the following
 .JSP code.  Is there a
 better way to write this?  I could not find a tag
 in STRUTS to let me just
 get the property from the object.  My object does
 not have get/set methods,
 so I had to resort to using %= tag.  Is there a
 tag in STRUTS that would
 just access the raw String attribute of the
 object instead of calling
 get/set?
 
 I also tried using the keyboardmonkey nested
 library, but kept getting
 NullPointerExceptions when nested:iterate would
 execute
 
 jsp:useBean id=profileHeaders

class=com.myprofiles.client.web.bean.MemberProfileHeadersBean
 /
 logic:iterate id=profile name=profileHeaders
 property=profiles

type=com.myprofiles.service.common.ProfileHeaderValue
   %=profile.name%
   %=profile.description%
 /logic:iterate
 
 Thanks.
 
 
 -AP_
 www: http://www.alexparansky.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]
 


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




RE: Execute Struts in Netbeans?

2002-01-16 Thread Sandeep Takhar

Here are some steps I compiled for the guys at work.

Note: WEB-INF for struts will automatically be
recognized as a web-module. (There is no talk of
struts below).  Also note that the list of steps is
for an older release 3.3 beta 6.  The latest release
of netbeans may not need all of the steps.

hope it helps someone  (a lot of this was compiled by
searching through the netbeans mailing list and the
netbeans site should really be updated with some of
this information at some point...)

Getting Servlet Debugging to Work: Netbeans 3.3.6.

1. Download jdk1.3.1_01 and install.
2. Create an environment variable java_home and point
to the install directory (eg: d:\jdk1.3.1)
3. Download and install Netbeans 3.3.6 (3.3 beta 6)
4. Since this Netbeans does not contain an
installation process update the 
ide.cfg file in the netbeans install
directory\bin\ide.cfg.
5. Update this file to contain reference to the
jdkhome variable:

-jdkhome d:\jdk1.3.1 -J-Xverify:none -J-Xms24m
-J-Xmx96m

6. Mount a fileSystem if one is not already mounted.
7. Right click and select: New\JSP  Servlet\Web
Module
8. A classes directory should have been created.
9. Right click the classes directory and choose
New\JSP  Servlet\Servlet
10. In the processRequest method - create a simple
output like Hello World
11. Compile the servlet.  The target for the
compilation is not set and so 
it will default to the current directory which is
fine.  To see this: 
Tools/Options/Building/Compiler Types/External
Compilation/Target.  To see which
compilation is being used:
Tools/Options/Building/JSPServlet/Default JSPServlet
Compiler.
12. Right click on a line in the processRequest()
method and select Toggle Breakpoint.
13. A breakpoint should be visible.
14. Right click on the servlet and select properties.
15. Check the URI parameter of the servlet.
16. Select the WEB-INF directory that was created
after step 7.
17. Go to the menu and select Debug-Start
18. This should launch Internet Explorer (If it
doesn't - go to 
Tools/Options/Building/JSPServlet and change the Web
Browser parameter).
19. The web browser will have a url like:
http://localhost:8080  (The port that the 
internal tomcat listens on can be changed: 
Tools/Options/Debugging  Executing/Execution
Types/J2EE Server Executor 
and select Installed Servers.  A server Registry
should open up when you can select: 
Server Registry/Installed Servers/Tomcat 3.2  The
properties box lists which port is 
applicable).
20.  Tack on the URI parameter determined in step #14.

Additional steps for jsp debugging

21. Set a break point in the jsp you want to:  Right
click on the jsp and select
View\Servlet.  Place the cursor where you want the
break point and select Debug\Add Breakpoint
Change the type from Class to Line in the dialog
box that pops up and select ok.  Note:
The breakpoint will not be visible.  To remove the
breakpoint -- go to the debugging tab.
--- Michael Mok [EMAIL PROTECTED] wrote:
 Hi Dave
 
 Yes it should work with Netbeans 3.3.
 
 Regards
 
 Michael Mok
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 16 January 2002 2:55
 To: Struts Users Mailing List;
 [EMAIL PROTECTED]
 Subject: RE: Execute Struts in Netbeans?
 
 
 
 
 Has anyone produced a similar HOW-TO for Netbeans? 
 Or will this work for
 Netbeans as well as Forte?
 
 Cheers,
 
 Dave
 
 
 
 
 
 Michael Mok
 [EMAIL PROTECTED]
 on
 01/14/2002
 02:24:27 AM
 
 Please respond to Struts Users Mailing List
  

[EMAIL PROTECTED];
 Please respond
 to
  
 [EMAIL PROTECTED]
 
 To:   'Struts Users Mailing List'
  

[EMAIL PROTECTED]
 cc:(bcc: David Hay/Lex/Lexmark)
 Subject:  RE: Execute Struts in Netbeans?
 
 
 
 I have written a HOW-TO on this. You may want to
 read it first.
 
 www.michaelmok.com
 
 Michael Mok
 Product Manager
 FullyBooked
 1306 Hay Street
 West Perth
 Western Australia 6005
 Tel: 61 8 93221295
 Fax: 61 8 94815281
 Email: [EMAIL PROTECTED]
 www.fullybooked.com.au
 
  -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, 12 January 2002 10:41
 To:  [EMAIL PROTECTED]
 Subject:  RE: Execute Struts in Netbeans?
 
 If you use Forte 3.0 CE (same as netbeans with a few
 extensions -- good web
 app extensions), running Struts apps is no problem.
 
 -Original Message-
 From: AJ Morris [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 11, 2002 4:14 PM
 To: [EMAIL PROTECTED]
 Subject: Execute Struts in Netbeans?
 
 
 Has anyone had luck executing struts-based
 applications in the Netbeans
 integrated Tomcat? Things are fine with the
 standalone Tomcat, but not the
 internal Tomcat.
 
 Here are the issues. Tomcat can't see the taglibs,
 but this is solved by
 mounting struts.jar. Tomcat will not execute action
 mappings, because it
 says the path is not valid. Tomcat cannot see my
 ApplicationProperties
 files, either.
 
 AJ Morris
 [EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL 

AW: How to use Log4j with a startup logging servlet

2002-01-16 Thread Hudayioglu, Fehmi

Use this
-
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

import org.apache.struts.action.ActionServlet;
import org.apache.log4j.xml.DOMConfigurator ;

import org.apache.log4j.Category ;
import javax.xml.parsers.FactoryConfigurationError ;


/**
 * @servletName action
 * @webURLPattern *.do
 * @webLoadOnStartup 1
 * @servletMapping *.do
 * @servletInitParam validate=true
 * @servletInitParam config=/WEB-INF/struts-config.xml*/
public class PPUActionServlet extends ActionServlet 
{
public void init(ServletConfig config)throws ServletException{

super.init(config);

  try
  {
 DOMConfigurator.configure(C:/Development/log4jConfig.xml) ;
 Category cat = Category.getInstance(PPUActionServlet.class) ;
 cat.info(Log4j has initialized sucessfully) ;
  }catch(FactoryConfigurationError fce)
   {
  System.err.println(Could not configure log4j:  + fce ) ;
 //  throw new ServletException(Could not configure log4j , fce) ;
   }
  catch(Exception e)
  {
System.err.println(Could not configure log4j:  + e ) ;
  }
}

public String getServletInfo()
{
return This ovedrrides the struts ActionServlet initilising log4j;
}
}

---
-Ursprüngliche Nachricht-
Von: Alex Colic [mailto:[EMAIL PROTECTED]]
Gesendet am: Wednesday, January 16, 2002 3:10 PM
An: Eric Ma; [EMAIL PROTECTED]
Betreff: RE: How to use Log4j with a startup logging servlet

Hi,

I have used option two.

The code for my servlet is below. It works for me. If you have any
suggestions, enhancements please send me a note.

Alex



package com.sirius.struts.action;

import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.log4j.*;


public class genericLog4JServlet extends HttpServlet
{

  private static final Category
cat=Category.getInstance(genericLog4JServlet.class.getName());

  public void init() throws javax.servlet.ServletException
{

  ServletContext context=getServletContext();

  /**
  * Get the Log4J settings and the logging paramters
  */
 try
  {
String strLogSetting
=(String)this.getInitParameter(Log4JFileSetting);

PropertyConfigurator.configure(context.getResource(strLogSetting));
  }
catch(java.net.MalformedURLException e){e.printStackTrace();}

}
}

-Original Message-
From: Eric Ma [mailto:[EMAIL PROTECTED]]
Sent: January 15, 2002 12:33 PM
To: [EMAIL PROTECTED]
Subject: How to use Log4j with a startup logging servlet


I want to use Log4J for logging exceptions thrown in a Struts-based web app.
After searching through this list, I found 2 common solutions:

1. Extend the Struts ActionServlet and override the init() method to set up
a Log4J Category.  Then in any custom Action class I can just call
servlet.Category.debug() (let's assume Category is a protected or public
variable).

2. Write a separate startup servlet and again set up LOG4J in the init()
method.  But my question is, how do I invoke this servlet from my custom
Action class?  Do I need to do a RequestDispatcher.forward() to the servlet
when an exception is thrown?  Then how do I get back to the page I am on to
display the error message?

Eric Ma


--

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.




--
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: How to use Log4j with a startup logging servlet

2002-01-16 Thread Eric L. Ma

Thanks, gentlemen.  I start to get the idea but am still fuzzy on how to
issue logging requests in my custom Action classes.  Do I have to
declare a static Category variable in each and every Action class I
write?  Please share some code on how logging is actually done, now that
I know how to set up the startup servlet.

Eric

-Original Message-
From: Eric Ma [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 15, 2002 12:33 PM
To: [EMAIL PROTECTED]
Subject: How to use Log4j with a startup logging servlet

I want to use Log4J for logging exceptions thrown in a Struts-based web
app.  After searching through this list, I found 2 common solutions:

1. Extend the Struts ActionServlet and override the init() method to set
up a Log4J Category.  Then in any custom Action class I can just call
servlet.Category.debug() (let's assume Category is a protected or public
variable).

2. Write a separate startup servlet and again set up LOG4J in the init()
method.  But my question is, how do I invoke this servlet from my custom
Action class?  Do I need to do a RequestDispatcher.forward() to the
servlet when an exception is thrown?  Then how do I get back to the page
I am on to display the error message?

Eric Ma


--

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.



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




Suggestion

2002-01-16 Thread Sidhartha Jain


Hi 
Could anyone suggest a good way to code these lines in struts.I Am converting normal 
JSP to a struts JSP and launchsearch is an Javascript function which is to be called.I 
am totally confused and wanna do it in struts .

 
LinkedList list = (LinkedList) pd.getValue(field);
out.println(INPUT TYPE='HIDDEN' NAME=' + field + '/);
out.println(SELECT NAME=' + field + Sel');
Iterator iter = list.iterator();
while(iter.hasNext())
{
BioClass b = (BioClass) iter.next();
if (b != null){}
out.println(OPTION VALUE=' + b.getAccNum() + ' + b + /OPTION);
}
out.println(/SELECT);
out.println(BR A HREF='JavaScript: launchSearch(document.editForm. + field + 
Sel, document.editForm. + field + , true)'Add/A);
 
out.println(nbsp; nbsp; nbsp; A HREF=\JavaScript: launchEdit(document.editForm. 
+ field + Sel, document.editForm. + field + ,true, ' + fia[i].getType() + 
')\Add New/A);
 
Thanks in Advance

Sidh 


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




Re: session id appearing

2002-01-16 Thread Olivier Dinocourt

use cookies
- Original Message -
From: Henrik Chua [EMAIL PROTECTED]
To: Struts Users Mailing List (E-mail) [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 2:12 AM
Subject: session id appearing


 Hi folks...

 I have a problem.  What should i do so that the session ids do not appear
in
 the hyperlinks or in the address bar when you execute a link or an action?
 coz right now, here is what comes out on my address bar.


http://devbox/Project/logon.do;jsessionid=abdev995-3%3A3c44d1fc%3A8bc344f1fe
 edf33a

 I don't want the jsessionid to appear.

 thanx in advance...


 regards,
 henrik

 --
 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: How to store a String[] in a hidden field?

2002-01-16 Thread Keith Bacon

How about putting a helper class in your session which has methods:-

String stringArrayToTokenizedString(String[] array)
   //store array elements delimted by some char that's not in the data.

String[] tokenizedStringToStringArray.
   //Use StringTokeniser to build the array again.

Then you need only store 1 big long string.
Personally that seems fairly horrible too but at least there's less JSP code.
Keith.

--- Christian Bouessay [EMAIL PROTECTED] wrote:
 Well, I've found one solution:
 
 logic:present parameter=fields property=fields
logic:iterate id=fieldsValue
 collection=%=request.getParameterValues(fields)%
 
  html:hidden property=fields value=%=fieldsValue%/
 
/logic:iterate
 /logic:present
 
 Is there a better way to do this?
 
 --
 C. Bouessay
 
 Christian Bouessay wrote:
 
  Hi,
  I have a form with a multiple select box.
  
  class myForm1 extends ActionForm {
  String[] getFields() { ...}
  void setFields(String[] fields )
  ...
  }
  html:select property=fields multiple=1 size=3
  html:options collection=list property=value
  labelProperty=label/
  /html:select
  
  When I submit the form and validate() return null, it forwards to an 
  other view of the same form where I would like to store this property in 
  a hidden field.
  
  And HTML output is:
  
  input type=hidden name=fields value=[Ljava.lang.String;@1765ae
  
  How can I tell struts to store it in a String format?
  
  
  Thanks for help.
  -- 
  C. Bouessay
  
  
  -- 
  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!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




Suggestion Needed

2002-01-16 Thread Sidhartha Jain


Hi 
Could anyone suggest a good way to code these lines in struts.I Am converting normal 
JSP to a struts JSP and launchsearch is an Javascript function which is to be called.I 
am totally confused and wanna do it in struts .

 
LinkedList list = (LinkedList) pd.getValue(field);
out.println(INPUT TYPE='HIDDEN' NAME=' + field + '/);
out.println(SELECT NAME=' + field + Sel');
Iterator iter = list.iterator();
while(iter.hasNext())
{
BioClass b = (BioClass) iter.next();
if (b != null){}
out.println(OPTION VALUE=' + b.getAccNum() + ' + b + /OPTION);
}
out.println(/SELECT);
out.println(BR A HREF='JavaScript: launchSearch(document.editForm. + field + 
Sel, document.editForm. + field + , true)'Add/A);
 
out.println(nbsp; nbsp; nbsp; A HREF=\JavaScript: launchEdit(document.editForm. 
+ field + Sel, document.editForm. + field + ,true, ' + fia[i].getType() + 
')\Add New/A);
 
Thanks in Advance

Sidh
 


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




Suggestion

2002-01-16 Thread Sidhartha Jain


Hi 
Could anyone suggest a good way to code these lines in struts.I Am converting normal 
JSP to a struts JSP and launchsearch is an Javascript function which is to be called.I 
am totally confused and wanna do it in struts .

 
LinkedList list = (LinkedList) pd.getValue(field);
out.println(INPUT TYPE='HIDDEN' NAME=' + field + '/);
out.println(SELECT NAME=' + field + Sel');
Iterator iter = list.iterator();
while(iter.hasNext())
{
BioClass b = (BioClass) iter.next();
if (b != null){}
out.println(OPTION VALUE=' + b.getAccNum() + ' + b + /OPTION);
}
out.println(/SELECT);
out.println(BR A HREF='JavaScript: launchSearch(document.editForm. + field + 
Sel, document.editForm. + field + , true)'Add/A);
 
out.println(nbsp; nbsp; nbsp; A HREF=\JavaScript: launchEdit(document.editForm. 
+ field + Sel, document.editForm. + field + ,true, ' + fia[i].getType() + 
')\Add New/A);
 
Thanks in Advance

Sidh 


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




set method in Action form is not called

2002-01-16 Thread Mahesh Agarwal

Hi all

I am facing a strange problem in Struts.

The situation is as follows

There is a check box (html:checkbox  property=allowOffContractPricing
disabled=true  /)which is disable and checked.When I submit that page,
the corresponding set method(public void setAllowOffContractPricing(String
val)) in Action form is not called.

Can any one pls help me solving this problem

thanks a lot in advance

Mahesh

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




Struts Connection Pooling

2002-01-16 Thread Adrian Theuma

Hi,
I just joined this mailing list and I think it is great for
someone starting off with struts and even in the longer term. I need an
opinion on the connection pooling build in struts. Is this safe to use,
how does it behave under heavy load? Can you forward me to an example
where this is used?

Thanks.

Regards,
Adrian

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




Re: about connectionPool

2002-01-16 Thread Dick Starr

Nick:

In Professional JSP Site Design page 608 Ted Husted says ... since the
Struts GenericDataSource is an optional package, its just as easy to use
something else (and in a production environment, I would recommend that you
do, since this Struts package is really not designed for intensive use). He
recommends Poolman but provides an example design where you could use any
other connection pool by just changing one class.

Dick

- Original Message -
From: Nick Thomson [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, January 16, 2000 9:56 AM
Subject: RE: about connectionPool


 Is there something wrong with the built-in connection pooling offered by
 struts?

 -Original Message-
 From: Dick Starr [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 16, 2002 4:34 AM
 To: Struts Users Mailing List
 Subject: Re: about connectionPool


 From what I have seen by the postings, Poolman is the favorite.

 Dick Starr

 - Original Message -
 From: Struts Newsgroup @[EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 16, 2002 2:25 AM
 Subject: about connectionPool


  Subject: about connectionPool
  From: Gary [EMAIL PROTECTED]
   ===
  Since most of u r using Structs, what kind of database connection pool
do
 u
  highly recommend to adopt? ( shareware will be better)
 
  Thanks.
 
  --
  /**
   * Name: Gary Wang
   * Tele: 010-65546668-8119
   * Mail: [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]




[Off Topic] Turn on Logging in Tomcat 4.0.1

2002-01-16 Thread Matt Raible

I'm hoping someone on this list will know the solution to this.  I'm using
Tomcat 4.0.1 on a Windows platform.

I start Tomcat and run it in a console window on my machine, but I never see
any logging messages.  I *know* they're there, because when I put the same
application on another machine (fresh install of Tomcat) - I get all the
startup messages from my struts app.

My question is - how do I turn on logging, so I get more than just this:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1



__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




html:errors error?

2002-01-16 Thread Frank Lawlor

I just noticed that my error messages are acting strange.
I recently changed to a nightly build (approx 1/2).
For example, instead of getting the text:
  You must specify a Contact Name. 
I am now getting:
  null You must specify a Contact Name. null 
There are no substitution parms in the properties spec:
  error.no_contact_name=You must specify a Contact Name.
The html generated almost looks like there are two
null error entries:

font color=red bnull
You must specify a Contact Name.
null

but when I add my message the error array is empty.

Anyone else on a nightly build noticed any funny error messages?

Thanks,

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




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




Use action class for read only page?

2002-01-16 Thread Hai Hoang

Should I use an action class for my read-only page or
just using the jsp to call the Model layer directly? I
can understand if the page is large then you can use
the action to load the data, but what I've is a small
page.  Do you know what are the guidelines or best
practices regarding the use of action class? 

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




Re: Struts Connection Pooling

2002-01-16 Thread Michael Mehrle

Very simple - use Poolman! All you need to do is to download it, and put
poolman.jar and the poolman.xml location in your classpath. It even has
caching of frequent requests - cool stuff.

Michae


- Original Message -
From: Adrian Theuma [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 8:43 AM
Subject: Struts Connection Pooling


Hi,
I just joined this mailing list and I think it is great for
someone starting off with struts and even in the longer term. I need an
opinion on the connection pooling build in struts. Is this safe to use,
how does it behave under heavy load? Can you forward me to an example
where this is used?

Thanks.

Regards,
Adrian

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




RES: html:errors error?

2002-01-16 Thread Rubens Gama

you must define in ApplicationResourses.properties:

error.header=
error.footer=

the problem is solved.
ok?

-Mensagem original-
De: Frank Lawlor [mailto:[EMAIL PROTECTED]]
Enviada em: quarta-feira, 16 de janeiro de 2002 15:15
Para: Struts (E-mail)
Assunto: html:errors error?


I just noticed that my error messages are acting strange.
I recently changed to a nightly build (approx 1/2).
For example, instead of getting the text:
  You must specify a Contact Name.
I am now getting:
  null You must specify a Contact Name. null
There are no substitution parms in the properties spec:
  error.no_contact_name=You must specify a Contact Name.
The html generated almost looks like there are two
null error entries:

font color=red bnull
You must specify a Contact Name.
null

but when I add my message the error array is empty.

Anyone else on a nightly build noticed any funny error messages?

Thanks,

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




--
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: Using struts-template as taglib

2002-01-16 Thread Ryan

Advanced Javaserver Pages is a great book but I have run into problems with
his tags, as they were compiled with Xalan1 ( now deprecated ) I had to hack
some of his source to work with Xalan 2 to use any xslt related
functionality.

just a note


- Original Message -
From: Vaughan Jackson [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 12:53 PM
Subject: RE: Using struts-template as taglib


 Andras,

 I believe you can download a jar file containing a
 templates taglib from http://www.phptr.com/advjsp/.

 The author of this taglib is David Geary, the same author
 as that of the template tags in Struts. I think this
 version is just an improved version of that in Struts
 (although some of the tag attribute names have been
 changed).

 HTH,
 Vaughan.

  -Original Message-
  From: Andras Balogh [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 15, 2002 8:26 AM
  To: [EMAIL PROTECTED]
  Subject: Using struts-template as taglib
 
 
 
  Hi all,
 
  I want to ask you about the posibility to using the struts-template
  taglib in a project that is not using struts at all.
  Initally i searched for a template taglib at
  http://jakarta.apache.org/taglibs/
  but i couldn't find any.
  I then thought about using the struts-template taglib.
  So i took struts.jar and removed anything not related to
  struts-template. This is legal to do?
  I wonder if will be available the struts-template as taglib?
 
  Sorry for being off-topic a little bit ..
 
  Andras.
 
 
 
 
 
  --
  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: about connectionPool

2002-01-16 Thread Jenkins, David

I use Tomcat 4.0.x which has connection pooling built in. The pooling jar is
available separately from http://tyrex.exolab.org/. The version bundled with
Tomcat 4.0.1 is missing some configuration options, this may be fixed in the
newer release.

Dave


-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 16 January 2002 9:25 p.m.
To: [EMAIL PROTECTED]
Subject: about connectionPool


Subject: about connectionPool
From: Gary [EMAIL PROTECTED]
 ===
Since most of u r using Structs, what kind of database connection pool do u
highly recommend to adopt? ( shareware will be better)

Thanks.

--
/**
 * Name: Gary Wang
 * Tele: 010-65546668-8119
 * Mail: [EMAIL PROTECTED]
 */



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


This message contains official information which is intended
for the use of the addressee(s) only.  If you are not the
intended recipient, please notify the sender immediately.
You should not further disseminate or copy this message
in any way.
*

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




RE: How to use Log4j with a startup logging servlet

2002-01-16 Thread Jenkins, David

Hi Eric, here's how use Logging to provide method call logging.

import org.apache.log4j.Category;

public class myclass {

  private static final Category log = Category.getInstance(myclass .class);

  public void mymethod() {
try {
  log.debug(enter mymethod);
}
finally {
  log.debug(exit mymethod);
}
  }
}

Dave

-Original Message-
From: Eric L. Ma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 16 January 2002 3:58 p.m.
To: 'Struts Users Mailing List'
Subject: RE: How to use Log4j with a startup logging servlet


Thanks, gentlemen.  I start to get the idea but am still fuzzy on how to
issue logging requests in my custom Action classes.  Do I have to
declare a static Category variable in each and every Action class I
write?  Please share some code on how logging is actually done, now that
I know how to set up the startup servlet.

Eric

-Original Message-
From: Eric Ma [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 15, 2002 12:33 PM
To: [EMAIL PROTECTED]
Subject: How to use Log4j with a startup logging servlet

I want to use Log4J for logging exceptions thrown in a Struts-based web
app.  After searching through this list, I found 2 common solutions:

1. Extend the Struts ActionServlet and override the init() method to set
up a Log4J Category.  Then in any custom Action class I can just call
servlet.Category.debug() (let's assume Category is a protected or public
variable).

2. Write a separate startup servlet and again set up LOG4J in the init()
method.  But my question is, how do I invoke this servlet from my custom
Action class?  Do I need to do a RequestDispatcher.forward() to the
servlet when an exception is thrown?  Then how do I get back to the page
I am on to display the error message?

Eric Ma


--

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.



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


This message contains official information which is intended
for the use of the addressee(s) only.  If you are not the
intended recipient, please notify the sender immediately.
You should not further disseminate or copy this message
in any way.
*

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




RE: [Off Topic] Turn on Logging in Tomcat 4.0.1

2002-01-16 Thread Jenkins, David

All Logs are in the logs directory which is off your tomcat installation
directory.

Dave


-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 17 January 2002 6:10 a.m.
To: [EMAIL PROTECTED]
Subject: [Off Topic] Turn on Logging in Tomcat 4.0.1


I'm hoping someone on this list will know the solution to this.  I'm using
Tomcat 4.0.1 on a Windows platform.

I start Tomcat and run it in a console window on my machine, but I never see
any logging messages.  I *know* they're there, because when I put the same
application on another machine (fresh install of Tomcat) - I get all the
startup messages from my struts app.

My question is - how do I turn on logging, so I get more than just this:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1



__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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


This message contains official information which is intended
for the use of the addressee(s) only.  If you are not the
intended recipient, please notify the sender immediately.
You should not further disseminate or copy this message
in any way.
*

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




Problem with bean:write and bean:define

2002-01-16 Thread Marcelo Caldas

Hi,
Maybe this is more related on how reflection works, But I'm trying to understand the 
behavior here...
Here's my situation:

I have a Bean under request scope with the following methods:

public MyBean {
private java.util.Calendar startDate;

public void setStartDate(Calendar newValue) {
this.startDate = newValue;
}
public void setStartDate(java.util.Date newValue) {
if (this.startDate == null) {
this.startDate = Calendar.getInstance();
}
this.startDate.setTime(newValue);
}
public Calendar getStartDate() {
return this.startDate;
}
}
Well, forget all the typos, since I just created the above code as example... But when 
I have a scenario like the above (two setters with different signature - can be 
Calendars, int and Integer, long and Long, etc...)
the above tags, bean:write and bean:define complains that can't find a getter 
method for property ???.

I tried with jsp:useBean and jsp:getProperty and the error was: Property ??? in 
package.class is write only

Am I missing something? I don't know much about reflection, but I know that it's 
possible to declare the method signature while trying to get reference to a method, 
and it seems that it's not the case here...

Any explanation is appreciated...

Right now, I just fixed the problem by removing one of the setter methods.

Regards,
Marcelo


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




multipart post files struts

2002-01-16 Thread Robert Tyler Retzlaff

Exactly what does struts do with form files?  Does struts use
some kind of intermediate temporary file for storing the file
prior to the user writing the file out to some specified location?

If a temp file is used how does struts determine the appropriate
path for the tempfile?

Thanks

Rob

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




uploading *multiple* files?

2002-01-16 Thread dhay



Hi.  Does anyone know how to upload multiple files using a single file field -
ie allow the user to choose multiple files in the file select box that opens?

Pretty sure you can't do it in regular HTML, but does anyone know of any 3rd
party tools to do it?

Cheers,

Dave




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




RequestUtils - bug? design limitation?

2002-01-16 Thread Esbrook, Scott


In some of my JSPs I've tried setting the page directive %@ page
session=false % (for performance reasons) but when the JSP includes
bean:message tags this results in the following exception at compilation
time:

java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an
HttpSession
at org.apache.jasper.runtime.PageContextImpl.getAttribute(Unknown
Source)
at
org.apache.struts.util.RequestUtils.message(RequestUtils.java:577)

I have set the locale attribute to false in the web.xml file for this
application.

Browsing through the latest version of RequestUtils.java, it looks like the
offending line is

   Locale userLocale = (Locale)pageContext.getAttribute(locale,
PageContext.SESSION_SCOPE);

Isn't this wrongfully assuming that there will be a session object to
retrieve the attribute from?

Any help/comments greatly appreciated. Thanks,

Scott Esbrook
Software Developer
Compuware Corporation

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




Re: Config Problem using Struts with WebSphere 3.5.4 on Linux 7.2

2002-01-16 Thread dion

[EMAIL PROTECTED] wrote:

 hi all,
 
 sorry first for one more question on this topic,
 but I am trying to run struts-sample and another application using
 WebSphere 3.5.4 on Linux 7.2 for almost 4 days without success.
 
 I was reading the installation hints
  http://jakarta.apache.org/struts/installation-was352-x.html
  http://www.distribucon.com/struts/WASInstall.htm
 
 I tried several things, but still get the error ...
 
  [02.01.16 11:07:11:630 CET] cacd731a ServletInstan X Uncaught service
 () exception thrown by servlet {0}: {1}
  jsp11
  javax.servlet.ServletException: Cannot
 retrieve mapping for action /login
  at javax.servlet.ServletException.init(ServletException.java:161)
  at
 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:392)
 
 
  at jsp._login_jsp_1._jspService(_login_jsp_1.java:782)
 
 
 As I understand this means the ActionServlet has not initialized the
 Mappings
 defined in struts-config.xml
 
   action path=/login
type=de.man.mn.aaw.okbv.struts.action.LoginAction
name=userProfile
input=jsp/login.jsp

  forward name=ok path=jsp/vehiclechoice.jsp /
  forward name=fehler path=jsp/login.jsp?target=error/
   /action
 
 The DOCTYPE-Declaration looks like this
 
  !DOCTYPE struts-config SYSTEM
 
file:///opt/IBMWebAS/hosts/default_host/OKBVWebApp/servlets/org/apache/struts/resources/struts-config_1_0.dtd
 
 
 
 
 WebSphere stdout.txt
 
 [02.01.16 11:06:04:958 CET] f00bf31f ServletInstan A SRVE0048I: Loading
 servlet: action
 [02.01.16 11:06:05:007 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
 LOG]: action: init
 [02.01.16 11:06:05:031 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
 LOG]: action: Loading application resources from resource
 de.man.mn.aaw.okbv.struts.OKBVResources
 [02.01.16 11:06:05:036 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
 LOG]: action: Initializing configuration from resource path
 /WEB-INF/struts-config.xml
 resolveEntity('null',
 
'file:///opt/IBMWebAS/hosts/default_host/OKBVWebApp/servlets/org/apache/struts/resources/struts-config_1_0.dtd')
 
 
  Not registered, use system identifier
 register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
 'file:/opt/IBMWebAS/classes/org/apache/struts/resources/struts-config_1_0.dtd'
 
 
 register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
 'file:/opt/IBMWebAS/classes/org/apache/struts/resources/web-app_2_2.dtd'
 register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
 'file:/opt/IBMWebAS/classes/org/apache/struts/resources/web-app_2_3.dtd'
 resolveEntity('null',
 
'file:///opt/IBMWebAS/hosts/default_host/OKBVWebApp/servlets/org/apache/struts/resources/web-app_2_2.dtd')
 
 
  Not registered, use system identifier
 Call
 org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,
 
 
 
 .do/java.lang.String)
 [02.01.16 11:06:05:469 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
 LOG]: action: Process servletName=action, urlPattern=*.do
 [02.01.16 11:06:05:491 CET] f00bf31f WebGroup  A SRVE0091I: [Servlet
 LOG]: action: Mapping for servlet 'action' = '*.do'
 [02.01.16 11:06:05:498 CET] f00bf31f ServletInstan A SRVE0130I: Servlet
 available for service: action
 
 
 any help is very much appreciated

Where's your web.xml?

-- 
dIon Gillard, Multitask Consulting
http://www.multitask.com.au/developers


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




Re: Problem with bean:write and bean:define

2002-01-16 Thread Michael Mehrle

This seems to be an obvious limitation based on Java reflection. By
overloading the setStartDate method you seem to be confusing the write/read
permission mechanism available from JSP. By adding a second method you seem
to lose read capability altogether.

Here's a little workaround - make the parameter type in setStartDate a
simple object and then have the method sort out what is has been called. You
pretty much are shifting things into runtime this way and you won't have
this signature problem. Of course you can't do this with a simple String
(not an object in Java), so you might want to write yourself a little
wrapper object.

I know - this gets ugly - but unless someone else has figured out how to
circumvent this flaw it's what I might try...

Cheers!


- Original Message -
From: Marcelo Caldas [EMAIL PROTECTED]
To: Struts Mailing List [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 10:55 AM
Subject: Problem with bean:write and bean:define


 Hi,
 Maybe this is more related on how reflection works, But I'm trying to
understand the behavior here...
 Here's my situation:

 I have a Bean under request scope with the following methods:

 public MyBean {
 private java.util.Calendar startDate;

 public void setStartDate(Calendar newValue) {
 this.startDate = newValue;
 }
 public void setStartDate(java.util.Date newValue) {
 if (this.startDate == null) {
 this.startDate = Calendar.getInstance();
 }
 this.startDate.setTime(newValue);
 }
 public Calendar getStartDate() {
 return this.startDate;
 }
 }
 Well, forget all the typos, since I just created the above code as
example... But when I have a scenario like the above (two setters with
different signature - can be Calendars, int and Integer, long and Long,
etc...)
 the above tags, bean:write and bean:define complains that can't find a
getter method for property ???.

 I tried with jsp:useBean and jsp:getProperty and the error was:
Property ??? in package.class is write only

 Am I missing something? I don't know much about reflection, but I know
that it's possible to declare the method signature while trying to get
reference to a method, and it seems that it's not the case here...

 Any explanation is appreciated...

 Right now, I just fixed the problem by removing one of the setter methods.

 Regards,
 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: [Off Topic] Turn on Logging in Tomcat 4.0.1

2002-01-16 Thread Michael Mehrle

Solution: run LINUX!! Just kiddin' - the logs should be in your
$CATALINA_HOME\logs\ directory (I'm using Windows slashes - hehehehe :-)

If you want them to go somewhere else change the following entry in your
$CATALINA_HOME\conf\server.xml file:

Logger classname=org.apache.catalina.logger.FileLogger
directory=logs prefix=localhost_log. suffix=.txt timestamp=true/

Looks like you are able to pretty much set everything there - HAVE A BLAST!

Michael



- Original Message -
From: Jenkins, David [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 10:48 AM
Subject: RE: [Off Topic] Turn on Logging in Tomcat 4.0.1


 All Logs are in the logs directory which is off your tomcat installation
 directory.

 Dave


 -Original Message-
 From: Matt Raible [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 17 January 2002 6:10 a.m.
 To: [EMAIL PROTECTED]
 Subject: [Off Topic] Turn on Logging in Tomcat 4.0.1


 I'm hoping someone on this list will know the solution to this.  I'm using
 Tomcat 4.0.1 on a Windows platform.

 I start Tomcat and run it in a console window on my machine, but I never
see
 any logging messages.  I *know* they're there, because when I put the same
 application on another machine (fresh install of Tomcat) - I get all the
 startup messages from my struts app.

 My question is - how do I turn on logging, so I get more than just this:

 Starting service Tomcat-Standalone
 Apache Tomcat/4.0.1
 Starting service Tomcat-Apache
 Apache Tomcat/4.0.1



 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/

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

 
 This message contains official information which is intended
 for the use of the addressee(s) only.  If you are not the
 intended recipient, please notify the sender immediately.
 You should not further disseminate or copy this message
 in any way.
 *

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




No action instance for path-only with sub-sub-class of Action

2002-01-16 Thread Kelly Davis

I have created a class called DefaultAction which extends Action. It
contains some common helper methods which all my actions will use. I
then extend DefaultAction for my actual action fooAction. When I do this
I get 'No action instance for path /foo could be created'. Now, when I
extend Action directly instead of using DefaultAction, I don't get the
error. This confirms to me that my struts-config.xml is setup correctly.
Doesn't anybody know why this is happening?

-- 
Kelly Lawrence Davis
[EMAIL PROTECTED]


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




RE: FW: Nesting Beans/Iterators/... GOT IT!

2002-01-16 Thread Collard, John

Thanks for all the help!  The problem (for some reason) was the name of my
property!  I simply created another property and its getter that returned
the value of the first property.  

John Collard
[EMAIL PROTECTED]





-Original Message-
From: Arron Bates 
Sent: Tuesday, January 15, 2002 7:15 PM
To: Collard, John
Subject: Re: FW: Nesting Beans/Iterators/Logic tags  whatever else...


  John,

I went through the beans and everything certainly seems to be in order. 
All the names are correct, and there's nothing wrong with the markup.

Attached is a war where I took the beans and took out all the code which 
depended on your systems, and put in constructors so they could be made 
by simple constructor. Then went through the JSP page and commented out 
all the things that I didn't have (resource files etc) which don't 
affect anything anyways, and ran your own markup.

And it loads fine. So I'm thinking that there's a sneaky bug either in 
the way the beans are constructed (but you say they're used as-is 
someplace else, so there goes that), or the action or something.

Without knowing the exact error, it's hard to say. But the above has 
proven that it's not the bean definitions or your markup of the nested tags.

Sorry that the problem's not immediately solvable.


Arron.


Collard, John wrote:

From: Collard, John 
Sent: Tuesday, January 15, 2002 10:36 AM
To: 'mailto:[EMAIL PROTECTED]'
Subject: RE: Nesting Beans/Iterators/Logic tags  whatever else...


Arron,
   Thanks for offering to look at the issues I am having.  

First, the basics: we are developing under Struts 1.0 using Tomcat 4.01 as
our application server.  This will be cross tested and then deployed to
WebLogic 6.1 for production.  Our product is used in the Natural Gas
distribution industry.


The offending process is a report that can be viewed or downloaded by the
user.  The report presents the user with their daily natural gas purchases
for the month.  The pipeline, Customer (Their customer), where delivered,
and the daily volume (31 columns) and daily contract (under the volume in
the table).  

I created three beans.  (NomsMonlthlyRpt) The fir
st bean stores the
pipeline, customer, delivery information, and an ArrayList for the daily
volume and contract information.  (NomsDailyRpt) The second bean stores the
date, volume,  contract.  (NomsDailyRptForm) My Struts form bean holds an
ArrayList object pointing the the first bean above.

The download uses all the same processes as the view. Instead of calling a
JSP, it creates an output stream to a CSV file.  The download works,
showing
that the data is being compiled properly and the beans are working.  


Unfortunately, I am unable to supply a working jar due to database
connections and data related issues.  Here is the code, though.  




Thank-you,


John Collard
[EMAIL PROTECTED]





-Original Message-
From: Tom Klaasen (TeleRelay) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 6:54 AM
To: Struts Users Mailing List
Subject: RE: Nesting Beans/Iterators/Logic tags  whatever else...


After 25 hours, you're entitled to send more information for us to try
to give help on ;-)
Full stacktrace, jsp and relevant java code...

I suppose the other taglibs do work?

tomK


-Original Message-
From: Collard, John [mailto:[EMAIL PROTECTED]] 
Sent: maandag 14 januari 2002 20:46
To: 'Struts Users Mailing List'
Subject: RE: Nesting Beans/Iterators/Logic tags  whatever else...


Spent about 25 hours attempting to get it to work.  Kept 
getting the no
getter method found error, even though I must have compared 
my code to the
examples 60-70 times. Sorry.


John Collard
Senior Systems Analyst
UtiliCorp United Information Technology
7101 Mercy Road, Suite 400
Omaha, NE  68106
voice: 402-926-5236
fax: 402-996-9736 
email: [EMAIL PROTECTED]



-Original Message-
From: Tom Klaasen (TeleRelay) [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 4:23 AM
To: Struts Users Mailing List
Subject: RE: Nesting Beans/Iterators/Logic tags  whatever else...


-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]] 
Sent: vrijdag 11 januari 2002 3:01
To: Struts Users Mailing List
Subject: Nesting Beans/Iterators/Logic tags  whatever else...

[...]

If you have used the extension and found it useful, can you 
please reply 
to this mail to show others that people are using it, and 

that it is 

worth using 

[...]

You know I use it, and you know I love it :-)

tomK

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

--
To unsubscribe, e-mail:   
mailto:struts-user- [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]




tag for authentication

2002-01-16 Thread Domen, Ken

Is there a struts tag library that does basic authentication?

ken


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




Has anyone seen this issue

2002-01-16 Thread Juan Alvarado \(Struts List\)

Hello Everyone:

I've come across an interesting issue that I'd like to share with everyone
with the hopes that someone might be able to provide an explanation or
solution.

I have a form with a bunch of text fields. One of these fields I want to
have disabled (disabled=true). So using the struts tag library I have the
following:

html:text property=role size=16 maxlength=16 disabled=true /

When I first load this form, everything is prepopulated as it should be in
the form. I submit the form leaving some fields blank so that I can ensure
my validation works. The validation works fine as the I am redirected back
to the form with the appropriate error messages. However, the text field
mentioned above (role), is no longer prepopulated. Everything else is except
that text field. I took out the disabled=true and submitted the form again
and the next time around the text field WAS prepopulated. I put back
disabled=true and the field WAS NOT prepopulated. So I realized that
disabled=true is causing a glitch somewhere.

After scratching my head for a while I decided to put the Visual Age
Debugger to use to see if I could see what was going on. This is what I
found out:

When I go to the form the very first time, the setRole(String role) method
in my form bean is getting called and therefore that property gets set. But
when I submit the form and I have disabled=true in the text field, the
setRole(String role) method never gets called therefore the property never
gets set. A very interesting thing is that I looked inside the request
object with the VAJ debugger and the role parameter is not there when I
submit my form to my validation action with disabled=true in the text
field. When I took out the disabled=true the role parameter was inside the
request. So the problem boils down to the fact that the parameter is not
included in the request object when using disabled=true and therefore does
not get set.

If anyone has seen this problem and has a fix or suggestion, please let me
know.

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]




RE: Has anyone seen this issue

2002-01-16 Thread Andrew B Forman

disabled elements are not submitted with the form

as per the html spec (below)

http://www.w3.org/TR/html4/interact/forms.html#h-17.12

---begin---

17.12.1 Disabled controls
Attribute definitions

disabled [CI]
When set for a form control, this boolean attribute disables the control for
user input.
When set, the disabled attribute has the following effects on an element:

Disabled controls do not receive focus.
Disabled controls are skipped in tabbing navigation.
Disabled controls cannot be successful.
The following elements support the disabled attribute: BUTTON, INPUT,
OPTGROUP, OPTION, SELECT, and TEXTAREA.

This attribute is inherited but local declarations override the inherited
value.

How disabled elements are rendered depends on the user agent. For example,
some user agents gray out disabled menu items, button labels, etc.

In this example, the INPUT element is disabled. Therefore, it cannot receive
user input nor will its value be submitted with the form.

INPUT disabled name=fred value=stone

Note. The only way to modify dynamically the value of the disabled attribute
is through a script.

---end---

 -Original Message-
 From: Juan Alvarado (Struts List) [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 16, 2002 3:42 PM
 To: Struts
 Subject: Has anyone seen this issue


 Hello Everyone:

 I've come across an interesting issue that I'd like to share with everyone
 with the hopes that someone might be able to provide an explanation or
 solution.

 I have a form with a bunch of text fields. One of these fields I want to
 have disabled (disabled=true). So using the struts tag library
 I have the
 following:

 html:text property=role size=16 maxlength=16 disabled=true /

 When I first load this form, everything is prepopulated as it should be in
 the form. I submit the form leaving some fields blank so that I can ensure
 my validation works. The validation works fine as the I am redirected back
 to the form with the appropriate error messages. However, the text field
 mentioned above (role), is no longer prepopulated. Everything
 else is except
 that text field. I took out the disabled=true and submitted the
 form again
 and the next time around the text field WAS prepopulated. I put back
 disabled=true and the field WAS NOT prepopulated. So I realized that
 disabled=true is causing a glitch somewhere.

 After scratching my head for a while I decided to put the Visual Age
 Debugger to use to see if I could see what was going on. This is what I
 found out:

 When I go to the form the very first time, the setRole(String role) method
 in my form bean is getting called and therefore that property
 gets set. But
 when I submit the form and I have disabled=true in the text field, the
 setRole(String role) method never gets called therefore the property never
 gets set. A very interesting thing is that I looked inside the request
 object with the VAJ debugger and the role parameter is not there when I
 submit my form to my validation action with disabled=true in the text
 field. When I took out the disabled=true the role parameter was
 inside the
 request. So the problem boils down to the fact that the parameter is not
 included in the request object when using disabled=true and
 therefore does
 not get set.

 If anyone has seen this problem and has a fix or suggestion, please let me
 know.

 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]



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




Re: Has anyone seen this issue

2002-01-16 Thread Ryan Cornia

I think adding property role to the page as a html:hidden field will solve your 
problem. This way it WILL be submitted with each request.

Ryan



 [EMAIL PROTECTED] 01/16/02 02:42PM 
Hello Everyone:

I've come across an interesting issue that I'd like to share with everyone
with the hopes that someone might be able to provide an explanation or
solution.

I have a form with a bunch of text fields. One of these fields I want to
have disabled (disabled=true). So using the struts tag library I have the
following:

html:text property=role size=16 maxlength=16 disabled=true /

When I first load this form, everything is prepopulated as it should be in
the form. I submit the form leaving some fields blank so that I can ensure
my validation works. The validation works fine as the I am redirected back
to the form with the appropriate error messages. However, the text field
mentioned above (role), is no longer prepopulated. Everything else is except
that text field. I took out the disabled=true and submitted the form again
and the next time around the text field WAS prepopulated. I put back
disabled=true and the field WAS NOT prepopulated. So I realized that
disabled=true is causing a glitch somewhere.

After scratching my head for a while I decided to put the Visual Age
Debugger to use to see if I could see what was going on. This is what I
found out:

When I go to the form the very first time, the setRole(String role) method
in my form bean is getting called and therefore that property gets set. But
when I submit the form and I have disabled=true in the text field, the
setRole(String role) method never gets called therefore the property never
gets set. A very interesting thing is that I looked inside the request
object with the VAJ debugger and the role parameter is not there when I
submit my form to my validation action with disabled=true in the text
field. When I took out the disabled=true the role parameter was inside the
request. So the problem boils down to the fact that the parameter is not
included in the request object when using disabled=true and therefore does
not get set.

If anyone has seen this problem and has a fix or suggestion, please let me
know.

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]



Language Alphabet Set

2002-01-16 Thread John Hunt

Hi 
I want to get the alphabet of a language based on the
locale. How can I do that? I have to display an index
structure based on the locale. So I need alphabet of
the particular locale which comes in the request.
Any help regarding this would be highly appreciated.
Thanks
Junta

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




Re: Is there a better way to write this code?

2002-01-16 Thread Arron Bates

A getter method like...

public int getMyListSize() {
return this.myList.getSize();
}

with a tag like...
bean:write name=myForm property=myListSize /
...maybe?


Arron.


c tang wrote:

I agree with Alex that current strut taglib has a big
deficiency.  It allows only access through get/set
methods of a property.  How do I write the size of
collection object to a page without resorting
scriptlet or %=?  How do I write toString() output to
a page without resorting scriptlet or %=?

I had a proposal to allow x.y expression to get y
in the this order:
(1) x.getY()
(2) x.y()
(3) x.y

In this way, to write toString of x object to a page,
simply use
bean:write name=x property=toString/

This proposal is shotdown.  Without this, scriptlet
has to be used in jsp.

ct


--- Arron Bates [EMAIL PROTECTED] wrote:

For one, I recommend getting your properties into
getter/setter 
methodology. Simply so you can use the wealth that
is the Struts tagging 
system (as it's (the bean spec Struts runs against
for it's model 
components) kind of what it's all about).

By 'raw' String do you mean the object's
toString() method?... Any 
property that yields and object to be written out
will have it's 
toString() method called to write it to the
output.

I'm also curious about your null pointer issue
with the nested 
extension (for some reason :).
Can I get a hold of the bean and JSP you were trying
to run it with?...

Arron.


Alex Paransky wrote:

I am pretty new with struts and wrote the following

.JSP code.  Is there a

better way to write this?  I could not find a tag

in STRUTS to let me just

get the property from the object.  My object does

not have get/set methods,

so I had to resort to using %= tag.  Is there a

tag in STRUTS that would

just access the raw String attribute of the

object instead of calling

get/set?

I also tried using the keyboardmonkey nested

library, but kept getting

NullPointerExceptions when nested:iterate would

execute

jsp:useBean id=profileHeaders

class=com.myprofiles.client.web.bean.MemberProfileHeadersBean
/

logic:iterate id=profile name=profileHeaders

property=profiles

type=com.myprofiles.service.common.ProfileHeaderValue

 %=profile.name%
 %=profile.description%
/logic:iterate

Thanks.


-AP_
www: http://www.alexparansky.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]



__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
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: Is there a better way to write this code?

2002-01-16 Thread Arron Bates

You have three options on starting the nested tags.

nested:form - extends html:form
html:form - naturally
nested:root - this is the formless option for starting off. It requires only a 
name attribute which has to match the name of a bean which is in scope. This can 
be done by defining a bean in the struts-config.xml and have it put in session scope, 
or you can use the jsp:useBean/ tag and set the name of the nested:root tag to the 
name of the bean in this jap:useBean tag.

One other thing...

nested:iterate id=profile name=profileHeaders property=profiles
/nested:iterate

...there's no need to set the name property here. It will be ignored by the nested 
tags anyway, as they must rely on the founded name set by the parent tags.


Arron.


Alex Paransky wrote:

Some background:

I am using Struts 1.0.1.  The nested tags were obtained from
http://www.keyboardmonkey.com/struts.  I could not find a reference manual
for the nested tags, but looking at the .TDL it appears as they were
intended to be a 1-to-1 mapping with struts.  So I simply replaced
logic:iterate ... with nested:iterate ... (where logic references the
struts-logic.tld and nested references the nested-tags.tld).  I even removed
the code in the tag, so it looked like this:

nested:iterate id=profile name=profileHeaders property=profiles
/nested:iterate

In the examples on the www.keyboardmonkey.com/struts site, all the tags were
used inside of a form.  I don't have a form, perhaps that's why I was
getting a null pointer exception.  I am new with STRUTS so I do not know why
this is happening and I have not had a chance to dig into the source code
yet.

Thanks.
-AP_

-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 10:30 PM
To: Struts Users Mailing List
Subject: Re: Is there a better way to write this code?


For one, I recommend getting your properties into getter/setter
methodology. Simply so you can use the wealth that is the Struts tagging
system (as it's (the bean spec Struts runs against for it's model
components) kind of what it's all about).

By 'raw' String do you mean the object's toString() method?... Any
property that yields and object to be written out will have it's
toString() method called to write it to the output.

I'm also curious about your null pointer issue with the nested
extension (for some reason :).
Can I get a hold of the bean and JSP you were trying to run it with?...

Arron.


Alex Paransky wrote:

I am pretty new with struts and wrote the following .JSP code.  Is there a
better way to write this?  I could not find a tag in STRUTS to let me just
get the property from the object.  My object does not have get/set methods,
so I had to resort to using %= tag.  Is there a tag in STRUTS that would
just access the raw String attribute of the object instead of calling
get/set?

I also tried using the keyboardmonkey nested library, but kept getting
NullPointerExceptions when nested:iterate would execute

jsp:useBean id=profileHeaders
class=com.myprofiles.client.web.bean.MemberProfileHeadersBean /
logic:iterate id=profile name=profileHeaders property=profiles
type=com.myprofiles.service.common.ProfileHeaderValue
 %=profile.name%
 %=profile.description%
/logic:iterate

Thanks.


-AP_
www: http://www.alexparansky.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]


--
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: Nesting Beans/Iterators/... GOT IT!

2002-01-16 Thread Arron Bates

Sweet!
:)

Have fun.


Arron.



Collard, John wrote:

Thanks for all the help!  The problem (for some reason) was the name of my
property!  I simply created another property and its getter that returned
the value of the first property.  

John Collard
[EMAIL PROTECTED]



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




Re: Indexed properties...setters and getters

2002-01-16 Thread Arron Bates

Is table[5].minimumSales the tag's name or its property property?...

Have you tried the nested extension for doing this stuff?...


Arron.

TODD HARNEY wrote:

If I have a html:text field on my form with the property named table[5].minimumSales, 
wouldn't this result in:

1) A getTable(5).getMinimumSales() for displaying the form
2) A getTable(5).setMinimumSales(data) for posting the form through an Action class

I am not seeing this behavior at all in my web application and I am using the Struts 
1.0.1 release. Any ideas? Any suggestions on how to debug this?

Thanks,
Todd Harney


--
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: Is there a better way to write this code?

2002-01-16 Thread Alex Paransky

Arron, was this in some documentation that I failed to read.  If so, could
you please point me to it.  I will try this at home tonight.

Thanks.
-AP_

-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 3:37 PM
To: Struts Users Mailing List
Subject: Re: Is there a better way to write this code?


You have three options on starting the nested tags.

nested:form - extends html:form
html:form - naturally
nested:root - this is the formless option for starting off. It requires
only a name attribute which has to match the name of a bean which is in
scope. This can be done by defining a bean in the struts-config.xml and
have it put in session scope, or you can use the jsp:useBean/ tag and set
the name of the nested:root tag to the name of the bean in this jap:useBean
tag.

One other thing...

nested:iterate id=profile name=profileHeaders property=profiles
/nested:iterate

...there's no need to set the name property here. It will be ignored by
the nested tags anyway, as they must rely on the founded name set by the
parent tags.


Arron.


Alex Paransky wrote:

Some background:

I am using Struts 1.0.1.  The nested tags were obtained from
http://www.keyboardmonkey.com/struts.  I could not find a reference manual
for the nested tags, but looking at the .TDL it appears as they were
intended to be a 1-to-1 mapping with struts.  So I simply replaced
logic:iterate ... with nested:iterate ... (where logic references the
struts-logic.tld and nested references the nested-tags.tld).  I even
removed
the code in the tag, so it looked like this:

nested:iterate id=profile name=profileHeaders property=profiles
/nested:iterate

In the examples on the www.keyboardmonkey.com/struts site, all the tags
were
used inside of a form.  I don't have a form, perhaps that's why I was
getting a null pointer exception.  I am new with STRUTS so I do not know
why
this is happening and I have not had a chance to dig into the source code
yet.

Thanks.
-AP_

-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 10:30 PM
To: Struts Users Mailing List
Subject: Re: Is there a better way to write this code?


For one, I recommend getting your properties into getter/setter
methodology. Simply so you can use the wealth that is the Struts tagging
system (as it's (the bean spec Struts runs against for it's model
components) kind of what it's all about).

By 'raw' String do you mean the object's toString() method?... Any
property that yields and object to be written out will have it's
toString() method called to write it to the output.

I'm also curious about your null pointer issue with the nested
extension (for some reason :).
Can I get a hold of the bean and JSP you were trying to run it with?...

Arron.


Alex Paransky wrote:

I am pretty new with struts and wrote the following .JSP code.  Is there a
better way to write this?  I could not find a tag in STRUTS to let me just
get the property from the object.  My object does not have get/set
methods,
so I had to resort to using %= tag.  Is there a tag in STRUTS that would
just access the raw String attribute of the object instead of calling
get/set?

I also tried using the keyboardmonkey nested library, but kept getting
NullPointerExceptions when nested:iterate would execute

jsp:useBean id=profileHeaders
class=com.myprofiles.client.web.bean.MemberProfileHeadersBean /
logic:iterate id=profile name=profileHeaders property=profiles
type=com.myprofiles.service.common.ProfileHeaderValue
 %=profile.name%
 %=profile.description%
/logic:iterate

Thanks.


-AP_
www: http://www.alexparansky.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]


--
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: Language Alphabet Set

2002-01-16 Thread John Hunt

Isnt there a way to get the alphabet of a language?

--- John Hunt [EMAIL PROTECTED] wrote:
 Hi 
 I want to get the alphabet of a language based on
 the
 locale. How can I do that? I have to display an
 index
 structure based on the locale. So I need alphabet of
 the particular locale which comes in the request.
 Any help regarding this would be highly appreciated.
 Thanks
 Junta
 
 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




Re: Recommended method to pass back result to the JSP

2002-01-16 Thread Jorge Ruiz \(SX\)

This is how to put it in your action:

  List resultList = someClass.getResultList( request );
  request.setAttribute(resultList, resultList);

This could also be done by someClass.getResultList directly.

This is how to get it in you JSP:

 List resultList = (List) request.getAttribute(resultList);

Hope this helps.

Cheers

Jorge
- Original Message -
From: Jin Siong Voon [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 7:07 PM
Subject: Recommended method to pass back result to the JSP


 Hi all,
 I've been doing some poking around, and still can't decide on the method
to use
 to pass results back to the jsp page.  this is the scenario:

 1. click on something on jsp page, e.g. click on a category
 2. the appropriate action class will do perform(), which gets all the
category
 items based on the category id which was selected and put the result into
a
 list.
 3. the jsp page will render the categories (in a table) based on the list

 3. the question is, where do i put the list? i've seen people putting it
into
 the session, and some people talked about putting it into the request. i
don't
 really fancy putting the list into the session as i believe we should keep
the
 session object small? so far i haven't seen any code as on how to put that
into
 the request object and how do i access that in the forwarded jsp?

 thanks for your help.

 Regards,
 Jin S. Voon

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




Mouse over images on buttons in Struts

2002-01-16 Thread Tony

Hi

I want to have a mouseover effect on a button.  When the mouse is not over the button 
the button should display graphic A, when the mouse is over the button the graphic 
should be graphic B.  What is the best way to do this with struts.
I have had a look at the
html:button  

tag but am not having much luck getting it to work for me.  Should I use Struts for 
this, or plain javascript?



-- 


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]




Re: Mouse over images on buttons in Struts

2002-01-16 Thread David M. Karr

 s45652001 == s45652001  Tony writes:

s45652001 Hi
s45652001 I want to have a mouseover effect on a button.  When the mouse is not 
over the button the button should display graphic A, when the mouse is over the button 
the graphic should be graphic B.  What is the best way to do this with struts.
s45652001 I have had a look at the
s45652001 html:button  

s45652001 tag but am not having much luck getting it to work for me.  Should I 
use Struts for this, or plain javascript?

The html:button tag has a onmouseover attribute, which can be used to
specify the javascript to execute on the mouseover event.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; BrainBench CJ12P (#12004)


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




RE: tag for authentication

2002-01-16 Thread Jake Thompson

Do you mean to check if the user has a role?
There is support in the logic:present tag and also in the tglibs, the
request taglib(http://jakarta.apache.org/taglib/) There is also role
checking.
Also, I believe the logic:present supports checking usernames also.

Later
Jake T


-Original Message-
From: Domen, Ken [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 16, 2002 4:42 PM
To: '[EMAIL PROTECTED]'
Subject: tag for authentication


Is there a struts tag library that does basic authentication?

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]




Re: Recommended method to pass back result to the JSP

2002-01-16 Thread Jin Siong Voon

Hi Jorge,
Thanks for the info, but in the JSP page, I would like to pass the result list 
to the struts taglib, e.g.

html:select property=profileName onchange=submitProfileForm();
   html:options collection=resultlist property=name /
/html:select

how do i do that? thanks.

regards,
Jin S. Voon

Quoting Jorge Ruiz (SX) [EMAIL PROTECTED]:

 This is how to put it in your action:
 
  List resultList = someClass.getResultList( request );
  request.setAttribute(resultList, resultList);
 
 This could also be done by someClass.getResultList directly.
 
 This is how to get it in you JSP:
 
  List resultList = (List) request.getAttribute(resultList);
 
 Hope this helps.
 
 Cheers
 
 Jorge
 - Original Message -
 From: Jin Siong Voon [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, January 16, 2002 7:07 PM
 Subject: Recommended method to pass back result to the JSP
 
 
  Hi all,
  I've been doing some poking around, and still can't decide on the
 method
 to use
  to pass results back to the jsp page. this is the scenario:
 
  1. click on something on jsp page, e.g. click on a category
  2. the appropriate action class will do perform(), which gets all
 the
 category
  items based on the category id which was selected and put the result
 into
 a
  list.
  3. the jsp page will render the categories (in a table) based on the
 list
 
  3. the question is, where do i put the list? i've seen people putting
 it
 into
  the session, and some people talked about putting it into the request.
 i
 don't
  really fancy putting the list into the session as i believe we should
 keep
 the
  session object small? so far i haven't seen any code as on how to put
 that
 into
  the request object and how do i access that in the forwarded jsp?
 
  thanks for your help.
 
  Regards,
  Jin S. Voon
 
  --
  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]




html:form focus failing in NS on linux?

2002-01-16 Thread Mark Woon


Is anyone else seeing weirdness with the focus attribute to the
html:form tag?  It works fine for me on Windows (NS and IE), but on
Linux, NS never grabs the focus properly.  Is this a known bug?

I've attached the html result.  It all looks good to me, but yet...

Any thoughts?

Thanks,
-Mark



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


Re: Error - MultipartIterator: no multipart request data sent

2002-01-16 Thread Antony Stace

Hi 

This is an old post that follows.  I have found the same problem with Struts
1.01.  Is this behaviour a bug or is it how Struts is meant to work?  
Also can someone please tell me what setting
the value of redirect=true does besides clearing the request attributes.

Cheers

Tony




Hello,

It seems to work like that. But as you wrote, if the redirect attribute is set 
to 'true', it is cleaning all the attributes in request. I had put my 
attributes in session instead of request.
Anyway, Thanks a lot. 

Regards
Nuray

-Original Message-
From: mikael.eriksson [mailto:[EMAIL PROTECTED]]
Sent: Montag, 2. Juli 2001 00:18
To: struts-user
Subject: Re: Error - MultipartIterator: no multipart request data sent


Hello

 I noticed the same problem when moving to 1.0. It seems that
the requesthandler notices that the request is a multi-part and
tries to find the multi-part data, even when the request are
already handled and you are only forwarding to the next
action. (I only got the problem when going to another action.)

 The way I handled it was to set redirect=true in struts-config.xml
for the action that I forwarded to, this made the multi-part info
go away from the request (and all other parameters too of course,
so if you are expecting request parameters in the next action this
will not work.)

 I guess this could be fixed in the code too, maybe by having the request
reader setting a request attribute so that it knows the next time
that it already has gotten the data. But I did not go deep enough
into the code to know if that is feasible or not.

 Regards
 Mikael


[EMAIL PROTECTED] wrote:

 Hi everbody,

 I am writing a program that needs to process form data. I have an uploadForm
 (that is an insatance of org.apache.struts.action.ActionForm). I have no
 problem with uploading a file via this form. After uploading the file, I am
 executing a couple of procedures inside the uploadAction(instance of
 org.apache.struts.action.Action) and afterwards forwarding the request to
 another page. While it is forwarding the request, it gives the following 
error:

 javax.servlet.ServletException: MultipartIterator: no multipart request data
 sent
 java.lang.Throwable(java.lang.String)
 java.lang.Exception(java.lang.String)
 javax.servlet.ServletException(java.lang.String)
 void org.apache.struts.upload.MultipartIterator.parseRequest()

 org.apache.struts.upload.MultipartIterator(javax.servlet.http.HttpServletRequest
 , int, long, java.lang.String)
 void
 org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(javax.servlet
 .http.HttpServletRequest)
 void org.apache.struts.util.RequestUtils.populate(java.lang.Object,
 java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)
 void
 org.apache.struts.action.ActionServlet.processPopulate(org.apache.struts.action.
 ActionForm, org.apache.struts.action.ActionMapping,
 javax.servlet.http.HttpServletRequest)
 void
 org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
 uest, javax.servlet.http.HttpServletResponse)
 void
 com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
 letRequest, javax.servlet.http.HttpServletResponse)
 void
 org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
 est, javax.servlet.http.HttpServletResponse)
 void
 javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)
 void
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
 void
 org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
 org.apache.tomcat.core.Response)
 void
 org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
 org.apache.tomcat.core.Response)
 void
 org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
 org.apache.tomcat.core.Response)
 void
 org.apache.tomcat.facade.RequestDispatcherImpl.forward(javax.servlet.ServletRequ
 est, javax.servlet.ServletResponse)
 void
 org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.ac
 tion.ActionForward, org.apache.struts.action.ActionMapping,
 org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)
 void
 org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
 uest, javax.servlet.http.HttpServletResponse)
 void
 com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
 letRequest, javax.servlet.http.HttpServletResponse)
 void
 org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
 est, javax.servlet.http.HttpServletResponse)
 void
 javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)
 void
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
 void
 

Re: Struts Connection Pooling

2002-01-16 Thread @Basebeans.com

Subject: Re: Struts Connection Pooling
From: Gary [EMAIL PROTECTED]
 ===
Where could i download it?
Thanks.

Michael Mehrle [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Very simple - use Poolman! All you need to do is to download it, and put
 poolman.jar and the poolman.xml location in your classpath. It even has
 caching of frequent requests - cool stuff.

 Michae


 - Original Message -
 From: Adrian Theuma [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 16, 2002 8:43 AM
 Subject: Struts Connection Pooling


 Hi,
 I just joined this mailing list and I think it is great for
 someone starting off with struts and even in the longer term. I need an
 opinion on the connection pooling build in struts. Is this safe to use,
 how does it behave under heavy load? Can you forward me to an example
 where this is used?

 Thanks.

 Regards,
 Adrian

 --
 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: Indexed properties...setters and getters

2002-01-16 Thread Tom Goemaes

Is the indexed feature supported in 1.0.1 ? don't think so... not sure.
Use the nightly builds.


 Struts Users Mailing List [EMAIL PROTECTED] wrote:


If I have a html:text field on my form with the property named table[5].min
imumSales, wouldn't this result in:

1) A getTable(5).getMinimumSales() for displaying the form
2) A getTable(5).setMinimumSales(data) for posting the form through an 
Action class

I am not seeing this behavior at all in my web application and I am using 
the Struts 1.0.1 release. Any ideas? Any suggestions on how to debug this?

Thanks,
Todd Harney


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




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




Antwort: Re: Config Problem using Struts with WebSphere 3.5.4 on Linux 7.2

2002-01-16 Thread Anton_Grimm


sorry for this one

the whole file web.xml

##

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

!DOCTYPE web-app SYSTEM
file:/opt/IBMWebAS/hosts/default_host/OKBVWebApp/servlets/org/apache/struts/resources/web-app_2_2.dtd

web-app

servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
param-nameapplication/param-nameparam-valuede.man.mn.aaw.okbv.struts.OKBVResources/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
 init-paramparam-namedebug/param-name
param-value2/param-value  /init-param
 init-paramparam-namedetail/param-name
param-value2/param-value  /init-param
 load-on-startup   2   /load-on-startup
/servlet

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

  welcome-file-list
welcome-fileOnlineKBV.html/welcome-file
  /welcome-file-list

 taglib
  taglib-uri/WEB-INF/struts-form.tld/taglib-uri
  taglib-location/WEB-INF/struts-form.tld/taglib-location
 /taglib
 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



the tlds are in OKBVWebApp/web/WEB-INF/

Toni


MAN Nutzfahrzeuge AG
Anton Grimm
Abt. IDP (SoftwareProduktionsumgebungen)
Dachauerstr.667
80995 München

Tel.:  089/1580-1054
Fax:  089/1580-911054
E-Mail: [EMAIL PROTECTED]



   

dion   

dion@multitaAn: Struts Users Mailing List 
[EMAIL PROTECTED]
sk.com.au   Kopie:

 Thema:  Re: Config Problem using Struts with 
WebSphere 3.5.4 on Linux 7.2 
16.01.02   

20:51  

Bitte  

antworten an   

Struts Users  

Mailing List  

   

   





[EMAIL PROTECTED] wrote:

 hi all,

 sorry first for one more question on this topic,
 but I am trying to run struts-sample and another application using
 WebSphere 3.5.4 on Linux 7.2 for almost 4 days without success.

 I was reading the installation hints
  http://jakarta.apache.org/struts/installation-was352-x.html
  http://www.distribucon.com/struts/WASInstall.htm

 I tried several things, but still get the error ...

  [02.01.16 11:07:11:630 CET] cacd731a ServletInstan X Uncaught
service
 () exception thrown by servlet {0}: {1}
  jsp11
  javax.servlet.ServletException: Cannot
 retrieve mapping for action /login
  at javax.servlet.ServletException.init(ServletException.java:161)
  at

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:392)



  at jsp._login_jsp_1._jspService(_login_jsp_1.java:782)


 As I understand this means the ActionServlet has not initialized the
 Mappings
 defined in struts-config.xml

   action path=/login
type=de.man.mn.aaw.okbv.struts.action.LoginAction
name=userProfile
input=jsp/login.jsp

  forward name=ok path=jsp/vehiclechoice.jsp /
  forward name=fehler path=jsp/login.jsp?target=error/
   /action

 The DOCTYPE-Declaration looks like this

  !DOCTYPE struts-config SYSTEM


Re: Problem with bean:write and bean:define

2002-01-16 Thread Tom Goemaes

could be that bean:write needs a String to be returned by the getter ... and not a 
Calendar ? since it is a String that is inserted ... 


 Struts Users Mailing List [EMAIL PROTECTED] wrote:


Hi,
Maybe this is more related on how reflection works, But I'm trying to understand the 
behavior here...
Here's my situation:

I have a Bean under request scope with the following methods:

public MyBean {
   private java.util.Calendar startDate;
   
   public void setStartDate(Calendar newValue) {
   this.startDate = newValue;
   }
   public void setStartDate(java.util.Date newValue) {
   if (this.startDate == null) {
   this.startDate = Calendar.getInstance();
   }
   this.startDate.setTime(newValue);
   }
   public Calendar getStartDate() {
   return this.startDate;
   }
}
Well, forget all the typos, since I just created the above code as example... But 
when I have a scenario like the above (two setters with different signature - can be 
Calendars, int and Integer, long and Long, etc...)
the above tags,  and  complains that can't find a getter method for property ???.

I tried with  and  and the error was: Property ??? in  is write only

Am I missing something? I don't know much about reflection, but I know that it's 
possible to declare the method signature while trying to get reference to a method, 
and it seems that it's not the case here...

Any explanation is appreciated...

Right now, I just fixed the problem by removing one of the setter methods.

Regards,
Marcelo
   

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




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