Error ! ! !

2002-03-02 Thread jwas

Can any one help me to solve this error ??

when i submit the page , it is not calling the perform method (of  action 
class)

One set method is fired after that this error 

2002-03-02 01:55:53 - Ctx( /iPort ): Exception in: R( /iPort + /execute + 
/showPilotList) - javaxse
rvletServletException: BeanUtilspopulate
at 
orgapachestrutsutilRequestUtilspopulate(RequestUtilsjava:774)
at 
orgapachestrutsactionActionServletprocessPopulate(ActionServletjava:2061)
at 
orgapachestrutsactionActionServletprocess(ActionServletjava:1563)
at 
orgapachestrutsactionActionServletdoGet(ActionServletjava:491)
at javaxservlethttpHttpServletservice(HttpServletjava:740)
at javaxservlethttpHttpServletservice(HttpServletjava:853)
at 
orgapachetomcatcoreServletWrapperdoService(ServletWrapperjava:405)
at orgapachetomcatcoreHandlerservice(Handlerjava:287)
at 
orgapachetomcatcoreServletWrapperservice(ServletWrapperjava:372)
at 
orgapachetomcatcoreContextManagerinternalService(ContextManagerjava:797)
at 
orgapachetomcatcoreContextManagerservice(ContextManagerjava:743)
at 
orgapachetomcatservicehttpHttpConnectionHandlerprocessConnection(HttpConnectionHand
lerjava:213)
at 
orgapachetomcatserviceTcpWorkerThreadrunIt(PoolTcpEndpointjava:416)
at 
orgapachetomcatutilThreadPool$ControlRunnablerun(ThreadPooljava:501)
at javalangThreadrun(Threadjava:484)
Root cause:
javalangIllegalArgumentException: argument type mismatch
at javalangreflectMethodinvoke(Native Method)
at 
orgapachestrutsutilPropertyUtilssetSimpleProperty(PropertyUtilsjava:988)
at 
orgapachestrutsutilPropertyUtilssetNestedProperty(PropertyUtilsjava:904)
at 
orgapachestrutsutilPropertyUtilssetProperty(PropertyUtilsjava:932)
at orgapachestrutsutilBeanUtilspopulate(BeanUtilsjava:509)
at 
orgapachestrutsutilRequestUtilspopulate(RequestUtilsjava:772)
at 
orgapachestrutsactionActionServletprocessPopulate(ActionServletjava:2061)
at 
orgapachestrutsactionActionServletprocess(ActionServletjava:1563)
at 
orgapachestrutsactionActionServletdoGet(ActionServletjava:491)
at javaxservlethttpHttpServletservice(HttpServletjava:740)
at javaxservlethttpHttpServletservice(HttpServletjava:853)
at 
orgapachetomcatcoreServletWrapperdoService(ServletWrapperjava:405)
at orgapachetomcatcoreHandlerservice(Handlerjava:287)
at 
orgapachetomcatcoreServletWrapperservice(ServletWrapperjava:372)
at 
orgapachetomcatcoreContextManagerinternalService(ContextManagerjava:797)
at 
orgapachetomcatcoreContextManagerservice(ContextManagerjava:743)
at 
orgapachetomcatservicehttpHttpConnectionHandlerprocessConnection(HttpConnectionHand
lerjava:213)
at 
orgapachetomcatserviceTcpWorkerThreadrunIt(PoolTcpEndpointjava:416)
at 
orgapachetomcatutilThreadPool$ControlRunnablerun(ThreadPooljava:501)
at javalangThreadrun(Threadjava:484)


Wanted : a perfect solution for CharterEncoding

2002-03-02 Thread Gordon Luk

Hi all,

I got problem on charterencoding, because my program for chinese, so i
have use charset=big5, but when use the actionform, it change back to
iso8859. :-( then, I search for the problem/solution for charterencoding
on mail-list, i got the solution, that is i write my own ActionServlet,
and set encoding to Big5... that mean hardcode on my program :-(,
anyway, it work fine.

I just wonder, any better solution for other then default iso8859
encoding, that i don't need hardcode on my program?

Thanks for attention. :-)


Gordon


_
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: newbie question: is it ok to use struts selectively?

2002-03-02 Thread Ted Husted

Performance can vary quite a bit from container to container, and then
from system to system. The best answer is to always run your own
benchmarks with your own data on your own system. 

Some people have reported performance issues with pages that have more
that 50 input fields. But I'm not aware if using scriptlets would make
any difference there or not. I've never had this problem with my own
applications, and I don't remember anyone coming back to say that
scriplets worked better than tags for 100 input-field form.

If preformance becomes an issue, or you hit the 64kb barrier, another
option might be to bypass JSPs altogether, and try a Velocity template. 

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

By the time the page is rendered, it is all HTML. Struts itself has no
clue as to how the request is written, and so it is not an issue from
the framework's perspective. All other decisions are going to be up to
the team. 

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

[EMAIL PROTECTED] wrote:
 
 yeah i understand the part that you have to type less and its simpler, but I
 want to know how is the performance hit?
 suppose I have a huge form with lots of input type, just to put something
 simple as
 
 input type-submit name=submit value=Login and its brothers and
 sisters, is it worth using the tags? will it slow down the page loading?
 
 Regards,
 Rumpa Giri
 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 01, 2002 2:23 PM
 To: Struts Users Mailing List
 Subject: Re: newbie question: is it ok to use struts selectively?
 
 You certainly can pick and choose which pieces you want to use.  You can use
 the tag library without a thought of using the controller servlet.  However,
 which would you rather write?
 
 input type-submit name=submit value=Login
 
 or
 
 html:submit value=Login/
 
 The tag library (in many cases) isn't used because it provides functionalty
 you can't write youself, but because it makes it so much easier to write the
 same things you can write yourself.
 
 ... at least that's what I gather.  Don't let me be the final word - I'm
 just a lazy developer that likes cutting what I have to type in half =)
 
 Other opinions?
 
 Regards,
 
 Eddie
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, March 01, 2002 4:09 PM
 Subject: newbie question: is it ok to use struts selectively?
 
  Suppose I have a login page, with username and password and submit button.
  Is it ok to have something like the following?
  is it ok to use struts html tags only for the input type form but not for
  the others?
  if the output of the tags is same as what I have here, why should I be
  inclined to use, or is it a convention to use? or is it a personal choice?
  html:form action=/login.do name=frm1
  type=mypackage.struts.login.LoginForm focus=username
  table cellpadding=4 cellspacing=2 border=0 align=center
  tr
  td colspan=2html:errors//td
  /tr
  tr bgcolor=#ebf5fe
  td class=b width=120Username: /td
  tdinput type=text name=username
  value=%=request.getParameter(username)% size=20
 maxlength=60/td
  /tr
  tr bgcolor=#ebf5fe
  td class=b width=120Password: /td
  tdinput type=password name=pwd
  value=%=request.getParameter(pwd)% size=20 maxlength=12/td
  /tr
  tr
  tdnbsp;/td
  td align=centerinput type=submit name=submit value=Login/td
  /tr
  /table
  /html:form
  Regards,
  Rumpa Giri
 
 
 --
 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: Methods In Action Class

2002-03-02 Thread Ted Husted

Before going to a page you want to protect, route to an Action first and
call SaveToken. This stores a token with a unique value in the user's
session.

If the page uses the html:form tag, it will automatically include a
hidden field with the token if it finds one in the session. 

In the Action that receives the page, use isTokenValue to see if the
token in the session matches the one from the form. Call resetToken to
clear the token, so it can't be used again.

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


subhendukumar mohanty wrote:
 
 Hi
 
 I found the following methods in Action.java which I think may help to control the 
session ID. That means if the user submits the page and press the back button and 
submit the page again it will throw an error.
 
 generateToken(HttpServletRequest request)
 saveToken(HttpServletRequest request)
 isTokenValid(HttpServletRequest request)
 
 If anybody has used these methods let me know how to use these methods .
 
 Thanks,
 Subhendu
 
 --
 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]




Newbie question about struts and Tomcat 4

2002-03-02 Thread Tony Ziolkowski

I've installed Tomcat4 and it works fine. I've copied the struts .war files
into the tomcat webapps directory. However tomcat doesn't see their
presence. What did I miss doing in the install process?

Thanks
Tony


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




Re: Digester and inheritance

2002-03-02 Thread dIon Gillard

Stacy Weng wrote:

I have a parent class called Component, and several child classes extending from it.  
 All the common get/set methods are defined in Component.  So, after each child is 
getting created from addObjectCreate() method, I call addSetProperties() method to 
initialize their values (values are from the xml file), however, digester can't find 
the set methods from the child class, cause they're defined in the parent class 
(Component).  The temporary solution I had was defining those set methods in the 
child classes, and have them call the super methods.  But that seems to defeat the 
whole purpose of inheritance.  Here's an example with the problem:

public class Component {
public String name = null;
public void setName(String name) {
this.name=name;
}
public void getname() {
return this.name;
}
}

public class ChildClass extend Component {
//Other methods that differ from parent class
}

Do you have any beaninfo classes coded/generated for ChildClass?


for the digester rules:

digester.addObjectCreate(ChildClassPattern, some.package.ChildClass);
digester.addSetProperties(ChildClassPattern);

so, as it gets to addSetProperties(), it doesn't see any of the get/set methods in 
ChildClass, and yet, it doesn't know to look its parent class, Component.

I hope I'm able to get my problem across.  Thanks again for taking the time to 
respond.

--Stacy

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




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




RE: configure welcome page

2002-03-02 Thread Phase Web and Multimedia

I thought Tomcat 4.0 allowed for some filtering that could avoid this and
send a request straight to an Action.

Brandon Goodin

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: Re: configure welcome page


Subject: Re: configure welcome page
From: Don Miller [EMAIL PROTECTED]
 ===
Your problem is due to a common misconception of how the welcome file list
works.  The welcome file list in the web.xml file defines the default
file(s) for all directories, including the root and all subdirectories.  It
does not specify the URL of a default page for the web application.  If you
request http://myserver/myapp/, the application looks for
http://myserver/myapp/index.jsp.  If you request
http://myserver/myapp/mydirectory/, the application looks for
http://myserver/myapp/mydirectory/index.jsp.

The only work-around for your situation is to perform a forward from
/index.jsp to /WEB-INF/JSP/index.jsp.

I hope this helps.

Don

Patria Lukman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 hi everyone

 am a newbie in Struts and have been playing around with some examples. I
 know it might sound obvious, but I have looked it up in the archive mail
and
 have not found anything.
 I want to move the welcome page ( index.jsp)  of my app from the root to
 WEB-INF/JSP/index.jsp and for that I modified the web.xml file, in the 
 welcome-fileindex.jsp /welcome-file to
 welcome-file/WEB-INF/JSP/index.jsp/welcome-file but it gives a not
 resource found error when i access the app I also tried it without
the
 / before WEB-INF
 any hints?

 __
 Patria Handatjaia Lukman

 NdexSystems Inc. 360 St-Jacques Ouest, Suite 2000
 Montréal, Qc. H2Y 1P5
 Office phone: 1-514-288-0908 Ext 110
 [EMAIL PROTECTED]

 Quote of the century:
 Life is a carnaval...



 --
 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: Newbie question about struts and Tomcat 4

2002-03-02 Thread Gaulin . David

Don't put too much detail in your posting, it makes it too hard to answer.
:)

Mark Galbreath posted that link on Friday, have a look
http://www.tuxedo.org/~esr/faqs/smart-questions.html



David Gaulin
Tel / tél :(613) 946-9595 
Email / courriel : [EMAIL PROTECTED] 
Facsimile / télécopieur : (613) 954-6012
Industry Canada | 235 Queen Street, Ottawa, Ontario, K1A 0H5
Industry Canada | 235, rue Queen, Ottawa (Ontario)  K1A 0H5



-Original Message-
From: Tony Ziolkowski [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 02, 2002 11:14 AM
To: [EMAIL PROTECTED]
Subject: Newbie question about struts and Tomcat 4


I've installed Tomcat4 and it works fine. I've copied the struts .war files
into the tomcat webapps directory. However tomcat doesn't see their
presence. What did I miss doing in the install process?

Thanks
Tony


--
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: Newbie question about struts and Tomcat 4

2002-03-02 Thread Adam Fields


Tony Ziolkowski says:
 Well let's see what more I can add. I took the .war files from the struts
 installation and copied them the /var/tomcat4/webapps. I restarted tomat.
 When I enter http://localhost:8180/struts-example I am told that tomcat
 can't find the page /struts-example. And I know that http://localhost:8180
 IS the correct tomcat port.
 
 That enough detail?

There's no path expansion - try this:

http://localhost:8180/struts-example/index.jsp

- Adam

-
Surgam, Inc. is a technology consulting firm with strong background in
delivering scalable and robust enterprise web and IT applications.
http://www.surgam.net


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




Re: Wanted : a perfect solution for CharterEncoding

2002-03-02 Thread David Winterfeldt

If you are using a servlet 2.3 compliant server like
Tomcat 4.0, you can use a filter to control this. 
Look at this example 'Example: Modifying the Request
Character Encoding' at: 

http://java.sun.com/products/servlet/Filters.html

Or you could modify the Struts source code to set your
character type on the request as it comes into the
ActionServlet if you can't use filters.  Although the
filter solution is much cleaner and separate from your
main code.

David

--- Gordon Luk [EMAIL PROTECTED] wrote:
 Hi all,
 
 I got problem on charterencoding, because my program
 for chinese, so i
 have use charset=big5, but when use the actionform,
 it change back to
 iso8859. :-( then, I search for the problem/solution
 for charterencoding
 on mail-list, i got the solution, that is i write my
 own ActionServlet,
 and set encoding to Big5... that mean hardcode on
 my program :-(,
 anyway, it work fine.
 
 I just wonder, any better solution for other then
 default iso8859
 encoding, that i don't need hardcode on my program?
 
 Thanks for attention. :-)
 
 
 Gordon
 
 

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


__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

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




RE: White Paper on Struts

2002-03-02 Thread John Menke

Larry,

Thanks for your contribution.  I am finding your white paper useful.

-john

-Original Message-
From: Maturo, Larry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 2:11 PM
To: 'Struts Users Mailing List'
Subject: White Paper on Struts


I've been collecting, in a document, Struts examples
and know how while I have been learning Struts.  I
have decided to make this available to everyone in
a white paper.

It's available on my companies web-site at:

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

It's under the Model_Layer_Framework heading.  The
link to the paper is called Struts_Whitepaper.doc
(it's a word document.)

I hope others will find this to be useful.

-- Larry Maturo
   [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: User Registration with Struts query

2002-03-02 Thread John Menke

Ghoot,

Is this something you could use?

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html



-Original Message-
From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 8:43 AM
To: [EMAIL PROTECTED]
Subject: User Registration with Struts query


I have a question regarding registering new users of a struts web app.

If the web app is using container managed security, and say form-based
authentication, and a registration action is available for new users, is
there a way to implement the registration process that is portable ?

For instance, if user info is stored in a 'database', the container manages
the authentication checks during login. However when a new user completes
the registration, the registraion action then needs to 'add' this user, but
I dont really want to put the specifics of the user database etc into the
registering action, as it may be deployed using LDAP somewhere else.

All the other security stuff seems to be portable across implementations,
and i know the spec doesnt deal with maintaining users, but does this really
mean that I need to implement specific registration for each different user
'database' that may be used ?

Ideally I want to do something like:

realm.addUser(...)

where 'realm' is the user database (LDAP, RDBMS whatever) which would keep
the registration action portable.

(Note: when I talk about the registration action being portable, i know in
real terms this stuff would be in a helper bean/business delegate, so I
could have different delegates deal with different databases - i just wanted
to keep the question simple, so I say the registration action.)

How have you dealt with this ? Is there a portable solution ?

Thanks for any feedback

Ghoot Emaho
Development Team Leader
Petrotechnics  http://www.petrotechnics.co.uk/ Ltd




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




RE: User Registration with Struts query

2002-03-02 Thread John Menke

Ghoot,

I found another resource that might be helpful

http://www.vsj.co.uk/archive/Feb2002/Javanet/javanet1-0202.asp

-john

-Original Message-
From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 8:43 AM
To: [EMAIL PROTECTED]
Subject: User Registration with Struts query


I have a question regarding registering new users of a struts web app.

If the web app is using container managed security, and say form-based
authentication, and a registration action is available for new users, is
there a way to implement the registration process that is portable ?

For instance, if user info is stored in a 'database', the container manages
the authentication checks during login. However when a new user completes
the registration, the registraion action then needs to 'add' this user, but
I dont really want to put the specifics of the user database etc into the
registering action, as it may be deployed using LDAP somewhere else.

All the other security stuff seems to be portable across implementations,
and i know the spec doesnt deal with maintaining users, but does this really
mean that I need to implement specific registration for each different user
'database' that may be used ?

Ideally I want to do something like:

realm.addUser(...)

where 'realm' is the user database (LDAP, RDBMS whatever) which would keep
the registration action portable.

(Note: when I talk about the registration action being portable, i know in
real terms this stuff would be in a helper bean/business delegate, so I
could have different delegates deal with different databases - i just wanted
to keep the question simple, so I say the registration action.)

How have you dealt with this ? Is there a portable solution ?

Thanks for any feedback

Ghoot Emaho
Development Team Leader
Petrotechnics  http://www.petrotechnics.co.uk/ Ltd




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




Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Dick Starr

Tony:

I thought the default port was always 8080. In any event, you might prove
Tomcat is running OK by entering http://localhost:8080/  (or whatever port
you are using). Then try the struts-example. If that doesn't work then I
would stop Tomcat, erase the tomcat /work/localhost/ directory then re-start
Tomcat (forces re-generation of the work jsp's).

By the way, I posted a problem Friday morning where Tomcat 4.0.2 did
Marking servlet action unavailable when I definined a data-source in the
config. I didn't receive a response and don't know why it happened, but did
discover that Tomcat 3.3a worked fine. For now, I am forced to go to 3.3a,
but I can't believe that Tomcat 4.0.2 is broken.

Dick

- Original Message -
From: Tony Ziolkowski [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Saturday, March 02, 2002 12:27 PM
Subject: RE: Newbie question about struts and Tomcat 4


 Well let's see what more I can add. I took the .war files from the struts
 installation and copied them the /var/tomcat4/webapps. I restarted tomat.
 When I enter http://localhost:8180/struts-example I am told that tomcat
 can't find the page /struts-example. And I know that http://localhost:8180
 IS the correct tomcat port.

 That enough detail?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: March 2, 2002 12:32 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Newbie question about struts and Tomcat 4


 Don't put too much detail in your posting, it makes it too hard to answer.
 :)

 Mark Galbreath posted that link on Friday, have a look
 http://www.tuxedo.org/~esr/faqs/smart-questions.html



 David Gaulin
 Tel / tél :(613) 946-9595
 Email / courriel : [EMAIL PROTECTED]
 Facsimile / télécopieur : (613) 954-6012
 Industry Canada | 235 Queen Street, Ottawa, Ontario, K1A 0H5
 Industry Canada | 235, rue Queen, Ottawa (Ontario)  K1A 0H5



 -Original Message-
 From: Tony Ziolkowski [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, March 02, 2002 11:14 AM
 To: [EMAIL PROTECTED]
 Subject: Newbie question about struts and Tomcat 4


 I've installed Tomcat4 and it works fine. I've copied the struts .war
files
 into the tomcat webapps directory. However tomcat doesn't see their
 presence. What did I miss doing in the install process?

 Thanks
 Tony


 --
 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: Methods In Action Class

2002-03-02 Thread subhendukumar mohanty

The isTokenValid() method compares the token value from request attribute(hidden field 
stored in form) with the token stored in session. If it matches then the session is 
valid.
I have one doubt in the following scenario.


action path=/ATCreateConfirm
type=com.test.ATCreateConfirmAction
name=ATCreateForm
scope=session
input=ATCreate.jsp
validate=true
forward name=Success path=/ATCreate.do/
forward name=failureLoad path=/ATCreate.do/
forward name=failureSubmit path=/ATCreateCutOff.jsp/
/action

In this scenario the first request will be ATCreateConfirm.do , in the 
ATCreateConfirmAction class I will check the token and  validate it if it is valid i 
will generate a new token. But after success of this action it calls ATCreate.do , in 
the case this request still contains the old transaction token value from the form . 
If a am going to check the validity of token in the corresponding action class of 
ATCreate.do , the token will be not valid because the previous action has already 
updated  it. 

So my question is in this case where one mapping forwards to another .do how to 
handle this token. Should I have to manually check for the following scenarios or 
struts has any way to handle this type of scenario.

Any help will be great.

Thanks,
Subhendu

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 02, 2002 9:27 AM
To: Struts Users Mailing List
Subject: Re: Methods In Action Class


Before going to a page you want to protect, route to an Action first and
call SaveToken. This stores a token with a unique value in the user's
session.

If the page uses the html:form tag, it will automatically include a
hidden field with the token if it finds one in the session. 

In the Action that receives the page, use isTokenValue to see if the
token in the session matches the one from the form. Call resetToken to
clear the token, so it can't be used again.

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


subhendukumar mohanty wrote:
 
 Hi
 
 I found the following methods in Action.java which I think may help to control the 
session ID. That means if the user submits the page and press the back button and 
submit the page again it will throw an error.
 
 generateToken(HttpServletRequest request)
 saveToken(HttpServletRequest request)
 isTokenValid(HttpServletRequest request)
 
 If anybody has used these methods let me know how to use these methods .
 
 Thanks,
 Subhendu
 
 --
 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]




IMINT - iTree-X Powertree

2002-03-02 Thread Linh Nguyen

Hi,

I am evaluating navigation tree applet called IMINT - iTree-X Powertree 
(http://www.imint.com/index.html) Has anyone successfully integrated this package or 
one similar with Struts?  They require the data for the tree nodes to either be 
written in applet param tags:
PARAM NAME=entry1-0   VALUE=text:NEWSREEL MENU|1|0| | 
 or in an external text file (w/data in their proprietary format) : 
ID:2;text:General Description 1 1  

If anyone has any experience with integrating this into struts or a similar concept, 
advice would greatly be appreciated!

Thanks in advance,
-linh

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




Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Tony Ziolkowski

That didn't work either. This is the exact response I get:


  Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp



type Status report

message/structs-example/index.jsp

descriptionThe requested resource (/structs-example/index.jsp) is not 
available.


Sorry about the html.

Adam Fields wrote:

Tony Ziolkowski says:

Well let's see what more I can add. I took the .war files from the struts
installation and copied them the /var/tomcat4/webapps. I restarted tomat.
When I enter http://localhost:8180/struts-example I am told that tomcat
can't find the page /struts-example. And I know that http://localhost:8180
IS the correct tomcat port.

That enough detail?


There's no path expansion - try this:

http://localhost:8180/struts-example/index.jsp

   - Adam

-
Surgam, Inc. is a technology consulting firm with strong background in
delivering scalable and robust enterprise web and IT applications.
http://www.surgam.net


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






Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Ted Husted

   Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp
-^

Tony Ziolkowski wrote:
 
 That didn't work either. This is the exact response I get:
 
   Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp
 
 
 
 type Status report
 
 message/structs-example/index.jsp
 
 descriptionThe requested resource (/structs-example/index.jsp) is not
 available.
 
 
 Sorry about the html.
 
 Adam Fields wrote:
 
 Tony Ziolkowski says:
 
 Well let's see what more I can add. I took the .war files from the struts
 installation and copied them the /var/tomcat4/webapps. I restarted tomat.
 When I enter http://localhost:8180/struts-example I am told that tomcat
 can't find the page /struts-example. And I know that http://localhost:8180
 IS the correct tomcat port.
 
 That enough detail?
 
 
 There's no path expansion - try this:
 
 http://localhost:8180/struts-example/index.jsp
 
- Adam
 
 -
 Surgam, Inc. is a technology consulting firm with strong background in
 delivering scalable and robust enterprise web and IT applications.
 http://www.surgam.net
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 

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

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




Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Tony Ziolkowski

DOH! :)


Ted Husted wrote:

  Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp

-^

Tony Ziolkowski wrote:

That didn't work either. This is the exact response I get:

  Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp



type Status report

message/structs-example/index.jsp

descriptionThe requested resource (/structs-example/index.jsp) is not
available.


Sorry about the html.

Adam Fields wrote:

Tony Ziolkowski says:

Well let's see what more I can add. I took the .war files from the struts
installation and copied them the /var/tomcat4/webapps. I restarted tomat.
When I enter http://localhost:8180/struts-example I am told that tomcat
can't find the page /struts-example. And I know that http://localhost:8180
IS the correct tomcat port.

That enough detail?

There's no path expansion - try this:

http://localhost:8180/struts-example/index.jsp

  - Adam

-
Surgam, Inc. is a technology consulting firm with strong background in
delivering scalable and robust enterprise web and IT applications.
http://www.surgam.net


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



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

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






Struts Warning messages

2002-03-02 Thread Jon Doe

Hi:

Does anyone know what these warning message might mean:

We are running Struts under a Websphere App Server. This warning comes just 
before we forward to another JSP page.

Sat Mar 02 17:41:42 2002 (1015116102.249205) 
bvsmgr[15663]@abctw.office.tac.net:12.389491001:L2:S44 warning: resetting 
Response buffer before forwarding the request.

Sat Mar 02 17:41:42 2002 (1015116102.304446) 
bvsmgr[15663]@abctw.tac.net:12.389491001:L2:S44 Warning: output committing 
is allowed only once.

Any suggestions would be appreciated.



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




paging taglib and struts?

2002-03-02 Thread John Menke

Does anyone any suggestions for implementing paging with struts? I have
searched the archive and karl basel posted this:

snip

There's a good pager taglib at jsptags.com. I've used it in a struts app and
does the job quite well when embedded in the iterate tags.

logic:iterate
   pg:item
   Item Details
   /pg:item
/logic:iterate

snip


I have downloaded this pager and the documentation is not providing enough
information on how this works.  Are there any examples out there on how to
do this that I am missing?

-john


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




Sample file on husted.com

2002-03-02 Thread Jeff Kilbride

Hi All,

I'm trying to download the sample file struts-stub.zip from the Building
a Web Application page at:

http://husted.com/about/scaffolding/strutByStrut.htm

However, my browser just keeps timing out and giving me errors. Does anybody
have this file they could send me, or know of a different location I can
download it from?

Thanks,
--jeff



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




struts-config.xml not loading - WL6.0 - urgent

2002-03-02 Thread Santhosh Kumar

Hi
I am using Weblogic 6.0. My problem is its not loading the action mapping at
the time of startup. I have kept struts-config.xml in web-inf and struts.jar
in classpath.
I have pasted down the console messages. Please let me know if any of you
have any clue. 
Thanks in advance
San

==
Mar 3, 2002 10:36:37 AM GMT+05:30 Info HTTP
[WebAppServletContext(5093971,applications/web)] action: init

Mar 3, 2002 10:36:37 AM GMT+05:30 Info HTTP
[WebAppServletContext(5093971,applications/web)] action: Initializing
configuration from resource path /WEB-INF/struts-config.xml

resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier

resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier

register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
'jar:file:/D:/Projects/sant/deploy/cma/applications/web/WEB-INF/lib/struts.j
ar!/org/apache/struts/resources/struts-config_1_0.dtd'

register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'jar:file:/D:/Projects/sant/deploy/cma/applications/web/WEB-INF/lib/struts.j
ar!/org/apache/struts/resources/web-app_2_2.dtd'

register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'jar:file:/D:/Projects/sant/deploy/cma/applications/web/WEB-INF/lib/struts.j
ar!/org/apache/struts/resources/web-app_2_3.dtd'

resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')
 Resolving to alternate DTD
'jar:file:/D:/Projects/sant/deploy/cma/applications/web/WEB-INF/lib/struts.j
ar!/org/apache/struts/reso
urces/web-app_2_2.dtd'

Call
org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.St
ring,*.action/java.lang.String)

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




Best way to deal with Form object String parameters into another bean?

2002-03-02 Thread Rick Reumann

I've just begun studying the struts examples and reading the
documentation and have waited a bit before I posted this question. I
am a newbie to struts but have done some searching and looking at
examples but still need some more help.

Before I begin it would be best if I ask my questions in the context
of a simple example. Lets say we have a simple Employee Administration
application where there might a form that allows you to enter or edit
employee information.

Now first off, it would seem likely using struts that I would have an
EmployeeForm object and then maybe two action objects such as
AddEmployee and EditEmployee (or possibly just one of them that can do
all the tasks).

Now it would seem like for most situations you would have an
EmployeeForm object and also an EmployeeBean. Now the question I have
is at what point would you transfer the info in the EmployeeForm
object to the EmployeeBean? Should this be done in the AddAction and
then the AddAction might call a method in the business tier of
doInsert( EmployeeBean employee )? Or do you possibly just pass all
the form parameters off to a doInsert() method as arguments and then
in the business tier doInsert() method do what you have to do with
them.

I'm having some trouble seeing how they manage this with the
SaveSubscriptionAction in the strut example. It looks like they are
using PropertyUtils.copyProperties(subscription, subform); to get the
information from the subform into a subscription object. (I admit I
haven't studied using this PropertyUtils objects so I'll have to look
into it). However, I'm still just generally confused about the best
way to get the values in my EmployeeForm object which are all Strings
into the correct format for being entered into a database.

Before looking into this struts framework, my controler servlet would
pass the request object off to the appropriate Action class which in
turn might hand the request object to another class method that would
create an EmployeeBean from the request object parameters. Than after
that EmployeeBean was returned the appropriate method in the business
logic tier was called such as businessTierObject.addEmployee(
employeeBean );

The validation abilities using FormObjects seem really powerful, yet
I'm still stuck on where to do all my casting and conversions of the
String request parameters into the proper data types (ie..birth date
as a String to birthDate as a java.util.Date, ss# as a String to an
int, etc).  I guess my basic question is where should this process
take place? Do you pass the whole Form object in the Action object off
to the business tier and let that level deal with creating the correct
format of the request parameters?

I'm sure this has all been brought up and/or answered many times so I
appreciate your patience. Is there a way I can search through past
posts to this mailing list?

Thanks for any help.


--

Rick

mailto:[EMAIL PROTECTED]

I can't stand cheap people. It makes me real mad when someone says
something like, 'Hey, when are you going to pay me that $100 you owe
me?' or 'Do you have that $50 you borrowed?' Man, quit being so
cheap!
  -Jack Handey


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




NullPointerException unsynchronize problem on select tag

2002-03-02 Thread Elijah Jacobs

Hi All,

I am using Struts 1.0 on Windows 2000 running Weblogic 5.x

There's a lot of code on the bottom so please bear with me.  I supplied the
code to give a clear understanding of what I'm doing. I promise to be
concise and to the point.

The page i am creating mypage.jsp displays fine initialy (w/0) submitting
the form.  But when I submit the form I get a NullPointerException and a
unsynchronized error.  In the my action class I have no logic other than to
return to my original page (mypage.jsp).  The problem is occuring because of
a select tag that I am using.

One of the ways I tried to solved the problem was to first use a Vector
instead of an ArrayList since a Vector is synchronize and ArrayLists are
not. This didn't get rid of the synch error.  Key word search for
synchronize and synchronize select at JGuru FAQ and struts-user Mail
Archive did not return me any listings of any help.

The way I am creating the select is at follows:

*** Begin of mypage.jsp
 bean:define name=myForm type=java.util.Vector id=bdMonth
property=bdMonth/
  html:select property=selectedBdMonth
   html:options collection=bdMonth property=idValue
labelProperty=displayValue/
  /html:select
*** End of mypage.jsp

*** Begin of MyForm.jsp
   private Vector bdMonth  = null;
private String selectedBdMonth  = null;

  // constructor
 public MyForm(){
  
  // BEGIN DATE
  bdMonth = new Vector();
  bdMonth.add(new OptionValues(01, jan));
  bdMonth.add(new OptionValues(02, feb));
  bdMonth.add(new OptionValues(03, mar));
  bdMonth.add(new OptionValues(04, apr));
  bdMonth.add(new OptionValues(05, may));
  bdMonth.add(new OptionValues(06, jun));
  bdMonth.add(new OptionValues(07, jul));
  bdMonth.add(new OptionValues(08, aug));
  bdMonth.add(new OptionValues(09, sep));
  bdMonth.add(new OptionValues(10, oct));
  bdMonth.add(new OptionValues(11, nov));
  bdMonth.add(new OptionValues(12, dec));
}
// inner class for storing select box values.
 public class OptionValues{

  private String idValue = null;
  private String displayValue = null;

  public OptionValues() {}
  public OptionValues(String idValue, String displayValue){
   this.idValue = idValue;
   this.displayValue = displayValue;
  }

  public String getDisplayValue() { return (this.displayValue); }
  public void setDisplayValue(String displayValue) { this.displayValue =
displayValue; }

  public String getIdValue() { return (this.idValue); }
  public void setIdValue(String idValue) { this.idValue = idValue; }
 }

*** End of MyForm.jsp



below is the error I get after submitting the form...

thanks in advanced,
- ej

 start of weblogic error *
java.lang.NullPointerException
at weblogic.utils.UnsyncHashtable.put(UnsyncHashtable.java, Compiled
Cod
e)
at
weblogic.servlet.jsp.PageContextImpl.setAttribute(PageContextImpl.jav
a, Compiled Code)
at
weblogic.servlet.jsp.PageContextImpl.setAttribute(PageContextImpl.jav
a:155)
at
org.apache.struts.taglib.bean.DefineTag.doStartTag(DefineTag.java:210
)
at jsp_servlet._cma.__auction._jspService(__auction.java, Compiled
Code)

at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:120)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
cherImpl.java:168)
at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.
java:2169)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:156
6)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:511)



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